/* =========================================
   SARVAGYA FORUM - CORE STYLES
   ========================================= */

/* --- Variables & Themes --- */
:root[data-theme="dark"] {
    --bg-base: #0A0A0A;
    --bg-surface: #1A1A1A;
    --bg-panel: #120F08;
    --text-main: #F0EDE6; /* Warm White */
    --text-muted: #A09E98;
    --gold-primary: #D4A017;
    --gold-bright: #F5C842;
    --gold-dim: rgba(212, 160, 23, 0.2);
    --border-color: rgba(212, 160, 23, 0.15);
    
    --shadow-glow: 0 0 20px rgba(212, 160, 23, 0.15);
    --shadow-hover: 0 10px 30px rgba(212, 160, 23, 0.3);

    /* Glassmorphism */
    --glass-bg: rgba(20, 20, 20, 0.5);
    --glass-border: rgba(212, 160, 23, 0.2);
    --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.5);
}

:root[data-theme="light"] {
    --bg-base: #FAF7F0; /* Ivory */
    --bg-surface: #FFFFFF;
    --bg-panel: #F0EDE6;
    --text-main: #1A1A1A; /* Charcoal */
    --text-muted: #4A4A4A;
    --gold-primary: #D4A017;
    --gold-bright: #C28E00; /* Slightly darker gold for light mode text contrast */
    --gold-dim: rgba(212, 160, 23, 0.15);
    --border-color: rgba(212, 160, 23, 0.3);
    
    --shadow-glow: 0 4px 15px rgba(0, 0, 0, 0.05);
    --shadow-hover: 0 10px 25px rgba(212, 160, 23, 0.3);

    /* Glassmorphism */
    --glass-bg: rgba(255, 255, 255, 0.6);
    --glass-border: rgba(212, 160, 23, 0.3);
    --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.1);
}

/* Glassmorphism Utility */
.glass-panel {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border) !important;
    box-shadow: var(--glass-shadow);
    border-radius: 8px !important;
}

/* --- Global Resets & Typography --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
    overflow-x: hidden;
    width: 100vw;
    max-width: 100%;
}

body {
    background-color: var(--bg-base);
    color: var(--text-main);
    font-family: 'EB Garamond', serif;
    line-height: 1.6;
    overflow-x: hidden;
    width: 100vw;
    max-width: 100%;
    position: relative;
    transition: background-color 0.4s ease, color 0.4s ease;
    cursor: none; /* Due to custom cursor */
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 6px;
}
::-webkit-scrollbar-track {
    background: var(--bg-base);
}
::-webkit-scrollbar-thumb {
    background: var(--gold-primary);
    border-radius: 10px;
}

h1, h2, h3, h4, h5, h6, .logo, .nav-link, .btn {
    font-family: 'Cinzel', serif;
    font-weight: 600;
}

.sanskrit-motto {
    font-family: sans-serif; /* Fallback for Devanagari */
    color: var(--gold-primary);
    margin-bottom: 1rem;
    font-style: italic;
    font-size: 1.2rem;
    font-weight: 400;
}

a {
    color: var(--gold-primary);
    text-decoration: none;
    transition: color 0.3s;
}

a:hover {
    color: var(--gold-bright);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 100px 20px;
}

.text-center { text-align: center; }
.mt-4 { margin-top: 2rem; }

/* --- Cinematic Effects & Animations --- */
.shimmer-text {
    background: linear-gradient(
        90deg,
        var(--gold-primary) 0%,
        var(--gold-bright) 50%,
        var(--gold-primary) 100%
    );
    background-size: 200% auto;
    color: transparent;
    -webkit-background-clip: text;
    background-clip: text;
    animation: shimmer 3s linear infinite;
}

@keyframes shimmer {
    to { background-position: 200% center; }
}

.section-watermark {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-family: 'Cinzel', serif;
    font-size: 12vw;
    font-weight: 800;
    color: var(--gold-primary);
    opacity: 0.03;
    z-index: 0;
    pointer-events: none;
    white-space: nowrap;
}

/* Scroll Animations via IntersectionObserver classes */
.fade-in-up {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}
.fade-in-up.visible {
    opacity: 1;
    transform: translateY(0);
}
.delay-1 { transition-delay: 0.2s; }
.delay-2 { transition-delay: 0.4s; }

/* --- Page Loader --- */
#loader {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background-color: #000;
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 0.8s ease;
}
.loader-content {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}
.loader-mandala {
    width: 80px;
    height: 80px;
    stroke: var(--gold-primary);
    stroke-width: 2;
    fill: none;
    stroke-dasharray: 500;
    stroke-dashoffset: 500;
    animation: drawMandala 2s ease forwards, spinMandala 10s linear infinite;
}
.loader-text {
    text-align: center;
    line-height: 1.1;
    opacity: 0;
    animation: fadeIn 1s ease 1s forwards;
}
.logo-sarvagya {
    font-family: 'Cinzel Decorative', serif;
    color: var(--gold-primary);
    font-size: 1.8em;
    letter-spacing: 2px;
}
.logo-forum {
    font-family: 'Cinzel', serif;
    color: var(--text-main);
    font-size: 1em;
    letter-spacing: 6px;
    margin-left: 2px;
}

@keyframes drawMandala {
    to { stroke-dashoffset: 0; }
}
@keyframes spinMandala {
    to { transform: rotate(360deg); }
}
@keyframes fadeIn {
    to { opacity: 1; }
}

/* --- Custom Cursor --- */
@media (min-width: 1025px) {
    #cursor, #cursor-ring {
        position: fixed;
        pointer-events: none;
        z-index: 999999;
        transform: translate(-50%, -50%);
        transition: width 0.2s, height 0.2s, background-color 0.2s;
    }
    #cursor {
        width: 8px;
        height: 8px;
        background-color: var(--gold-bright);
        border-radius: 50%;
    }
    #cursor-ring {
        width: 32px;
        height: 32px;
        border: 1px solid var(--gold-primary);
        border-radius: 50%;
        transition: transform 0.1s ease-out, width 0.2s, height 0.2s;
    }
    /* Hover states for cursor managed by JS adding classes */
    body.hovering #cursor-ring {
        width: 50px;
        height: 50px;
        background-color: var(--gold-dim);
    }
}
@media (max-width: 1024px) {
    #cursor, #cursor-ring { display: none; }
    body { cursor: auto; }
}

/* --- Navbar --- */
#navbar {
    position: fixed;
    top: 0; left: 0; width: 100%;
    padding: 20px;
    z-index: 1000;
    transition: background-color 0.3s, backdrop-filter 0.3s, padding 0.3s;
}
#navbar.scrolled {
    background-color: var(--glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    padding: 15px 20px;
    border-bottom: 1px solid var(--glass-border);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
}
:root[data-theme="light"] #navbar.scrolled {
    background-color: rgba(255, 255, 255, 0.8);
}
.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.logo {
    display: flex;
    flex-direction: column;
    align-items: center;
    line-height: 0.9;
    text-align: center;
}
.logo .logo-sarvagya {
    font-size: 2rem;
    font-weight: 700;
}
.logo .logo-forum {
    font-size: 1.1rem;
    letter-spacing: 14px;
    margin-left: 14px;
}
.desktop-menu {
    display: flex;
    gap: 30px;
}
.nav-link {
    color: var(--text-main);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    position: relative;
}
.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 1px;
    background-color: var(--gold-primary);
    transition: width 0.3s;
}
.nav-link:hover::after { width: 100%; }

.nav-actions {
    display: flex;
    gap: 15px;
    align-items: center;
}
.icon-btn {
    background: none;
    border: none;
    color: var(--text-main);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.3s, transform 0.3s;
}
.icon-btn:hover { color: var(--gold-primary); transform: scale(1.1); }
.mobile-only { display: none; }

/* Theme toggle logic */
:root[data-theme="dark"] .sun-icon { display: block; }
:root[data-theme="dark"] .moon-icon { display: none; }
:root[data-theme="light"] .sun-icon { display: none; }
:root[data-theme="light"] .moon-icon { display: block; }

.mobile-menu {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background-color: var(--bg-surface);
    display: flex;
    flex-direction: column;
    padding: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease;
    border-bottom: 1px solid var(--border-color);
}
.mobile-menu.open { max-height: 400px; }
.mobile-nav-link {
    padding: 15px 20px;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-main);
    font-family: 'Cinzel', serif;
    text-transform: uppercase;
}

/* --- Hero Section --- */
#hero {
    position: relative;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    text-align: center;
}
#particles-canvas {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    z-index: 1;
}
.hero-bg-mandala {
    position: absolute;
    width: 150vw;
    height: 150vw;
    max-width: 1000px;
    max-height: 1000px;
    background: url('../assets/mandala.svg') no-repeat center center;
    background-size: contain;
    opacity: 0.05;
    animation: spinMandala 60s linear infinite;
    z-index: 0;
}
.hero-content {
    position: relative;
    z-index: 2;
    padding: 0 20px;
}
.hero-title {
    font-size: clamp(2.5rem, 6vw, 5rem);
    line-height: 1.1;
    margin-bottom: 1rem;
    letter-spacing: 2px;
}
.hero-subtitle {
    font-family: 'Cormorant SC', serif;
    font-size: clamp(1.2rem, 2vw, 1.8rem);
    color: var(--text-muted);
    margin-bottom: 2.5rem;
    letter-spacing: 4px;
}
.hero-ctas {
    display: flex;
    gap: 20px;
    justify-content: center;
}

.btn {
    padding: 12px 30px;
    font-size: 0.9rem;
    letter-spacing: 1px;
    text-transform: uppercase;
    border-radius: 2px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 10px;
}
.btn-primary {
    background-color: var(--gold-primary);
    color: #000 !important;
    border: 1px solid var(--gold-primary);
}
.btn-primary:hover {
    background-color: var(--gold-bright);
    box-shadow: var(--shadow-glow);
    transform: translateY(-2px);
}
.btn-outline {
    background: transparent;
    color: var(--gold-primary) !important;
    border: 1px solid var(--gold-primary);
}
.btn-outline:hover {
    background-color: var(--gold-dim);
    transform: translateY(-2px);
}

/* Staggered load for hero */
.reveal-text {
    opacity: 0;
    transform: translateY(30px);
    animation: revealUp 1s ease 1.5s forwards; /* After loader */
}
.reveal-text.delay-1 { animation-delay: 1.7s; }
.reveal-text.delay-2 { animation-delay: 1.9s; }
@keyframes revealUp {
    to { opacity: 1; transform: translateY(0); }
}

/* --- Layout Elements --- */
.section { position: relative; }
.section-title {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}
.section-subtitle {
    font-family: 'Cormorant SC', serif;
    font-size: 1.2rem;
    color: var(--text-muted);
    margin-bottom: 3rem;
}

/* --- Banner Layouts --- */
.about-flex-container {
    display: flex;
    gap: 40px;
    align-items: stretch;
    position: relative;
    z-index: 2;
}
.about-banner {
    flex: 0 0 250px;
    overflow: hidden;
    padding: 0 !important;
}
.banner-img-v {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.8;
    transition: transform 0.8s ease;
}
.about-banner:hover .banner-img-v { transform: scale(1.05); }

.banner-img-h {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.8;
}

/* --- About Section --- */
.about-grid {
    flex: 1;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: center;
}
.about-text p {
    font-size: 1.1rem;
    color: var(--text-muted);
}
.about-stats {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
}
.stat-card {
    /* Using .glass-panel class now */
    padding: 30px;
    text-align: center;
    transition: transform 0.3s, box-shadow 0.3s;
}
.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
    border-color: var(--gold-primary);
}
.stat-number {
    font-family: 'Cinzel', serif;
    font-size: 3rem;
    font-weight: 700;
    color: var(--gold-primary);
    line-height: 1;
}
.stat-label {
    font-family: 'Cormorant SC', serif;
    font-size: 1.2rem;
    color: var(--text-muted);
    margin-top: 10px;
}

/* --- Cards (Events & Committees) --- */
.committees-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 30px;
    position: relative;
    z-index: 2;
}

/* --- Timeline (Chronicles) --- */
.timeline-header {
    position: relative;
    z-index: 2;
}
.timeline {
    position: relative;
    max-width: 900px;
    margin: 0 auto;
    padding: 40px 0;
}
/* Center line */
.timeline::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 2px;
    height: 100%;
    background: linear-gradient(to bottom, transparent, var(--gold-dim) 5%, var(--gold-dim) 95%, transparent);
    z-index: 1;
}

.timeline-item {
    position: relative;
    width: 50%;
    padding: 20px 40px;
    box-sizing: border-box;
    z-index: 2;
}
.timeline-item.left {
    left: 0;
    text-align: left;
}
.timeline-item.right {
    left: 50%;
    text-align: left;
}
.timeline-item.right .timeline-content {
    margin-top: 60px; /* Offset to stagger items visually */
}

/* Marker dots */
.timeline-marker {
    position: absolute;
    top: 30px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--gold-primary);
    box-shadow: 0 0 10px rgba(212, 160, 23, 0.5);
    z-index: 3;
}
.timeline-item.left .timeline-marker {
    right: -7px;
}
.timeline-item.right .timeline-marker {
    left: -7px;
}

.timeline-item.right .timeline-marker {
    top: 90px;
}

.timeline-content {
    padding: 30px;
    transition: transform 0.3s ease, border-color 0.3s;
}
.timeline-content:hover {
    transform: translateY(-5px);
    border-color: var(--gold-primary) !important;
}

.timeline-badge {
    display: inline-block;
    padding: 4px 12px;
    border: 1px solid var(--gold-primary);
    color: var(--gold-primary);
    font-family: 'Cinzel', serif;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 20px;
}
.timeline-title {
    font-family: 'Cinzel', serif;
    font-size: 1.5rem;
    color: var(--text-main);
    margin-bottom: 15px;
    text-transform: uppercase;
}
.timeline-meta {
    display: flex;
    flex-direction: column;
    gap: 8px;
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 20px;
}
.timeline-meta span {
    display: flex;
    align-items: center;
    gap: 8px;
}
.timeline-meta i { width: 14px; height: 14px; color: var(--gold-primary); }
.timeline-text {
    font-size: 0.95rem;
    line-height: 1.6;
    color: #ccc;
    margin-bottom: 25px;
}
:root[data-theme="light"] .timeline-text {
    color: #555;
}

.timeline-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}
.t-tag {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 12px;
    border: 1px solid rgba(212, 160, 23, 0.3);
    border-radius: 4px;
    color: var(--gold-primary);
    font-size: 0.8rem;
    background: transparent;
}
.t-tag i { width: 12px; height: 12px; }

.committee-card {
    /* Using .glass-panel class now */
    padding: 40px 30px;
    position: relative;
    overflow: hidden;
    transition: all 0.4s ease;
}
.card-glow {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: radial-gradient(circle at center, var(--gold-dim) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.4s;
    pointer-events: none;
}
.committee-card:hover {
    transform: translateY(-10px);
    border-color: var(--gold-primary);
    box-shadow: var(--shadow-hover);
}
.committee-card:hover .card-glow {
    opacity: 1;
}

.committee-name {
    font-size: 1.8rem;
    margin-bottom: 15px;
    color: var(--text-main);
}

.committee-abbr {
    color: var(--gold-primary);
    font-size: 2.5rem;
    opacity: 0.8;
    margin-bottom: 10px;
    line-height: 1;
}
.committee-desc {
    color: var(--text-muted);
    font-size: 1rem;
}

/* --- Upcoming Event --- */
.upcoming-wrapper {
    /* Using .glass-panel class now */
    padding: 60px;
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 40px;
    align-items: center;
    position: relative;
    z-index: 2;
}
.pulsing-badge {
    display: inline-block;
    padding: 5px 15px;
    border: 1px solid var(--gold-primary);
    color: var(--gold-primary);
    font-family: 'Cinzel', serif;
    font-size: 0.8rem;
    text-transform: uppercase;
    border-radius: 20px;
    margin-bottom: 20px;
    animation: pulse 2s infinite;
}
:root[data-theme="light"] .pulsing-badge {
    color: var(--gold-bright);
    border-color: var(--gold-bright);
}
@keyframes pulse {
    0% { box-shadow: 0 0 0 0 var(--gold-dim); }
    70% { box-shadow: 0 0 0 10px transparent; }
    100% { box-shadow: 0 0 0 0 transparent; }
}
.upcoming-title { font-size: 3.5rem; line-height: 1; }
.upcoming-edition { font-family: 'Cormorant SC', serif; font-size: 1.5rem; color: var(--text-muted); margin-bottom: 10px; }
.upcoming-tagline { font-style: italic; color: var(--gold-primary); margin-bottom: 15px; font-size: 1.1rem; }
.upcoming-desc { color: var(--text-muted); margin-bottom: 20px; max-width: 500px; }

.upcoming-timer {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
}
.timer-box {
    text-align: center;
}
.timer-value {
    font-family: 'Cinzel', serif;
    font-size: 3.5rem;
    font-weight: 700;
    color: var(--gold-primary);
    line-height: 1;
    text-shadow: 0 0 15px var(--gold-dim);
}
:root[data-theme="light"] .timer-value {
    color: var(--gold-bright);
    text-shadow: none;
}
.timer-label {
    font-family: 'Cormorant SC', serif;
    text-transform: uppercase;
    color: var(--text-muted);
    letter-spacing: 2px;
}
.timer-sep {
    font-size: 3rem;
    color: var(--text-muted);
    margin-top: -20px;
}

/* --- Gallery Strip --- */
.gallery-strip {
    overflow: visible; /* To allow scaled images to break out vertically without being clipped */
    white-space: nowrap;
    position: relative;
    padding: 40px 0;
    margin: 40px 0;
    width: 100vw;
    margin-left: 50%;
    transform: translateX(-50%);
}
.gallery-strip::before, .gallery-strip::after {
    content: '';
    position: absolute;
    top: 0; width: 100px; height: 100%;
    z-index: 2;
    pointer-events: none;
}
.gallery-strip::before {
    left: 0;
    background: linear-gradient(to right, var(--bg-base), transparent);
}
.gallery-strip::after {
    right: 0;
    background: linear-gradient(to left, var(--bg-base), transparent);
}
.gallery-track {
    display: inline-flex;
    gap: 20px;
    animation: scrollGallery 25s linear infinite;
    will-change: transform;
}
.gallery-track:hover {
    animation-play-state: paused;
}
img.gallery-item {
    width: 300px;
    height: 200px;
    object-fit: cover;
    border-radius: 8px;
    border: 2px solid transparent;
    transition: transform 0.4s ease, filter 0.4s ease, border-color 0.4s ease, box-shadow 0.4s ease;
    filter: grayscale(40%) opacity(0.8);
    cursor: pointer;
    flex-shrink: 0;
}
img.gallery-item:hover {
    filter: grayscale(0%) opacity(1);
    transform: scale(1.1);
    border-color: var(--gold-primary);
    box-shadow: 0 10px 30px rgba(0,0,0,0.8), 0 0 20px rgba(212, 160, 23, 0.4);
    z-index: 10;
}
@keyframes scrollGallery {
    0% { transform: translateX(0); }
    100% { transform: translateX(calc(-50% - 10px)); } /* Accounts for gap */
}

/* --- Footer --- */
footer {
    border-top: 1px solid var(--border-color);
    padding: 60px 20px 30px;
    background-color: var(--bg-surface);
}
.footer-logo {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 10px;
}
.footer-logo .logo-sarvagya {
    font-size: 2.5rem;
}
.footer-logo .logo-forum {
    font-size: 1.2rem;
    letter-spacing: 12px;
    margin-left: 12px;
}
.footer-tagline {
    font-family: 'Cormorant SC', serif;
    color: var(--text-muted);
    margin-bottom: 30px;
}
.footer-copyright {
    font-size: 0.9rem;
    color: var(--text-muted);
    opacity: 0.7;
}

/* --- Diplomat's Desk (Scratchpad) --- */
#fab-scratchpad {
    position: fixed;
    bottom: 30px; right: 30px;
    width: 60px; height: 60px;
    border-radius: 50%;
    background-color: var(--gold-primary);
    color: #000;
    border: none;
    box-shadow: var(--shadow-hover);
    cursor: pointer;
    z-index: 1000;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: transform 0.3s, background-color 0.3s;
}
#fab-scratchpad:hover {
    transform: scale(1.1);
    background-color: var(--gold-bright);
}
#fab-scratchpad i { width: 24px; height: 24px; }

#scratchpad-panel {
    position: fixed;
    top: 0; right: -420px;
    width: 420px; max-width: 100vw;
    height: 100vh;
    background-color: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-left: 2px solid var(--gold-primary);
    z-index: 1001;
    display: flex;
    flex-direction: column;
    transition: right 0.4s ease-in-out;
    box-shadow: -10px 0 30px rgba(0,0,0,0.5);
}
#scratchpad-panel.open { right: 0; }

.sp-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid var(--border-color);
}
.sp-header h3 {
    color: var(--gold-primary);
    margin: 0;
}
#close-scratchpad {
    background: none; border: none;
    color: var(--text-main);
    cursor: pointer;
}
#close-scratchpad:hover { color: var(--gold-primary); }

.sp-tabs {
    display: flex;
    overflow-x: auto;
    border-bottom: 1px solid var(--border-color);
}
.sp-tabs::-webkit-scrollbar { height: 2px; }
.sp-tab {
    background: none; border: none;
    padding: 15px 20px;
    color: var(--text-muted);
    font-family: 'Cinzel', serif;
    font-size: 0.8rem;
    cursor: pointer;
    white-space: nowrap;
    border-bottom: 2px solid transparent;
}
.sp-tab.active {
    color: var(--gold-primary);
    border-bottom-color: var(--gold-primary);
}

.sp-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 20px;
}
#sp-textarea {
    flex: 1;
    background: transparent;
    border: none;
    color: var(--text-main);
    font-family: 'EB Garamond', serif;
    font-size: 1.1rem;
    resize: none;
    outline: none;
    line-height: 1.6;
}
.sp-status {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px dashed var(--border-color);
}
#save-status {
    font-family: monospace;
    color: #4CAF50;
    font-size: 0.9rem;
    opacity: 0;
    transition: opacity 0.3s;
}
#save-status.visible { opacity: 1; }
#export-notes {
    background: transparent;
    border: 1px solid var(--gold-primary);
    color: var(--gold-primary);
    padding: 5px 15px;
    font-family: 'Cinzel', serif;
    cursor: pointer;
    font-size: 0.8rem;
    border-radius: 2px;
}
#export-notes:hover { background-color: var(--gold-dim); }
.sp-hint {
    text-align: center;
    color: var(--text-muted);
    font-size: 0.8rem;
    margin-top: 10px;
    opacity: 0.5;
}

/* --- Lightbox --- */
.lightbox-overlay {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 10000;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}
.lightbox-overlay.active {
    opacity: 1;
    pointer-events: auto;
}
.lightbox-content {
    position: relative;
    max-width: 80%;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    align-items: center;
}
#lightbox-img {
    max-width: 100%;
    max-height: 80vh;
    object-fit: contain;
    border: 2px solid var(--gold-primary);
    box-shadow: var(--shadow-glow);
    border-radius: 4px;
}
#lightbox-caption {
    margin-top: 15px;
    color: var(--gold-primary);
    font-family: 'Cinzel', serif;
    letter-spacing: 2px;
}
#lightbox-close {
    position: absolute;
    top: 30px; right: 30px;
    background: transparent;
    border: none;
    color: #fff;
    cursor: pointer;
    transition: color 0.3s, transform 0.3s;
}
#lightbox-close i { width: 36px; height: 36px; }
#lightbox-close:hover { color: var(--gold-primary); transform: scale(1.1); }

#lightbox-prev, #lightbox-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    color: #fff;
    cursor: pointer;
    transition: color 0.3s, transform 0.3s;
}
#lightbox-prev { left: 30px; }
#lightbox-next { right: 30px; }
#lightbox-prev i, #lightbox-next i { width: 48px; height: 48px; }
#lightbox-prev:hover, #lightbox-next:hover { color: var(--gold-primary); transform: translateY(-50%) scale(1.1); }

/* --- Responsive Design --- */
@media (max-width: 900px) {
    .about-flex-container { flex-direction: column; }
    .about-banner { height: 200px; flex: none; }
    .about-grid { grid-template-columns: 1fr; gap: 40px; }
    .upcoming-wrapper { grid-template-columns: 1fr; text-align: center; padding: 40px 20px; }
    .upcoming-timer { justify-content: center; }
    .desktop-menu { display: none; }
    .mobile-only { display: block; }
    .nav-actions { gap: 10px; }
    .container { padding: 80px 20px 40px; }
    .hero-bg-mandala { width: 200vw; height: 200vw; }
    
    .timeline::before { left: 30px; }
    .timeline-item { width: 100%; padding: 0 0 40px 70px; left: 0 !important; }
    .timeline-item.right .timeline-content { margin-top: 0; }
    .timeline-item.left .timeline-marker, .timeline-item.right .timeline-marker { left: 23px; right: auto; top: 0; }
}

@media (max-width: 600px) {
    .timer-value { font-size: 2.5rem; }
    .timer-sep { font-size: 2rem; }
    .hero-title { font-size: 2.5rem; }
}

/* --- Masonry Gallery (gallery.html) --- */
.masonry-gallery {
    column-count: 3;
    column-gap: 20px;
    padding: 0 20px;
}
@media (max-width: 1024px) { .masonry-gallery { column-count: 2; } }
@media (max-width: 600px) { .masonry-gallery { column-count: 1; } }

.gallery-media-wrapper {
    break-inside: avoid;
    margin-bottom: 20px;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    position: relative;
    border: 2px solid transparent;
    transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}
.gallery-media-wrapper:hover {
    transform: scale(1.03);
    border-color: var(--gold-primary);
    box-shadow: 0 10px 30px rgba(0,0,0,0.8), 0 0 20px rgba(212, 160, 23, 0.4);
    z-index: 5;
}
.gallery-media-wrapper img, .gallery-media-wrapper video {
    width: 100%;
    display: block;
    object-fit: cover;
}
.play-icon {
    position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
    background: rgba(0,0,0,0.6); border-radius: 50%; width: 60px; height: 60px;
    display: flex; align-items: center; justify-content: center; color: var(--gold-bright);
    pointer-events: none;
}
