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

/* --- 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; background-color: #f0c400; 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 */
    #selector-content { text-align: center; width: 100%; height: 100%; box-sizing: border-box;}
    #student-selection-grid { display: flex; flex-wrap: wrap; gap: 15px; justify-content: center; max-height: 60vh; overflow-y: auto; padding: 20px; }
    .selectable-card { border: 2px solid #4c1d95; border-radius: 8px; padding: 10px; cursor: pointer; transition: all 0.2s; text-align: center; width: 150px; }
    .selectable-card.is-deselected { opacity: 0.4; border-color: #555; transform: scale(0.95); }
    .selectable-card img { width: 80px; height: 80px; border-radius: 5%; }
    .selectable-card p { margin-top: 5px; font-weight: bold; }
	
/* --- 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 */
}

/* 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;
}
