* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #8B4513;
    --secondary: #D4A574;
    --accent: #FFD700;
    --dark: #2C1810;
    --light: #FFF8F0;
}

body {
    font-family: 'Quicksand', sans-serif;
    background-color: var(--light);
    color: var(--dark);
    line-height: 1.6;
    font-weight: 500;
}

/* Hero Section */
.hero {
    min-height: 100vh;
    background: linear-gradient(135deg, rgba(44, 24, 16, 0.9), rgba(139, 69, 19, 0.8)),
                url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><text y=".9em" font-size="90">🎓</text></svg>') center/cover;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 2rem;
    position: relative;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 20% 80%, rgba(255, 215, 0, 0.1) 0%, transparent 50%),
                radial-gradient(circle at 80% 20%, rgba(212, 165, 116, 0.1) 0%, transparent 50%);
}

.hero-content {
    position: relative;
    z-index: 1;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.year-badge {
    display: inline-block;
    background: linear-gradient(135deg, #FF6B35 0%, #F7971E 50%, #FFD93D 100%);
    color: white;
    padding: 0.75rem 2.5rem;
    font-size: 1.2rem;
    font-weight: 700;
    border-radius: 50px;
    margin-bottom: 1.5rem;
    animation: badge-bounce 2.5s ease-in-out infinite;
    letter-spacing: 3px;
    text-transform: uppercase;
    border: 5px solid white;
    box-shadow:
        0 0 0 2px #FF6B35,
        0 8px 20px rgba(255, 107, 53, 0.4),
        0 4px 8px rgba(0, 0, 0, 0.2);
    transform: rotate(-2deg);
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
}

.year-badge:hover {
    transform: rotate(-2deg) scale(1.05);
    box-shadow:
        0 0 0 2px #FF6B35,
        0 12px 30px rgba(255, 107, 53, 0.6),
        0 6px 12px rgba(0, 0, 0, 0.3);
}

@keyframes badge-bounce {
    0%, 100% {
        transform: rotate(-2deg) translateY(0) scale(1);
        box-shadow:
            0 0 0 2px #FF6B35,
            0 8px 20px rgba(255, 107, 53, 0.4),
            0 4px 8px rgba(0, 0, 0, 0.2);
    }
    50% {
        transform: rotate(-2deg) translateY(-8px) scale(1.02);
        box-shadow:
            0 0 0 2px #FF6B35,
            0 15px 35px rgba(255, 107, 53, 0.6),
            0 8px 15px rgba(0, 0, 0, 0.25);
    }
}

.hero h1 {
    font-family: 'Great Vibes', cursive;
    font-size: 6rem;
    color: white;
    margin-bottom: 0.5rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
    font-weight: 400;
}

.hero h2 {
    font-family: 'Abril Fatface', serif;
    font-size: 2rem;
    color: var(--secondary);
    margin-bottom: 2rem;
    font-weight: 400;
    letter-spacing: 3px;
}

.hero p {
    font-size: 1.3rem;
    color: rgba(255,255,255,0.9);
    max-width: 600px;
    margin-bottom: 2rem;
}

/* FlipDown - Minimal Customization */
#flipdown {
    margin: 2rem auto;
    transform: scale(1.4);
    transform-origin: center center;
}

/* Live Indicator - Elegant Footer Version */
.live-indicator-footer {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 1.5rem;
    padding: 0.4rem 0.9rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    backdrop-filter: blur(5px);
    transition: all 0.3s ease;
}

.live-indicator-footer:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

.live-dot {
    width: 7px;
    height: 7px;
    background: #00ff88;
    border-radius: 50%;
    animation: pulse-live 2s infinite;
    box-shadow: 0 0 8px rgba(0, 255, 136, 0.4);
}

@keyframes pulse-live {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
        box-shadow: 0 0 8px rgba(0, 255, 136, 0.4);
    }
    50% {
        opacity: 0.7;
        transform: scale(1.2);
        box-shadow: 0 0 12px rgba(0, 255, 136, 0.6);
    }
}

/* Wrapper for overflow control */
.count-wrapper {
    display: inline-block;
    position: relative;
    overflow: hidden;
    height: 1em;
    line-height: 1;
    vertical-align: baseline;
}

/* Update existing #live-count */
.count-value {
    display: inline-block;
    position: relative;
    color: var(--accent);
    font-size: 0.8rem;
    font-weight: 700;
    min-width: 1rem;
    text-align: center;
}

/* Animation state */
.count-value.animating {
    animation: countChange 0.5s ease-in-out;
}

/* Counter animation keyframe */
@keyframes countChange {
    0% {
        transform: translateY(0);
        opacity: 1;
    }
    50% {
        transform: translateY(-100%);
        opacity: 0;
    }
    51% {
        transform: translateY(100%);
        opacity: 0;
    }
    100% {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Unique user icon */
.unique-icon {
    width: 14px;
    height: 14px;
    opacity: 0.8;
    margin-right: 0.3rem;
    filter: brightness(0) saturate(100%) invert(87%) sepia(47%) saturate(1345%) hue-rotate(359deg) brightness(106%) contrast(104%);
    vertical-align: middle;
}

.count-separator {
    color: rgba(255, 255, 255, 0.3);
    font-size: 0.7rem;
    margin: 0 0.6rem;
}

/* Only color overrides - let library handle layout */
.flipdown.flipdown__theme-dark .rotor-group-heading::before {
    color: rgba(255, 255, 255, 0.9);
}

.flipdown.flipdown__theme-dark .rotor,
.flipdown.flipdown__theme-dark .rotor-top,
.flipdown.flipdown__theme-dark .rotor-leaf-front {
    background-color: #1a1a2e;
    color: var(--accent);
}

.flipdown.flipdown__theme-dark .rotor-bottom,
.flipdown.flipdown__theme-dark .rotor-leaf-rear {
    background-color: #16213e;
    color: var(--accent);
}

.flipdown.flipdown__theme-dark .rotor::after {
    border-top: solid 1px rgba(0, 0, 0, 0.3);
}

/* Event Details */
.event-section {
    padding: 5rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.section-title {
    font-family: 'Abril Fatface', serif;
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 3rem;
    color: var(--primary);
    position: relative;
    letter-spacing: 2px;
}

.section-title::after {
    content: '';
    display: block;
    width: 80px;
    height: 3px;
    background: var(--accent);
    margin: 1rem auto 0;
}

.event-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.event-card {
    background: white;
    padding: 2.5rem;
    border-radius: 15px;
    text-align: center;
    box-shadow: 0 10px 40px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
}

.event-card:hover {
    transform: translateY(-10px);
}

.event-card .icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.calendar-icon {
    width: 70px;
    height: 75px;
    background: #fff8f0;
    border: 3px solid var(--primary);
    border-radius: 10px;
    margin: 0 auto 1rem;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(139, 69, 19, 0.2);
}

.calendar-icon .cal-month {
    background: var(--primary);
    color: white;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 6px 0;
    letter-spacing: 2px;
    text-align: center;
}

.calendar-icon .cal-day {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.2rem;
    font-weight: 700;
    color: var(--primary);
    font-family: 'Abril Fatface', serif;
    background: white;
    text-align: center;
    line-height: 1;
}

.event-card h4 {
    font-family: 'Abril Fatface', serif;
    font-size: 1.4rem;
    color: var(--primary);
    margin-bottom: 0.5rem;
}

.event-card p {
    color: #666;
    font-size: 1.1rem;
}

/* Agenda Section - 90s Nostalgic Zigzag Timeline */
.agenda-section {
    padding: 5rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
    background: var(--light);
}

.agenda-subtitle {
    text-align: center;
    font-size: 1.5rem;
    color: var(--primary);
    margin-bottom: 4rem;
    font-weight: 700;
    font-style: italic;
    text-shadow: 2px 2px 0px rgba(139, 69, 19, 0.1);
}

/* Mobile-first: Single Column Layout */
.agenda-timeline {
    position: relative;
    padding: 0;
}

/* Vertical timeline line - mobile (left side) */
.agenda-timeline::before {
    content: '';
    position: absolute;
    left: 30px;
    top: 0;
    bottom: 0;
    width: 4px;
    background: repeating-linear-gradient(
        to bottom,
        var(--accent) 0px,
        var(--accent) 10px,
        transparent 10px,
        transparent 20px
    );
}

.agenda-item {
    position: relative;
    margin-bottom: 3rem;
    padding-left: 80px;
    opacity: 0;
    animation: fadeInUp 0.6s ease forwards;
}

/* Stagger animation delays */
.agenda-item:nth-child(1) { animation-delay: 0.1s; }
.agenda-item:nth-child(2) { animation-delay: 0.2s; }
.agenda-item:nth-child(3) { animation-delay: 0.3s; }
.agenda-item:nth-child(4) { animation-delay: 0.4s; }
.agenda-item:nth-child(5) { animation-delay: 0.5s; }
.agenda-item:nth-child(6) { animation-delay: 0.6s; }
.agenda-item:nth-child(7) { animation-delay: 0.7s; }
.agenda-item:nth-child(8) { animation-delay: 0.8s; }
.agenda-item:nth-child(9) { animation-delay: 0.9s; }

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

/* Emoji dot badges on timeline */
.agenda-dot {
    position: absolute;
    left: -5px;
    top: 50%;
    transform: translateY(-50%);
    width: 45px;
    height: 45px;
    background: white;
    border: 5px solid var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 2;
    transition: all 0.3s ease;
}

.agenda-item:hover .agenda-dot {
    transform: translateY(-50%) scale(1.15) rotate(5deg);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
}

.agenda-time {
    font-size: 0.95rem;
    color: var(--primary);
    font-weight: 700;
    margin-bottom: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Retro card styling with individual colors */
.agenda-content {
    background: white;
    padding: 1.8rem;
    border-radius: 8px;
    box-shadow:
        4px 4px 0px rgba(0, 0, 0, 0.1),
        0 8px 25px rgba(0, 0, 0, 0.08);
    border: 5px solid;
    transition: all 0.3s ease;
    position: relative;
}

.agenda-content::before {
    content: '';
    position: absolute;
    top: -3px;
    left: -3px;
    right: -3px;
    bottom: -3px;
    border: 2px dotted rgba(0, 0, 0, 0.1);
    border-radius: 10px;
    pointer-events: none;
}

.agenda-item:hover .agenda-content {
    transform: translateY(-3px) rotate(0.5deg);
    box-shadow:
        6px 6px 0px rgba(0, 0, 0, 0.15),
        0 12px 35px rgba(0, 0, 0, 0.12);
}

.agenda-title {
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 0.7rem;
    line-height: 1.4;
    text-shadow: 1px 1px 0px rgba(139, 69, 19, 0.1);
}

.agenda-desc {
    font-size: 1rem;
    color: #555;
    line-height: 1.7;
    font-style: italic;
}

/* 90s Vibrant Colors for Each Activity */
.agenda-item-welcome .agenda-content {
    border-color: #FF6B35;
    background: linear-gradient(135deg, #fff 0%, #fff5f0 100%);
}
.agenda-item-welcome .agenda-dot {
    border-color: #FF6B35;
    background: linear-gradient(135deg, #fff 0%, #ffe5dc 100%);
}

.agenda-item-speech .agenda-content {
    border-color: #4ECDC4;
    background: linear-gradient(135deg, #fff 0%, #f0fffe 100%);
}
.agenda-item-speech .agenda-dot {
    border-color: #4ECDC4;
    background: linear-gradient(135deg, #fff 0%, #e0fffd 100%);
}

.agenda-item-games .agenda-content {
    border-color: #95E1D3;
    background: linear-gradient(135deg, #fff 0%, #f0fff8 100%);
}
.agenda-item-games .agenda-dot {
    border-color: #95E1D3;
    background: linear-gradient(135deg, #fff 0%, #dfffef 100%);
}

.agenda-item-photos .agenda-content {
    border-color: #F38BA0;
    background: linear-gradient(135deg, #fff 0%, #fff5f8 100%);
}
.agenda-item-photos .agenda-dot {
    border-color: #F38BA0;
    background: linear-gradient(135deg, #fff 0%, #ffe5eb 100%);
}

.agenda-item-talent .agenda-content {
    border-color: #9B59B6;
    background: linear-gradient(135deg, #fff 0%, #f8f5ff 100%);
}
.agenda-item-talent .agenda-dot {
    border-color: #9B59B6;
    background: linear-gradient(135deg, #fff 0%, #ede5f5 100%);
}

.agenda-item-lunch .agenda-content {
    border-color: #F39C12;
    background: linear-gradient(135deg, #fff 0%, #fff8f0 100%);
}
.agenda-item-lunch .agenda-dot {
    border-color: #F39C12;
    background: linear-gradient(135deg, #fff 0%, #ffeed5 100%);
}

.agenda-item-memory .agenda-content {
    border-color: #E74C3C;
    background: linear-gradient(135deg, #fff 0%, #fff5f5 100%);
}
.agenda-item-memory .agenda-dot {
    border-color: #E74C3C;
    background: linear-gradient(135deg, #fff 0%, #ffe5e5 100%);
}

.agenda-item-cake .agenda-content {
    border-color: #FFD93D;
    background: linear-gradient(135deg, #fff 0%, #fffef0 100%);
}
.agenda-item-cake .agenda-dot {
    border-color: #FFD93D;
    background: linear-gradient(135deg, #fff 0%, #fff8d5 100%);
}

.agenda-item-dance .agenda-content {
    border-color: #6BCB77;
    background: linear-gradient(135deg, #fff 0%, #f5fff6 100%);
}
.agenda-item-dance .agenda-dot {
    border-color: #6BCB77;
    background: linear-gradient(135deg, #fff 0%, #e5f9e7 100%);
}

/* Desktop: Zigzag Layout */
@media (min-width: 768px) {
    .agenda-timeline {
        padding: 0 50px;
    }

    /* Center timeline */
    .agenda-timeline::before {
        left: 50%;
        transform: translateX(-2px);
        width: 4px;
    }

    .agenda-item {
        width: calc(50% - 30px);
        padding-left: 0;
        margin-bottom: 4rem;
    }

    /* Odd items - Left side */
    .agenda-item:nth-child(odd) {
        float: left;
        clear: both;
        text-align: right;
        padding-right: 50px;
    }

    .agenda-item:nth-child(odd) .agenda-dot {
        right: -72px;
        left: auto;
        top: 50%;
        transform: translateY(-50%);
    }

    .agenda-item:nth-child(odd) .agenda-content {
        margin-right: 0;
    }

    /* Even items - Right side */
    .agenda-item:nth-child(even) {
        float: right;
        clear: both;
        text-align: left;
        padding-left: 50px;
    }

    .agenda-item:nth-child(even) .agenda-dot {
        left: -72px;
        right: auto;
        top: 50%;
        transform: translateY(-50%);
    }

    .agenda-item:nth-child(even) .agenda-content {
        margin-left: 0;
    }

    /* Clearfix for zigzag */
    .agenda-timeline::after {
        content: '';
        display: table;
        clear: both;
    }

    /* Enhanced hover for desktop */
    .agenda-item:nth-child(odd):hover .agenda-content {
        transform: translateY(-3px) translateX(-5px) rotate(-0.5deg);
    }

    .agenda-item:nth-child(even):hover .agenda-content {
        transform: translateY(-3px) translateX(5px) rotate(0.5deg);
    }

    .agenda-item:nth-child(odd):hover .agenda-dot,
    .agenda-item:nth-child(even):hover .agenda-dot {
        transform: translateY(-50%) scale(1.15) rotate(5deg);
    }
}

.agenda-note {
    clear: both;
    background: linear-gradient(135deg, #fff9e6 0%, #fff5f0 100%);
    border: 5px solid #FFD700;
    border-radius: 10px;
    padding: 2rem;
    margin-top: 4rem;
    display: flex;
    align-items: center;
    gap: 1.5rem;
    box-shadow:
        5px 5px 0px rgba(0, 0, 0, 0.1),
        0 8px 25px rgba(0, 0, 0, 0.1);
    position: relative;
    transition: all 0.3s ease;
}

.agenda-note::before {
    content: '';
    position: absolute;
    top: -3px;
    left: -3px;
    right: -3px;
    bottom: -3px;
    border: 2px dotted rgba(255, 215, 0, 0.4);
    border-radius: 12px;
    pointer-events: none;
}

.agenda-note:hover {
    transform: translateY(-2px);
    box-shadow:
        7px 7px 0px rgba(0, 0, 0, 0.15),
        0 12px 35px rgba(0, 0, 0, 0.15);
}

.note-icon {
    font-size: 2.5rem;
    flex-shrink: 0;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: white;
    border-radius: 50%;
    border: 4px solid #FFD700;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.note-text {
    flex: 1;
    font-size: 1.05rem;
    color: var(--dark);
    line-height: 1.8;
}

.note-text strong {
    color: var(--primary);
    font-weight: 700;
    font-size: 1.15rem;
    text-shadow: 1px 1px 0px rgba(139, 69, 19, 0.1);
}

/* Memories Section */
.memories-section {
    background: linear-gradient(135deg, var(--secondary) 0%, var(--primary) 100%);
    padding: 5rem 2rem;
    color: white;
}

.memories-section .section-title {
    color: white;
}

.memories-section .section-title::after {
    background: white;
}

.memory-quote {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
    font-family: 'Great Vibes', cursive;
    font-size: 2.2rem;
    line-height: 1.6;
}

.years-grid {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 3rem;
    flex-wrap: wrap;
}

.year-circle {
    width: 80px;
    height: 80px;
    background: rgba(255,255,255,0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.1rem;
    transition: all 0.3s ease;
}

.year-circle:hover {
    background: var(--accent);
    color: var(--dark);
    transform: scale(1.1);
}

.year-circle.highlight {
    background: var(--accent);
    color: var(--dark);
    transform: scale(1.2);
}

/* Footer */
footer {
    background: var(--dark);
    color: white;
    text-align: center;
    padding: 3rem 2rem;
}

footer h4 {
    font-family: 'Great Vibes', cursive;
    font-size: 2rem;
    margin-bottom: 1rem;
}

.contact-info {
    margin-bottom: 2rem;
}

.contact-info p {
    margin: 0.5rem 0;
    color: var(--secondary);
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 2rem;
}

.social-links a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    background: rgba(255,255,255,0.1);
    border-radius: 50%;
    text-decoration: none;
    font-size: 1.5rem;
    transition: all 0.3s ease;
}

.social-links a:hover {
    background: var(--accent);
    transform: translateY(-3px);
}

.copyright {
    font-size: 0.9rem;
    color: rgba(255,255,255,0.6);
}

/* Responsive */
@media (max-width: 768px) {
    .hero h1 {
        font-size: 4rem;
    }

    .hero h2 {
        font-size: 1.5rem;
    }

    .section-title {
        font-size: 2rem;
    }

    .memory-quote {
        font-size: 1.6rem;
    }

    .agenda-subtitle {
        font-size: 1.2rem;
        margin-bottom: 3rem;
    }

    .agenda-timeline {
        padding: 0 1rem;
    }

    .agenda-timeline::before {
        left: 25px;
    }

    .agenda-item {
        padding-left: 70px;
        margin-bottom: 2.5rem;
    }

    .agenda-dot {
        left: -5px;
        top: 50%;
        transform: translateY(-50%);
        width: 40px;
        height: 40px;
        font-size: 1.3rem;
        border-width: 4px;
    }

    .agenda-time {
        font-size: 0.85rem;
    }

    .agenda-content {
        padding: 1.3rem;
        border-width: 4px;
    }

    .agenda-title {
        font-size: 1.15rem;
    }

    .agenda-desc {
        font-size: 0.9rem;
    }

    .agenda-note {
        padding: 1.5rem;
        margin-top: 3rem;
        border-width: 4px;
        gap: 1.2rem;
    }

    .note-icon {
        font-size: 2rem;
        width: 50px;
        height: 50px;
        border-width: 3px;
    }

    .note-text {
        font-size: 0.95rem;
    }

    .note-text strong {
        font-size: 1.05rem;
    }
}

@media (max-width: 550px) {
    #flipdown {
        transform: scale(1.1);
        transform-origin: center center;
    }
}

@media (max-width: 480px) {
    .hero h1 {
        font-size: 3rem;
    }

    .hero p {
        font-size: 1rem;
    }

    #flipdown {
        transform: scale(0.85);
    }

    .memory-quote {
        font-size: 1.4rem;
    }

    .agenda-subtitle {
        font-size: 1rem;
        padding: 0 1rem;
    }

    .agenda-timeline {
        padding: 0 0.5rem;
    }

    .agenda-timeline::before {
        left: 20px;
    }

    .agenda-item {
        padding-left: 60px;
        margin-bottom: 2rem;
    }

    .agenda-dot {
        left: -5px;
        top: 50%;
        transform: translateY(-50%);
        width: 36px;
        height: 36px;
        font-size: 1.2rem;
        border-width: 3px;
    }

    .agenda-time {
        font-size: 0.8rem;
    }

    .agenda-content {
        padding: 1.1rem;
        border-width: 3px;
    }

    .agenda-title {
        font-size: 1.05rem;
    }

    .agenda-desc {
        font-size: 0.85rem;
    }

    .agenda-note {
        flex-direction: column;
        text-align: center;
        padding: 1.3rem;
        gap: 1rem;
        border-width: 4px;
    }

    .note-icon {
        font-size: 1.8rem;
        width: 45px;
        height: 45px;
        border-width: 3px;
        margin: 0 auto;
    }

    .note-text {
        font-size: 0.9rem;
    }

    .note-text strong {
        font-size: 1rem;
    }
}
