/* =================================================================
   LMS PROJESİ - ANA TEMA DOSYASI (theme.css)
   Tasarım İlkeleri: Responsive, Mor Tonları, Hızlı, Animasyonlu, İkonlu
================================================================= */

@font-face {
    font-family: "TemelYaziGeriSayim";
    src: url("../cizim/TemelYazi.66fe05979160.ttf") format("truetype");
    font-display: swap;
}

/* --- 1. TEMEL AYARLAR VE RENK PALETİ --- */
:root {
    --purple-dark: #4c1d95;
    --purple-main: #6d28d9;
    --purple-light: #8b5cf6;
    --purple-bg: #f5f3ff;
    --text-dark: #1f2937;
    --text-light: #6b7280;
    --white: #ffffff;
    --gray-light: #f9fafb;
    --border-color: #e5e7eb;
    --success-color: #10b981;
    --error-color: #ef4444;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    margin: 0;
    background-color: var(--gray-light);
    color: var(--text-dark);
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 0.5rem;
}

/* --- 2. GENEL ELEMENTLER (BAŞLIKLAR, LİNKLER) --- */
h1, h2, h3, h4, h5 {
    color: var(--purple-dark);
    font-weight: 800;
}

a {
    color: var(--purple-main);
    text-decoration: none;
    transition: color 0.3s ease;
}
a:hover {
    color: var(--purple-dark);
}

/* --- 3. BUTONLAR --- */
.btn { display: inline-flex; align-items: center; gap: 0.75rem; padding: 0.75rem 1.5rem; border-radius: 8px; text-decoration: none; font-weight: 600; transition: all 0.3s ease; border: 2px solid transparent; cursor: pointer; }
.btn-primary { background-color: var(--purple-main); color: var(--white); }
.btn-primary2 { background-color: #d92d2d; color: var(--white); }
.btn-primary2:hover { background-color: #a4202d; color: white;  box-shadow: 0 4px 15px rgba(0,0,0,0.2); }
.btn-primary:hover { background-color: var(--purple-dark); color: white;  box-shadow: 0 4px 15px rgba(0,0,0,0.2); }
.btn-outline { background-color: var(--white); color: var(--purple-main); border-color: var(--purple-light); }
.btn-outline:hover { background-color: var(--purple-main); color: var(--white); }
.btn-lg { font-size: 1.1rem; padding: 1rem 2.5rem; }

.btn2 { display: inline-flex; align-items: center; gap: 0.75rem; border-radius: 8px; text-decoration: none; font-size:x-large; font-weight: 600;  border: 2px solid transparent; cursor: pointer; }
.btn2-primary { background-color: var(--purple-main); color: var(--white); }
.btn2-primary:hover { background-color: #a4202d;  box-shadow: 0 4px 15px rgba(0,0,0,0.2); }


.btn3 { display: inline-flex; padding: 0.3rem 0.5rem; align-items: center; gap: 0.5rem; border-radius: 8px; text-decoration: none; font-size:x-large; font-weight: 600;  border: 2px solid transparent; cursor: pointer; }
.btn3-primary { background-color: white; border: 1px solid #6d28d9; margin-bottom: 10px; font-size: x-large; }
.btn3-primary:hover { background-color: var(--purple-dark); color: white;  box-shadow: 0 4px 15px rgba(0,0,0,0.2); }
.btn3-block { width: 100%; }


/* --- 4. FORMLAR --- */
.form-group { margin-bottom: 1.25rem; }
.form-group label { display: block; font-weight: 600; font-size: 0.9rem; }
.form-group input, .form-group select {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ac84ff;
    border-radius: 8px;
    font-size: 1rem;
    box-sizing: border-box;
    transition: all 0.3s ease;
}
.form-group input:focus, .form-group select:focus {
    outline: none;
    border-color: var(--purple-main);
    box-shadow: 0 0 0 3px rgba(109, 40, 217, 0.2);
}

.form-group-row {
    display: flex;
    gap: 20px; /* kutular arasındaki boşluk */
}

.form-group-row .form-group {
    flex: 1; /* eşit genişlikte olsunlar */
}
/* --- 5. KART YAPILARI (Öğrenci Kartı, İstatistik Kartı vb.) --- */
.card {
    background: var(--white);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
}
.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

/* --- 6. NAVİGASYON / HEADER --- */
    * { box-sizing: border-box; }
        
        body { font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; background: #f8f9fa; }
        
        .navbar {
            background: white;
            backdrop-filter: blur(10px);
            padding: 10px 10px;
            position: fixed;
            top: 0;
            width: 100%;
            display: flex;
            justify-content: space-between;
            align-items: center;
            box-shadow: 0 4px 20px rgba(167, 139, 255, 0.3);
            z-index: 1000;
        }
        
        .nav-item {
            display: flex;
            align-items: center;
            gap: 8px;
            padding: 10px 15px;
            text-decoration: none;
            color: #5a4fcf;
            font-weight: 600;
            border-radius: 25px;
            transition: all 0.3s ease;
            position: relative;
        }
        
        .nav-item:hover {
            background: rgba(255, 255, 255, 0.4);
            transform: translateY(-2px);
            box-shadow: 0 8px 25px rgba(167, 139, 255, 0.4);
        }
        
        .icon {
            font-size: 20px;
            transition: transform 0.3s ease;
        }
        
        .nav-item:hover .icon {
            transform: rotate(360deg);
        }
        
        .logo {
            font-size: 24px;
            font-weight: bold;
            color: #4c3d99;
        }
        
        .center-menu {
            display: flex;
            gap: 25px;
        }
        
        .profile {
           
        }
        
        .profile:hover {
           
        }
        
        body { margin-top: 80px; }
        
        .content {
            padding: 50px 20px;
            text-align: center;
            color: #666;
        }
        
        .mobile-menu { display: none; }
        .mobile-dropdown { display: none; position: absolute; top: 100%; right: 0; background: white; border-radius: 15px; padding: 10px; box-shadow: 0 8px 25px rgba(167, 139, 255, 0.4); }
        .mobile-dropdown.show { display: block; }
        .mobile-dropdown .nav-item { margin: 5px 0; }
        
        .profile-dropdown { display: none; position: absolute; top: 100%; right: 0; background: white; border-radius: 15px; padding: 10px; box-shadow: 0 8px 25px rgba(167, 139, 255, 0.4); min-width: 160px; }
        .profile-dropdown.show { display: block; }
        .profile-dropdown .nav-item {  margin: 5px 0;}
        .profile { position: relative; }
        
        @media (max-width: 768px) {
            .navbar { padding: 10px 5px; position: fixed; top: 0;  }
            .center-menu { display: none; }
            .mobile-menu { display: block; }
            .nav-item { padding: 8px 12px; font-size: 14px; }
            .logo { font-size: 18px; }
            .icon { font-size: 16px; }
            body { margin-top: 60px; }
        }

/* --- 7. MOBİL UYUMLULUK (RESPONSIVE) --- */
@media (max-width: 768px) {
    .section { padding: 3rem 0; }
    h1 { font-size: 2.5rem; }
    h2 { font-size: 2rem; }
    /* Mobil için özel menü, kart vb. stilleri buraya eklenecek */
}

/* --- 4. GİRİŞ VE KAYIT SAYFALARI (YENİ EKLENEN BÖLÜM) --- */
.auth-page {
    background-color: var(--purple-bg);
}
.auth-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    min-height: 100vh;
    padding: 2rem 1rem;
}
.auth-card {
    background-color: var(--white);
    padding: 2rem;
    border-radius: 16px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
    width: 100%;
    max-width: 450px;
}
.auth-header { text-align: center; margin-bottom: 2rem; }
.auth-logo { font-size: 2rem; font-weight: 800; text-decoration: none; color: var(--purple-dark); display: inline-block; margin-bottom: 1rem; }
.auth-card h1 { font-size: 2rem; font-weight: 800; color: var(--purple-dark); margin: 0; }
.auth-card p { color: var(--text-light);}

.auth-form .input-group { position: relative; margin-bottom: 1.5rem; }
.auth-form .input-icon { position: absolute; top: 50%; left: 1rem; transform: translateY(-50%); color: var(--text-light); }
.auth-form .form-control {
    width: 100%;
    padding: 0.8rem 0.8rem 0.8rem 3rem; /* İkon için soldan boşluk */
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
    box-sizing: border-box;
    transition: all 0.3s ease;
}



.auth-form .form-control:focus {
    outline: none;
    border-color: var(--purple-main);
    box-shadow: 0 0 0 4px rgba(109, 40, 217, 0.2);
}
.btn-block { width: 100%; justify-content: center; }

.auth-links { text-align: center; margin-top: 1.5rem; font-size: 0.9rem; }
.auth-links a { color: var(--purple-main); text-decoration: none; font-weight: 600; }
.auth-links span { margin: 0 0.5rem; color: var(--text-light); }

.back-to-home { display: block; text-align: center; margin-top: 2rem; color: var(--text-light); }
.back-to-home i { margin-right: 0.5rem; }

.text-center {
    text-align: center !important;
}

.text-center h1,
.text-center p,
.text-center a {
    text-align: center !important;
    display: block;
    margin-left: auto;
    margin-right: auto;
}


hr {
    
    border-style: solid;
    color: #4c1d95;
    border-width: 1px;
}


/* --- PANEL SAYFALARI (Öğretmen, Veli, Öğrenci) --- */
.page-header {
    text-align: center;
    padding: 2rem 0;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 2rem;
}
.page-header h1 {
    font-size: 2.8rem;
    margin-bottom: 0.5rem;
}
.page-header p {
    font-size: 1.1rem;
    color: var(--text-light);
    max-width: 600px;
    margin: 0 auto;
}
 .action-buttons button { margin-right: 10px; background-color: #007bff; color: white; padding: 10px 15px; border: none; border-radius: 4px; cursor: pointer; font-size: 16px; }
    .action-buttons button:hover { background-color: #0056b3; }
    .student-grid { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 20px;}
    .student-card { border: 1px solid #4c1d95; border-radius: 8px; padding: 15px; width: 180px; text-align: center; box-shadow: 2px 2px 5px rgba(0,0,0,0.1); cursor: pointer; transition: transform 0.2s; position: relative; }
    .student-card:hover { transform: translateY(-5px); }
    .student-card .avatar-container { width: 120px; height: 120px; margin: 0 auto 10px auto; border-radius: 5%; display: flex; align-items: center; justify-content: center; overflow: hidden; pointer-events: none; }
    .student-card .avatar-container img { width: 100%; height: 100%; object-fit: cover; }
    .student-card .student-name { font-weight: bold; border-top: 1px solid #ccc; padding-top: 15px; margin-top: 5px; min-height: 40px; pointer-events: none; }
    .student-card .stars { color: #ffc107; font-size: 24px; margin-top: 5px; pointer-events: none; }
    .diamond-icon { position: absolute; top: 10px; right: 10px; font-size: 20px; text-shadow: 0 0 3px white; pointer-events: none; }

    /* Modal Stilleri */
    .modal { display: none; position: fixed; z-index: 1000; left: 0; top: 0; width: 100%; height: 100%; overflow: auto; background-color: rgba(0,0,0,0.4); }
    .modal.overlay { background-color: #f8f9fa; }
    .modal-content { background-color: #fefefe; margin: 15% auto; padding: 20px; border: 1px solid #888; width: 90%; max-width: 500px; border-radius: 8px; text-align: center; position: relative;}
    .close-btn { color: #aaa; position: absolute; top: 10px; right: 20px; font-size: 28px; font-weight: bold; cursor: pointer; z-index: 1010;}
    .modal.overlay .close-btn { color: #fff; }
    .modal-menu { list-style: none; padding: 0; }
    .modal-menu li { margin-bottom: 10px; }
    .modal-menu a, .modal-menu button { display: block; width: 100%; box-sizing: border-box; padding: 12px; text-decoration: none; color: white; border: none; border-radius: 5px; cursor: pointer; font-size: 16px; text-align: center; }
   

    /* Rastgele Seçim Aracına Özel Stiller (Çocuksu / Konfetili Tema) */
    #selector-content { text-align: center; width: 100%; height: 100%; box-sizing: border-box;}

    #random-selector-overlay .fun-heading {
        font-size: 1.7em;
        color: var(--purple-dark);
        margin-bottom: 6px;
    }
    #random-selector-overlay .fun-subtext {
        color: #fff;
        margin-top: 0;
        margin-bottom: 18px;
        font-size:3em;
    }

    #student-selection-grid { display: flex; flex-wrap: wrap; gap: 15px; justify-content: center; max-height: 60vh; overflow-y: auto; padding: 20px; }
    .selectable-card {
        border: 3px solid var(--purple-light);
        border-radius: 20px;
        padding: 12px;
        cursor: pointer;
        transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
        text-align: center;
        width: 150px;
        background: var(--white);
        box-shadow: 0 4px 0 var(--purple-light), 0 6px 10px rgba(76,29,149,0.12);
    }
    .selectable-card:hover { transform: translateY(-4px) scale(1.03); }
    .selectable-card.is-deselected { opacity: 0.4; border-color: #cbd5e1; box-shadow: 0 4px 0 #cbd5e1; transform: scale(0.93); }
    .selectable-card img { width: 80px; height: 80px; }
    .selectable-card p { margin-top: 8px; font-weight: bold; color: var(--purple-dark); }

/* --- RASTGELE ÖĞRENCİ SEÇİM ANİMASYON STİLLERİ --- */

 .student-card2 { border: 1px solid #4c1d95; border-radius: 8px; padding: 15px; width: 180px; text-align: center; box-shadow: 2px 2px 5px rgba(0,0,0,0.1); cursor: pointer; transition: transform 0.2s; position: relative; margin: 0 auto;}
#lottery-phase {
    display: flex;
    flex-direction: column;  /* alt alta gelsin */
    align-items: center;     /* ortalasın */
    justify-content: center; /* dikeyde ortalasın */
    text-align: center;      /* içteki yazıları ortalasın */
    gap: 20px;               /* elemanlar arası boşluk */
}

#lottery-phase > div {
    position: static; /* üst üste binmemesi için */
    z-index: auto;    /* varsayılan seviyeye getir */
}

/* Çekiliş sırasında dönen aday kartı */
#lottery-animation .spin-card {
    border: 3px dashed var(--purple-light);
    border-radius: 24px;
    padding: 18px;
    height:100%;
    width: 300px;
    margin: 60px auto;
    background: var(--purple-bg);
    
}
#lottery-animation .spin-card .avatar-container {
    margin: 0 auto 10px auto;
   overflow: hidden; 
}
#lottery-animation .spin-card .avatar-container img { width: 100%; height: 100%; object-fit: cover; }
#lottery-animation .spin-card .student-name { font-weight: bold; font-size: 2.2em; color: var(--purple-dark); }

@keyframes spinPulse {
    from { transform: scale(1) rotate(-1.5deg); }
    to   { transform: scale(1.04) rotate(1.5deg); }
}

/* Kazanan kartı */
#winner-display .winner-title {
    color: var(--purple-main);
    font-size: 1.8em;
    margin-bottom: 10px;
}
#winner-display .winner-title .fa-solid,
#winner-display .winner-title i { margin: 0 6px; }

#winner-display .winner-card {
    border: 4px solid var(--purple-main);
    border-radius: 28px;
    padding: 20px;
    width: 360px;
    height: 100%;
    margin: 10px auto 90px auto;
    background: var(--white);
    box-shadow: 0 8px 0 var(--purple-light), 0 12px 24px rgba(76,29,149,0.18);
    animation: winnerPop 0.5s cubic-bezier(.34,1.56,.64,1);
    position: relative;
}
#winner-display .winner-card .avatar-container {
   margin: 0 auto 12px auto;
     overflow: hidden; 
}
#winner-display .winner-card .avatar-container img { width: 100%; height: 100%; object-fit: cover; }
#winner-display .winner-card .student-name { font-weight: bold; color: var(--purple-dark); font-size: 3.2em; }

@keyframes winnerPop {
    0%   { transform: scale(0.4) rotate(-8deg); opacity: 0; }
    60%  { transform: scale(1.08) rotate(3deg); opacity: 1; }
    100% { transform: scale(1) rotate(0deg); opacity: 1; }
}

/* Saf CSS/JS konfeti parçacıkları */
.confetti-piece {
    position: fixed;
    top: -20px;
    width: 10px;
    height: 14px;
    opacity: 0.9;
    pointer-events: none;
    z-index: 3000;
    animation-name: confettiFall;
    animation-timing-function: linear;
    animation-fill-mode: forwards;
    border-radius: 2px;
}
@keyframes confettiFall {
    0%   { transform: translateY(0) rotate(0deg); opacity: 1; }
    100% { transform: translateY(105vh) rotate(540deg); opacity: 0.9; }
}

/* --- ÇARK ÇEVİR --- */
/* Sayfa DÜZENİ (layout) hiç değişmesin diye bu dış kutu, çarkın normal
   (büyütülmemiş) haliyle aynı sabit yüksekliktedir ve taşanı gizler.
   Böylece çark ne kadar büyürse büyüsün, altındaki butonlar (Seçileni
   Ayır / Tekrar Çevir / Ayrılanlar) her zaman aynı yerde sabit kalır.
   GENİŞLİK dönüş sırasında JS tarafından (spinWheel/openWheel) --wheel-viewport-w
   değişkeni ile geçici olarak genişletilir ki büyüyen çark yatayda kesilmesin;
   burada tanımlı değer sadece başlangıç/dinlenme halidir. */
#wheel-zoom-viewport {
    
    /* İmleç çarkın biraz üstüne taşar (bkz. #wheel-pointer); o üst payı da
       bu kutunun içinde kalsın diye yükseklik genişlikten biraz fazladır. */
    height: calc(min(92vw, 620px) + 30px);
    padding-top: 30px;
    margin: 20px auto 10px auto;
    overflow: hidden;
    position: relative;
    box-sizing: border-box;
}
/* Yakınlaşma bu katmanı GERÇEKTEN büyütür (halka + SVG + imleç + hub hepsi
   birlikte) — SVG içeriğini değil, tüm çarkı büyütüyoruz. transform-origin
   imlecin olduğu üst noktaya sabitlenir; böylece büyüyünce üst (imlece yakın)
   bölge #wheel-zoom-viewport'u doldurur, alt taraf o kutunun dışına taşıp
   overflow:hidden ile kesilir (sayfanın geri kalanına asla taşmaz). Genişliği
   HER ZAMAN çarkın gerçek (büyütülmemiş) boyutuna sabittir ve viewport
   içinde ortalanır. */
#wheel-zoom-stage {
    width: min(92vw, 620px);
    margin: 0 auto;
    will-change: transform;
}
#wheel-wrap {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1;
}
#wheel-svg {
    width: 100%;
    height: 100%;
    display: block;
    border-radius: 50%;
    
    transform: rotate(0deg);
    will-change: transform;
    /* Büyük bir çizim alanı (900x900) küçültülerek gösterilir; bu ayarlar
       tarayıcının kenarları/metni bulanıklaştırmadan keskin çizmesini sağlar. */
    shape-rendering: geometricPrecision;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
    backface-visibility: hidden;
}
.wheel-slice {
    transition: fill 0.35s ease;
}
.wheel-slice.is-winner {
    animation: wheelWinnerGlow 0.7s ease-in-out infinite;
}
@keyframes wheelWinnerGlow {
    0%, 100% { filter: brightness(1) saturate(1); }
    50%      { filter: brightness(1.6) saturate(1.8); }
}
.wheel-slice-label {
    font-weight: 700;
    fill: var(--purple-dark);
}
/* Kazanan dilimde avatar VE isim yazısı %50 büyüyüp küçülerek (pulse)
   belirginleşir. transform-box:fill-box + transform-origin:center, SVG
   içeriğinin kendi görsel merkezine göre ölçeklenmesini sağlar (elin
   hesapladığı translate/textPath konumunu bozmadan). */
.wheel-avatar-group.is-winner,
.wheel-slice-label.is-winner {
    transform-box: fill-box;
    transform-origin: center;
    animation: wheelWinnerPulse 0.7s ease-in-out infinite;
}
@keyframes wheelWinnerPulse {
    0%, 100% { transform: scale(1); }
    50%      { transform: scale(1.5); }
}
/* İmleç: çarkın en dış halkasından başlayıp dilimlerin içine doğru uzanan
   büyük bir üçgen. Boyutunu değiştirmek için width/height (üçgenin taban
   genişliği/uzunluğu) değerlerini ayarla. */
#wheel-pointer {
    position: absolute;
    top: -6px;
    left: 50%;
    width: 0;
    height: 0;
    border-left: 30px solid transparent;
    border-right: 30px solid transparent;
    border-top: 56px solid #d92828;
    transform: translateX(-50%);
    z-index: 5;
    filter: drop-shadow(0 3px 4px rgba(0,0,0,0.4));
}
#wheel-hub {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: var(--white);
    border: 4px solid var(--purple-main);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    box-shadow: 0 4px 10px rgba(76,29,149,0.3);
    z-index: 4;
}
#wheel-hub img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* Ayrılanlar listesi: küçük kartlar */
#set-aside-list {
    background: var(--purple-bg);
    padding: 16px;
    border-radius: 20px;
    border: 2px dashed var(--purple-light);
}
#set-aside-list .fun-heading {
    font-size: 1.2em;
    margin: 0 0 12px 0;
    color: var(--purple-dark);
}
#aside-list-ul {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
    list-style: none;
    padding: 0;
    margin: 0;
}
.aside-card {
    background: var(--white);
    border: 2px solid var(--purple-light);
    border-radius: 16px;
    padding: 10px 12px 8px 12px;
    width: 110px;
    text-align: center;
    box-shadow: 0 3px 0 var(--purple-light);
    position: relative;
}
.aside-card img {
    width: 56px; height: 56px; 
   
    margin-bottom: 6px;
    object-fit: cover;
}
.aside-card .aside-name {
    font-size: 0.85em;
    font-weight: bold;
    color: var(--purple-dark);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.aside-card .aside-reinclude-btn {
    background: none;
    border: none;
    color: var(--purple-main);
    cursor: pointer;
    font-size: 0.78em;
    margin-top: 4px;
    padding: 2px 4px;
}
.aside-card .aside-reinclude-btn:hover { color: var(--purple-dark); text-decoration: underline; }
#aside-list-empty {
    color: var(--text-light);
    font-style: italic;
}

/* Modal açıkken body kaymasın (çift scrollbar'ı keser) */
body:has(#random-selector-overlay[style*="display: block"]) {
  overflow: hidden;
}


#random-selector-overlay {
    position: fixed;
    inset: 0;
    width: 100vw;
    height: 100dvh;
   
    overscroll-behavior: contain;
    padding-inline: 20vw;
    
    /* Bu satırı ekleyin - overlay'e tıklamayı engeller */
    pointer-events: none;
}

/* İçeriğe tıklamayı tekrar aktif edin */
#selector-content {
    pointer-events: auto;
}

@media (max-width: 768px) {
    #random-selector-overlay {
        padding-inline: 0 !important;
    }
}

/* Ek güvenlik için - overlay'deki boş alanlara tıklamayı tamamen engelle */
#random-selector-overlay::before {
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
}

#random-selector-overlay::after {
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
}

@media (max-width: 768px) {
  .container {
    /* Mobilde sanki hiç class/style yokmuş gibi blok düzenine dön */
    display: block !important;
    gap: 0 !important;              /* gap sadece flex/grid'te çalışır, sıfırla */
    align-items: normal !important;  /* varsayılan davranış */
  }
}

/* --- ABONELİK PAKETLERİ SAYFASI --- */
.pricing-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    align-items: center;
}
.pricing-card {
    background-color: var(--white);
    border-radius: 12px;
    padding: 2rem;
    text-align: center;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
}
.pricing-card.popular {
    border-width: 3px;
    border-color: var(--purple-main);
    transform: scale(1.05);
    position: relative;
}
.popular-badge {
    position: absolute;
    top: -15px;
    left: 50%;
    transform: translateX(-50%);
    background-color: var(--purple-main);
    color: var(--white);
    padding: 0.3rem 1rem;
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: bold;
}
.pricing-header h3 { font-size: 1.5rem; font-weight: 600; }
.pricing-header .price { font-size: 3rem; font-weight: 800; color: var(--purple-dark); margin: 1rem 0; }
.pricing-header .period { font-size: 1rem; color: var(--text-light); }
.features-list { list-style: none; padding: 0; margin: 1.5rem 0; }
.features-list li { padding: 0.5rem 0; color: var(--text-light); }
.features-list li i { color: var(--success-color); margin-right: 0.5rem; }

@media (max-width: 768px) {
    .pricing-grid { grid-template-columns: 1fr; }
}


/* --- ABONELİK YÖNETİM SAYFASI --- */
.subscription-details {
    text-align: left;
    margin-top: 2rem;
    border-top: 1px solid var(--border-color);
    padding-top: 2rem;
}
.detail-item {
    display: flex;
    justify-content: space-between;
    padding: 0.75rem 0;
    border-bottom: 1px solid #f0f0f0;
}
.detail-item span {
    color: var(--text-light);
}
.detail-item strong {
    color: var(--text-dark);
    font-weight: 600;
}
.status-active {
    color: var(--success-color);
    font-weight: bold;
}
.status-inactive {
    color: var(--error-color);
    font-weight: bold;
}
.btn-danger {
    background-color: var(--error-color);
    color: white;
}
.btn-danger:hover {
    background-color: #c82333;
}

/* --- AKORDİYON MENÜ SİSTEMİ (İçerikler Sayfası) --- */
.accordion-container {
    width: 100%;
    max-width: 900px; /* Ortalanmış ve daha okunaklı bir genişlik */
    margin: 2rem auto;
}
.accordion-btn {
    background-color: var(--white);
    color: var(--purple-dark);
    cursor: pointer;
    padding: 18px 25px;
    width: 100%;
    text-align: left;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    outline: none;
    transition: all 0.4s ease;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 10px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}
.accordion-btn:hover, .accordion-btn.active {
    background-color: var(--purple-bg);
    border-color: var(--purple-light);
}
.accordion-btn .accordion-icon {
    transition: transform 0.4s ease;
    font-size: 1rem;
    color: var(--purple-main);
}
.accordion-btn.active .accordion-icon {
    transform: rotate(180deg);
}
.accordion-panel {
    padding: 0 1.5rem;
    background-color: var(--white);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out, padding 0.3s ease-out;
    border-radius: 8px;
    margin-bottom: 10px;
    border: 1px solid var(--border-color);
    border-top: none;
}
.accordion-panel.active {
    padding-top: 1rem;
    padding-bottom: 1rem;
}


/* --- ÖĞRETMEN ÖZEL İÇERİK DETAY SAYFASI --- */
.content-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
}
.content-card {
    background: var(--white);
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}
.content-thumbnail {
    width: 100%;
    aspect-ratio: 16 / 9; /* 16:9 oranını sağlar */
    background-color: var(--purple-bg);
}
.content-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Resmi kırparak sığdırır */
}
.content-body {
    padding: 0.5rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    flex-grow: 1;
}
.content-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--text-dark);
	margin-top: 0px;
}


/* --- KONU DETAY SAYFASI (topic_detail.html) --- */
.content-section-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--purple-dark);
    text-align: center;
    margin-top: 2rem;
    margin-bottom: 2rem;
    border-bottom: 2px solid var(--purple-light);
    padding-bottom: 0.5rem;
 
}

.game-section {
    margin-bottom: 0rem;
    text-align: center;
}

.game-button-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 2rem;
}

.game-iframe-container {
    width: 100%;
    height: 600px;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}

.game-iframe-container iframe {
    width: 100%;
    height: 100%;
    border: none;
}

.download-count {
    font-size: 0.8rem;
    opacity: 0.8;
    margin-left: 0.5rem;
}

/* --- GERİ SAYIM ARACI --- */
body:has(#countdown-overlay[style*="display: block"]) {
    overflow: hidden;
}

#countdown-overlay {
    display: none;
    position: fixed;
    inset: 0;
    width: 100vw;
    height: 100dvh;
    z-index: 1100;
    overscroll-behavior: contain;
    background-color: #6383f7;
    transition: background-color 0.6s ease;
    font-family: "TemelYaziGeriSayim", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}

/* Tarayıcılar button/input'a varsayılan sistem fontu atayıp miras
   zincirini kırar; overlay içindeki tüm form kontrollerinde açıkça geri veriyoruz. */
#countdown-overlay button,
#countdown-overlay input {
  
}

#countdown-overlay.countdown-danger {
    background-color: #ff5c5c;
}

#countdown-progress-bar {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100px;
    background: rgb(0, 0, 0);
    z-index: 1102;
}

#countdown-progress-fill {
    height: 100%;
    width: 100%;
    background: hsl(120, 85%, 45%);
    transform-origin: left center;
    /* width'in JS'te sık değişmesi reflow tetikler; transition kısa ve tek
       özellik üzerinde tutularak akıcılık korunur. */
    transition: width 0.2s linear, background-color 0.4s linear;
}

#countdown-overlay #closeCountdownBtn {
    /* #countdown-content tüm ekranı kaplayıp daha yüksek z-index'e sahip
       olduğundan, kapatma butonu onun üstüne çıkarılmazsa tıklamayı yutar. */
    z-index: 1103;
}

#countdown-overlay #countdown-content {
    position: relative;
    z-index: 1101;
    width: 100%;
    height: 100%;
    box-sizing: border-box;
    padding: 60px 20px 20px 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    overflow-y: auto;
}

#countdown-preset-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 32px;
    justify-content: center;
    max-width: 720px;
    margin: 120px;
}

.countdown-preset-btn {
    border: 3px solid var(--purple-light);
    border-radius: 16px;
    background: var(--white);
    color: var(--purple-dark);
    font-weight: bold;
    font-size: 3.1em;
    padding: 14px 22px;
    cursor: pointer;
    box-shadow: 0 4px 0 var(--purple-light);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.countdown-preset-btn:hover { transform: translateY(-3px); }
.countdown-preset-btn:active { transform: translateY(1px); box-shadow: 0 1px 0 var(--purple-light); }

#countdown-custom-inputs {
    display: flex;
    gap: 20px;
    justify-content: center;
    margin-top: 10px;
}

.countdown-custom-field {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}

.countdown-custom-field input {
    width: 190px;
    font-size: 2.6em;
    text-align: center;
    padding: 18px;
    border: 2px solid var(--purple-light);
    border-radius: 10px;
    color: var(--purple-dark);
    font-weight: bold;
}

.countdown-custom-field label {
    color: #fff;
    font-size: 1.9em;
}

#countdown-display {
    font-size: min(32vw, 15rem);
    font-weight: 999;
    color: #fff;
    line-height: 1;
    font-variant-numeric: tabular-nums;
    letter-spacing: 2px;
}

.countdown-colon {
    opacity: 0.6;
}

#countdown-timer-controls {
    display: flex;
    gap: 22px;
    justify-content: center;
    margin-top: 30px;
}

.countdown-icon-btn {
    width: 84px;
    height: 84px;
    border-radius: 50%;
    border: none;
    background-color: var(--purple-main);
    color: var(--white);
    font-size: 1.8em;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 0 var(--purple-dark), 0 6px 14px rgba(76,29,149,0.25);
    transition: transform 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
    flex-shrink: 0;
}
.countdown-icon-btn:hover { background-color: var(--purple-dark); transform: translateY(-2px); }
.countdown-icon-btn:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--purple-dark); }

#countdown-finished-phase .fun-heading {
    font-size: 12em;
    animation: countdownFinishedPop 0.4s ease-out;
    color:#fff;
}

@keyframes countdownFinishedPop {
    from { transform: scale(0.7); opacity: 0; }
    to   { transform: scale(1); opacity: 1; }
}

#countdown-finished-controls {
    display: flex;
    gap: 22px;
    justify-content: center;
    margin-top: 20px;
}

@media (max-width: 768px) {
    #countdown-content {
        padding-top: 40px;
    }
    #countdown-display {
        font-size: min(28vw, 8rem);
    }
    .countdown-icon-btn {
        width: 68px;
        height: 68px;
        font-size: 1.5em;
    }
    #countdown-timer-controls,
    #countdown-finished-controls {
        gap: 16px;
    }
}
