/* 
 * LunaStudy Homepage - index.css
 * Premium Glassmorphism & Modern UI Design
 * Version: 3.0 (2026 Edition)
 */

/* ============================================
   Layout Foundations
   ============================================ */

:root {
    --glass-bg: rgba(255, 255, 255, 0.7);
    --glass-border: rgba(0, 0, 0, 0.1);
    --card-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.05);
    --primary-gradient: linear-gradient(135deg, #6366f1 0%, #a855f7 100%);
    --surface-gradient: linear-gradient(180deg, rgba(255, 255, 255, 0.5) 0%, rgba(240, 245, 255, 0.8) 100%);
    --hero-title-grad: linear-gradient(to bottom right, #1e293b 30%, #475569);
    --tag-bg: rgba(0,0,0,0.05);
    --tag-border: rgba(0,0,0,0.1);
}

[data-theme="dark"] {
    --glass-bg: rgba(15, 23, 42, 0.7);
    --glass-border: rgba(255, 255, 255, 0.1);
    --card-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
    --primary-gradient: linear-gradient(135deg, #6366f1 0%, #a855f7 100%);
    --surface-gradient: linear-gradient(180deg, rgba(30, 41, 59, 0.5) 0%, rgba(15, 23, 42, 0.8) 100%);
    --hero-title-grad: linear-gradient(to bottom right, #fff 30%, rgba(255,255,255,0.6));
    --tag-bg: rgba(255,255,255,0.05);
    --tag-border: rgba(255,255,255,0.1);
}

.container {
    max-width: 1300px;
    margin: 0 auto;
    padding: 0 40px;
}

/* ============================================
   Hero Section - Premium Entry
   ============================================ */

.hero {
    position: relative;
    padding: clamp(160px, 15vh, 200px) 0 100px;
    background: radial-gradient(circle at top right, rgba(99, 102, 241, 0.15), transparent 40%),
                radial-gradient(circle at bottom left, rgba(168, 85, 247, 0.1), transparent 40%);
    text-align: center;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 200%;
    height: 100%;
    background: url("data:image/svg+xml,%3Csvg width='100' height='100' viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M10 10h1v1h-1z' fill='%23ffffff' fill-opacity='0.05'/%3E%3C/svg%3E");
    opacity: 0.5;
    pointer-events: none;
}

.hero-content {
    position: relative;
    z-index: 2;
    animation: fadeInUp 0.8s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.hero-badge {
    display: inline-block;
    padding: 8px 16px;
    border-radius: 99px;
    background: var(--tag-bg);
    border: 1px solid var(--tag-border);
    color: var(--ls-text-secondary);
    font-size: 0.9rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    margin-bottom: 24px;
}

.hero h1 {
    font-size: clamp(3rem, 8vw, 5rem);
    font-weight: 900;
    letter-spacing: -0.04em;
    background: var(--hero-title-grad);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 24px;
    line-height: 1.05;
}

.hero p {
    font-size: 1.25rem;
    color: var(--ls-text-secondary);
    max-width: 650px;
    margin: 0 auto 40px;
    line-height: 1.6;
}

.hero-actions {
    display: flex;
    justify-content: center;
    gap: 20px;
}

/* ============================================
   Category Sections
   ============================================ */

.curriculum-map {
    padding-bottom: 120px;
}

.category-section {
    margin-bottom: 56px;
    animation: fadeInUp 1s cubic-bezier(0.2, 0.8, 0.2, 1) backwards;
}

.category-section:nth-child(2) { animation-delay: 0.1s; }
.category-section:nth-child(3) { animation-delay: 0.2s; }

.category-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
}

.category-header h2 {
    font-size: 1.4rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--ls-text-primary);
}

.category-line {
    flex-grow: 1;
    height: 1px;
    background: linear-gradient(90deg, var(--ls-border), transparent);
}

/* ============================================
   Course Cards - Premium Glassmorphism
   ============================================ */

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

.course-card {
    position: relative;
    background: var(--surface-gradient);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 24px;
    text-decoration: none;
    transition: all 0.35s cubic-bezier(0.2, 0.8, 0.2, 1);
    display: flex;
    flex-direction: column;
    gap: 12px;
    backdrop-filter: blur(10px);
    overflow: hidden;
}

.course-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--ls-border);
    opacity: 0.3;
    transition: opacity 0.3s ease;
}

.course-card:hover {
    transform: translateY(-6px) scale(1.01);
    border-color: var(--glass-border);
    box-shadow: var(--ls-shadow-xl);
}

.course-card.active:hover::before {
    background: var(--primary-gradient);
    opacity: 1;
}

.course-card i {
    font-size: 1.8rem;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 0 6px rgba(99, 102, 241, 0.3));
}

.course-card h3 {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--ls-text-primary);
}

.course-card p {
    font-size: 0.88rem;
    color: var(--ls-text-secondary);
    line-height: 1.5;
    margin-bottom: 4px;
}

.course-stats {
    display: flex;
    gap: 16px;
    margin-top: auto;
    font-size: 0.85rem;
    color: var(--ls-text-tertiary);
}

.course-stats span {
    display: flex;
    align-items: center;
    gap: 6px;
}

.status-tag {
    position: absolute;
    top: 16px;
    right: 16px;
    padding: 4px 10px;
    border-radius: 99px;
    font-size: 0.65rem;
    font-weight: 700;
    background: var(--tag-bg);
    border: 1px solid var(--tag-border);
    color: var(--ls-text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.active .status-tag {
    background: rgba(16, 185, 129, 0.1);
    border-color: rgba(16, 185, 129, 0.2);
    color: #10b981;
}

.locked {
    opacity: 0.7;
    cursor: default;
}

/* ============================================
   Animations & Utils
   ============================================ */

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 响应式适配 */
@media (max-width: 1024px) {
    .container {
        padding: 0 32px;
    }
}

@media (max-width: 768px) {
    .hero h1 {
        font-size: 3.5rem;
    }
    .courses-grid {
        grid-template-columns: 1fr;
    }
    .course-card {
        padding: 20px;
    }
}

/* ============================================
   Footer Section
   ============================================ */

.main-footer {
    padding: 80px 0;
    border-top: 1px solid var(--ls-border);
    text-align: center;
    color: var(--ls-text-tertiary);
}