/**
 * Akıllı Tahta Dijital Sınıf Panosu (SSTPANO v2.0) — Bağımsız & Çevrimdışı Stil Dosyası
 * Tailwind CDN ve Google Fonts bağımlılığı olmadan %100 çevrimdışı çalışacak şekilde tasarlanmıştır.
 * 4K Akıllı Tahtalar, 1080p Ekranlar, Tablet ve Mobil Cihazlar için duyarlı (clamp & grid) mimari.
 */

@font-face {
    font-family: 'TemelYazi';
    src: url('../../fontlar/temelyazi.otf') format('opentype');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

:root {
    --bg-opacity: 0.72;
    --card-bg-rgb: 15, 23, 42;
    --card-border: rgba(255, 255, 255, 0.14);
    --card-border-hover: rgba(244, 114, 182, 0.45);
    --main-text: #f8fafc;
    --muted-text: rgba(226, 232, 240, 0.78);
    --accent-color: #f472b6;
    --accent-secondary: #8b5cf6;
    --accent-cyan: #38bdf8;
    --accent-emerald: #34d399;
    --accent-amber: #fbbf24;
    --accent-rose: #fb7185;
    --font-sans: 'Segoe UI', system-ui, -apple-system, BlinkMacSystemFont, Roboto, 'Helvetica Neue', Arial, sans-serif;
    --font-mono: 'Cascadia Mono', 'Consolas', 'Courier New', monospace;
}

/* Sınıf düzeyine göre okuma-yazma font desteği */
body.grade-1 .grade-font-aware {
    font-family: 'TemelYazi', var(--font-sans);
    letter-spacing: 0.02em;
}

*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html, body {
    width: 100%;
    height: 100%;
    font-family: var(--font-sans);
    color: var(--main-text);
    background-color: #070b19;
    overflow: hidden;
    user-select: none;
    -webkit-user-select: none;
    line-height: 1.45;
}

/* Input ve düzenlenebilir alanlar seçilebilir olmalı (Erişilebilirlik C9) */
input, textarea, select, [contenteditable="true"] {
    user-select: text !important;
    -webkit-user-select: text !important;
    font-family: inherit;
    color: var(--main-text);
}

/* Küçük ekranlarda (tablet/mobil) dikey kaydırmaya izin ver (C8) */
@media (max-width: 1024px) {
    html, body {
        overflow-y: auto;
        overflow-x: hidden;
        height: auto;
        min-height: 100vh;
    }
}

/* Erişilebilirlik Odak Halkası (C9) */
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, [tabindex]:focus-visible {
    outline: 3px solid var(--accent-cyan);
    outline-offset: 2px;
}

button {
    cursor: pointer;
    font-family: inherit;
    border: none;
    background: none;
    color: inherit;
}

/* Arka Plan Video ve Karartma Katmanı */
#bg-video {
    position: fixed;
    top: 50%;
    left: 50%;
    min-width: 100%;
    min-height: 100%;
    width: auto;
    height: auto;
    z-index: -2;
    transform: translate(-50%, -50%);
    object-fit: cover;
    transition: opacity 0.8s ease;
}

.bg-overlay {
    position: fixed;
    inset: 0;
    z-index: -1;
    background: radial-gradient(circle at 50% 20%, rgba(15, 23, 42, 0.35) 0%, rgba(7, 11, 25, 0.78) 100%);
    pointer-events: none;
}

/* Ana İskelet */
.app-shell {
    position: relative;
    width: 100%;
    height: 100vh;
    display: flex;
    flex-direction: column;
    padding: clamp(0.75rem, 1.5vw, 1.75rem);
    gap: clamp(0.65rem, 1.2vh, 1.25rem);
}

@media (max-width: 1024px) {
    .app-shell {
        height: auto;
        min-height: 100vh;
    }
}

/* Üst Bar (Header) */
.pano-header {
    display: grid;
    grid-template-columns: 1.1fr 1.6fr 1.1fr;
    align-items: center;
    gap: 1rem;
    background: rgba(var(--card-bg-rgb), calc(var(--bg-opacity) * 0.9));
    border: 1px solid var(--card-border);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-radius: 1.25rem;
    padding: clamp(0.6rem, 1vw, 1rem) clamp(0.9rem, 1.5vw, 1.5rem);
    box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.5);
}

@media (max-width: 900px) {
    .pano-header {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 0.75rem;
    }
}

.header-left {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    flex-wrap: wrap;
}

@media (max-width: 900px) {
    .header-left {
        justify-content: center;
    }
}

.icon-btn {
    width: clamp(2.6rem, 3.2vw, 3.4rem);
    height: clamp(2.6rem, 3.2vw, 3.4rem);
    border-radius: 9999px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.14);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    color: #fff;
    position: relative;
}

.icon-btn:hover {
    background: rgba(244, 114, 182, 0.25);
    border-color: var(--accent-color);
    transform: translateY(-2px);
}

.icon-btn.active-state {
    background: rgba(52, 211, 153, 0.25);
    border-color: var(--accent-emerald);
    color: var(--accent-emerald);
}

.icon-btn svg {
    width: clamp(1.3rem, 1.6vw, 1.7rem);
    height: clamp(1.3rem, 1.6vw, 1.7rem);
}

/* Hızlı Çalışma / Etkinlik Sayacı Butonu (Öğretmen Favorisi) */
.quick-timer-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.55rem 1rem;
    border-radius: 9999px;
    background: linear-gradient(135deg, #f59e0b 0%, #ea580c 100%);
    color: #fff;
    font-weight: 700;
    font-size: clamp(0.82rem, 1vw, 1.05rem);
    box-shadow: 0 4px 15px rgba(245, 158, 11, 0.35);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    white-space: nowrap;
}

.quick-timer-btn:hover {
    transform: translateY(-2px) scale(1.03);
    box-shadow: 0 6px 20px rgba(245, 158, 11, 0.55);
}

/* Yapay Sınıf Rozet Butonu */
.yapay-sinif-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.55rem 1rem;
    border-radius: 9999px;
    background: linear-gradient(135deg, #ec4899 0%, #8b5cf6 100%);
    color: #fff;
    text-decoration: none;
    font-weight: 700;
    font-size: clamp(0.82rem, 1vw, 1.05rem);
    box-shadow: 0 4px 15px rgba(236, 72, 153, 0.35);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    white-space: nowrap;
}

.yapay-sinif-btn:hover {
    transform: translateY(-2px) scale(1.03);
    box-shadow: 0 6px 22px rgba(236, 72, 153, 0.55);
}

.header-center {
    text-align: center;
    min-width: 0;
}

.school-title {
    font-size: clamp(1.35rem, 2.2vw, 2.5rem);
    font-weight: 800;
    letter-spacing: 0.02em;
    background: linear-gradient(90deg, #ffffff 0%, #fbcfe8 50%, #e9d5ff 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.subtitle-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    margin-top: 0.2rem;
    flex-wrap: wrap;
}

.class-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.15rem 0.75rem;
    border-radius: 9999px;
    background: rgba(56, 189, 248, 0.18);
    border: 1px solid rgba(56, 189, 248, 0.4);
    color: #bae6fd;
    font-weight: 700;
    font-size: clamp(0.85rem, 1.1vw, 1.15rem);
}

.grade-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.15rem 0.65rem;
    border-radius: 9999px;
    background: rgba(244, 114, 182, 0.18);
    border: 1px solid rgba(244, 114, 182, 0.4);
    color: #fbcfe8;
    font-weight: 700;
    font-size: clamp(0.8rem, 1vw, 1.05rem);
}

.header-right {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: clamp(0.75rem, 1.5vw, 1.5rem);
}

@media (max-width: 900px) {
    .header-right {
        justify-content: center;
    }
}

.clock-date-box {
    text-align: right;
}

@media (max-width: 900px) {
    .clock-date-box {
        text-align: center;
    }
}

.live-digital-clock {
    font-family: var(--font-mono);
    font-size: clamp(1.35rem, 2vw, 2.25rem);
    font-weight: 800;
    color: #fff;
    letter-spacing: 0.05em;
    line-height: 1.1;
}

.date-line {
    font-size: clamp(0.9rem, 1.1vw, 1.2rem);
    color: var(--muted-text);
    font-weight: 600;
}

.weather-pill {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid rgba(255, 255, 255, 0.14);
    padding: 0.45rem 0.9rem;
    border-radius: 1rem;
    font-weight: 700;
    font-size: clamp(1.1rem, 1.5vw, 1.65rem);
    white-space: nowrap;
}

.weather-meta {
    display: flex;
    flex-direction: column;
    text-align: left;
    line-height: 1.15;
}

.weather-city {
    font-size: clamp(0.72rem, 0.85vw, 0.95rem);
    color: var(--muted-text);
    font-weight: 600;
}

/* Ana İçerik Izgarası (Main Grid) */
.pano-main {
    flex: 1;
    display: grid;
    grid-template-columns: 3fr 1fr;
    gap: clamp(0.85rem, 1.4vw, 1.5rem);
    min-height: 0;
}

@media (max-width: 1180px) {
    .pano-main {
        grid-template-columns: 1fr;
    }
}

/* Sol Bölüm: Kartlar */
.cards-stage {
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: stretch;
    min-height: 0;
}

#card-container {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: clamp(0.85rem, 1.4vw, 1.5rem);
    width: 100%;
    height: 100%;
}

@media (max-width: 1024px) {
    #card-container {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        height: auto;
    }
}

@media (max-width: 680px) {
    #card-container {
        grid-template-columns: 1fr;
    }
}

/* Geçiş Animasyonları */
@keyframes slide-in-up {
    from { opacity: 0; transform: translateY(24px) scale(0.98); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes fade-out-scale {
    from { opacity: 1; transform: scale(1); }
    to { opacity: 0; transform: scale(0.97); }
}

#card-container.entering {
    animation: slide-in-up 0.55s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

#card-container.exiting {
    animation: fade-out-scale 0.35s ease-in forwards;
}

/* Kart Tasarımı (Glassmorphism + Büyük Ekran Okunabilirliği C8) */
.card {
    background-color: rgba(var(--card-bg-rgb), var(--bg-opacity));
    border: 1px solid var(--card-border);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-radius: 1.35rem;
    padding: clamp(1rem, 1.4vw, 1.6rem);
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 0;
    box-shadow: 0 12px 32px -8px rgba(0, 0, 0, 0.45);
    transition: border-color 0.25s ease, transform 0.25s ease;
    position: relative;
    overflow: hidden;
}

.card:hover {
    border-color: var(--card-border-hover);
}

.card-placeholder {
    background: transparent !important;
    border: 1px dashed rgba(255, 255, 255, 0.08) !important;
    box-shadow: none !important;
    backdrop-filter: none !important;
}

.card-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: clamp(0.6rem, 1vh, 1rem);
    padding-bottom: 0.55rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    flex-shrink: 0;
}

.card-header h3 {
    font-size: clamp(1.15rem, 1.55vw, 1.75rem);
    font-weight: 800;
    text-align: center;
    background: linear-gradient(90deg, #fbcfe8 0%, #ffffff 50%, #bae6fd 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    letter-spacing: 0.01em;
}

.card-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    width: 100%;
    min-height: 0;
    overflow-y: auto;
    font-size: clamp(1.05rem, 1.3vw, 1.45rem);
}

/* Özel Doğum Günü Kartı */
.birthday-card-today {
    background: linear-gradient(135deg, rgba(236, 72, 153, 0.88) 0%, rgba(139, 92, 246, 0.88) 100%);
    border-color: rgba(255, 255, 255, 0.45);
}

.birthday-card-today .card-header h3 {
    background: none;
    color: #fff;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
}

@keyframes float-Slow {
    0%, 100% { transform: translateY(-4px); }
    50% { transform: translateY(5px); }
}

.cake-img {
    font-size: clamp(3rem, 4.5vw, 5rem);
    animation: float-Slow 2.4s ease-in-out infinite;
}

/* Liste Öğeleri (Büyük Ekran Okunabilirliği C8: en az text-lg eşdeğeri clamp) */
.pano-list {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: clamp(0.4rem, 0.7vh, 0.7rem);
}

.pano-list-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.65rem;
    padding: clamp(0.5rem, 0.8vh, 0.8rem) clamp(0.65rem, 1vw, 1rem);
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 0.85rem;
    font-size: clamp(1rem, 1.25vw, 1.4rem);
    text-align: left;
}

.pano-list-item.highlight-today {
    background: linear-gradient(90deg, rgba(244, 114, 182, 0.28), rgba(139, 92, 246, 0.28));
    border-color: rgba(244, 114, 182, 0.65);
}

.badge-pill {
    display: inline-flex;
    align-items: center;
    padding: 0.2rem 0.7rem;
    border-radius: 9999px;
    font-weight: 700;
    font-size: clamp(0.88rem, 1.05vw, 1.2rem);
    white-space: nowrap;
}

.badge-pink { background: rgba(244, 114, 182, 0.22); color: #fbcfe8; border: 1px solid rgba(244, 114, 182, 0.45); }
.badge-green { background: rgba(52, 211, 153, 0.22); color: #a7f3d0; border: 1px solid rgba(52, 211, 153, 0.45); }
.badge-amber { background: rgba(251, 191, 36, 0.25); color: #fde68a; border: 1px solid rgba(251, 191, 36, 0.5); }
.badge-cyan { background: rgba(56, 189, 248, 0.22); color: #bae6fd; border: 1px solid rgba(56, 189, 248, 0.45); }

/* İngilizce Kelime Kartı (WebP + Seslendirme C6) */
.eng-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: clamp(0.5rem, 0.8vw, 0.85rem);
    width: 100%;
}

.eng-item {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 0.95rem;
    padding: 0.5rem 0.65rem;
    text-align: left;
    transition: all 0.2s ease;
    cursor: pointer;
}

.eng-item:hover {
    background: rgba(56, 189, 248, 0.18);
    border-color: var(--accent-cyan);
    transform: translateY(-2px);
}

.eng-thumb {
    width: clamp(2.8rem, 3.6vw, 4rem);
    height: clamp(2.8rem, 3.6vw, 4rem);
    border-radius: 0.65rem;
    object-fit: contain;
    background: #ffffff;
    padding: 0.15rem;
    flex-shrink: 0;
}

.eng-text {
    flex: 1;
    min-width: 0;
}

.eng-word {
    font-weight: 800;
    font-size: clamp(1rem, 1.25vw, 1.35rem);
    color: #fff;
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.eng-tr {
    font-size: clamp(0.88rem, 1.05vw, 1.15rem);
    color: #bae6fd;
    font-weight: 600;
}

/* Sağ Bölüm: Ders & Zil Sayacı (Aside) */
.lesson-aside {
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 0;
}

.timer-card {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    padding: clamp(1rem, 1.5vw, 1.75rem);
}

.ring-wrapper {
    position: relative;
    width: 100%;
    max-width: clamp(210px, 20vw, 310px);
    aspect-ratio: 1 / 1;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: auto 0;
}

/* #timer-ring-svg yalnızca bir kez döndürülür (A11 düzeltmesi) */
#timer-ring-svg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
}

#timer-ring {
    transition: stroke-dashoffset 0.8s linear, stroke 0.4s ease;
}

.ring-center-info {
    position: relative;
    z-index: 5;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 78%;
    text-align: center;
}

.status-badge-label {
    font-size: clamp(0.78rem, 0.95vw, 1.05rem);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 800;
    padding: 0.15rem 0.65rem;
    border-radius: 9999px;
    background: rgba(255, 255, 255, 0.1);
    color: var(--muted-text);
    margin-bottom: 0.25rem;
}

#current-lesson-name {
    font-size: clamp(1.25rem, 1.8vw, 2.1rem);
    font-weight: 800;
    line-height: 1.2;
    color: #fff;
    margin-bottom: 0.2rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

#time-remaining {
    font-family: var(--font-mono);
    font-size: clamp(2.1rem, 3.2vw, 3.8rem);
    font-weight: 800;
    letter-spacing: 0.04em;
    color: var(--accent-color);
    line-height: 1.1;
    margin: 0.15rem 0;
}

#next-lesson-small {
    font-size: clamp(0.88rem, 1.05vw, 1.2rem);
    color: var(--muted-text);
    margin-top: 0.35rem;
    padding-top: 0.35rem;
    border-top: 1px solid rgba(255, 255, 255, 0.15);
    width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.lesson-times-bar {
    width: 100%;
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 1rem;
    padding: 0.65rem 1rem;
    margin-top: 0.75rem;
}

.lesson-times-row {
    display: flex;
    justify-content: space-between;
    font-size: clamp(0.85rem, 1vw, 1.1rem);
    color: var(--muted-text);
}

.lesson-times-values {
    display: flex;
    justify-content: space-between;
    font-family: var(--font-mono);
    font-size: clamp(1.05rem, 1.3vw, 1.45rem);
    font-weight: 700;
    color: #fff;
    margin-top: 0.15rem;
}

/* Araçlar Izgarası (Kart İçi) */
.tools-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.6rem;
    width: 100%;
    height: 100%;
}

.tool-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    padding: 0.6rem 0.4rem;
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 1rem;
    font-weight: 700;
    font-size: clamp(0.88rem, 1.05vw, 1.18rem);
    transition: all 0.2s ease;
}

.tool-btn:hover {
    background: rgba(244, 114, 182, 0.22);
    border-color: var(--accent-color);
    transform: translateY(-2px);
}

.tool-btn .tool-emoji {
    font-size: clamp(1.6rem, 2.2vw, 2.4rem);
    line-height: 1;
}

/* Alt Navigasyon ve Medya Çubuğu (Footer) */
.pano-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    min-height: 2.5rem;
    flex-wrap: wrap;
}

.nav-dots-pill {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    background: rgba(15, 23, 42, 0.65);
    border: 1px solid rgba(255, 255, 255, 0.14);
    padding: 0.45rem 1rem;
    border-radius: 9999px;
    backdrop-filter: blur(8px);
}

.nav-dot {
    width: 0.85rem;
    height: 0.85rem;
    border-radius: 9999px;
    background: rgba(255, 255, 255, 0.3);
    transition: all 0.25s ease;
}

.nav-dot:hover {
    background: rgba(255, 255, 255, 0.65);
}

.nav-dot.active {
    background: var(--accent-color);
    transform: scale(1.3);
    box-shadow: 0 0 10px var(--accent-color);
}

/* Yüzen / Küçültülebilir Medya Paneli */
#media-panel-container {
    position: fixed;
    bottom: 1.1rem;
    left: 1.1rem;
    z-index: 40;
    width: 310px;
    background: rgba(15, 23, 42, 0.88);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 1.1rem;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.6);
    color: #fff;
    transition: width 0.25s ease, opacity 0.25s ease;
}

#media-panel-container.minimized {
    width: 210px;
}

#media-panel-container.minimized .media-panel-body {
    display: none;
}

#media-panel-handle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.45rem 0.8rem;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 1.1rem 1.1rem 0 0;
    cursor: grab;
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--muted-text);
}

#media-panel-container.minimized #media-panel-handle {
    border-radius: 1.1rem;
}

.media-panel-body {
    padding: 0.75rem;
}

.media-controls-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.4rem;
    margin: 0.35rem 0;
}

#music-player {
    width: 100%;
    height: 32px;
}

.video-selector-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.35rem;
    margin-top: 0.4rem;
}

.video-btn {
    padding: 0.3rem 0.45rem;
    border-radius: 0.5rem;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    font-size: 0.75rem;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: all 0.2s ease;
}

.video-btn:hover, .video-btn.active {
    background: rgba(244, 114, 182, 0.35);
    border-color: var(--accent-color);
}

/* Modallar (Ayarlar, PIN, Araçlar ve Çalışma Sayacı) */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(4, 7, 17, 0.78);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 60;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease, visibility 0.25s ease;
    padding: 1rem;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Ayarlar Modalı İskeleti */
.settings-dialog {
    width: 100%;
    max-width: 1180px;
    height: 88vh;
    background: #0f172a;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 1.5rem;
    display: flex;
    overflow: hidden;
    position: relative;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.75);
}

@media (max-width: 820px) {
    .settings-dialog {
        flex-direction: column;
        height: 94vh;
    }
}

.settings-sidebar {
    width: 120px;
    background: rgba(0, 0, 0, 0.3);
    border-right: 1px solid rgba(255, 255, 255, 0.1);
    padding: 0.75rem 0.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
    overflow-y: auto;
    flex-shrink: 0;
}

@media (max-width: 820px) {
    .settings-sidebar {
        width: 100%;
        flex-direction: row;
        border-right: none;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        overflow-x: auto;
    }
}

.settings-tab-icon {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
    padding: 0.65rem 0.35rem;
    border-radius: 0.9rem;
    color: var(--muted-text);
    font-size: 0.78rem;
    font-weight: 700;
    transition: all 0.2s ease;
}

.settings-tab-icon:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
}

.settings-tab-icon.active {
    background: linear-gradient(135deg, #ec4899 0%, #8b5cf6 100%);
    color: #fff;
    box-shadow: 0 4px 12px rgba(236, 72, 153, 0.35);
}

.settings-body {
    flex: 1;
    padding: clamp(1.2rem, 2.2vw, 2.2rem);
    overflow-y: auto;
}

/* Form Elemanları */
.form-group {
    margin-bottom: 1.1rem;
}

.form-label {
    display: block;
    font-size: 0.92rem;
    font-weight: 700;
    color: var(--muted-text);
    margin-bottom: 0.35rem;
}

.form-input, .form-select, .form-textarea {
    width: 100%;
    padding: 0.65rem 0.85rem;
    border-radius: 0.75rem;
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid rgba(255, 255, 255, 0.18);
    color: #fff;
    font-size: 0.98rem;
    transition: border-color 0.2s ease;
}

.form-input:focus, .form-select:focus, .form-textarea:focus {
    border-color: var(--accent-color);
    outline: none;
}

.form-select option {
    background-color: #0f172a;
    color: #fff;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    padding: 0.65rem 1.25rem;
    border-radius: 0.8rem;
    font-weight: 700;
    font-size: 0.95rem;
    transition: all 0.2s ease;
}

.btn-primary { background: linear-gradient(135deg, #ec4899, #8b5cf6); color: #fff; }
.btn-primary:hover { filter: brightness(1.1); transform: translateY(-1px); }
.btn-blue { background: #2563eb; color: #fff; }
.btn-blue:hover { background: #3b82f6; }
.btn-green { background: #059669; color: #fff; }
.btn-green:hover { background: #10b981; }
.btn-amber { background: #d97706; color: #fff; }
.btn-amber:hover { background: #f59e0b; }
.btn-red { background: #dc2626; color: #fff; }
.btn-red:hover { background: #ef4444; }
.btn-ghost { background: rgba(255, 255, 255, 0.09); border: 1px solid rgba(255, 255, 255, 0.16); color: #fff; }
.btn-ghost:hover { background: rgba(255, 255, 255, 0.18); }

/* Araç Modalı (Tam Ekran / Geniş Kutu) */
.tool-dialog {
    width: 100%;
    max-width: 780px;
    min-height: 500px;
    max-height: 92vh;
    background: rgba(15, 23, 42, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 2rem;
    padding: clamp(1.5rem, 2.5vw, 2.5rem);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    box-shadow: 0 25px 70px rgba(0, 0, 0, 0.8);
    overflow-y: auto;
}

.tool-dialog.wide-tool {
    max-width: 980px;
}

/* Animasyonlu Etkinlik / Çalışma Geri Sayım Sayacı */
.study-timer-presets {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.55rem;
    margin-bottom: 1.2rem;
}

.preset-chip {
    padding: 0.5rem 1rem;
    border-radius: 9999px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.16);
    font-weight: 700;
    font-size: 1rem;
    transition: all 0.2s ease;
}

.preset-chip:hover, .preset-chip.active {
    background: var(--accent-color);
    border-color: var(--accent-color);
    color: #fff;
    transform: scale(1.05);
}

.study-ring-box {
    position: relative;
    width: clamp(230px, 32vh, 320px);
    height: clamp(230px, 32vh, 320px);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0.5rem 0 1.25rem;
}

.study-ring-svg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
}

/* Trafik Işığı Gürültü Ölçer */
.traffic-light-box {
    display: flex;
    gap: 1.25rem;
    background: #090d16;
    padding: 1.1rem 1.8rem;
    border-radius: 9999px;
    border: 2px solid rgba(255, 255, 255, 0.15);
    margin: 1rem 0;
}

.tl-bulb {
    width: 4.2rem;
    height: 4.2rem;
    border-radius: 9999px;
    opacity: 0.22;
    transition: all 0.2s ease;
}

.tl-bulb.green { background: #10b981; }
.tl-bulb.yellow { background: #f59e0b; }
.tl-bulb.red { background: #ef4444; }

.tl-bulb.active {
    opacity: 1;
    transform: scale(1.1);
}
.tl-bulb.green.active { box-shadow: 0 0 28px #10b981; }
.tl-bulb.yellow.active { box-shadow: 0 0 28px #f59e0b; }
.tl-bulb.red.active { box-shadow: 0 0 32px #ef4444; }

/* Rastgele Öğrenci Seçici Kartı */
.picker-stage {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    border-radius: 1.5rem;
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(244, 114, 182, 0.35);
    min-width: 300px;
    margin: 1rem 0;
}

.picker-avatar {
    width: 7.5rem;
    height: 7.5rem;
    border-radius: 9999px;
    object-fit: cover;
    border: 4px solid var(--accent-color);
    margin-bottom: 0.85rem;
    background: #1e293b;
}

/* Tablolar */
.pano-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.92rem;
}

.pano-table th, .pano-table td {
    padding: 0.6rem 0.75rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    text-align: left;
}

.pano-table th {
    background: rgba(255, 255, 255, 0.08);
    font-weight: 700;
}

/* Bildirim Toast (alert yerine anlaşılır uyarı C5) */
#toast-container {
    position: fixed;
    top: 1.25rem;
    right: 1.25rem;
    z-index: 100;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    max-width: 380px;
}

.toast-msg {
    padding: 0.85rem 1.2rem;
    border-radius: 0.95rem;
    background: rgba(15, 23, 42, 0.95);
    border-left: 5px solid var(--accent-color);
    color: #fff;
    font-weight: 600;
    font-size: 0.95rem;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.55);
    animation: slide-in-up 0.3s ease forwards;
}

.toast-msg.success { border-left-color: var(--accent-emerald); }
.toast-msg.error { border-left-color: var(--accent-rose); }
.toast-msg.warn { border-left-color: var(--accent-amber); }

/* Kaydırma Çubuğu */
::-webkit-scrollbar { width: 7px; height: 7px; }
::-webkit-scrollbar-track { background: rgba(255, 255, 255, 0.04); }
::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.22); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: rgba(255, 255, 255, 0.4); }

/* Yardımcı Sınıflar (Tailwind Geçiş Uyumluluğu İçin) */
.hidden { display: none !important; }
.flex { display: flex; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.gap-2 { gap: 0.5rem; }
.gap-3 { gap: 0.75rem; }
.gap-4 { gap: 1rem; }
.w-full { width: 100%; }
.text-center { text-align: center; }
.font-bold { font-weight: 700; }
.truncate { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
