/* General Styles */
:root {
    --primary-color: #4776E6;
    --primary-light: #e8f0ff;
    --primary-dark: #3264d0;
    --secondary-color: #FF5E62;
    --secondary-light: #fff5f5;
    --text-color: #333;
    --text-light: #6c757d;
    --bg-color: #f8f9fa;
    --border-radius: 14px;
    --card-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
    --gradient-primary: linear-gradient(135deg, #4776E6, #8E54E9);
    --gradient-secondary: linear-gradient(135deg, #FF5E62, #FF9966);
    --box-shadow-hover: 0 15px 35px rgba(71, 118, 230, 0.25);
    --box-shadow-light: 0 8px 20px rgba(0, 0, 0, 0.08);
    --round-button-radius: 50%;
    --circle-dimension: 50px;
}

body, html {
    background-color: #f7f9fc !important;
    color: #333 !important;
    font-family: 'Nunito', sans-serif;
    overflow-x: hidden;
    line-height: 1.6;
    height: 100vh;
}

/* YÜKLEME EKRANI STILLERİ */
#loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background-color: #f7f9fc;
    z-index: 10000;
    opacity: 1; /* Başlangıçta görünür */
    visibility: visible; /* Başlangıçta görünür */
    transition: opacity 0.5s ease, visibility 0s 0.5s; /* opacity için 0.5s, visibility için 0s gecikmeli 0.5s */
}

/* Yükleme ekranı gizlendiğinde */
.loading-hidden {
    opacity: 0 !important;
    pointer-events: none;
    visibility: hidden !important;
    transition-delay: 0s !important; /* Gizleme transition'ı hemen başlasın */
}

/* İçeriği başlangıçta gizle, JS ile göstereceğiz */
#content {
    opacity: 0;
    visibility: hidden;
    /* İçerik görünür olduğunda transition 0.5s gecikmeli başlasın,
       böylece yükleme ekranı kaybolduktan sonra içerik belirginleşir. */
    transition: opacity 0.5s ease, visibility 0s 0.5s;
}

/* İçerik görünür olduğunda */
.content-visible {
    opacity: 1 !important;
    visibility: visible !important;
    transition-delay: 0.5s !important; /* İçeriğin görünmesi için gecikme */
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: #aaa;
}

/* Wrapper */
.wrapper {
    display: flex;
    width: 100%;
    align-items: stretch;
    position: relative;
    min-height: 100vh;
}

/* Content */
#content {
    width: 100%;
    transition: var(--transition);
    margin-left: 0;
    background-color: #f7f9fc !important;
    background-image:
        radial-gradient(circle at 10% 20%, rgba(71, 118, 230, 0.07) 0%, transparent 25%),
        radial-gradient(circle at 90% 80%, rgba(142, 84, 233, 0.09) 0%, transparent 30%),
        linear-gradient(135deg, rgba(255, 255, 255, 0.9) 0%, rgba(240, 247, 255, 0.9) 100%);
    background-attachment: fixed;
    color: #333 !important;
    display: flex;
    flex-direction: column;
}


/* Kullanıcı bilgisinin yeni konumu (sağ üst) */
/* User Profile Component stilleri artık user_component/user-profile.css dosyasında */

.loading-spinner {
    width: 20px;
    height: 20px;
    border: 3px solid rgba(71, 118, 230, 0.2);
    border-top: 3px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-right: 10px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Background accents */
.accent-circle {
    position: fixed;
    border-radius: 50%;
    filter: blur(80px);
    z-index: -1;
    opacity: 0.6;
    animation: pulse 15s infinite alternate ease-in-out;
}

.accent-circle-1 {
    width: 500px;
    height: 500px;
    background: rgba(71, 118, 230, 0.15);
    top: -150px;
    right: -100px;
    animation-delay: 0s;
}

.accent-circle-2 {
    width: 450px;
    height: 450px;
    background: rgba(142, 84, 233, 0.12);
    bottom: -100px;
    left: -50px;
    animation-delay: 5s;
}

@keyframes pulse {
    0% {
        transform: scale(1);
        opacity: 0.5;
    }
    50% {
        transform: scale(1.1);
        opacity: 0.6;
    }
    100% {
        transform: scale(1);
        opacity: 0.5;
    }
}

/* Card styles */
.glass-card {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: var(--border-radius);
    transition: all 0.5s cubic-bezier(0.165, 0.84, 0.44, 1);
    border: 1px solid rgba(255, 255, 255, 0.5);
    overflow: hidden;
    box-shadow:
        0 10px 25px rgba(0, 0, 0, 0.08),
        0 0 0 1px rgba(255, 255, 255, 0.2) inset;
}

.glass-card:hover {
    box-shadow:
        0 15px 35px rgba(71, 118, 230, 0.2),
        0 0 0 1px rgba(255, 255, 255, 0.3) inset;
    transform: translateY(-8px);
}

/* Timer Icon */
.timer-icon {
    width: 90px;
    height: 90px;
    background: var(--gradient-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 25px;
    color: white;
    font-size: 36px;
    box-shadow:
        0 10px 25px rgba(71, 118, 230, 0.35),
        0 0 0 10px rgba(71, 118, 230, 0.1);
    position: relative;
    transition: all 0.3s ease;
    animation: float 3s infinite ease-in-out;
}

@keyframes float {
    0% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-10px);
    }
    100% {
        transform: translateY(0px);
    }
}

/* Timer Section */
.timer-section {
    background: white;
    border-radius: var(--border-radius);
    padding: 35px;
    margin-top: 20px;
    box-shadow: var(--box-shadow-light);
    text-align: center;
    border: 1px solid rgba(240, 240, 240, 0.8);
    transition: all 0.3s ease;
}

.timer-section:hover {
    box-shadow: 0 12px 30px rgba(71, 118, 230, 0.15);
}

/* Timer Controls */
.timer-controls {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-bottom: 30px;
}

.timer-button {
    padding: 14px 28px;
    border: none;
    border-radius: 12px;
    background: var(--primary-light);
    color: var(--text-color);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden;
}

.timer-button.active {
    background: var(--gradient-primary);
    color: white;
    box-shadow: 0 6px 15px rgba(71, 118, 230, 0.3);
}

.timer-button:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.1);
}

.timer-button:before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(120deg, rgba(255,255,255,0) 30%, rgba(255,255,255,0.5), rgba(255,255,255,0) 70%);
    transform: translateX(-100%);
    transition: 0.6s;
}

.timer-button:hover:before {
    transform: translateX(100%);
}

/* Timer Display */
.timer {
    font-size: 7rem;
    font-weight: 700;
    color: var(--text-color);
    margin: 15px 0 35px;
    text-shadow: 0 3px 8px rgba(0, 0, 0, 0.08);
    letter-spacing: -3px;
    line-height: 1;
    background: linear-gradient(135deg, #333, #555);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    transition: all 0.3s ease;
}

/* Timer Actions */
.timer-actions {
    display: flex;
    justify-content: center;
    gap: 18px;
    flex-wrap: wrap;
}

.timer-btn {
    padding: 14px 28px;
    border-radius: 12px;
    font-weight: 600;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    font-size: 1.05rem;
    position: relative;
    overflow: hidden;
}

.timer-btn:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
}

.timer-btn:before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(120deg, rgba(255,255,255,0) 30%, rgba(255,255,255,0.5), rgba(255,255,255,0) 70%);
    transform: translateX(-100%);
    transition: 0.6s;
}

.timer-btn:hover:before {
    transform: translateX(100%);
}

.btn-primary {
    background: var(--gradient-primary);
    border: none;
    box-shadow: 0 5px 15px rgba(71, 118, 230, 0.2);
}

.btn-danger {
    background: linear-gradient(135deg, #FF5E62, #FF416C);
    border: none;
    box-shadow: 0 5px 15px rgba(255, 94, 98, 0.25);
}

.settings-btn {
    background: transparent;
    border: 1px solid var(--primary-color);
}

/* Stats Section */
.stats-section {
    padding: 25px 0;
}

.stat-card {
    background: white;
    border-radius: var(--border-radius);
    padding: 24px;
    display: flex;
    align-items: center;
    box-shadow: var(--box-shadow-light);
    height: 100%;
    transition: all 0.3s cubic-bezier(0.165, 0.84, 0.44, 1);
    border: 1px solid rgba(240, 240, 240, 0.8);
}

.stat-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.12);
    border-color: rgba(71, 118, 230, 0.15);
}

.stat-icon {
    width: 56px;
    height: 56px;
    background: var(--primary-light);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 18px;
    color: var(--primary-color);
    font-size: 26px;
    transition: all 0.3s ease;
}

.stat-card:hover .stat-icon {
    background: var(--gradient-primary);
    color: white;
    box-shadow: 0 5px 15px rgba(71, 118, 230, 0.25);
    transform: scale(1.1);
}

.stat-info h3 {
    font-size: 26px;
    font-weight: 800;
    margin-bottom: 5px;
    color: var(--text-color);
}

.stat-info p {
    font-size: 14px;
    color: var(--text-light);
    margin: 0;
    font-weight: 500;
}

/* Info Section */
.info-section {
    padding: 20px 0;
}

.info-card {
    background: white;
    border-radius: var(--border-radius);
    padding: 30px;
    box-shadow: var(--box-shadow-light);
    border: 1px solid rgba(240, 240, 240, 0.8);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.info-card:hover {
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

.info-card::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 150px;
    height: 150px;
    background: linear-gradient(135deg, transparent 45%, rgba(71, 118, 230, 0.05) 75%);
    z-index: 1;
    border-radius: 0 0 0 100%;
    pointer-events: none;
}

.info-card p {
    font-size: 1.05rem;
    line-height: 1.6;
    color: var(--text-color);
    position: relative;
    z-index: 2;
}

.step-card {
    background: var(--primary-light);
    border-radius: var(--border-radius);
    padding: 25px;
    text-align: center;
    box-shadow: var(--box-shadow-light);
    height: 100%;
    transition: all 0.3s cubic-bezier(0.165, 0.84, 0.44, 1);
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(240, 240, 240, 0.8);
}

.step-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.12);
    background: white;
}

.step-number {
    width: 40px;
    height: 40px;
    background: var(--gradient-primary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 18px;
    font-weight: 700;
    font-size: 18px;
    box-shadow: 0 5px 15px rgba(71, 118, 230, 0.25);
    transition: all 0.3s ease;
}

.step-card:hover .step-number {
    transform: scale(1.15);
}

.step-card h5 {
    font-weight: 700;
    margin-bottom: 12px;
    color: var(--text-color);
    font-size: 1.2rem;
}

.step-card p {
    color: var(--text-light);
    margin: 0;
    font-weight: 500;
}

/* Settings Modal - Enhanced */
.modal-content {
    border-radius: var(--border-radius);
    border: none;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    overflow: hidden;
}

.modal-header {
    border-bottom: 1px solid rgba(71, 118, 230, 0.1);
    padding: 20px 25px;
    background: var(--primary-light);
}

.modal-title {
    font-weight: 700;
    color: var(--primary-color);
    font-size: 1.25rem;
    display: flex;
    align-items: center;
}

.modal-title i {
    margin-right: 10px;
    background: var(--primary-color);
    color: white;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 3px 10px rgba(71, 118, 230, 0.2);
}

.modal-body {
    padding: 25px;
}

.modal-footer {
    border-top: 1px solid rgba(71, 118, 230, 0.1);
    padding: 15px 25px;
}

.setting-item {
    margin-bottom: 25px;
    position: relative;
}

.setting-item:last-child {
    margin-bottom: 0;
}

.setting-item label {
    font-weight: 600;
    margin-bottom: 10px;
    display: block;
    color: var(--text-color);
    font-size: 0.95rem;
}

.setting-item input[type="number"] {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: white;
    color: var(--text-color);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.03);
}

.setting-item input[type="number"]:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(71, 118, 230, 0.1);
    outline: none;
}

.form-select {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background-color: white;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.03);
    cursor: pointer;
}

.form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(71, 118, 230, 0.1);
    outline: none;
}

.volume-control-container {
    position: relative;
}

input[type="range"] {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    width: 100%;
    height: 6px;
    border-radius: 5px;
    background: #e0e0e0;
    outline: none;
    margin: 10px 0;
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--primary-color);
    cursor: pointer;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
}

input[type="range"]::-webkit-slider-thumb:hover {
    transform: scale(1.2);
    background: var(--primary-dark);
}

.form-check-input {
    width: 1.2em;
    height: 1.2em;
    margin-top: 0.15em;
    margin-right: 10px;
    background-color: white;
    border: 1px solid #ccc;
    transition: all 0.3s ease;
}

.form-check-input:checked {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.form-check-label {
    font-weight: 500;
}

.form-switch .form-check-input {
    width: 2.5em;
    height: 1.25em;
    border-radius: 2em;
}

.btn-secondary {
    background-color: #6c757d;
    border: none;
}

.btn-primary {
    background: var(--gradient-primary);
    border: none;
    box-shadow: 0 5px 15px rgba(71, 118, 230, 0.2);
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(71, 118, 230, 0.3);
}

/* Media Queries */
@media (max-width: 991.98px) {
    .timer {
        font-size: 5rem;
    }

    .timer-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .timer-btn {
        margin-bottom: 10px;
    }

    .modal-content {
        width: 90%;
        margin: 0 auto;
    }

    .stat-card {
        padding: 15px;
        margin-bottom: 15px;
    }

    .step-card {
        margin-bottom: 15px;
    }
}

@media (max-width: 767.98px) {
    .timer-controls {
        flex-wrap: wrap;
    }

    .timer-button {
        flex: 1 0 30%;
        padding: 10px;
        font-size: 0.9rem;
    }

    .timer {
        font-size: 3.5rem;
    }

    .stat-card {
        flex-direction: column;
        text-align: center;
    }

    .stat-icon {
        margin: 0 auto 10px;
    }

    .modal-dialog {
        margin: 10px;
    }

    .setting-item input[type="number"] {
        font-size: 14px;
    }
}

@media (max-width: 575.98px) {
    .timer {
        font-size: 3rem;
    }
}

/* Fix for iOS Safari buttons */
button {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

/* Timer Progress Container */
.timer-progress-container {
    height: 8px;
    background-color: rgba(71, 118, 230, 0.1);
    border-radius: 4px;
    margin: 0 auto 20px;
    width: 80%;
    overflow: hidden;
    position: relative;
}

.timer-progress {
    height: 100%;
    width: 0%;
    background: var(--gradient-primary);
    border-radius: 4px;
    transition: width 1s linear;
}

/* Timer Mode Indicator */
.timer-mode-indicator {
    font-size: 1.2rem;
    color: var(--text-light);
    margin-bottom: 25px;
    font-weight: 500;
    position: relative;
    display: inline-block;
}

.timer-mode-indicator::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 30px;
    height: 3px;
    background: var(--gradient-primary);
    border-radius: 3px;
}

/* Sol Üst Geri Butonu Stili */
.back-button {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    padding: 0;
    box-shadow: 0 4px 10px rgba(220, 53, 69, 0.2);
    transition: all 0.3s ease;
}

.back-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(220, 53, 69, 0.3);
}