/* ==========================================================================
   PUGY LEARNING PORTAL - PREMIUM CSS DESIGN SYSTEM
   Theme: Warm Fox Orange & Soft Cream
   Author: Antigravity
   ========================================================================== */

/* Fonts Import */
@import url('https://fonts.googleapis.com/css2?family=Nunito:wght@400;600;700;800;900&display=swap');

/* CSS Custom Properties / Tokens */
:root {
    /* Colors */
    --primary: #E8620A;
    --primary-hover: #C4510A;
    --primary-light: rgba(232,98,10,0.12);
    --primary-light-hover: rgba(232,98,10,0.18);
    --secondary: #F5A623;
    --secondary-light: #FFF8ED;
    --dark-chocolate: #3D2010;
    --text-dark: #3D2010;
    --text-muted: #9C6B40;
    --text-light: #B8956A;
    --bg-page: #FFF8F2;
    --bg-card: #FFFFFF;
    
    /* System States */
    --success: #2D9E6B;
    --success-light: rgba(45,158,107,0.1);
    --success-border: rgba(45,158,107,0.25);
    --info: #4A90D9;
    --info-light: rgba(74,144,217,0.1);
    --warning: #F59E0B;
    --warning-light: #FEF3C7;
    --danger: #E84040;
    --danger-light: rgba(232,64,64,0.1);

    /* Layout & Styling */
    --sidebar-width: 280px;
    --sidebar-collapsed-width: 80px;
    --topbar-height: 80px;
    
    --radius-lg: 24px;
    --radius-md: 18px;
    --radius-sm: 12px;
    --radius-full: 9999px;
    
    --shadow-sm: 0 4px 12px rgba(232, 98, 10, 0.05);
    --shadow-md: 0 10px 30px rgba(232, 98, 10, 0.08);
    --shadow-lg: 0 20px 48px rgba(232, 98, 10, 0.12);
    --shadow-glow: 0 8px 24px rgba(232, 98, 10, 0.3);
    
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-fast: all 0.15s ease;
}

/* Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

html, body {
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0;
    overflow: hidden !important;
    position: fixed;
    font-family: 'Nunito', sans-serif;
    background-color: var(--bg-page);
    color: var(--text-dark);
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Nunito', sans-serif;
    color: var(--text-dark);
    font-weight: 900;
}

a {
    color: inherit;
    text-decoration: none;
    transition: var(--transition);
}

button {
    font-family: inherit;
    border: none;
    background: none;
    cursor: pointer;
    outline: none;
    transition: var(--transition);
}

/* Core Layout */
.app-container {
    display: flex;
    width: 100%;
    height: 100%;
    overflow: hidden;
    position: relative;
}

.hidden {
    display: none !important;
}

/* Glassmorphism background decor */
.bg-decor {
    position: absolute;
    width: 300px;
    height: 300px;
    border-radius: var(--radius-full);
    background: radial-gradient(circle, rgba(232, 98, 10, 0.15) 0%, rgba(255, 243, 235, 0) 70%);
    filter: blur(40px);
    z-index: 0;
    pointer-events: none;
}
.bg-decor-1 { top: -50px; right: -50px; }
.bg-decor-2 { bottom: -100px; left: -100px; }

/* Sidebar Styling */
.sidebar {
    width: var(--sidebar-width);
    height: 100%;
    background-color: var(--bg-card);
    border-right: 1px solid rgba(240, 222, 202, 0.5);
    display: flex;
    flex-direction: column;
    padding: 24px;
    z-index: 10;
    transition: var(--transition);
    position: relative;
    flex-shrink: 0;
}

.sidebar-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 8px 32px 8px;
}

.logo-icon {
    width: 44px;
    height: 44px;
    background-color: var(--primary);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-glow);
    color: #fff;
    font-size: 24px;
    position: relative;
    overflow: hidden;
}

.logo-icon::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(255,255,255,0.3), transparent);
    transform: rotate(45deg);
    animation: shine 3s infinite;
}

@keyframes shine {
    0% { transform: translate(-100%, -100%) rotate(45deg); }
    100% { transform: translate(100%, 100%) rotate(45deg); }
}

.logo-text {
    font-family: 'Outfit', sans-serif;
    font-size: 24px;
    font-weight: 800;
    color: var(--primary);
    letter-spacing: -0.5px;
    display: flex;
    align-items: baseline;
    gap: 4px;
}

.logo-badge {
    font-size: 10px;
    background-color: var(--secondary-light);
    color: var(--secondary);
    border: 1px solid rgba(245, 166, 35, 0.3);
    padding: 2px 6px;
    border-radius: var(--radius-full);
    font-weight: 600;
    text-transform: uppercase;
}

.sidebar-menu {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex-grow: 1;
}

.menu-item a {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 14px 18px;
    color: var(--text-muted);
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 15px;
    border: 1px solid transparent;
}

.menu-item a svg {
    width: 22px;
    height: 22px;
    stroke: var(--text-muted);
    stroke-width: 2;
    fill: none;
    transition: var(--transition);
}

.menu-item:hover a {
    color: var(--primary);
    background-color: var(--primary-light);
}

.menu-item:hover a svg {
    stroke: var(--primary);
    transform: translateX(3px);
}

.menu-item.active a {
    color: #fff;
    background: linear-gradient(135deg, var(--primary) 0%, #FF8533 100%);
    box-shadow: var(--shadow-glow);
    border: 1px solid rgba(232, 98, 10, 0.1);
}

.menu-item.active a svg {
    stroke: #fff;
}

/* Sidebar Footer (User Profile Card) */
.sidebar-profile {
    margin-top: auto;
    padding: 10px 12px;
    background-color: var(--secondary-light);
    border: 1px solid rgba(240, 222, 202, 0.4);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    gap: 8px;
    position: relative;
    cursor: pointer;
    transition: var(--transition);
}

.sidebar-profile:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
    border-color: rgba(232, 98, 10, 0.2);
}

.profile-avatar-wrap-mini {
    position: relative;
}

.profile-avatar-mini {
    width: 32px;
    height: 32px;
    border-radius: var(--radius-sm);
    border: 2px solid var(--primary);
    background-color: var(--primary-light);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    overflow: hidden;
}

.profile-avatar-mini img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.profile-info {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    flex: 1;
    min-width: 0;
    padding-right: 16px;
}

.profile-name {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-dark);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.profile-role {
    font-size: 11px;
    color: var(--text-light);
    font-weight: 500;
}

.logout-btn {
    position: absolute;
    right: 12px;
    color: var(--text-light);
    opacity: 0.7;
    transition: var(--transition);
}

.logout-btn:hover {
    color: var(--danger);
    opacity: 1;
    transform: scale(1.1);
}

/* Main Content Area */
.main-wrapper {
    flex-grow: 1;
    height: 100%;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    z-index: 1;
}

/* Topbar Styling */
.topbar {
    height: var(--topbar-height);
    background-color: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(240, 222, 202, 0.5);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 40px;
    z-index: 9;
    flex-shrink: 0;
}

.topbar-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.page-title {
    font-size: 26px;
    font-weight: 800;
    color: var(--text-dark);
}

.topbar-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

/* Language Selector */
.lang-selector {
    display: flex;
    background-color: var(--primary-light);
    border: 1px solid rgba(232, 98, 10, 0.15);
    padding: 4px;
    border-radius: var(--radius-full);
    position: relative;
}

.lang-btn {
    padding: 6px 14px;
    font-size: 13px;
    font-weight: 700;
    border-radius: var(--radius-full);
    color: var(--text-muted);
}

.lang-btn.active {
    background-color: var(--primary);
    color: #fff;
    box-shadow: 0 4px 10px rgba(232, 98, 10, 0.2);
}

/* Notification Button */
.notification-btn {
    width: 46px;
    height: 46px;
    background-color: #fff;
    border: 1px solid rgba(240, 222, 202, 0.6);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.notification-btn:hover {
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}

.notification-btn svg {
    width: 22px;
    height: 22px;
    stroke: var(--text-dark);
    stroke-width: 2;
    fill: none;
}

.notification-dot {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 10px;
    height: 10px;
    background-color: var(--primary);
    border: 2px solid #fff;
    border-radius: var(--radius-full);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(232, 98, 10, 0.7); }
    70% { transform: scale(1); box-shadow: 0 0 0 6px rgba(232, 98, 10, 0); }
    100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(232, 98, 10, 0); }
}

/* Content Container */
.content-body {
    flex-grow: 1;
    overflow-y: auto;
    padding: 40px;
    position: relative;
}

/* Tab Transitions */
.tab-content {
    display: none;
    animation: fadeScale 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.tab-content.active {
    display: block;
}

@keyframes fadeScale {
    from {
        opacity: 0;
        transform: scale(0.98) translateY(10px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

/* --- TAB 1: DASHBOARD PAGE --- */

/* Greeting Header Card */
.welcome-card {
    background: linear-gradient(135deg, #1A1200 0%, #302000 100%);
    border-radius: var(--radius-lg);
    padding: 32px 40px;
    color: #fff;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    margin-bottom: 32px;
}

.welcome-card::after {
    content: '';
    position: absolute;
    right: 0;
    top: 0;
    width: 350px;
    height: 100%;
    background: radial-gradient(circle, rgba(232, 98, 10, 0.25) 0%, rgba(26, 18, 0, 0) 70%);
    pointer-events: none;
}

.welcome-text h2 {
    color: #fff;
    font-size: 32px;
    margin-bottom: 8px;
    font-family: 'Outfit', sans-serif;
}

.welcome-text p {
    color: #FFF3EB;
    font-size: 16px;
    font-weight: 500;
    opacity: 0.9;
}

.welcome-decor-fox {
    font-size: 80px;
    filter: drop-shadow(0 8px 16px rgba(0,0,0,0.3));
    animation: bounce 4s ease-in-out infinite;
    z-index: 1;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-10px) rotate(5deg); }
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 32px;
}

.stat-card {
    background-color: var(--bg-card);
    border: 1px solid rgba(240, 222, 202, 0.4);
    border-radius: var(--radius-lg);
    padding: 24px;
    display: flex;
    align-items: center;
    gap: 20px;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
    border-color: rgba(232, 98, 10, 0.2);
}

.stat-icon {
    width: 54px;
    height: 54px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
}

.stat-icon svg {
    width: 26px;
    height: 26px;
}

.stat-1 .stat-icon { background-color: #FFF2EB; color: var(--primary); }
.stat-2 .stat-icon { background-color: #FFF9E6; color: var(--secondary); }
.stat-3 .stat-icon { background-color: #EBFDF5; color: var(--success); }
.stat-4 .stat-icon { background-color: #EFF6FF; color: var(--info); }

.stat-details {
    display: flex;
    flex-direction: column;
}

.stat-value {
    font-family: 'Outfit', sans-serif;
    font-size: 28px;
    font-weight: 800;
    color: var(--text-dark);
    line-height: 1.2;
}

.stat-label {
    font-size: 13px;
    color: var(--text-light);
    font-weight: 600;
    margin-top: 2px;
}

/* Dashboard Bottom Grid Sections */
.dashboard-sections {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 32px;
}

.section-panel {
    background-color: var(--bg-card);
    border: 1px solid rgba(240, 222, 202, 0.4);
    border-radius: var(--radius-lg);
    padding: 32px;
    box-shadow: var(--shadow-sm);
}

.panel-header {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-bottom: 28px;
}

.panel-title {
    font-size: 18px;
    font-weight: 800;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Weekly Progress Chart */
.chart-container {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    height: 220px;
    padding-top: 20px;
}

.chart-bar-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    width: 40px;
}

.chart-bar-fill {
    width: 24px;
    background: linear-gradient(180deg, var(--primary) 0%, #FF8533 100%);
    border-radius: var(--radius-full);
    position: relative;
    transition: height 1s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 12px rgba(232, 98, 10, 0.15);
}

.chart-bar-fill::after {
    content: attr(data-val) 'm';
    position: absolute;
    top: -28px;
    left: 50%;
    transform: translateX(-50%);
    background-color: var(--dark-chocolate);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    padding: 3px 6px;
    border-radius: 6px;
    opacity: 0;
    transition: var(--transition-fast);
    pointer-events: none;
    white-space: nowrap;
}

.chart-bar-fill:hover::after {
    opacity: 1;
    top: -34px;
}

.chart-bar-fill:hover {
    background: linear-gradient(180deg, var(--primary-hover) 0%, var(--primary) 100%);
}

.chart-label {
    font-size: 12px;
    font-weight: 700;
    color: var(--text-light);
}

/* Sidebar Widgets panel */
.classroom-panel {
    display: flex;
    flex-direction: column;
    gap: 32px;
}

.countdown-box {
    background: linear-gradient(135deg, var(--primary) 0%, #FF8533 100%);
    border-radius: var(--radius-lg);
    padding: 28px;
    color: #fff;
    text-align: center;
    box-shadow: var(--shadow-glow);
}

.countdown-title {
    font-family: 'Outfit', sans-serif;
    font-size: 16px;
    font-weight: 800;
    letter-spacing: 0.5px;
    margin-bottom: 12px;
}

.countdown-time {
    font-family: 'Outfit', sans-serif;
    font-size: 32px;
    font-weight: 900;
    letter-spacing: -0.5px;
    margin-bottom: 6px;
}

.countdown-btn {
    width: 100%;
    background-color: #fff;
    color: var(--primary);
    padding: 12px;
    border-radius: var(--radius-md);
    font-weight: 800;
    font-size: 14px;
    box-shadow: var(--shadow-sm);
}

.countdown-btn:hover {
    background-color: var(--primary-light);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.summary-note-card {
    background-color: var(--primary-light);
    border: 1px dashed rgba(232, 98, 10, 0.3);
    border-radius: var(--radius-md);
    padding: 16px;
}

.note-author {
    font-size: 13px;
    font-weight: 700;
    color: var(--primary);
}

/* --- TAB 2: MY COURSES --- */
.courses-filter {
    display: flex;
    gap: 12px;
    margin-bottom: 32px;
    overflow-x: auto;
    padding-bottom: 8px;
}

.filter-btn {
    padding: 10px 20px;
    border-radius: var(--radius-full);
    font-weight: 700;
    font-size: 14px;
    background-color: #fff;
    color: var(--text-muted);
    border: 1px solid rgba(240, 222, 202, 0.6);
}

.filter-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.filter-btn.active {
    background-color: var(--primary);
    color: #fff;
    border-color: var(--primary);
    box-shadow: var(--shadow-glow);
}

.courses-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 28px;
}

.course-card {
    background-color: var(--bg-card);
    border: 1px solid rgba(240, 222, 202, 0.4);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
}

.course-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
    border-color: rgba(232, 98, 10, 0.25);
}

.course-card-header {
    height: 10px;
}

.course-card-body {
    padding: 28px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.course-card-badge {
    align-self: flex-start;
    font-size: 11px;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: var(--radius-full);
    margin-bottom: 16px;
    text-transform: uppercase;
}

.course-card-badge.eng { background-color: #EFF6FF; color: var(--info); }
.course-card-badge.ger { background-color: #EBFDF5; color: var(--success); }

.course-title {
    font-size: 18px;
    font-weight: 800;
    margin-bottom: 8px;
}

.course-desc {
    font-size: 13px;
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: 24px;
}

.course-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
}

.course-meta {
    font-size: 13px;
    color: var(--text-light);
    font-weight: 600;
}

.course-btn {
    background-color: var(--primary-light);
    color: var(--primary);
    padding: 8px 18px;
    border-radius: var(--radius-md);
    font-weight: 800;
    font-size: 13px;
}

.course-btn:hover {
    background-color: var(--primary);
    color: #fff;
}

/* --- TAB 3: INTERACTIVE CLASSROOM --- */
/* --- VISUAL LESSONS BAR & CARDS --- */
.visual-lessons-bar::-webkit-scrollbar {
    height: 8px;
}
.visual-lessons-bar::-webkit-scrollbar-track {
    background: rgba(232, 98, 10, 0.03);
    border-radius: 10px;
}
.visual-lessons-bar::-webkit-scrollbar-thumb {
    background: rgba(232, 98, 10, 0.15);
    border-radius: 10px;
}
.visual-lessons-bar::-webkit-scrollbar-thumb:hover {
    background: var(--primary);
}

.visual-lesson-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(232, 98, 10, 0.06) !important;
}

.visual-lesson-card.active {
    animation: activeGlow 2s infinite ease-in-out;
}

@keyframes activeGlow {
    0% {
        box-shadow: 0 0 0 0 rgba(232, 98, 10, 0.2);
    }
    70% {
        box-shadow: 0 0 0 8px rgba(232, 98, 10, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(232, 98, 10, 0);
    }
}

.classroom-layout {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 32px;
}

.classroom-main-panel {
    min-width: 0;
}

.video-container {
    background-color: #000;
    border-radius: var(--radius-lg);
    overflow: hidden;
    position: relative;
    box-shadow: var(--shadow-lg);
}

.video-wrap {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
}

.video-wrap iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

.video-placeholder {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: 700;
    font-size: 16px;
    background-color: var(--dark-chocolate);
}

.classroom-tabs {
    display: flex;
    border-bottom: 2px solid rgba(240, 222, 202, 0.4);
    gap: 24px;
    margin-bottom: 20px;
    margin-top: 16px;
}

.classroom-tab-btn {
    padding: 12px 4px;
    font-size: 14px;
    font-weight: 700;
    color: var(--text-light);
    position: relative;
}

.classroom-tab-btn::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: var(--primary);
    transform: scaleX(0);
    transition: var(--transition);
}

.classroom-tab-btn.active {
    color: var(--primary);
}

.classroom-tab-btn.active::after {
    transform: scaleX(1);
}

.classroom-pane {
    display: none;
    animation: fadeScale 0.3s ease;
}

.classroom-pane.active {
    display: block;
}

/* Sidebar Kelimeler & Test */
.classroom-sidebar {
    display: flex;
    flex-direction: column;
    gap: 32px;
}

.vocab-list, .quiz-box {
    background-color: var(--bg-card);
    border: 1px solid rgba(240, 222, 202, 0.4);
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: var(--shadow-sm);
}

.vocab-items {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
    max-height: 300px;
    overflow-y: auto;
    padding-right: 4px;
}

.vocab-card {
    background-color: var(--primary-light);
    border: 1px solid rgba(232, 98, 10, 0.1);
    border-radius: var(--radius-md);
    padding: 12px 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    transition: var(--transition-fast);
}

.vocab-card:hover {
    transform: translateX(4px);
    background-color: var(--primary-light-hover);
    border-color: var(--primary);
}

.vc-emoji {
    font-size: 22px;
}

.vc-info {
    display: flex;
    flex-direction: column;
}

.vc-word {
    font-family: 'Outfit', sans-serif;
    font-size: 15px;
    font-weight: 700;
    color: var(--primary);
}

.vc-tr {
    font-size: 12px;
    color: var(--text-muted);
}

/* Interactive Quiz */
.quiz-question {
    font-size: 14px;
    font-weight: 700;
    line-height: 1.5;
    margin-bottom: 16px;
}

.quiz-options {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.quiz-opt {
    width: 100%;
    background-color: var(--primary-light);
    border: 1px solid rgba(232, 98, 10, 0.1);
    padding: 12px 16px;
    border-radius: var(--radius-md);
    font-size: 13px;
    font-weight: 600;
    color: var(--text-dark);
    text-align: left;
}

.quiz-opt:hover {
    border-color: var(--primary);
    background-color: var(--primary-light-hover);
}

.quiz-opt.correct {
    background-color: var(--success-light);
    border-color: var(--success);
    color: var(--success);
}

.quiz-opt.wrong {
    background-color: var(--danger-light);
    border-color: var(--danger);
    color: var(--danger);
}

/* --- TAB 4: DERS KAYITLARI (RECORDINGS) --- */
.recording-card {
    background-color: var(--bg-card);
    border: 1px solid rgba(240, 222, 202, 0.4);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.recording-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: rgba(232, 98, 10, 0.2);
}

.rec-video-wrap {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    background-color: #000;
}

.rec-video-wrap iframe {
    position: absolute;
    top:0; left:0; width:100%; height:100%; border:none;
}

.rec-info {
    padding: 20px;
}

.rec-title {
    font-size: 15px;
    font-weight: 800;
    margin-bottom: 6px;
}

.rec-meta {
    font-size: 12px;
    color: var(--text-light);
    font-weight: 600;
}

/* --- TAB 5: PROGRESS & EVALUATIONS --- */
.progress-stats-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.progress-box {
    background-color: var(--bg-card);
    border: 1px solid rgba(240, 222, 202, 0.4);
    border-radius: var(--radius-lg);
    padding: 32px;
    text-align: center;
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
    align-items: center;
}

.radial-progress-wrapper {
    position: relative;
    width: 140px;
    height: 140px;
    margin-bottom: 20px;
}

.radial-progress-svg {
    transform: rotate(-90deg);
}

.radial-circle-bg {
    fill: none;
    stroke: var(--primary-light);
    stroke-width: 10;
}

.radial-circle-fill {
    fill: none;
    stroke: var(--primary);
    stroke-width: 10;
    stroke-linecap: round;
    stroke-dasharray: 345.5; /* 2 * PI * r (r=55) = 345.5 */
    transition: stroke-dashoffset 1s ease-in-out;
}

.radial-progress-text {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Outfit', sans-serif;
    font-size: 24px;
    font-weight: 800;
    color: var(--text-dark);
}

.radial-label {
    font-family: 'Outfit', sans-serif;
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 6px;
}

.radial-desc {
    font-size: 12px;
    color: var(--text-muted);
    line-height: 1.5;
}

.badges-panel {
    background-color: var(--bg-card);
    border: 1px solid rgba(240, 222, 202, 0.4);
    border-radius: var(--radius-lg);
    padding: 32px;
    box-shadow: var(--shadow-sm);
}

.badges-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 20px;
}

.badge-card {
    border: 1.5px solid rgba(240, 222, 202, 0.4);
    background-color: var(--secondary-light);
    border-radius: var(--radius-lg);
    padding: 24px 16px;
    text-align: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: default;
}

.badge-card:not(.locked) {
    background: white;
    border-color: #FFEBE0;
    box-shadow: 0 4px 12px rgba(232, 98, 10, 0.04);
    cursor: pointer;
}

.badge-card:not(.locked):hover {
    transform: translateY(-8px) scale(1.05);
    box-shadow: 0 12px 24px rgba(232, 98, 10, 0.12);
    border-color: var(--primary);
}

.badge-card:not(.locked) .badge-icon-box {
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-6px) rotate(5deg); }
    100% { transform: translateY(0px) rotate(0deg); }
}

.badge-card.locked {
    filter: grayscale(1);
    opacity: 0.55;
    background-color: #F3F4F6;
}

.badge-icon-box {
    font-size: 36px;
    margin-bottom: 12px;
}

.badge-title {
    font-size: 14px;
    font-weight: 800;
    margin-bottom: 4px;
}

.badge-desc {
    font-size: 11px;
    color: var(--text-muted);
    line-height: 1.4;
}

/* --- TAB 6: FEEDBACK & HOMEWORK --- */
.feedback-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 32px;
}

.teachers-list-panel {
    background-color: var(--bg-card);
    border: 1px solid rgba(240, 222, 202, 0.4);
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: var(--shadow-sm);
    height: fit-content;
}

.my-teacher-card {
    display: flex;
    align-items: center;
    gap: 12px;
    background-color: var(--primary-light);
    border: 1px solid rgba(232, 98, 10, 0.1);
    border-radius: var(--radius-md);
    padding: 12px;
    cursor: pointer;
    transition: var(--transition-fast);
}

.my-teacher-card:hover, .my-teacher-card.active {
    border-color: var(--primary);
    background-color: var(--primary-light-hover);
}

.mtc-avatar {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-md);
    border: 2px solid var(--primary);
    background-color: #fff;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.mtc-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.feedback-details-panel {
    background-color: var(--bg-card);
    border: 1px solid rgba(240, 222, 202, 0.4);
    border-radius: var(--radius-lg);
    padding: 32px;
    box-shadow: var(--shadow-sm);
}

.feedback-stars-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 24px;
}

.fb-rating-card {
    background-color: var(--bg-page);
    border-radius: var(--radius-md);
    padding: 16px;
    text-align: center;
}

.fb-rating-label {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-light);
    margin-bottom: 6px;
}

.fb-rating-stars {
    color: var(--secondary);
    font-size: 20px;
}

.fb-comment-box {
    background-color: var(--primary-light);
    border-left: 4px solid var(--primary);
    padding: 16px 20px;
    border-radius: var(--radius-md);
    font-size: 14px;
    line-height: 1.6;
    color: var(--text-dark);
}

.hw-card textarea {
    width: 100%;
    background-color: var(--bg-page);
    border: 1px solid rgba(240, 222, 202, 0.6);
    border-radius: var(--radius-md);
    padding: 16px;
    font-family: inherit;
    font-size: 14px;
    color: var(--text-dark);
    outline: none;
    resize: vertical;
    margin-bottom: 16px;
}

.hw-card textarea:focus {
    border-color: var(--primary);
}

.btn-submit-hw {
    background-color: var(--primary);
    color: #fff;
    padding: 12px 24px;
    border-radius: var(--radius-md);
    font-weight: 800;
    font-size: 14px;
    box-shadow: var(--shadow-glow);
}

.btn-submit-hw:hover {
    background-color: var(--primary-hover);
    transform: translateY(-2px);
}

/* --- TAB 7: PROFILE --- */
.profile-layout {
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 32px;
}

.profile-photo-card {
    background: linear-gradient(135deg, #FFF9F6 0%, #FFFFFF 100%);
    border: 2px solid #FFEBE0;
    border-radius: var(--radius-lg);
    padding: 40px 24px;
    text-align: center;
    box-shadow: 0 8px 24px rgba(232, 98, 10, 0.05);
    height: fit-content;
    position: relative;
    overflow: hidden;
}
.profile-photo-card::before {
    content: "🦊 PUGY PASSPORT";
    position: absolute;
    top: 12px;
    left: 12px;
    font-size: 9px;
    font-weight: 900;
    color: var(--primary);
    opacity: 0.8;
    letter-spacing: 1px;
}

.profile-avatar-wrap {
    position: relative;
    display: inline-block;
    margin-bottom: 20px;
}

.profile-avatar {
    width: 130px;
    height: 130px;
    border-radius: var(--radius-lg);
    border: 4px solid var(--primary);
    background-color: var(--primary-light);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 64px;
    overflow: hidden;
    margin: 0 auto;
    box-shadow: var(--shadow-md);
}

.profile-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.photo-change-btn {
    display: block;
    margin: 16px auto 0;
    background-color: var(--primary-light);
    color: var(--primary);
    padding: 8px 18px;
    border-radius: var(--radius-md);
    font-weight: 800;
    font-size: 13px;
    border: 1px dashed rgba(232, 98, 10, 0.4);
}

.photo-change-btn:hover {
    background-color: var(--primary);
    color: #fff;
    border-color: var(--primary);
}

.profile-name {
    font-size: 20px;
    font-weight: 800;
    color: var(--text-dark);
    word-wrap: break-word;
    overflow-wrap: break-word;
    line-height: 1.3;
    margin-top: 12px;
}

.profile-username {
    font-size: 14px;
    color: var(--text-light);
    margin-top: 4px;
}

.profile-level {
    display: inline-block;
    background-color: var(--secondary-light);
    color: var(--secondary);
    border: 1px solid rgba(245,166,35,0.2);
    font-size: 12px;
    font-weight: 700;
    padding: 4px 12px;
    border-radius: var(--radius-full);
    margin-top: 12px;
}

.profile-info-card {
    background: #FFFFFF;
    border: 2px solid #FFEBE0;
    border-radius: var(--radius-lg);
    padding: 32px;
    box-shadow: 0 8px 24px rgba(232, 98, 10, 0.05);
    position: relative;
}

.profile-info-card h3 {
    font-size: 16px;
    font-weight: 800;
    color: var(--text-dark);
    margin-bottom: 20px;
}

.info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 0;
    border-bottom: 1px solid rgba(240, 222, 202, 0.3);
    font-size: 14px;
}

.info-row:last-child {
    border-bottom: none;
}

.info-lbl {
    color: var(--text-light);
    font-weight: 700;
}

.phone-badge {
    background-color: var(--success-light);
    color: var(--success);
    font-weight: 700;
    padding: 4px 10px;
    border-radius: var(--radius-full);
}

.save-note {
    margin-top: 24px;
    background-color: var(--primary-light);
    border-left: 4px solid var(--primary);
    border-radius: var(--radius-md);
    padding: 16px;
    font-size: 12px;
    color: var(--text-muted);
    line-height: 1.5;
}

.my-teachers-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 12px;
}

/* --- TOAST & NOTIFICATIONS --- */
.toast {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background-color: var(--bg-card);
    border: 1px solid rgba(240, 222, 202, 0.5);
    border-radius: var(--radius-lg);
    padding: 16px 24px;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: var(--shadow-lg);
    z-index: 9999;
    transform: translateY(100px);
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.toast.show {
    transform: translateY(0);
    opacity: 1;
}

#toastIcon {
    font-size: 22px;
}

#toastMsg {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-dark);
}

/* --- 1. LOGIN SCREEN --- */
.login-overlay {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--bg-page);
    overflow-y: auto;
    padding: 20px;
}

.login-card {
    background-color: var(--bg-card);
    border: 1px solid rgba(240, 222, 202, 0.5);
    box-shadow: var(--shadow-lg);
    border-radius: 28px;
    padding: 48px;
    width: 100%;
    max-width: 440px;
    text-align: center;
    animation: fadeScale 0.5s ease;
}

.login-header-icon {
    font-size: 72px;
    display: block;
    margin-bottom: 20px;
    animation: bounce 4s infinite;
}

.login-title {
    font-size: 24px;
    font-weight: 800;
    margin-bottom: 8px;
}

.login-subtitle {
    font-size: 14px;
    color: var(--text-muted);
    line-height: 1.5;
    margin-bottom: 32px;
}

.form-group {
    text-align: left;
    margin-bottom: 20px;
}

.form-label {
    display: block;
    font-size: 13px;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 8px;
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-icon {
    position: absolute;
    left: 16px;
    width: 20px;
    height: 20px;
    color: var(--text-light);
}

.form-input {
    width: 100%;
    padding: 14px 16px 14px 48px;
    border-radius: var(--radius-md);
    border: 1px solid rgba(240, 222, 202, 0.8);
    font-family: inherit;
    font-size: 14px;
    background-color: var(--bg-page);
    color: var(--text-dark);
    outline: none;
    transition: var(--transition);
}

.form-input:focus {
    border-color: var(--primary);
    background-color: #fff;
    box-shadow: 0 0 0 4px rgba(232, 98, 10, 0.08);
}

.login-submit-btn {
    width: 100%;
    background: linear-gradient(135deg, var(--primary) 0%, #FF8533 100%);
    color: #fff;
    padding: 16px;
    border-radius: var(--radius-md);
    font-weight: 800;
    font-size: 16px;
    box-shadow: var(--shadow-glow);
    margin-top: 12px;
}

.login-submit-btn:hover {
    background: linear-gradient(135deg, var(--primary-hover) 0%, var(--primary) 100%);
    transform: translateY(-2px);
    box-shadow: 0 12px 30px rgba(232, 98, 10, 0.35);
}

.login-error-text {
    color: var(--danger);
    font-size: 13px;
    font-weight: 700;
    margin-top: 12px;
    min-height: 18px;
}

.login-footer-link {
    margin-top: 32px;
    font-size: 13px;
    color: var(--text-muted);
}

.login-footer-link a {
    color: var(--primary);
    font-weight: 700;
}

.login-footer-link a:hover {
    text-decoration: underline;
}

/* Responsive Grid Tweaks */
@media (max-width: 1024px) {
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
    .dashboard-sections { grid-template-columns: 1fr; }
    .classroom-layout { grid-template-columns: 1fr; }
    .progress-stats-row { grid-template-columns: 1fr; }
    .badges-grid { grid-template-columns: repeat(3, 1fr); }
    .feedback-layout { grid-template-columns: 1fr; }
    .profile-layout { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
    .stats-grid { grid-template-columns: 1fr; }
    .badges-grid { grid-template-columns: repeat(2, 1fr); }
    .topbar { padding: 0 20px; }
}

/* Interactive Classroom Games & Quizzes Grid */
.interactive-games-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
    margin-top: 16px;
}

.interactive-game-card {
    background: #ffffff;
    border: 2px solid rgba(232, 98, 10, 0.08);
    border-radius: var(--radius-lg);
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    box-shadow: 0 4px 12px rgba(61, 32, 16, 0.03);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.interactive-game-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 24px rgba(232, 98, 10, 0.08);
    border-color: rgba(232, 98, 10, 0.18);
}

.interactive-game-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
}

.game-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.game-type-badge {
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
}

.game-type-badge.oyun { background: #E6F6F5; color: #2A9D8F; }
.game-type-badge.quiz { background: #FDF0ED; color: #E76F51; }
.game-type-badge.etkinlik { background: #EEF4F8; color: #457B9D; }
.game-type-badge.ders { background: #FFE4D1; color: #E8620A; }

.game-card-date {
    font-size: 11px;
    color: var(--text-light);
    font-weight: 600;
}

.game-card-title {
    font-size: 16px;
    font-weight: 800;
    color: var(--text-dark);
    line-height: 1.3;
}

.game-card-desc {
    font-size: 13px;
    color: var(--text-muted);
    line-height: 1.5;
    flex-grow: 1;
}

.game-card-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark, #C75206));
    color: #ffffff;
    border: none;
    padding: 12px;
    border-radius: 12px;
    font-weight: 700;
    font-size: 14px;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s ease;
}

.game-card-btn:hover {
    transform: scale(1.02);
    box-shadow: 0 4px 12px rgba(232, 98, 10, 0.3);
    filter: brightness(1.05);
}

/* Premium Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: rgba(232, 98, 10, 0.02);
  border-radius: 10px;
}
::-webkit-scrollbar-thumb {
  background: rgba(232, 98, 10, 0.2);
  border-radius: 10px;
  border: 2px solid transparent;
  background-clip: padding-box;
  transition: background 0.2s;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(232, 98, 10, 0.45);
  border: 2px solid transparent;
  background-clip: padding-box;
}
