:root {
    --bg-color: #0f172a;
    --primary: #3b82f6;
    --primary-glow: rgba(59, 130, 246, 0.5);
    --secondary: #10b981;
    --secondary-glow: rgba(16, 185, 129, 0.5);
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --glass-bg: rgba(30, 41, 59, 0.4);
    --glass-border: rgba(255, 255, 255, 0.08);
    --glass-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
    --danger: #ef4444;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
}

body {
    background-color: var(--bg-color);
    color: var(--text-main);
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
    padding: 2rem 1rem;
}

/* Background Animation */
.bg-animation {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    overflow: hidden;
}

.blob {
    position: absolute;
    filter: blur(80px);
    border-radius: 50%;
    opacity: 0.6;
    animation: float 20s infinite alternate ease-in-out;
}

.blob-1 {
    top: -10%;
    left: -10%;
    width: 50vw;
    height: 50vw;
    background: radial-gradient(circle, #312e81 0%, transparent 70%);
    animation-delay: 0s;
}

.blob-2 {
    bottom: -20%;
    right: -10%;
    width: 60vw;
    height: 60vw;
    background: radial-gradient(circle, #064e3b 0%, transparent 70%);
    animation-delay: -5s;
}

@keyframes float {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(5%, 10%) scale(1.1); }
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

/* Typography Utilities */
.text-primary { color: var(--primary); }
.text-secondary { color: var(--secondary); }

/* Glass Panel Utility */
.glass-panel {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    box-shadow: var(--glass-shadow);
    padding: 1.5rem;
}

/* Header */
.main-header .header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 2rem;
}

.title-area h1 {
    font-size: 2.2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    background: linear-gradient(to right, #60a5fa, #34d399);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.title-area .subtitle {
    color: var(--text-muted);
    font-size: 1.1rem;
}

/* Countdown */
.countdown-card {
    background: rgba(15, 23, 42, 0.6);
    min-width: 320px;
}

.countdown-card h3 {
    font-size: 1rem;
    margin-bottom: 1rem;
    color: #e2e8f0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    justify-content: center;
}

.countdown-grid {
    display: flex;
    justify-content: center;
    gap: 1rem;
}

.time-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: rgba(255, 255, 255, 0.05);
    padding: 0.5rem 0.8rem;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    min-width: 65px;
}

.time-box span {
    font-size: 1.5rem;
    font-weight: 700;
    color: #f8fafc;
}

.time-box small {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Dashboard Stats */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.stat-card {
    display: flex;
    align-items: center;
    gap: 1.2rem;
    transition: transform 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
    border-color: rgba(255, 255, 255, 0.15);
}

.stat-icon {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    background: rgba(59, 130, 246, 0.1);
    color: var(--primary);
}

.stat-card:nth-child(2) .stat-icon {
    background: rgba(16, 185, 129, 0.1);
    color: var(--secondary);
}

.stat-card:nth-child(3) .stat-icon {
    background: rgba(245, 158, 11, 0.1);
    color: #f59e0b;
}

.stat-info h4 {
    color: var(--text-muted);
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: 0.3rem;
}

.stat-info .stat-value {
    font-size: 1.5rem;
    font-weight: 700;
}

/* Progress Bar */
.progress-container {
    padding: 2rem;
}

.progress-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 1rem;
    font-weight: 600;
}

.progress-bar-bg {
    width: 100%;
    height: 12px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    overflow: hidden;
    position: relative;
}

.progress-bar-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #3b82f6, #10b981);
    border-radius: 10px;
    transition: width 1s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    box-shadow: 0 0 10px var(--primary-glow);
}

.progress-bar-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

/* Video List */
.list-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.list-header h2 {
    font-size: 1.5rem;
}

.btn-reset {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.3);
    padding: 0.5rem 1rem;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.2s;
}

.btn-reset:hover {
    background: #ef4444;
    color: white;
}

.loading {
    text-align: center;
    padding: 3rem;
    color: var(--text-muted);
    font-size: 1.2rem;
}

.video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1rem;
}

.video-item {
    background: rgba(15, 23, 42, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 1rem;
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    transition: all 0.2s;
    position: relative;
    overflow: hidden;
}

.video-item:hover {
    background: rgba(30, 41, 59, 0.8);
    border-color: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
}

.video-item.completed {
    background: rgba(16, 185, 129, 0.05);
    border-color: rgba(16, 185, 129, 0.2);
}

.video-item.completed::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: var(--secondary);
}

/* Custom Checkbox */
.checkbox-wrapper {
    position: relative;
    display: inline-block;
    width: 24px;
    height: 24px;
    flex-shrink: 0;
    margin-top: 3px;
}

.checkbox-wrapper input {
    opacity: 0;
    width: 0;
    height: 0;
}

.checkmark {
    position: absolute;
    top: 0;
    left: 0;
    height: 24px;
    width: 24px;
    background-color: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
}

.checkbox-wrapper:hover input ~ .checkmark {
    background-color: rgba(255, 255, 255, 0.2);
}

.checkbox-wrapper input:checked ~ .checkmark {
    background-color: var(--secondary);
    border-color: var(--secondary);
    box-shadow: 0 0 10px var(--secondary-glow);
}

.checkmark:after {
    content: "";
    position: absolute;
    display: none;
    left: 8px;
    top: 4px;
    width: 5px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.checkbox-wrapper input:checked ~ .checkmark:after {
    display: block;
    animation: check-anim 0.3s ease-out;
}

@keyframes check-anim {
    0% { transform: rotate(45deg) scale(0); }
    100% { transform: rotate(45deg) scale(1); }
}

.video-content {
    flex: 1;
    min-width: 0; /* for text truncation */
}

.day-badge {
    display: inline-block;
    font-size: 0.7rem;
    background: rgba(59, 130, 246, 0.2);
    color: #93c5fd;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    margin-bottom: 0.5rem;
    font-weight: 600;
    text-transform: uppercase;
}

.video-item.completed .day-badge {
    background: rgba(16, 185, 129, 0.2);
    color: #6ee7b7;
}

.video-title {
    font-size: 0.95rem;
    font-weight: 500;
    line-height: 1.4;
    margin-bottom: 0.5rem;
    color: var(--text-main);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.video-item.completed .video-title {
    text-decoration: line-through;
    color: var(--text-muted);
}

.video-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.youtube-link {
    color: var(--text-muted);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.3rem;
    transition: color 0.2s;
}

.youtube-link:hover {
    color: #ef4444; /* YouTube Red */
}

/* Toast */
.toast {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background: rgba(30, 41, 59, 0.9);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: white;
    padding: 1rem 1.5rem;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    gap: 0.8rem;
    transform: translateY(150%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1000;
}

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

.toast i {
    color: #fbbf24;
    font-size: 1.2rem;
}

/* Home specific */
.subject-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.subject-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2.5rem 1.5rem;
    text-decoration: none;
    color: var(--text-main);
    transition: transform 0.3s ease, border-color 0.3s ease;
}

.subject-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary);
}

.subject-card i {
    font-size: 3rem;
    margin-bottom: 1rem;
    background: linear-gradient(to right, #60a5fa, #34d399);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.subject-card h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

/* Responsive */
@media (max-width: 768px) {
    .main-header .header-content {
        flex-direction: column;
        text-align: center;
    }
    .countdown-card {
        width: 100%;
    }
    .stats-grid {
        grid-template-columns: 1fr;
    }
    .subject-nav {
        flex-wrap: wrap;
    }
}

/* New Subject Navigation Menu */
.subject-nav {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 2rem;
    padding: 1rem;
    background: rgba(15, 23, 42, 0.6);
}

.nav-item {
    text-decoration: none;
    color: var(--text-muted);
    padding: 0.8rem 1.5rem;
    border-radius: 12px;
    font-weight: 500;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.nav-item:hover {
    color: var(--text-main);
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
}

.nav-item.active {
    color: #fff;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.2), rgba(16, 185, 129, 0.2));
    border-color: rgba(59, 130, 246, 0.4);
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.15);
}

/* Home Page Enhancements */
.hero-section {
    text-align: center;
    padding: 3rem 1rem;
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.8) 0%, transparent 100%);
    border-radius: 20px;
    margin-bottom: 3rem;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 800;
    background: linear-gradient(to right, #38bdf8, #34d399);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 1rem;
    letter-spacing: -1px;
}

.home-subject-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    padding: 1rem;
}

.home-subject-card {
    position: relative;
    overflow: hidden;
    padding: 3rem 2rem;
    border-radius: 24px;
    background: rgba(30, 41, 59, 0.5);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    text-decoration: none;
    color: white;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.home-subject-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at center, rgba(255,255,255,0.1) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.4s;
}

.home-subject-card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 20px 40px rgba(0,0,0,0.4);
    border-color: rgba(255,255,255,0.2);
}

.home-subject-card:hover::before {
    opacity: 1;
}

.home-subject-card i {
    font-size: 4rem;
    margin-bottom: 1.5rem;
    transition: transform 0.4s;
}

.home-subject-card:hover i {
    transform: scale(1.1) rotate(5deg);
}

.card-tarih:hover { border-color: #f59e0b; box-shadow: 0 10px 30px rgba(245, 158, 11, 0.2); }
.card-tarih i { color: #f59e0b; }

.card-cografya:hover { border-color: #10b981; box-shadow: 0 10px 30px rgba(16, 185, 129, 0.2); }
.card-cografya i { color: #10b981; }

.card-vatandaslik:hover { border-color: #3b82f6; box-shadow: 0 10px 30px rgba(59, 130, 246, 0.2); }
.card-vatandaslik i { color: #3b82f6; }

.card-turkce:hover { border-color: #ec4899; box-shadow: 0 10px 30px rgba(236, 72, 153, 0.2); }
.card-turkce i { color: #ec4899; }

/* New Subject Header Styles */
.subject-header {
    text-align: center;
    padding: 3.5rem 1.5rem;
    position: relative;
    border-radius: 20px;
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.7), rgba(15, 23, 42, 0.9));
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    overflow: hidden;
}

.subject-header::before {
    content: '';
    position: absolute;
    top: -50%; left: -50%;
    width: 200%; height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.03) 0%, transparent 60%);
    opacity: 0.5;
    animation: rotateBg 30s linear infinite;
}

@keyframes rotateBg {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.subject-header h1 {
    font-size: 2.8rem;
    font-weight: 800;
    margin-bottom: 1rem;
    position: relative;
    z-index: 1;
}

.subject-header .motivational-quote {
    font-size: 1.2rem;
    color: #cbd5e1;
    font-style: italic;
    margin-bottom: 2rem;
    position: relative;
    z-index: 1;
}

.subject-header .back-btn {
    display: inline-block;
    padding: 0.8rem 1.8rem;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 30px;
    color: #60a5fa;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s;
    position: relative;
    z-index: 1;
}

.subject-header .back-btn:hover {
    background: rgba(96, 165, 250, 0.2);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(96, 165, 250, 0.2);
}
