/* ===== THEME VARIABLES ===== */
:root {
    --bg: #fefefe;
    --bg-card: #ffffff;
    --bg-nav: rgba(255,255,255,0.85);
    --text: #1a1a2e;
    --text-muted: #6b7280;
    --accent-1: #FF6B6B;
    --accent-2: #4ECDC4;
    --accent-3: #FFE66D;
    --accent-4: #A78BFA;
    --accent-5: #F472B6;
    --accent-6: #34D399;
    --shadow: 0 4px 20px rgba(0,0,0,0.08);
    --shadow-hover: 0 8px 30px rgba(0,0,0,0.12);
    --border: rgba(0,0,0,0.06);
    --gradient-hero: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
    --radius: 16px;
    --radius-sm: 10px;
}

[data-theme="dark"] {
    --bg: #0f0f1a;
    --bg-card: #1a1a2e;
    --bg-nav: rgba(15,15,26,0.9);
    --text: #e8e8f0;
    --text-muted: #9ca3af;
    --shadow: 0 4px 20px rgba(0,0,0,0.3);
    --shadow-hover: 0 8px 30px rgba(0,0,0,0.4);
    --border: rgba(255,255,255,0.08);
    --gradient-hero: linear-gradient(135deg, #1a1a3e 0%, #2d1b69 50%, #4a1942 100%);
}

/* ===== RESET & BASE ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
    font-family: 'Inter', sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    transition: background 0.4s ease, color 0.4s ease;
    overflow-x: hidden;
}

/* ===== THEME TOGGLE ===== */
.theme-toggle {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 2px solid var(--border);
    background: var(--bg-card);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
}

.theme-toggle:hover {
    transform: scale(1.1) rotate(15deg);
    box-shadow: var(--shadow-hover);
}

.theme-icon { font-size: 22px; position: absolute; transition: opacity 0.3s, transform 0.3s; }
.sun { opacity: 1; transform: rotate(0deg); }
.moon { opacity: 0; transform: rotate(-90deg); }
[data-theme="dark"] .sun { opacity: 0; transform: rotate(90deg); }
[data-theme="dark"] .moon { opacity: 1; transform: rotate(0deg); }

/* ===== HERO ===== */
.hero {
    position: relative;
    background: var(--gradient-hero);
    padding: 100px 24px 80px;
    text-align: center;
    overflow: hidden;
    min-height: 420px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-content { position: relative; z-index: 2; }

.hero-avatar {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: rgba(255,255,255,0.2);
    backdrop-filter: blur(10px);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-family: 'Fredoka', sans-serif;
    font-size: 48px;
    font-weight: 700;
    color: white;
    margin-bottom: 20px;
    border: 3px solid rgba(255,255,255,0.3);
    animation: float 3s ease-in-out infinite;
}

.hero-title {
    font-family: 'Fredoka', sans-serif;
    font-size: clamp(2.5rem, 8vw, 4.5rem);
    font-weight: 700;
    color: white;
    letter-spacing: -1px;
    margin-bottom: 12px;
}

.highlight {
    background: linear-gradient(135deg, var(--accent-3), var(--accent-1));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-tagline {
    font-family: 'Patrick Hand', cursive;
    font-size: clamp(1.1rem, 3vw, 1.5rem);
    color: rgba(255,255,255,0.85);
    max-width: 500px;
    margin: 0 auto;
}

/* Floating shapes */
.hero-shapes { position: absolute; inset: 0; z-index: 1; pointer-events: none; }

.shape {
    position: absolute;
    border-radius: 50%;
    opacity: 0.15;
    animation: float 6s ease-in-out infinite;
}

.shape-1 { width: 120px; height: 120px; background: var(--accent-1); top: 10%; left: 5%; animation-delay: 0s; }
.shape-2 { width: 80px; height: 80px; background: var(--accent-3); top: 20%; right: 10%; animation-delay: 1s; }
.shape-3 { width: 60px; height: 60px; background: var(--accent-2); bottom: 15%; left: 15%; animation-delay: 2s; }
.shape-4 { width: 100px; height: 100px; background: var(--accent-4); bottom: 20%; right: 5%; animation-delay: 0.5s; }
.shape-5 { width: 40px; height: 40px; background: var(--accent-5); top: 50%; left: 50%; animation-delay: 1.5s; }

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-20px); }
}

/* ===== NAV ===== */
.nav {
    position: sticky;
    top: 0;
    z-index: 100;
    display: flex;
    gap: 10px;
    justify-content: center;
    padding: 16px 24px;
    background: var(--bg-nav);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    flex-wrap: wrap;
}

.nav-pill {
    font-family: 'Fredoka', sans-serif;
    font-size: 0.95rem;
    font-weight: 500;
    padding: 8px 20px;
    border-radius: 50px;
    text-decoration: none;
    color: var(--text-muted);
    background: transparent;
    border: 2px solid transparent;
    transition: all 0.3s ease;
}

.nav-pill:hover {
    color: var(--text);
    background: rgba(78, 205, 196, 0.1);
    border-color: var(--accent-2);
}

.nav-pill.active {
    color: white;
    background: linear-gradient(135deg, var(--accent-2), var(--accent-4));
    border-color: transparent;
    box-shadow: 0 4px 15px rgba(78, 205, 196, 0.3);
}

/* ===== SECTIONS ===== */
.section {
    max-width: 1100px;
    margin: 0 auto;
    padding: 60px 24px;
}

.section-title {
    font-family: 'Fredoka', sans-serif;
    font-size: 2rem;
    font-weight: 600;
    margin-bottom: 32px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.section-emoji { font-size: 1.8rem; }

/* ===== STORY CARDS ===== */
.stories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 24px;
}

.story-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 28px;
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.story-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--accent-1), var(--accent-2), var(--accent-4));
}

.story-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-hover);
}

.story-card h3 {
    font-family: 'Fredoka', sans-serif;
    font-size: 1.3rem;
    margin-bottom: 8px;
    color: var(--text);
}

.story-card .story-meta {
    font-size: 0.82rem;
    color: var(--text-muted);
    margin-bottom: 12px;
    display: flex;
    gap: 12px;
}

.story-card .story-excerpt {
    font-size: 0.95rem;
    color: var(--text-muted);
    line-height: 1.7;
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.story-card .read-more {
    display: inline-block;
    margin-top: 16px;
    font-family: 'Fredoka', sans-serif;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--accent-2);
    text-decoration: none;
    transition: color 0.2s;
}

.story-card .read-more:hover { color: var(--accent-4); }

/* ===== STORY FULL VIEW ===== */
.story-full {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 2000;
    background: var(--bg);
    overflow-y: auto;
    padding: 40px 24px;
    animation: fadeIn 0.3s ease;
}

.story-full.active { display: block; }

.story-full-inner {
    max-width: 700px;
    margin: 0 auto;
}

.story-full h1 {
    font-family: 'Fredoka', sans-serif;
    font-size: 2.2rem;
    margin-bottom: 8px;
}

.story-full .story-meta {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 32px;
}

.story-full .story-body {
    font-family: 'Patrick Hand', cursive;
    font-size: 1.25rem;
    line-height: 2;
    white-space: pre-wrap;
}

.story-full .back-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 24px;
    font-family: 'Fredoka', sans-serif;
    font-size: 1rem;
    color: var(--accent-2);
    background: none;
    border: none;
    cursor: pointer;
}

.story-full .back-btn:hover { color: var(--accent-4); }

/* ===== GALLERY ===== */
.gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 16px;
}

.gallery-item {
    border-radius: var(--radius-sm);
    overflow: hidden;
    aspect-ratio: 1;
    cursor: pointer;
    position: relative;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
}

.gallery-item:hover {
    transform: scale(1.03);
    box-shadow: var(--shadow-hover);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.gallery-item:hover img { transform: scale(1.1); }

.gallery-item .gallery-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 12px 16px;
    background: linear-gradient(transparent, rgba(0,0,0,0.7));
    color: white;
    font-family: 'Fredoka', sans-serif;
    font-size: 0.85rem;
    transform: translateY(100%);
    transition: transform 0.3s ease;
}

.gallery-item:hover .gallery-caption { transform: translateY(0); }

/* ===== VIDEOS ===== */
.videos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 24px;
}

.video-card {
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--bg-card);
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
}

.video-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-hover);
}

.video-card iframe {
    width: 100%;
    aspect-ratio: 16/9;
    border: none;
}

.video-card .video-title {
    padding: 16px;
    font-family: 'Fredoka', sans-serif;
    font-size: 1rem;
    font-weight: 500;
}

/* ===== LIGHTBOX ===== */
.lightbox {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 3000;
    background: rgba(0,0,0,0.9);
    align-items: center;
    justify-content: center;
    padding: 40px;
    cursor: zoom-out;
}

.lightbox.active { display: flex; }

.lightbox-img {
    max-width: 90%;
    max-height: 90vh;
    border-radius: 8px;
    box-shadow: 0 0 40px rgba(0,0,0,0.5);
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 24px;
    font-size: 2.5rem;
    color: white;
    background: none;
    border: none;
    cursor: pointer;
    line-height: 1;
}

/* ===== EMPTY STATE ===== */
.empty-state {
    text-align: center;
    padding: 60px 24px;
    color: var(--text-muted);
    font-family: 'Patrick Hand', cursive;
    font-size: 1.2rem;
}

/* ===== FOOTER ===== */
.footer {
    text-align: center;
    padding: 40px 24px;
    color: var(--text-muted);
    font-family: 'Patrick Hand', cursive;
    font-size: 1.1rem;
    border-top: 1px solid var(--border);
}

.heart {
    color: var(--accent-1);
    display: inline-block;
    animation: heartbeat 1.5s ease-in-out infinite;
}

@keyframes heartbeat {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.2); }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* ===== RESPONSIVE ===== */
@media (max-width: 640px) {
    .hero { padding: 80px 20px 60px; min-height: 350px; }
    .hero-avatar { width: 80px; height: 80px; font-size: 36px; }
    .section { padding: 40px 16px; }
    .stories-grid { grid-template-columns: 1fr; }
    .gallery { grid-template-columns: repeat(2, 1fr); gap: 10px; }
    .videos-grid { grid-template-columns: 1fr; }
    .nav { gap: 6px; padding: 12px 16px; }
    .nav-pill { font-size: 0.85rem; padding: 6px 14px; }
}
