 /* --- Tasarım Ayarları --- */
        :root {
            --primary-red: #ff3b5c;
            --primary-gold: #ffd700;
            --bg-dark: #121212;
            --glass-bg: rgba(28, 28, 30, 0.90);
            --text-main: #ffffff;
            --text-muted: #a0a0a0;
        }
html {
    box-sizing: border-box;
    -webkit-text-size-adjust: 100%; /* Safari/Chrome font büyütme hatasını engeller */
}

*, *:before, *:after {
    box-sizing: inherit;
}
       body {
    margin: 0; 
    padding: 0;
    font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    background: url('https://images.unsplash.com/photo-1518176258769-f227c798150e?q=80&w=2670&auto=format&fit=crop') no-repeat center center fixed;
    background-size: cover;
    color: var(--text-main);
    
    /* --- GÜNCEL MOBİL VE EKRAN AYARLARI --- */
    min-height: 100vh; /* Standart ekranlar için */
    min-height: -webkit-fill-available; /* iOS Safari boyutu hatası için */
    
    /* iPhone çentiği ve alt barı için güvenli boşluklar */
    padding-top: env(safe-area-inset-top);
    padding-bottom: env(safe-area-inset-bottom);
    padding-left: env(safe-area-inset-left);
    padding-right: env(safe-area-inset-right);

    display: flex;
    flex-direction: column;
    align-items: center;
    
    /* Taşmaları engelle ama kaydırmaya izin ver (Mobilde içerik uzarsa diye) */
    overflow-x: hidden; 
    overflow-y: auto; 
    
    transition: background 0.5s ease-in-out;
    position: relative; /* Before katmanı için gerekli */
}

body::before {
    content: ''; 
    position: fixed; 
    top: 0; left: 0; right: 0; bottom: 0;
    /* Kenarlar %85 karartma (0.85), merkez %45 karartma (0.45) */
    background: radial-gradient(circle, rgba(0,0,0,0.45) 0%, rgba(0,0,0,0.85) 100%);
    z-index: -1;
}

        /* --- HEADER --- */
        header {
            width: 100%;
            padding: 10px 40px;
            display: flex;
            justify-content: space-between;
            align-items: center;
            box-sizing: border-box;
            background: rgba(0,0,0,0.3);
            backdrop-filter: blur(10px);
            z-index: 1000;
            border-bottom: 1px solid rgba(255,255,255,0.05);
            flex-shrink: 0; 
        }

        .header-left { display: flex; align-items: center; gap: 25px; }
        .logo { font-weight: 700; font-size: 1.4rem; letter-spacing: 2px; color: #fff; display: flex; align-items: center; }
        .logo i { color: var(--primary-red); margin-right: 10px; font-size: 1.2rem; }

        .streak-badge-header {
            background: rgba(255, 59, 92, 0.15);
            border: 1px solid rgba(255, 59, 92, 0.5);
            padding: 6px 15px; border-radius: 20px;
            display: flex; align-items: center; gap: 8px;
            color: #fff; transition: 0.3s;
        }
        .streak-badge-header:hover { background: rgba(255, 59, 92, 0.25); }
        .streak-badge-header i { color: var(--primary-red); font-size: 0.9rem; }
        .streak-text { font-weight: 600; font-size: 0.85rem; letter-spacing: 0.5px; }

        .header-actions { display: flex; gap: 10px; }
        .nav-btn {
            background: rgba(255,255,255,0.1); color: #fff;
            border: 1px solid rgba(255,255,255,0.2);
            padding: 8px 20px; border-radius: 20px;
            cursor: pointer; transition: 0.3s;
            display: flex; align-items: center; gap: 8px; font-size: 0.9rem;
        }
        .nav-btn:hover { background: var(--primary-red); border-color: var(--primary-red); }

       

        /* --- SOL PANEL --- */
        .timer-section {
            display: flex; flex-direction: column; align-items: center; justify-content: center; position: relative;
        }

        .task-input-container {
            position: absolute; top: 0; width: 90%;
            display: flex; flex-direction: column; gap: 10px; z-index: 10;
        }

        .task-input-wrapper {
    /* Saf beyaz yerine şeffaf beyaz ve blur efekti */
    background: rgba(255, 255, 255, 0.1) !important;
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border-radius: 50px;
    display: flex; 
    align-items: center; 
    padding: 5px 10px 5px 25px;
    /* Daha derin ve asil bir gölge */
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
    border: 1px solid rgba(255, 255, 255, 0.15);
    transition: all 0.3s ease;
}

.task-input-wrapper:focus-within { 
    transform: scale(1.02); 
    border-color: var(--primary-red);
    box-shadow: 0 8px 32px 0 rgba(255, 59, 92, 0.2);
}

/* Giriş metnini beyaz yaparak okunurluğu artırıyoruz */
.task-input {
    width: 100%; 
    padding: 15px 0; 
    border: none; 
    outline: none;
    background: transparent; 
    font-size: 1.1rem; 
    font-weight: 500; 
    color: #ffffff !important; /* Yazı rengi beyaz */
}

/* Placeholder (ipucu yazısı) rengini yumuşat */
.task-input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

/* Sol taraftaki ders seçme kutusunu cam temasına uyarla */
.subject-select {
    padding: 5px 15px; 
    border-radius: 15px; 
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.15); 
    color: #fff; 
    font-weight: 600;
    margin-right: 10px; 
    cursor: pointer; 
    outline: none;
    transition: 0.3s;
}

.subject-select:hover {
    background: rgba(255, 255, 255, 0.25);
}

/* Seçeneklerin içindeki metin renklerini düzelt (Tarayıcı uyumu için) */
.subject-select option {
    background: #1c1c1e;
    color: #fff;
}
        .add-btn {
            background: var(--primary-red); color: white;
            width: 45px; height: 45px; border-radius: 50%;
            display: flex; align-items: center; justify-content: center;
            cursor: pointer; transition: 0.3s; margin-left: auto;
            box-shadow: 0 4px 10px rgba(255, 59, 92, 0.4); flex-shrink: 0;
        }
        .add-btn:hover { transform: scale(1.1); background: #ff1f45; }

        .task-input {
            width: 100%; padding: 15px 0; border: none; outline: none;
            background: transparent; font-size: 1.1rem; font-weight: 600; color: #333;
        }

        .timer-circle { position: relative; width: 320px; height: 320px; margin-top: 60px; }
        
        @keyframes rotateRing {
            from { transform: rotate(-90deg); }
            to { transform: rotate(270deg); }
        }
        
        svg { transform: rotate(-90deg); width: 100%; height: 100%; }
        
        .timer-circle.active-timer svg {
            animation: rotateRing 60s linear infinite; 
        }

        circle { fill: none; stroke-width: 35; stroke-linecap: butt; }
        .circle-bg { stroke: rgba(255, 255, 255, 0.08); stroke-dasharray: 4 10; }
        
        .circle-progress {
    stroke: var(--primary-red); 
    stroke-dasharray: 4 10; 
    stroke-dashoffset: 0;
    /* BU SATIRI EKLE: Saniyeler arası yumuşak akış sağlar */
    transition: stroke-dashoffset 1s linear, stroke 0.3s ease; 
    filter: drop-shadow(0 0 10px var(--primary-red));
}

       .timer-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 4.8rem; /* Burayı butonlara bastığınızdaki değerle aynı yapın */
    font-weight: 200;
    letter-spacing: -2px;
    font-family: 'Inter', sans-serif;
    color: #fff;
    pointer-events: none;
    transition: all 0.3s ease; /* Boyut değişimleri olursa yumuşak geçiş sağlar */
    text-shadow: 0 0 20px rgba(255, 255, 255, 0.2);
}
        
        .active-subject-badge {
            position: absolute; top: 75%; left: 50%; transform: translate(-50%, -50%);
            font-size: 1rem; padding: 5px 15px; border-radius: 10px;
            background: rgba(255,255,255,0.1); color: #ccc;
        }

        .controls-area { margin-top: 30px; display: flex; flex-direction: column; align-items: center; gap: 15px; }
        .main-btns { display: flex; gap: 15px; }

        .btn {
            padding: 12px 40px; border-radius: 30px; border: none; cursor: pointer;
            font-size: 1rem; font-weight: 700; transition: all 0.3s ease;
        }
        .btn-primary { background: #fff; color: #333; }
        .btn-primary:hover { transform: scale(1.05); box-shadow: 0 0 20px rgba(255,255,255,0.3); }
        .btn-secondary { background: transparent; border: 2px solid rgba(255,255,255,0.3); color: #fff; }
        .btn-secondary:hover { border-color: #fff; background: rgba(255,255,255,0.1); }

        .btn-save {
            background: linear-gradient(45deg, #4CAF50, #45a049); color: white;
            box-shadow: 0 4px 15px rgba(76, 175, 80, 0.4);
        }
        .btn-save:hover {
    box-shadow: 0 0 15px rgba(76, 175, 80, 0.6);
}
        .duration-selector { display: flex; background: rgba(0,0,0,0.5); border-radius: 20px; padding: 5px; gap: 5px; }
        .duration-btn {
            background: transparent; border: none; color: var(--text-muted);
            padding: 10px 20px; border-radius: 15px; cursor: pointer; font-size: 0.9rem; transition: 0.3s;
        }
/* Aktif buton her zaman beyaz metin ve belirgin arka plan olsun */
.duration-btn.active {
    background: var(--primary-red) !important;
    color: #fff !important;
    font-weight: bold;
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.5);
}        .duration-btn:hover:not(.active) { color: #fff; }

.btn {
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden;
}

.btn:active {
    transform: scale(0.92);
}

.btn::after {
    content: '';
    position: absolute;
    top: 50%; left: 50%;
    width: 0; height: 0;
    background: rgba(255,255,255,0.2);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.3s, height 0.3s;
}

.btn:hover::after {
    width: 200%; height: 200%;
}
        /* --- SAĞ PANEL --- */
        .sidebar { 
            display: flex; 
            flex-direction: column; 
            gap: 20px; 
            height: 100%; 
            overflow: hidden; 
        }

        .glass-card {
            background: var(--glass-bg); backdrop-filter: blur(30px);
            -webkit-backdrop-filter: blur(30px);
            border-radius: 20px; padding: 25px;
            border: 1px solid rgba(255,255,255,0.08);
            box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
            display: flex; flex-direction: column;
            flex-shrink: 0;
        }

        .section-title {
            font-size: 0.85rem; color: var(--text-muted); margin-bottom: 15px;
            text-transform: uppercase; letter-spacing: 1.5px; display: flex; align-items: center;
        }
        .section-title::before {
            content: ''; display: inline-block; width: 4px; height: 14px;
            background: var(--primary-red); margin-right: 10px; border-radius: 2px;
        }

        .big-stat { font-size: 3.5rem; font-weight: 700; line-height: 1; }
        .big-stat span { font-size: 1.2rem; font-weight: 400; color: var(--text-muted); margin-left: 5px; }

        .badges-grid { display: flex; gap: 15px; justify-content: space-around; flex-wrap: wrap; }
        .badge-item { 
            display: flex; flex-direction: column; align-items: center; 
            opacity: 0.3; transition: 0.5s; position: relative; cursor: pointer;
        }
        .badge-item.unlocked { opacity: 1; transform: scale(1.1); }
        .badge-icon { font-size: 2rem; color: var(--primary-gold); margin-bottom: 5px; }
        .badge-item:not(.unlocked):hover::after {
            content: "Kilitli"; position: absolute; bottom: -20px;
            font-size: 0.8rem; color: var(--primary-red); font-weight: bold; white-space: nowrap;
        }

        .task-list-card {
            display: flex;
            flex-direction: column;
            flex: 1; 
            min-height: 0; 
            overflow: hidden; 
        }

        .task-list { 
            display: flex; 
            flex-direction: column; 
            gap: 10px; 
            overflow-y: auto; 
            flex: 1; 
            min-height: 0;
            padding-right: 5px;
            padding-bottom: 5px;
        }
        /* Kaydırma Çubuğu Tasarımı */
        .task-list::-webkit-scrollbar { width: 6px; }
        .task-list::-webkit-scrollbar-thumb { background: #444; border-radius: 3px; }
        .task-list::-webkit-scrollbar-track { background: rgba(255,255,255,0.05); }

        .empty-state { color: var(--text-muted); font-style: italic; font-size: 0.9rem; text-align: center; margin-top: 20px; }

        .task-item {
            display: flex; align-items: center; justify-content: space-between;
            background: rgba(255,255,255,0.08); padding: 15px; border-radius: 12px; transition: 0.3s;
            cursor: pointer; animation: fadeIn 0.5s ease; border-left: 4px solid transparent;
            flex-shrink: 0; 
        }
        .task-item:hover { background: rgba(255,255,255,0.15); }
        .task-left-content { display: flex; align-items: center; }

        .check-circle {
            width: 24px; height: 24px; border-radius: 50%; border: 2px solid var(--text-muted);
            margin-right: 15px; display: flex; align-items: center; justify-content: center; transition: 0.2s;
        }
        .task-item.completed .check-circle { background: #4CAF50; border-color: #4CAF50; }
        .check-circle i { display: none; color: white; font-size: 14px; }
        .task-item.completed .check-circle i { display: block; }

        .task-info h4 { margin: 0; font-size: 1rem; font-weight: 500; transition: 0.2s; color: #fff; }
        .task-item.completed .task-info h4 { text-decoration: line-through; color: var(--text-muted); }

        .task-subject-tag {
            font-size: 0.7rem; padding: 2px 8px; border-radius: 6px; 
            margin-left: 10px; color: #fff; font-weight: bold; text-shadow: 0 1px 2px rgba(0,0,0,0.5);
        }

        .task-actions { display: flex; gap: 8px; }
        .delete-btn, .edit-btn {
            opacity: 0.5; padding: 5px; transition: 0.3s; cursor: pointer;
            display: flex; align-items: center; justify-content: center;
        }
        .delete-btn { color: #ff3b5c; }
        .edit-btn { color: #ffd700; }
        .delete-btn:hover, .edit-btn:hover { opacity: 1; transform: scale(1.2); }

        @keyframes fadeIn { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: translateY(0); } }
        
        /* --- MODAL STİLLERİ --- */
        .modal {
            position: fixed; top: 0; left: 0; width: 100%; height: 100%;
            background: rgba(0,0,0,0.85); backdrop-filter: blur(10px);
            z-index: 2000; display: none; justify-content: center; align-items: center;
        }
        .modal-content {
            width: 80%; max-width: 900px; max-height: 80vh; overflow-y: auto;
            background: #1c1c1e; border-radius: 20px;
            border: 1px solid rgba(255,255,255,0.1);
            display: flex; flex-direction: column; padding: 30px;
            box-shadow: 0 0 50px rgba(0,0,0,0.5); animation: fadeIn 0.3s ease;
        }
        .modal-header {
            display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px;
            border-bottom: 1px solid rgba(255,255,255,0.1); padding-bottom: 15px;
        }
        .close-modal { color: #fff; font-size: 1.5rem; cursor: pointer; transition: 0.2s; }
        .close-modal:hover { color: var(--primary-red); }

        .subject-form { display: flex; gap: 10px; margin-bottom: 20px; align-items: center; }
        .subject-input { padding: 10px; border-radius: 10px; border:none; flex-grow: 1; }
        .color-input { width: 50px; height: 40px; border: none; border-radius: 10px; cursor: pointer; padding: 0; background: none; }
        .subject-list { display: flex; flex-direction: column; gap: 10px; overflow-y: auto; }
        .subject-item { 
            display: flex; justify-content: space-between; align-items: center;
            background: rgba(255,255,255,0.05); padding: 10px 20px; border-radius: 10px;
        }
        .subject-color-dot { width: 15px; height: 15px; border-radius: 50%; display: inline-block; margin-right: 10px; }

        .filters { display: flex; gap: 15px; margin-bottom: 20px; }
        .filter-select, .week-btn {
            padding: 10px 15px; background: rgba(255,255,255,0.1); border: 1px solid rgba(255,255,255,0.1);
            color: white; border-radius: 10px; cursor: pointer; font-family: inherit;
        }
        .week-btn.active { background: var(--primary-red); border-color: var(--primary-red); }
        .chart-container { flex-grow: 1; position: relative; margin-bottom: 20px; min-height: 250px; }
        .details-list {
            height: 150px; overflow-y: auto;
            border-top: 1px solid rgba(255,255,255,0.1); padding-top: 15px;
        }
        .stat-row {
            display: flex; justify-content: space-between; padding: 10px;
            border-bottom: 1px solid rgba(255,255,255,0.05); color: #ccc;
        }
        .stat-row:hover { background: rgba(255,255,255,0.05); }

        .theme-grid {
            display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 20px;
        }
        .theme-option {
            height: 100px; border-radius: 15px; cursor: pointer;
            background-size: cover; background-position: center;
            border: 2px solid transparent; transition: 0.3s; position: relative;
        }
        .theme-option:hover { transform: scale(1.05); }
        .theme-option.active-theme { border-color: var(--primary-gold); box-shadow: 0 0 15px var(--primary-gold); }
        .theme-name {
            position: absolute; bottom: 0; left: 0; right: 0;
            background: rgba(0,0,0,0.6); color: #fff;
            font-size: 0.8rem; padding: 5px; text-align: center;
            border-bottom-left-radius: 13px; border-bottom-right-radius: 13px;
        }

        .data-options-container { display: flex; flex-direction: column; gap: 20px; align-items: center; justify-content: center; flex-grow: 1; }
        .data-card {
            background: rgba(255,255,255,0.05); padding: 30px; border-radius: 20px;
            width: 80%; max-width: 500px; text-align: center; transition: 0.3s;
            border: 1px solid rgba(255,255,255,0.05);
        }
        .data-card:hover { background: rgba(255,255,255,0.1); border-color: rgba(255,255,255,0.2); }
        .data-card h3 { color: var(--primary-gold); margin-top:0; }
        .data-card p { color: var(--text-muted); font-size: 0.9rem; margin-bottom: 20px; }

       /* Sidebar Kart İçeriği Düzenlemesi */
.stats-row-container {
    display: flex !important;
    flex-direction: row !important; /* Kesinlikle yan yana */
    justify-content: space-between !important;
    align-items: flex-end !important;
    width: 100% !important;
    padding: 5px 0;
}

.stat-group {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center; /* Başlık ve sayıyı ortala */
}

/* --- PROFESYONEL MOBİL VE RESPONSIVE TASARIM GÜNCELLEMESİ --- */

/* Genel Masaüstü İyileştirmeleri */
.version-tag { font-size: 0.7rem; opacity: 0.7; margin-left: 5px; }
.mobile-menu-btn { display: none; background: none; border: none; color: white; font-size: 1.6rem; cursor: pointer; padding: 5px; z-index: 2001; transition: 0.3s; }

/* Mobilde SVG dairesinin oranını koruması için gerekli */
.timer-circle svg { width: 100%; height: 100%; }

@media (max-width: 992px) {
    /* Timer ve butonlar için dikey alanı sabitle */
    .timer-section {
        min-height: 500px; 
        justify-content: flex-start !important;
        padding-top: 20px;
        transition: all 0.4s ease; /* Yumuşak geçiş için */
    }

    /* Input'un olduğu kutuya odaklanıldığında (Klavye açıldığında) */
    .task-input-container:focus-within + .timer-circle {
        transform: scale(0.75); /* Timer'ı %25 küçült */
        margin-top: -10px; /* Yukarı çekerek alan kazan */
        opacity: 0.8; /* Biraz şeffaflaştırarak odağı inputa ver */
    }

    /* Timer dairesinin küçülürken bozulmaması için geçiş efekti */
    .timer-circle {
        transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    }

    
    /* 1. Sayfa Akışı ve Kaydırma */
    body { 
        height: auto !important; 
        overflow-y: auto !important; 
        overflow-x: hidden; 
    }
    /* İstatistik Modalı Mobil Düzenleme */
#statsModal .modal-content {
    width: 96% !important;
    padding: 15px !important;
}


/* Grafik Kapsayıcısı: Mobilde daha kareye yakın, masaüstünde yatay */
.chart-container {
    position: relative;
    width: 100% !important;
    height: 300px !important; /* Mobilde grafiği biraz uzatıyoruz */
    margin-bottom: 30px !important;
}

/* Filtre butonlarını mobilde yan yana sığdır */
.filters {
    flex-wrap: wrap;
    gap: 8px !important;
    justify-content: center;
}

.filter-select, .week-btn {
    padding: 8px 10px !important;
    font-size: 0.8rem !important;
    flex: 1; /* Butonların eşit dağılmasını sağlar */
    min-width: 80px;
}

/* Detay listesini mobilde daha okunur yap */
.details-list {
    height: auto !important; /* Liste uzadıkça modal kaydırılsın */
    max-height: 200px;
}

.stat-row {
    padding: 12px 5px !important;
    font-size: 0.85rem;
}

    /* 2. Header & Hamburger Menü */
    header { 
        padding: 12px 20px !important; 
        position: sticky; 
        top: 0; 
        width: 100%;
    }
    .mobile-menu-btn { display: block; }
    .header-left { gap: 12px; }
    
    .header-actions {
        display: none; 
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: rgba(18, 18, 18, 0.98);
        backdrop-filter: blur(25px);
        -webkit-backdrop-filter: blur(25px);
        padding: 25px;
        gap: 15px;
        border-bottom: 1px solid rgba(255,255,255,0.1);
        z-index: 2000;
        box-shadow: 0 20px 40px rgba(0,0,0,0.8);
        animation: fadeIn 0.3s ease;
    }

    .header-actions.active { display: flex; }

    .nav-btn {
        width: 100%;
        justify-content: center;
        padding: 16px;
        font-size: 1rem;
        background: rgba(255,255,255,0.08);
        border: 1px solid rgba(255,255,255,0.1);
        border-radius: 12px;
    }
   
.timer-circle {
    position: relative;
    width: 320px; /* Üstteki değerle aynı yaparak tutarlılık sağlayın */
    height: 320px;
    max-width: 80vw;
    max-height: 80vw;
    margin: 40px auto;
}
    /* 4. Timer (Zamanlayıcı) Düzenlemesi */
    .timer-section {
        min-height: auto;
        padding: 20px 0;
    }

    .task-input-container {
        position: relative; /* Sabit pozisyondan kurtar */
        width: 100%;
        margin-bottom: 20px;
    }

@media (max-width: 992px) {
    .app-container {
        grid-template-columns: 1fr;
        width: 92%;
        margin-top: 10px;
        overflow-y: visible;
    }

    header {
        padding: 10px 20px;
    }

 .timer-circle {
    /* Ekran yüksekliği çok küçükse daireyi otomatik küçültür */
    width: min(320px, 40vh); 
    height: min(320px, 40vh);
    margin: 20px 0;
}

.timer-text {
    /* Fontu da dikey yüksekliğe (vh) bağlayalım */
    font-size: min(4.8rem, 12vh) !important;
}
}
    .active-subject-badge { font-size: 0.9rem; top: 80%; }

    /* 5. Kontrol Butonları ve Süre Seçici */
    .btn { padding: 12px 30px; font-size: 0.95rem; }
    .duration-selector {
        display: grid;
        grid-template-columns: 1fr 1fr;
        width: 100%;
        max-width: 300px;
    }
    .duration-btn { padding: 8px 15px; flex: 1 1 40%; }

    
    .keyboard-active .timer-circle {
    transform: scale(0.6);
    margin-top: -30px;
    opacity: 0.5;
}

    /* 6. Sidebar ve Kartlar */
    .sidebar { 
        height: auto !important; 
        overflow: visible !important; 
        gap: 20px;
    }

    .glass-card { padding: 20px; }
    


    .stat-group .big-stat { font-size: 2.2rem !important; }
    .stat-group .section-title { font-size: 0.8rem; }
    .stat-divider { height: 35px; margin: 0 5px; }

    .badges-grid { gap: 20px; }
    .badge-icon { font-size: 1.8rem; }

    .task-list { max-height: 400px; }

    /* 7. Modallar */
    .modal-content {
        width: 95%;
        padding: 20px;
        max-height: 90vh;
    }
    .subject-form { flex-direction: column; }
    .subject-input { width: 100%; box-sizing: border-box; }
}
.timer-section {
    flex: 1.6; /* Grid'deki 1.6fr karşılığı */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center; /* Timer'ı dikeyde tam ortalar */
    height: 100%;
}

/* Zamanlayıcı dairesi tıklamaları arka plana geçirmeli */
.timer-circle {
    pointer-events: none; 
    position: relative;
}

/* Butonların olduğu alanlar mutlaka tıklanabilir olmalı */
.controls-area, .task-input-container {
    pointer-events: auto !important;
}

.btn, .duration-btn, .subject-select {
    cursor: pointer !important;
}
/* --- GÜNCEL VE SABİT ANA KAPSAYICI --- */
.app-container {
    display: grid;
    grid-template-columns: 1.6fr 1fr;
    width: 95%;
    max-width: 1400px;
    gap: 25px; /* Boşluğu biraz daraltmak alan kazandırır */
    margin: 10px auto;
    align-items: center;

    /* KRİTİK DEĞİŞİKLİK */
    height: calc(100vh - 80px); /* Ekranın %100'ünden header'ı çıkar */
    max-height: 850px; /* Çok büyük ekranlarda devasa olmasın */
    overflow: hidden; /* Dışarı taşmayı engelle */
}

/* Mobilde (Telefonlarda) tek sütuna dönmesi için bu kısmı da ekle/güncelle */
@media (max-width: 992px) {
    .app-container {
        grid-template-columns: 1fr;
        height: auto; /* Mobilde dikey ekran olduğu için kaymaya izin verilmeli */
        overflow: visible;
    }
}

/* Sidebar'ın içeriğini dikeyde hizala */
.sidebar {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 15px;
    height: 100%; /* Konteynıra sadık kal */
    overflow: hidden;
}

/* Görev listesi kartı ekranın geri kalanını kaplasın ve sadece o kaysın */
.task-list-card {
    flex: 1; 
    display: flex;
    flex-direction: column;
    min-height: 0; /* Flexbox içinde scroll'un çalışması için kritik */
}

.task-list {
    flex: 1;
    overflow-y: auto; /* Sadece burası kayabilir */
    padding-right: 8px;
}

/* Tablet ve küçük ekranlar için düzeni alta kaydırır */
@media (max-width: 1024px) {
    .app-container {
        grid-template-columns: 1fr; /* Sağ paneli timer'ın altına atar */
        width: 92%;
        margin-top: 10px;
        height: auto; /* Dikeyde uzamasına izin verir */
        overflow: visible; /* Kaydırmayı aktif eder */
    }
    
    .timer-circle {
        width: 280px; /* Tablet için daha dengeli bir boyut */
        height: 280px;
        margin-top: 80px;
        background: rgba(0, 0, 0, 0.35); /* Daire içi karartma */
   background: transparent; /* Opaklığı tamamen kaldırdık */
    backdrop-filter: none;   /* Arkadaki gri puslu görüntüyü sildik */
    -webkit-backdrop-filter: none;
    border: none;            /* Çerçeveyi kaldırdık */
    box-shadow: none;        /* Dış gölgeyi kaldırdık */
    
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}
    

    .timer-text {
        position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 4.2rem;
    font-weight: 200;
    letter-spacing: -2px;
    font-family: 'Inter', sans-serif;
    color: #fff;
    pointer-events: none;
    transition: all 0.3s ease;
    text-shadow: 0 0 40px rgba(0, 0, 0, 0.9), 0 0 10px rgba(0, 0, 0, 0.5);
    z-index: 10;
}
}

/* ============================================================
   PREMIUM BİTİŞ EKRANI (KESİN VE GÜNCEL VERSİYON)
   ============================================================ */

.timer-text.finished {
    /* Konumlandırma ve Hizalama */
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) !important;
    width: 100%;
    
    /* İçerik Düzeni (İkon ve Metinleri Alt Alta Dizme) */
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    line-height: 1.1 !important;
    
    /* Animasyon */
    animation: celebrateIn 0.6s cubic-bezier(0.17, 0.67, 0.83, 0.67) forwards;
    pointer-events: none;
    z-index: 10;
}

/* Ana Metin: ODAKLANMA / MOLA */
.timer-text.finished .main-status-text {
    font-size: 2.2rem !important;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: -0.5px;
    margin: 0;
    
    /* Premium Gradient Etkisi (Beyazdan Şeffafa) */
    background: linear-gradient(180deg, #ffffff 0%, rgba(255, 255, 255, 0.6) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 4px 10px rgba(0,0,0,0.3));
}

/* Alt Metin: BİTTİ */
.timer-text.finished .sub-text {
    display: block;
    font-size: 1.2rem;
    font-weight: 400;
    letter-spacing: 5px; /* Daha profesyonel yayılım */
    margin-top: 8px;
    color: rgba(255, 255, 255, 0.85);
    -webkit-text-fill-color: initial; /* Gradienti burada kapatıyoruz */
    text-transform: uppercase;
}

/* İkon: Kupa veya Yıldırım */
.timer-text.finished .status-icon {
    font-size: 3.2rem;
    margin-bottom: 10px;
    display: block;
    animation: bounceIcon 2s infinite ease-in-out;
}

/* --- KRİTİK ANİMASYONLAR --- */
@keyframes celebrateIn {
    0% { transform: translate(-50%, -50%) scale(0.8); opacity: 0; }
    100% { transform: translate(-50%, -50%) scale(1); opacity: 1; }
}

@keyframes bounceIcon {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-12px); }
}

/* MASAÜSTÜ İÇİN ÖZEL HİZALAMA */
@media (min-width: 993px) {
    .timer-section {
        /* Bu değer 'Hangi konu' çubuğu ile Timer arasındaki mesafeyi açar */
        padding-top: 120px !important; 
        justify-content: flex-start !important;
        min-height: 700px; /* Alt butonların sıkışmaması için alan açar */
    }

    .timer-circle {
        /* Ekstra mesafe isterseniz burayı da artırabilirsiniz */
        margin-top: 0px !important; 
        margin-bottom: 0px !important;
    }
}
.data-card.danger-zone:hover {
    border-color: var(--primary-red) !important;
    box-shadow: 0 0 20px rgba(255, 59, 92, 0.2);
}

/* --- HEDİYE KARTI (REWARD CARD) --- */
.reward-card {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.5);
    width: 320px;
    background: rgba(28, 28, 30, 0.98);
    backdrop-filter: blur(25px);
    border: 2px solid var(--primary-red);
    border-radius: 30px;
    padding: 40px 20px;
    text-align: center;
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 0 0 50px rgba(255, 59, 92, 0.3), 0 20px 60px rgba(0,0,0,0.8);
}

.reward-card.active {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, -50%) scale(1);
}

.reward-icon-wrapper {
    width: 90px;
    height: 90px;
    background: linear-gradient(135deg, var(--primary-red), #ff6b81);
    border-radius: 50%;
    margin: 0 auto 25px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 25px rgba(255, 59, 92, 0.4);
    animation: iconFloat 2s infinite ease-in-out;
}

.reward-icon-wrapper i {
    font-size: 2.5rem;
    color: white;
}

.reward-card h2 {
    color: #fff;
    font-size: 1.5rem;
    margin: 0 0 10px 0;
    letter-spacing: 1px;
}

.reward-card p {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 25px;
}

.reward-close-btn {
    background: var(--primary-red);
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 20px;
    font-weight: bold;
    cursor: pointer;
    transition: 0.3s;
}

.reward-close-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 5px 15px rgba(255, 59, 92, 0.4);
}

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

/* Arka Plan Karartma */
.reward-overlay {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.8);
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: 0.4s;
}
.reward-overlay.active {
    opacity: 1;
    visibility: visible;
}

.badges-controls-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
}

.badges-grid {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: hidden; /* Sağ-sol kodun zaten vardı */
    overflow-y: hidden !important; /* İSTEDİĞİN ŞEY BU: AŞAĞI-YUKARI HAREKETİ ÖLDÜRÜR */
    touch-action: pan-x; /* Sadece sağa-sola harekete izin verir, aşağı-yukarıyı kilitler */
    scroll-behavior: smooth;
    width: 100%;
    gap: 0;
}

.badge-item {
    flex: 0 0 25%;
    min-width: 25%;
    display: flex;
    flex-direction: column; /* İkon ve yazıyı alt alta diz */
    justify-content: center;
    align-items: center;
    padding: 15px 0;
    position: relative;
    transition: all 0.3s ease;
}

.badge-icon {
    font-size: 2rem; /* Boyutu biraz büyütebilirsin, alan genişledi */
    color: var(--primary-gold);
}

.scroll-arrow {
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.4);
    cursor: pointer;
    font-size: 1.2rem;
    padding: 0 5px;
}
.badge-status {
    font-size: 0.65rem;
    margin-top: 8px;
    color: var(--text-muted);
    opacity: 0; /* Normalde gizli */
    transform: translateY(5px);
    transition: all 0.3s ease;
    pointer-events: none; /* Yazı tıklamayı engellemesin */
}

/* Kilitli Rozet İkonu */
.badge-item.locked .badge-icon {
    opacity: 0.2;
    filter: grayscale(1);
}

/* Üzerine gelindiğinde veya mobilde tıklandığında */
.badge-item:hover .badge-status,
.badge-item:active .badge-status {
    opacity: 1;
    transform: translateY(0);
}

/* Kazandığın rozet özel stili */
.badge-item.unlocked .badge-icon {
    color: var(--primary-gold);
    filter: drop-shadow(0 0 5px rgba(255, 215, 0, 0.4));
}

.badge-item.unlocked .badge-status {
    color: var(--primary-gold);
}

.app-logo {
    height: 75px; /* Header yüksekliğine göre ayarlayabilirsiniz */
    width: auto;
    object-fit: contain;
    vertical-align: middle;
    margin-right: 8px; /* "doli" yazısı ile arasındaki mesafe */
}

/* Logo div'ini hizalamak için */
.logo {
    display: flex;
    align-items: center;
    font-weight: 700;
    font-size: 1.5rem;
} 

/* HAFTALIK BAȘARI KARTI */

/* ================= HAFTALIK ÖZET KARTI CSS ================= */

/* Arka Plan Karartma */
.recap-overlay {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.85); /* Daha koyu ve şık */
    backdrop-filter: blur(8px); /* Buzlu cam efekti */
    display: none; /* Başlangıçta gizli */
    justify-content: center;
    align-items: center;
    z-index: 2000; /* En üstte */
    opacity: 0;
    transition: opacity 0.4s ease;
}
.recap-overlay.active { display: flex; opacity: 1; }

/* Kartın Kendisi */
.recap-card {
    background: linear-gradient(145deg, #1a1a2e, #16213e); /* Premium koyu degrade */
    width: 90%; max-width: 450px;
    border-radius: 25px;
    padding: 30px;
    text-align: center;
    color: #fff;
    box-shadow: 0 20px 50px rgba(0,0,0,0.5), 0 0 0 1px rgba(255,255,255,0.1) inset;
    position: relative;
    transform: translateY(30px) scale(0.95);
    transition: all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1); /* Sıçrama efekti */
    overflow: hidden;
}
.recap-overlay.active .recap-card { transform: translateY(0) scale(1); }

/* Süsleme Şeridi */
.recap-card {
    overflow: hidden; /* Bu satır çok önemli, şeridin fazlalıklarını keser */
    /* ... diğer ayarların aynı kalsın ... */
}

.recap-ribbon {
    position: absolute;
    top: 40px;            /* Yukarıdan biraz daha aşağı indirdik */
    right: -60px;         /* Sağdan dışarıya doğru ittik */
    width: 220px;         /* Genişliği artırdık ki yazı sığsın */
    background: linear-gradient(45deg, #ff3b5c, #ff788e); /* Şık bir geçiş */
    color: white;
    text-align: center;   /* Yazıyı tam ortala */
    transform: rotate(45deg); /* 45 derece çapraz */
    
    /* Yazı Ayarları */
    font-size: 0.75rem;   /* Okunabilir boyut */
    font-weight: 900;     /* Ekstra kalın */
    letter-spacing: 1.5px; /* Harflerin arasını açtık */
    text-transform: uppercase; /* Hepsi BÜYÜK HARF */
    
    padding: 10px 0;      /* Şeridi kalınlaştırdık */
    box-shadow: 0 5px 10px rgba(0,0,0,0.3); /* Altına gölge */
    z-index: 10;
}

/* Başlık Alanı */
.recap-header { margin-bottom: 30px; }
.recap-main-icon { font-size: 4rem; color: #ffd700; margin-bottom: 15px; filter: drop-shadow(0 0 15px rgba(255, 215, 0, 0.6)); }
.recap-header h2 { font-size: 1.8rem; margin-bottom: 5px; background: linear-gradient(to right, #fff, #a0a0a0); -webkit-background-clip: text; -webkit-text-fill-color: transparent;}
.recap-subtitle { color: #a0a0a0; font-size: 1rem; }

/* İstatistik Izgarası */
.recap-grid { display: grid; gap: 15px; margin-bottom: 30px; }
.recap-stat-box {
    background: rgba(255, 255, 255, 0.05);
    padding: 15px; border-radius: 15px;
    display: flex; align-items: center;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: transform 0.3s ease;
}
.recap-stat-box:hover { transform: translateY(-3px); background: rgba(255, 255, 255, 0.08); }

.stat-icon {
    width: 50px; height: 50px;
    background: rgba(255,255,255,0.1);
    border-radius: 12px;
    display: flex; justify-content: center; align-items: center;
    font-size: 1.5rem; margin-right: 15px;
}

/* Özel Renkler */
.stat-time .stat-icon { color: #4CAF50; background: rgba(76, 175, 80, 0.15); }
.stat-day .stat-icon { color: #2196F3; background: rgba(33, 150, 243, 0.15); }
.stat-subject .stat-icon { color: #ff3b5c; background: rgba(255, 59, 92, 0.15); }

.stat-info { text-align: left; }
.stat-info h3 { font-size: 1.4rem; margin-bottom: 2px; font-weight: 800; }
.stat-info span { color: #a0a0a0; font-size: 0.9rem; }

/* Buton */
.recap-close-btn {
    background: linear-gradient(45deg, var(--primary-red, #ff3b5c), #ff788e);
    color: white; border: none;
    padding: 15px 40px; border-radius: 30px;
    font-size: 1.1rem; font-weight: bold;
    cursor: pointer; width: 100%;
    box-shadow: 0 10px 20px -10px rgba(255, 59, 92, 0.5);
    transition: all 0.3s ease;
}
.recap-close-btn:hover { transform: translateY(-3px); box-shadow: 0 15px 30px -10px rgba(255, 59, 92, 0.7); }


.week-navigation {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin: 15px 0;
    background: rgba(255,255,255,0.05);
    padding: 10px;
    border-radius: 12px;
}
.nav-arrow-btn {
    background: transparent;
    border: none;
    color: #fff;
    font-size: 1.2rem;
    cursor: pointer;
    padding: 5px 10px;
    transition: transform 0.2s;
}
.nav-arrow-btn:hover { transform: scale(1.2); color: var(--primary-gold, #ffd700); }
#currentWeekLabel {
    color: #fff;
    font-weight: bold;
    font-size: 0.95rem;
    min-width: 160px; /* Tarih aralığı sığsın diye genişlettim */
    text-align: center;
}

/* GİRİŞ SİSTEMİ CSS */
.auth-container {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-left: auto; /* Sağa yaslar */
    position: relative;
    z-index: 100;
}

.auth-btn {
    border: none;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: transform 0.2s, opacity 0.2s;
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
}

.auth-btn:active { transform: scale(0.95); }

.google-login {
    background-color: #4285F4;
    color: white;
    box-shadow: 0 4px 10px rgba(66, 133, 244, 0.3);
}

.logout-btn {
    background-color: rgba(255, 59, 92, 0.2);
    color: #ff3b5c;
    padding: 8px 12px;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

#userName {
    color: white;
    font-weight: 500;
    font-size: 0.95rem;
}

/* Mobilde sadece ikon görünsün istersen */
@media (max-width: 600px) {
    .auth-btn span { display: none; }
    .auth-btn { padding: 8px 10px; }
}

/* --- MOBİL İÇİN GÖREV LİSTESİ GENİŞLETME --- */
@media (max-width: 992px) {
    
    /* 1. Tüm uygulamanın genişliğini kenarlara yay */
    .app-container {
        width: 98% !important; /* Önceden %92 idi, %98 yaptık */
        padding: 0 5px !important; /* Yan boşlukları minimuma indirdik */
        max-width: none; /* Kısıtlamayı kaldır */
    }

    /* 2. Sağ Paneli (Sidebar) Tam Genişlik Yap */
    .sidebar {
        width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    /* 3. Görev Listesi Kartını Genişlet */
    .task-list-card {
        width: 100% !important;
        margin-top: 15px;
        border-radius: 15px; /* Köşeleri biraz daha kibar yap */
        min-height: 200px; /* Kartın boyunu uzat ki "yarım" durmasın */
        padding: 15px 10px !important; /* İç boşluğu ayarla */
    }

    /* 4. Görev Kutucuklarını Kenarlara Yasla */
    .task-item {
        width: 100% !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
    }
}

/* DIL BUTONU */
/* --- DİL SEÇENEĞİ BUTONU --- */
/* --- DİL SEÇENEĞİ ALANI (TAM ORTALAMA İÇİN) --- */
.lang-container {
    width: 100%;
    display: flex;
    justify-content: center; /* Butonu yatayda merkeze kilitler */
    padding: 15px 0; /* İsteğine göre bu boşluğu artırıp azaltabilirsin */
}

/* --- DİL SEÇENEĞİ BUTONU (PROFESYONEL GÖRÜNÜM) --- */
.lang-toggle-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    
    /* Modern Glassmorphism (Cam Efekti) ve Renkler */
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.05));
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #ffffff;
    
    /* Boyut ve Ovalleştirme */
    padding: 8px 18px;
    border-radius: 30px; /* Daha yumuşak, hap formunda kenarlar */
    
    /* Tipografi */
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    font-size: 0.85rem;
    letter-spacing: 0.5px; /* Harfleri biraz açarak okunabilirliği artırır */
    text-transform: uppercase; /* Daha kurumsal/temiz görünüm için büyük harf */
    text-decoration: none;
    cursor: pointer;
    outline: none;
    
    /* Derinlik ve Bulanıklık Efektleri */
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15), 
                inset 0 0 0 1px rgba(255, 255, 255, 0.05); /* İçeriden ince bir parlama */
    transition: all 0.3s ease;
}

/* --- HOVER & DOKUNMA EFEKTİ --- */
.lang-toggle-btn:hover,
.lang-toggle-btn:active {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.35);
    transform: translateY(-2px); /* Tıklanırken/dokunurken hafif yukarı kalkma hissi */
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.2);
}

/* Üzerine gelince veya dokunulunca ikonun senin mavi tonuna dönmesi */
.lang-toggle-btn:hover i,
.lang-toggle-btn:active i {
    color: #00d2ff;
    text-shadow: 0 0 8px rgba(0, 210, 255, 0.4); /* İkona tatlı bir neon ışıltısı verir */
}

.lang-toggle-btn i {
    color: #00d2ff; /* Dünya ikonuna hafif tatlı bir mavi ton */
    font-size: 1rem;
}

@media (max-width: 992px) {
    
    /* 1. Kapsayıcının iç boşluklarını daraltarak metne yer açıyoruz */
    .task-input-wrapper {
        padding: 5px 10px 5px 15px !important;
    }

    /* 2. Ders seçim kutusunun en fazla ne kadar uzayabileceğini kısıtlıyoruz */
    .subject-select {
        max-width: 90px; /* Ekranda çok yer kaplamaması için sınır */
        padding: 5px 8px !important; 
        font-size: 0.85rem !important;
        white-space: nowrap; /* Metni alt satıra geçirme */
        overflow: hidden; /* Taşan kısmı gizle */
        text-overflow: ellipsis; /* Sığmayan ders isminin sonuna ... koy */
        flex-shrink: 0; 
    }

    /* 3. Input'un ezilmesini önleyip, fontunu mobilde sığacak kadar küçültüyoruz */
    .task-input {
        min-width: 0; /* Flexbox içinde input'un taşımasını engeller (En kritik satır) */
        font-size: 0.9rem !important; /* "What are you working on?" sığsın diye fontu ufaltıyoruz */
        text-overflow: ellipsis; /* Input içindeki yazı da sığmazsa ... ile bitsin */
        white-space: nowrap;
    }
    
}