/* 
  Make Space For Art - Premium Design System 
*/

:root {
    /* Color Palette - User Defined */
    --bg-color: #0A192F;
    --text-main: #E6F1FF;
    --text-muted: #8892B0;
    --primary-yellow: #FFD700;
    /* Richer Gold */
    --yellow-glow: rgba(255, 215, 0, 0.4);
    --accent-blue: #64FFDA;
    --card-bg: rgba(17, 34, 64, 0.75);
    --card-border: rgba(255, 255, 255, 0.1);
    --btn-text: #0A192F;
    --testimonial-bg: #15233b;

    /* Typography */
    --font-display: 'Playfair Display', serif;
    --font-body: 'Inter', sans-serif;

    /* Spacing */
    --spacing-sm: 0.5rem;
    --spacing-md: 1rem;
    --spacing-lg: 2rem;
    --spacing-xl: 4rem;

    /* Radius */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;

    /* Transitions */
    --transition-fast: 0.2s ease;
    --transition-smooth: 0.4s cubic-bezier(0.645, 0.045, 0.355, 1);
}

/* Reset & Base */
html {
    scroll-behavior: smooth;
    font-size: 16px;
}

*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: var(--bg-color);
    color: var(--text-main);
    font-family: var(--font-body);
    line-height: 1.7;
    overflow-x: hidden;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    position: relative;
    background-image:
        radial-gradient(circle at 15% 50%, rgba(20, 40, 70, 0.6) 0%, transparent 25%),
        radial-gradient(circle at 85% 30%, rgba(20, 60, 80, 0.4) 0%, transparent 25%);
    background-attachment: fixed;
}

/* Noise Texture Overlay */
body::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -1;
    opacity: 0.04;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
}

a {
    color: inherit;
    text-decoration: none;
    transition: var(--transition-fast);
}

button {
    cursor: pointer;
    border: none;
    font-family: inherit;
}

/* Layout Utilities */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-lg);
}

.section {
    padding: 100px 0;
}

/* Typography */
h1,
h2,
h3,
h4 {
    font-family: var(--font-display);
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: -0.02em;
}

h1 {
    font-size: clamp(3rem, 5vw, 4.5rem);
    margin-bottom: var(--spacing-md);
    color: var(--text-main);
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

h2 {
    font-size: clamp(2rem, 3vw, 2.5rem);
    margin-bottom: var(--spacing-md);
    color: var(--primary-yellow);
    text-shadow: 0 0 20px var(--yellow-glow);
}

h3 {
    font-size: 1.5rem;
    margin-bottom: var(--spacing-sm);
    color: var(--primary-yellow);
}

p {
    color: var(--text-muted);
    margin-bottom: var(--spacing-md);
    font-size: 1.125rem;
    font-weight: 300;
}

/* Components */

/* Button */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 36px;
    border-radius: var(--radius-sm);
    font-weight: 600;
    letter-spacing: 0.05em;
    font-size: 1rem;
    transition: var(--transition-smooth);
    position: relative;
    overflow: hidden;
    text-transform: uppercase;
    font-family: var(--font-body);
}

.btn-primary {
    background: var(--primary-yellow);
    color: var(--btn-text);
    box-shadow: 0 4px 15px rgba(255, 215, 0, 0.2);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(255, 215, 0, 0.4);
    background-color: #FFE033;
}

.btn-primary:active {
    transform: translateY(1px);
}

.btn-secondary {
    background: transparent;
    border: 1px solid var(--primary-yellow);
    color: var(--primary-yellow);
}

.btn-secondary:hover {
    background: rgba(255, 215, 0, 0.1);
    box-shadow: 0 4px 15px rgba(255, 215, 0, 0.1);
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: none !important;
}

/* Header */
.site-header {
    height: 80px;
    display: flex;
    align-items: center;
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    background: rgba(10, 25, 47, 0.85);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    transition: var(--transition-smooth);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.logo {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-yellow);
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    letter-spacing: 0.05em;
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding-top: 80px;
    position: relative;
}

.hero-content {
    max-width: 900px;
    animation: fadeIn 1s ease-out;
}

.hero-stats {
    display: flex;
    justify-content: center;
    gap: var(--spacing-xl);
    margin-top: var(--spacing-xl);
    color: var(--text-main);
    font-family: var(--font-display);
}

.hero-stats div {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-yellow);
}

.stat-label {
    font-size: 0.9rem;
    color: var(--text-muted);
    font-family: var(--font-body);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-top: 5px;
}

/* Lesson Grid */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 30px;
}

.card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: var(--radius-md);
    padding: 40px var(--spacing-lg);
    transition: var(--transition-smooth);
    position: relative;
    backdrop-filter: blur(10px);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.card:hover {
    transform: translateY(-8px);
    border-color: var(--primary-yellow);
    box-shadow: 0 20px 40px -15px rgba(2, 12, 27, 0.7);
    background: rgba(23, 42, 69, 0.9);
}

.card-icon {
    color: var(--primary-yellow);
    margin-bottom: var(--spacing-md);
    width: 48px;
    height: 48px;
}

.card h3 {
    font-size: 1.5rem;
    color: var(--text-main);
    margin-bottom: var(--spacing-sm);
}

.card p {
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 2rem;
}

.card-action {
    margin-top: auto;
    color: var(--primary-yellow);
    font-weight: 600;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.card:hover .card-action {
    text-decoration: underline;
    text-underline-offset: 4px;
}

/* Locked State */
.locked-card {
    opacity: 0.5;
    filter: grayscale(0.8);
    cursor: not-allowed;
    background: rgba(10, 25, 47, 0.5);
    border: 1px dashed var(--border-color);
}

.locked-card:hover {
    transform: none;
    background: rgba(10, 25, 47, 0.5);
    border-color: var(--border-color);
    box-shadow: none;
}

/* Lesson Page Styles */
.lesson-container {
    padding-top: 120px;
    /* More space for header */
}

.lesson-progress-container {
    width: 100%;
    background: rgba(255, 255, 255, 0.1);
    height: 4px;
    margin-top: 20px;
    overflow: hidden;
}

.lesson-progress-bar {
    height: 100%;
    background: var(--primary-yellow);
    width: 0%;
    transition: width 0.5s ease;
    box-shadow: 0 0 10px var(--yellow-glow);
}

.lesson-section {
    opacity: 0;
    transform: translateY(30px);
    animation: slideUp 0.8s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
    margin-bottom: 100px;
    position: relative;
    padding-left: 0;
    border-left: none;
    /* Removed the sidebar line for a cleaner look */
}

/* Painting */
.painting-container {
    margin: 40px 0;
    border-radius: var(--radius-sm);
    overflow: hidden;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.05);
    position: relative;
}

.painting-container img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.8s ease;
}

.painting-container:hover img {
    transform: scale(1.02);
}

.painting-caption {
    padding: 20px;
    font-size: 0.95rem;
    text-align: center;
    font-family: var(--font-display);
    font-style: italic;
    background: rgba(2, 12, 27, 0.9);
    color: var(--text-muted);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

/* Quiz */
.quiz-container {
    background: rgba(17, 34, 64, 0.6);
    padding: 40px;
    border-radius: var(--radius-md);
    border: 1px solid var(--card-border);
}

.quiz-options {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-md);
    margin-top: var(--spacing-lg);
}

.quiz-btn {
    padding: 20px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-sm);
    text-align: left;
    color: var(--text-main);
    transition: var(--transition-fast);
    font-size: 1rem;
    font-weight: 500;
}

.quiz-btn:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--primary-yellow);
    transform: translateY(-2px);
}

.quiz-btn.correct {
    background: rgba(16, 185, 129, 0.2);
    border-color: #10B981;
    color: #10B981;
}

.quiz-btn.wrong {
    background: rgba(239, 68, 68, 0.2);
    border-color: #EF4444;
    color: #EF4444;
}

/* Utility Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .container {
        padding-left: 24px !important;
        padding-right: 24px !important;
    }

    .section {
        padding: 60px 0;
    }

    .hero {
        align-items: center;
        padding-top: 100px;
        min-height: auto;
        padding-bottom: 60px;
    }

    h1 {
        font-size: 2.2rem;
    }

    h2 {
        font-size: 1.8rem;
    }

    .hero-stats {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 1rem;
        justify-content: center;
    }

    .hero-stats div {
        min-width: 80px;
    }

    .grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .card {
        padding: 30px 20px;
    }

    .btn {
        width: 100%;
    }

    .quiz-options {
        grid-template-columns: 1fr;
    }

    .quiz-container {
        padding: 24px;
        margin: 0 -12px;
        /* Slight bleed for quiz too */
        width: calc(100% + 24px);
        border-radius: 0;
        border-left: none;
        border-right: none;
    }

    .header-content {
        padding: 0 24px !important;
    }

    /* Lesson Specifics */
    .lesson-section {
        margin-bottom: 40px;
    }

    .painting-container {
        width: 100vw;
        position: relative;
        left: 50%;
        right: 50%;
        margin-left: -50vw;
        margin-right: -50vw;
        border-radius: 0;
        border-left: none;
        border-right: none;
    }

    .painting-caption {
        padding: 16px 24px;
    }

    .lesson-container {
        padding-top: 100px;
    }
}