/* ============================================================
   🎂 40. Urodziny Agnieszki — Design System & Styles
   ============================================================ */

/* ── CSS Custom Properties ── */
:root {
    /* Background Colors */
    --bg-primary: #0a0a14;
    --bg-secondary: #12121f;
    --bg-card: #1a1a2e;
    --bg-card-hover: #222240;

    /* Polish Colors */
    --polish-red: #C41E3A;
    --polish-red-light: #E8304A;
    --polish-red-dark: #9A1830;
    --polish-white: #F5F0E8;

    /* Gold Accents */
    --gold: #D4A574;
    --gold-bright: #F0C987;
    --gold-dark: #B8864E;
    --gold-glow: rgba(212, 165, 116, 0.3);

    /* Rose/Pink */
    --rose: #E8A0BF;
    --rose-light: #F0BCD4;

    /* Text Colors */
    --text-primary: #F5F0E8;
    --text-secondary: #C0B8D0;
    --text-muted: #8880A0;

    /* Glass */
    --glass-bg: rgba(255, 255, 255, 0.04);
    --glass-border: rgba(255, 255, 255, 0.08);
    --glass-hover: rgba(255, 255, 255, 0.07);

    /* Typography */
    --font-heading: 'Playfair Display', Georgia, serif;
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-script: 'Great Vibes', cursive;

    /* Spacing */
    --section-padding: 120px 0;
    --container-max: 1200px;
    --container-padding: 0 24px;

    /* Transitions */
    --transition-fast: 0.2s ease;
    --transition-smooth: 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    --transition-slow: 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);

    /* Border Radius */
    --radius-sm: 8px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --radius-xl: 32px;
}

/* ── Reset & Base ── */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-body);
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.7;
    overflow-x: hidden;
    min-height: 100vh;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.2;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color var(--transition-fast);
}

img, video {
    max-width: 100%;
    height: auto;
    display: block;
}

button {
    border: none;
    background: none;
    cursor: pointer;
    font-family: inherit;
    color: inherit;
}

ul {
    list-style: none;
}

.container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: var(--container-padding);
}

/* ── Utility Classes ── */
.glass-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 28px;
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 0.95rem;
    transition: all var(--transition-smooth);
    cursor: pointer;
}

.btn-download {
    background: linear-gradient(135deg, var(--polish-red), var(--polish-red-dark));
    color: white;
    box-shadow: 0 4px 20px rgba(196, 30, 58, 0.3);
}

.btn-download:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(196, 30, 58, 0.5);
    background: linear-gradient(135deg, var(--polish-red-light), var(--polish-red));
}

/* ── Section Headers ── */
.section-header {
    text-align: center;
    margin-bottom: 64px;
}

.section-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
    background: linear-gradient(135deg, var(--gold-dark), var(--gold-bright));
    border-radius: 50%;
    font-size: 1.5rem;
    color: var(--bg-primary);
    margin-bottom: 20px;
    box-shadow: 0 4px 20px var(--gold-glow);
}

.section-title {
    font-size: clamp(2rem, 5vw, 3rem);
    color: var(--text-primary);
    margin-bottom: 12px;
    letter-spacing: -0.02em;
}

.section-subtitle {
    font-size: 1.1rem;
    color: var(--text-secondary);
    font-weight: 300;
    max-width: 500px;
    margin: 0 auto;
}

.section-divider {
    width: 80px;
    height: 3px;
    background: linear-gradient(90deg, var(--polish-red), var(--gold), var(--polish-red));
    border-radius: 2px;
    margin: 24px auto 0;
}

section {
    padding: var(--section-padding);
    position: relative;
}

/* ── Scroll Animations ── */
.fade-in,
.fade-in-up,
.fade-in-left,
.fade-in-right {
    opacity: 0;
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.fade-in {
    transform: translateY(20px);
}

.fade-in-up {
    transform: translateY(40px);
}

.fade-in-left {
    transform: translateX(-40px);
}

.fade-in-right {
    transform: translateX(40px);
}

.fade-in.visible,
.fade-in-up.visible,
.fade-in-left.visible,
.fade-in-right.visible {
    opacity: 1;
    transform: translate(0, 0);
}

/* ============================================================
   NAVIGATION
   ============================================================ */
#main-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 16px 0;
    transition: all var(--transition-smooth);
}

#main-nav.scrolled {
    background: rgba(10, 10, 20, 0.9);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: 10px 0;
    border-bottom: 1px solid var(--glass-border);
}

.nav-container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 6px;
}

.nav-logo-number {
    font-family: var(--font-heading);
    font-size: 1.6rem;
    font-weight: 900;
    background: linear-gradient(135deg, var(--gold), var(--gold-bright));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-links a {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-secondary);
    transition: all var(--transition-fast);
}

.nav-links a:hover {
    color: var(--gold-bright);
    background: var(--glass-bg);
}

.nav-links a i {
    font-size: 0.8rem;
}

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    padding: 4px;
    z-index: 1001;
}

.nav-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--text-primary);
    border-radius: 2px;
    transition: all var(--transition-fast);
}

.nav-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.nav-toggle.active span:nth-child(2) {
    opacity: 0;
}

.nav-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* ============================================================
   HERO SECTION
   ============================================================ */
#hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    padding: 0;
    background: radial-gradient(ellipse at 50% 30%, rgba(196, 30, 58, 0.12) 0%, transparent 60%),
                radial-gradient(ellipse at 20% 80%, rgba(212, 165, 116, 0.08) 0%, transparent 50%),
                radial-gradient(ellipse at 80% 70%, rgba(232, 160, 191, 0.06) 0%, transparent 50%),
                var(--bg-primary);
}

#confetti-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2;
    pointer-events: none;
}

.hero-bg-shapes {
    position: absolute;
    inset: 0;
    overflow: hidden;
    z-index: 0;
}

.shape {
    position: absolute;
    border-radius: 50%;
    opacity: 0.06;
    filter: blur(80px);
}

.shape-1 {
    width: 600px;
    height: 600px;
    background: var(--polish-red);
    top: -200px;
    right: -100px;
    animation: float-shape 12s ease-in-out infinite;
}

.shape-2 {
    width: 400px;
    height: 400px;
    background: var(--gold);
    bottom: -100px;
    left: -50px;
    animation: float-shape 15s ease-in-out infinite reverse;
}

.shape-3 {
    width: 300px;
    height: 300px;
    background: var(--rose);
    top: 40%;
    right: 20%;
    animation: float-shape 10s ease-in-out infinite 2s;
}

@keyframes float-shape {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(30px, -40px) scale(1.05); }
    66% { transform: translate(-20px, 20px) scale(0.95); }
}

.hero-content {
    text-align: center;
    z-index: 3;
    position: relative;
    padding: 20px;
    animation: hero-fade-in 1.5s ease-out;
}

@keyframes hero-fade-in {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

.hero-date-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 20px;
    border-radius: 50px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    color: var(--gold);
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: 32px;
    animation: hero-fade-in 1.5s ease-out 0.2s both;
}

.hero-number {
    font-family: var(--font-heading);
    font-size: clamp(8rem, 20vw, 16rem);
    font-weight: 900;
    line-height: 1;
    margin-bottom: 16px;
    position: relative;
    display: inline-block;
    animation: hero-fade-in 1.5s ease-out 0.3s both;
}

.number-digit {
    background: linear-gradient(180deg, var(--gold-bright) 0%, var(--gold) 40%, var(--gold-dark) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    filter: drop-shadow(0 0 40px var(--gold-glow));
    display: inline-block;
    animation: number-glow 3s ease-in-out infinite alternate;
}

.number-digit:last-child {
    animation-delay: 0.5s;
}

@keyframes number-glow {
    from { filter: drop-shadow(0 0 30px var(--gold-glow)); }
    to { filter: drop-shadow(0 0 60px rgba(212, 165, 116, 0.5)); }
}

.hero-title {
    font-size: clamp(1.8rem, 4vw, 3.2rem);
    font-weight: 700;
    margin-bottom: 4px;
    animation: hero-fade-in 1.5s ease-out 0.5s both;
}

.hero-subtitle {
    font-size: clamp(1rem, 2vw, 1.3rem);
    color: var(--text-secondary);
    font-weight: 300;
    margin-bottom: 12px;
    animation: hero-fade-in 1.5s ease-out 0.6s both;
}

.hero-name {
    font-family: var(--font-script);
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    background: linear-gradient(135deg, var(--gold-bright), var(--rose-light), var(--gold));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 32px;
    animation: hero-fade-in 1.5s ease-out 0.7s both;
}

.anniversary-badge {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 16px 28px;
    border-radius: 50px;
    background: linear-gradient(135deg, rgba(196, 30, 58, 0.15), rgba(212, 165, 116, 0.1));
    border: 1px solid rgba(196, 30, 58, 0.25);
    animation: hero-fade-in 1.5s ease-out 0.9s both;
}

.anniversary-badge i {
    font-size: 1.5rem;
    color: var(--gold-bright);
    animation: ring-sparkle 2s ease-in-out infinite;
}

@keyframes ring-sparkle {
    0%, 100% { transform: scale(1) rotate(0deg); }
    25% { transform: scale(1.1) rotate(-5deg); }
    50% { transform: scale(1) rotate(0deg); }
    75% { transform: scale(1.1) rotate(5deg); }
}

.anniversary-text {
    display: flex;
    flex-direction: column;
    text-align: left;
}

.anniversary-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-weight: 600;
}

.anniversary-value {
    font-size: 1rem;
    color: var(--gold-bright);
    font-weight: 600;
}

.scroll-indicator {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 3;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    color: var(--text-muted);
    font-size: 0.8rem;
    animation: hero-fade-in 1.5s ease-out 1.2s both;
}

.scroll-arrow {
    animation: bounce 2s ease-in-out infinite;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(8px); }
    60% { transform: translateY(4px); }
}

.polish-stripe {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg,
        transparent 10%,
        white 10%, white 50%,
        var(--polish-red) 50%, var(--polish-red) 90%,
        transparent 90%
    );
    opacity: 0.4;
}

/* ============================================================
   SONG SECTION
   ============================================================ */
#song {
    background: linear-gradient(180deg, var(--bg-primary), var(--bg-secondary));
}

.song-card {
    max-width: 800px;
    margin: 0 auto;
    padding: 48px;
    overflow: hidden;
}

.song-player-section {
    display: flex;
    gap: 32px;
    align-items: center;
    margin-bottom: 48px;
    flex-wrap: wrap;
}

.song-artwork {
    flex-shrink: 0;
}

.song-artwork-inner {
    width: 140px;
    height: 140px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--polish-red), var(--gold-dark), var(--polish-red-dark));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3.5rem;
    color: var(--text-primary);
    box-shadow: 0 8px 40px rgba(196, 30, 58, 0.2);
    position: relative;
}

.song-artwork-inner::before {
    content: '';
    position: absolute;
    width: 30px;
    height: 30px;
    background: var(--bg-card);
    border-radius: 50%;
    border: 3px solid var(--gold);
}

.fa-spin-slow {
    animation: spin 8s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.song-details {
    flex: 1;
    min-width: 250px;
}

.song-title {
    font-size: 1.5rem;
    margin-bottom: 4px;
    color: var(--text-primary);
}

.song-artist {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 20px;
}

#audio-player {
    width: 100%;
    margin-bottom: 20px;
    border-radius: var(--radius-sm);
    outline: none;
    filter: sepia(30%) saturate(150%) hue-rotate(-10deg);
}

.qr-section {
    border-top: 1px solid var(--glass-border);
    padding-top: 32px;
    text-align: center;
}

.qr-title {
    font-size: 1.2rem;
    margin-bottom: 24px;
    color: var(--text-secondary);
    font-weight: 500;
}

.qr-codes {
    display: flex;
    justify-content: center;
    gap: 48px;
    flex-wrap: wrap;
}

.qr-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.qr-code {
    padding: 16px;
    background: white;
    border-radius: var(--radius-md);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    transition: transform var(--transition-smooth);
}

.qr-code:hover {
    transform: scale(1.05);
}

.qr-label {
    color: var(--text-muted);
    font-size: 0.9rem;
    font-weight: 500;
}

.qr-label i {
    color: var(--polish-red);
}

/* ============================================================
   TIMELINE SECTION
   ============================================================ */
#timeline {
    background: var(--bg-secondary);
}

.timeline-container {
    position: relative;
    max-width: 900px;
    margin: 0 auto;
}

.timeline-container::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 3px;
    background: linear-gradient(180deg,
        transparent,
        var(--gold) 10%,
        var(--gold) 90%,
        transparent
    );
    transform: translateX(-50%);
}

.timeline-item {
    display: flex;
    align-items: flex-start;
    margin-bottom: 48px;
    position: relative;
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease;
}

.timeline-item.visible {
    opacity: 1;
    transform: translateY(0);
}

.timeline-item:nth-child(odd) {
    flex-direction: row;
    padding-right: calc(50% + 40px);
    text-align: right;
}

.timeline-item:nth-child(even) {
    flex-direction: row-reverse;
    padding-left: calc(50% + 40px);
    text-align: left;
}

.timeline-dot {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 20px;
    height: 20px;
    background: var(--gold);
    border-radius: 50%;
    border: 4px solid var(--bg-secondary);
    z-index: 2;
    box-shadow: 0 0 15px var(--gold-glow);
    transition: all var(--transition-smooth);
}

.timeline-item:hover .timeline-dot {
    transform: translateX(-50%) scale(1.3);
    box-shadow: 0 0 25px var(--gold-glow);
}

.timeline-item.highlight .timeline-dot {
    width: 28px;
    height: 28px;
    background: var(--polish-red);
    box-shadow: 0 0 20px rgba(196, 30, 58, 0.4);
}

.timeline-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    padding: 24px;
    transition: all var(--transition-smooth);
    position: relative;
}

.timeline-card:hover {
    background: var(--glass-hover);
    border-color: rgba(212, 165, 116, 0.15);
    transform: translateY(-4px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.2);
}

.timeline-item.highlight .timeline-card {
    border-color: rgba(196, 30, 58, 0.3);
    background: rgba(196, 30, 58, 0.06);
}

.timeline-year {
    font-family: var(--font-heading);
    font-size: 2rem;
    font-weight: 900;
    color: var(--gold);
    line-height: 1;
    margin-bottom: 4px;
}

.timeline-item.highlight .timeline-year {
    color: var(--polish-red-light);
}

.timeline-date {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 8px;
    font-weight: 500;
}

.timeline-event-title {
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.timeline-description {
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

.timeline-icon {
    position: absolute;
    top: 16px;
    font-size: 1.2rem;
    color: var(--gold);
    opacity: 0.4;
}

.timeline-item:nth-child(odd) .timeline-icon {
    left: 16px;
}

.timeline-item:nth-child(even) .timeline-icon {
    right: 16px;
}

/* ============================================================
   GALLERY SECTION
   ============================================================ */
#gallery {
    background: var(--bg-primary);
}

.gallery-filters {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-bottom: 40px;
    flex-wrap: wrap;
}

.gallery-filter-btn {
    padding: 8px 20px;
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-muted);
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    transition: all var(--transition-fast);
    cursor: pointer;
}

.gallery-filter-btn:hover,
.gallery-filter-btn.active {
    color: var(--gold-bright);
    border-color: var(--gold);
    background: rgba(212, 165, 116, 0.08);
}

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

.gallery-item {
    position: relative;
    border-radius: var(--radius-md);
    overflow: hidden;
    cursor: pointer;
    aspect-ratio: 4 / 3;
    background: var(--bg-card);
    transition: all var(--transition-smooth);
}

.gallery-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
}

.gallery-item img,
.gallery-item video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-slow);
}

.gallery-item:hover img,
.gallery-item:hover video {
    transform: scale(1.08);
}

.gallery-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 40%, rgba(10, 10, 20, 0.85) 100%);
    display: flex;
    align-items: flex-end;
    padding: 20px;
    opacity: 0;
    transition: opacity var(--transition-smooth);
}

.gallery-item:hover .gallery-overlay {
    opacity: 1;
}

.gallery-caption {
    color: var(--text-primary);
    font-weight: 500;
    font-size: 0.95rem;
}

.gallery-date {
    color: var(--gold);
    font-size: 0.8rem;
    margin-top: 4px;
}

.gallery-video-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60px;
    height: 60px;
    background: rgba(196, 30, 58, 0.8);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: white;
    transition: all var(--transition-smooth);
    z-index: 2;
}

.gallery-item:hover .gallery-video-icon {
    transform: translate(-50%, -50%) scale(1.1);
    background: var(--polish-red);
}

/* ── Gallery Group Dividers ── */
.gallery-group-divider {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    gap: 16px;
    margin: 2.5rem 0 1rem;
    padding: 0;
}

.gallery-group-divider::before,
.gallery-group-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(212, 165, 116, 0.25), transparent);
}

.gallery-group-divider::before {
    background: linear-gradient(90deg, transparent, rgba(212, 165, 116, 0.25));
}

.gallery-group-divider::after {
    background: linear-gradient(90deg, rgba(212, 165, 116, 0.25), transparent);
}

.gallery-group-label {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 6px 20px;
    background: rgba(212, 165, 116, 0.06);
    border: 1px solid rgba(212, 165, 116, 0.15);
    border-radius: 50px;
    white-space: nowrap;
    flex-shrink: 0;
}

.gallery-group-label .group-icon {
    font-size: 0.7rem;
    color: var(--polish-red);
    opacity: 0.8;
}

.gallery-group-label .group-location {
    font-family: var(--font-heading);
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--gold);
    letter-spacing: 0.5px;
}

.gallery-group-label .group-year {
    font-family: var(--font-body);
    font-size: 0.8rem;
    font-weight: 400;
    color: var(--text-muted);
    letter-spacing: 0.5px;
}

/* ── Photo Slideshow ── */
.slideshow-container {
    position: relative;
    max-width: 900px;
    margin: 0 auto 48px;
    border-radius: var(--radius-lg);
    overflow: hidden;
    aspect-ratio: 16 / 9;
    background: var(--bg-card);
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.3);
    border: 1px solid var(--glass-border);
}

.slideshow-container.hidden {
    display: none;
}

.slideshow-track {
    position: relative;
    width: 100%;
    height: 100%;
}

.slideshow-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 1s ease-in-out;
    z-index: 1;
}

.slideshow-slide.active {
    opacity: 1;
    z-index: 2;
}

.slideshow-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.slideshow-slide video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.slideshow-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(10, 10, 20, 0.5);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: white;
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all var(--transition-fast);
    opacity: 0;
}

.slideshow-container:hover .slideshow-btn {
    opacity: 1;
}

.slideshow-btn:hover {
    background: rgba(196, 30, 58, 0.7);
    transform: translateY(-50%) scale(1.1);
}

.slideshow-prev {
    left: 16px;
}

.slideshow-next {
    right: 16px;
}

.slideshow-dots {
    position: absolute;
    bottom: 16px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
    display: flex;
    gap: 8px;
}

.slideshow-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.35);
    border: none;
    cursor: pointer;
    transition: all var(--transition-fast);
    padding: 0;
}

.slideshow-dot.active {
    background: var(--gold-bright);
    transform: scale(1.2);
    box-shadow: 0 0 8px var(--gold-glow);
}

.slideshow-dot:hover {
    background: rgba(255, 255, 255, 0.7);
}

.slideshow-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 5;
    padding: 40px 24px 44px;
    background: linear-gradient(180deg, transparent, rgba(10, 10, 20, 0.8));
    color: var(--text-primary);
    font-size: 1rem;
    font-weight: 500;
    text-align: center;
    pointer-events: none;
}

.slideshow-caption .caption-date {
    display: block;
    font-size: 0.8rem;
    color: var(--gold);
    margin-top: 4px;
    font-weight: 400;
}

/* Slideshow counter badge */
.slideshow-counter {
    position: absolute;
    top: 16px;
    right: 16px;
    z-index: 10;
    background: rgba(10, 10, 20, 0.5);
    backdrop-filter: blur(8px);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    color: var(--text-secondary);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Slideshow play/pause */
.slideshow-play-pause {
    position: absolute;
    top: 16px;
    left: 16px;
    z-index: 10;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(10, 10, 20, 0.5);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: white;
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all var(--transition-fast);
    opacity: 0;
}

.slideshow-container:hover .slideshow-play-pause {
    opacity: 1;
}

.slideshow-play-pause:hover {
    background: rgba(196, 30, 58, 0.7);
}

/* Gallery Placeholder */
.gallery-placeholder {
    grid-column: 1 / -1;
    text-align: center;
    padding: 80px 40px;
    border-radius: var(--radius-lg);
    border: 2px dashed var(--glass-border);
    background: var(--glass-bg);
}

.gallery-placeholder-icon {
    font-size: 4rem;
    color: var(--text-muted);
    margin-bottom: 20px;
    opacity: 0.5;
}

.gallery-placeholder h3 {
    font-size: 1.5rem;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.gallery-placeholder p {
    color: var(--text-muted);
    font-size: 0.95rem;
    max-width: 400px;
    margin: 0 auto;
}

/* ============================================================
   LIGHTBOX
   ============================================================ */
.lightbox {
    position: fixed;
    inset: 0;
    z-index: 10000;
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(20px);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-smooth);
}

.lightbox.active {
    opacity: 1;
    visibility: visible;
}

.lightbox-content {
    max-width: 90vw;
    max-height: 85vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox-content img,
.lightbox-content video {
    max-width: 100%;
    max-height: 85vh;
    border-radius: var(--radius-md);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.lightbox-close,
.lightbox-prev,
.lightbox-next {
    position: absolute;
    z-index: 10001;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    color: var(--text-primary);
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
}

.lightbox-close:hover,
.lightbox-prev:hover,
.lightbox-next:hover {
    background: var(--glass-hover);
    border-color: var(--gold);
    color: var(--gold);
}

.lightbox-close {
    top: 24px;
    right: 24px;
}

.lightbox-prev {
    left: 24px;
    top: 50%;
    transform: translateY(-50%);
}

.lightbox-next {
    right: 24px;
    top: 50%;
    transform: translateY(-50%);
}

.lightbox-caption {
    position: absolute;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.95rem;
    padding: 12px 24px;
    background: var(--glass-bg);
    border-radius: 50px;
    border: 1px solid var(--glass-border);
    max-width: 90vw;
}

/* ============================================================
   MAP SECTION
   ============================================================ */
#map-section {
    background: var(--bg-secondary);
}

.map-wrapper {
    padding: 8px;
    overflow: hidden;
}

#memory-map {
    width: 100%;
    height: 500px;
    border-radius: calc(var(--radius-lg) - 4px);
    z-index: 1;
}

/* Custom Leaflet markers */
.custom-map-marker {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, var(--polish-red), var(--polish-red-dark));
    border-radius: 50% 50% 50% 0;
    transform: rotate(-45deg);
    border: 3px solid var(--gold);
    box-shadow: 0 4px 15px rgba(196, 30, 58, 0.4);
    transition: all 0.3s ease;
}

.custom-map-marker i {
    transform: rotate(45deg);
    color: white;
    font-size: 0.9rem;
}

.custom-map-marker:hover {
    transform: rotate(-45deg) scale(1.15);
}

.map-popup {
    text-align: center;
    font-family: var(--font-body);
}

.map-popup h3 {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    color: var(--polish-red);
    margin-bottom: 4px;
}

.map-popup .popup-country {
    color: #888;
    font-size: 0.8rem;
    margin-bottom: 8px;
}

.map-popup .popup-description {
    font-size: 0.9rem;
    color: #555;
    line-height: 1.5;
}

/* ============================================================
   MESSAGE SECTION
   ============================================================ */
#message {
    background: linear-gradient(180deg, var(--bg-primary), var(--bg-secondary));
}

.message-card {
    max-width: 700px;
    margin: 0 auto;
    padding: 60px 48px;
    text-align: center;
    position: relative;
}

.message-decoration-top,
.message-decoration-bottom {
    font-family: var(--font-script);
    font-size: 6rem;
    color: var(--gold);
    opacity: 0.3;
    line-height: 0.5;
    user-select: none;
}

.message-decoration-top {
    margin-bottom: 20px;
}

.message-decoration-bottom {
    margin-top: 20px;
}

.message-content {
    font-size: 1.1rem;
    line-height: 1.9;
    color: var(--text-secondary);
}

.message-content p {
    margin-bottom: 16px;
}

.message-content p:last-child {
    margin-bottom: 0;
}

.message-content strong {
    color: var(--gold);
    font-weight: 600;
}

.message-signature {
    margin-top: 40px;
    border-top: 1px solid var(--glass-border);
    padding-top: 24px;
}

.message-signature p {
    color: var(--text-muted);
    font-size: 0.95rem;
}

.signature-name {
    font-family: var(--font-script);
    font-size: 1.8rem;
    color: var(--gold-bright);
    margin-top: 4px;
}

/* ============================================================
   FOOTER
   ============================================================ */
#footer {
    background: var(--bg-secondary);
    padding: 80px 0 40px;
    text-align: center;
    border-top: 1px solid var(--glass-border);
}

.footer-number {
    font-family: var(--font-heading);
    font-size: 4rem;
    font-weight: 900;
    background: linear-gradient(135deg, var(--gold), var(--gold-bright));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    opacity: 0.3;
    margin-bottom: 16px;
}

.footer-text {
    font-family: var(--font-heading);
    font-size: 2rem;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.footer-subtext {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 24px;
}

.polish-flag-mini {
    display: inline-flex;
    border-radius: 4px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    margin-bottom: 24px;
}

.flag-white {
    width: 40px;
    height: 14px;
    background: white;
}

.flag-red {
    width: 40px;
    height: 14px;
    background: var(--polish-red);
}

.footer-credit {
    color: var(--text-muted);
    font-size: 0.85rem;
}

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

@keyframes heartbeat {
    0%, 100% { transform: scale(1); }
    15% { transform: scale(1.2); }
    30% { transform: scale(1); }
    45% { transform: scale(1.15); }
    60% { transform: scale(1); }
}

/* ============================================================
   RESPONSIVE DESIGN
   ============================================================ */
@media (max-width: 1024px) {
    :root {
        --section-padding: 80px 0;
    }

    .timeline-container::before {
        left: 24px;
    }

    .timeline-item:nth-child(odd),
    .timeline-item:nth-child(even) {
        flex-direction: row;
        padding-right: 0;
        padding-left: 60px;
        text-align: left;
    }

    .timeline-dot {
        left: 24px;
    }

    .timeline-item:nth-child(odd) .timeline-icon,
    .timeline-item:nth-child(even) .timeline-icon {
        right: 16px;
        left: auto;
    }
}

@media (max-width: 768px) {
    .nav-toggle {
        display: flex;
    }

    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        width: 280px;
        height: 100vh;
        flex-direction: column;
        background: rgba(10, 10, 20, 0.98);
        backdrop-filter: blur(20px);
        padding: 80px 24px 24px;
        gap: 4px;
        transition: right var(--transition-smooth);
        border-left: 1px solid var(--glass-border);
    }

    .nav-links.active {
        right: 0;
    }

    .nav-links a {
        width: 100%;
        padding: 14px 16px;
        font-size: 1rem;
    }

    .hero-number {
        font-size: clamp(6rem, 25vw, 12rem);
    }

    .song-card {
        padding: 28px;
    }

    .song-player-section {
        flex-direction: column;
        text-align: center;
    }

    .song-artwork-inner {
        width: 110px;
        height: 110px;
        font-size: 2.5rem;
    }

    .song-artwork-inner::before {
        width: 22px;
        height: 22px;
    }

    .qr-codes {
        gap: 24px;
    }

    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: 12px;
    }

    #memory-map {
        height: 400px;
    }

    .message-card {
        padding: 40px 24px;
    }

    .message-decoration-top,
    .message-decoration-bottom {
        font-size: 4rem;
    }

    .timeline-container::before {
        left: 16px;
    }

    .timeline-item:nth-child(odd),
    .timeline-item:nth-child(even) {
        padding-left: 48px;
    }

    .timeline-dot {
        left: 16px;
        width: 16px;
        height: 16px;
    }

    .timeline-item.highlight .timeline-dot {
        width: 22px;
        height: 22px;
    }
}

@media (max-width: 480px) {
    :root {
        --section-padding: 60px 0;
    }

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

    .hero-name {
        font-size: 2.2rem;
    }

    .anniversary-badge {
        padding: 12px 20px;
    }

    .song-card {
        padding: 20px;
    }

    .timeline-card {
        padding: 16px;
    }

    .gallery-grid {
        grid-template-columns: 1fr;
    }

    #memory-map {
        height: 300px;
    }

    .lightbox-prev,
    .lightbox-next {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }

    .footer-text {
        font-size: 1.5rem;
    }
}

/* ── Print styles ── */
@media print {
    #main-nav,
    #confetti-canvas,
    .scroll-indicator,
    .lightbox,
    .theme-toggle {
        display: none !important;
    }

    body {
        background: white;
        color: #333;
    }

    section {
        page-break-inside: avoid;
    }
}

/* ============================================================
   THEME TOGGLE BUTTON
   ============================================================ */
.theme-toggle {
    position: fixed;
    bottom: 28px;
    right: 28px;
    z-index: 9999;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    border: 2px solid var(--glass-border);
    background: var(--bg-card);
    backdrop-filter: blur(12px);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.3rem;
    box-shadow: 0 4px 20px rgba(0,0,0,0.4);
    transition: all var(--transition-smooth);
    overflow: hidden;
}

.theme-toggle:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 30px rgba(0,0,0,0.5);
    border-color: var(--gold);
}

.theme-toggle .toggle-flag {
    display: flex;
    flex-direction: column;
    width: 24px;
    height: 16px;
    border-radius: 2px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,0.3);
}

.theme-toggle .flag-half-white {
    flex: 1;
    background: #fff;
}

.theme-toggle .flag-half-red {
    flex: 1;
    background: #C41E3A;
}

.theme-toggle-tooltip {
    position: absolute;
    right: 62px;
    background: var(--bg-card);
    border: 1px solid var(--glass-border);
    color: var(--text-secondary);
    padding: 6px 12px;
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s;
}

.theme-toggle:hover .theme-toggle-tooltip {
    opacity: 1;
}

/* ============================================================
   COUNTDOWN TIMER
   ============================================================ */
.countdown-section {
    text-align: center;
    padding: 40px 20px 0;
    z-index: 3;
    position: relative;
    animation: hero-fade-in 1.5s ease-out 1s both;
}

.countdown-container {
    display: inline-flex;
    gap: 20px;
    flex-wrap: wrap;
    justify-content: center;
    margin-top: 12px;
}

.countdown-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 70px;
}

.countdown-value {
    font-family: var(--font-heading);
    font-size: 2.2rem;
    font-weight: 900;
    color: var(--gold-bright);
    line-height: 1;
}

.countdown-label {
    font-size: 0.7rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.12em;
    margin-top: 4px;
    font-weight: 600;
}

.countdown-passed {
    font-family: var(--font-heading);
    font-size: 1.3rem;
    color: var(--gold-bright);
    margin-top: 12px;
}

/* ============================================================
   🇵🇱 POLISH RED/WHITE THEME
   ============================================================ */
[data-theme="polish"] {
    /* Background Colors — Deep Dark Red */
    --bg-primary: #10060a;
    --bg-secondary: #1a0c12;
    --bg-card: #2a1018;
    --bg-card-hover: #3a1825;

    /* Gold accents → White/Silver accents */
    --gold: #FFFFFF;
    --gold-bright: #FFFFFF;
    --gold-dark: #D0D0D0;
    --gold-glow: rgba(255, 255, 255, 0.2);

    /* Rose → Lighter Red */
    --rose: #FF6B8A;
    --rose-light: #FF8FA8;

    /* Text Colors */
    --text-primary: #FFFFFF;
    --text-secondary: #D4B8C4;
    --text-muted: #A08090;

    /* Glass — warmer tones */
    --glass-bg: rgba(196, 30, 58, 0.06);
    --glass-border: rgba(255, 255, 255, 0.1);
    --glass-hover: rgba(196, 30, 58, 0.1);
}

/* Hero overrides for Polish theme */
[data-theme="polish"] #hero {
    background: radial-gradient(ellipse at 50% 30%, rgba(196, 30, 58, 0.2) 0%, transparent 60%),
                radial-gradient(ellipse at 20% 80%, rgba(255, 255, 255, 0.04) 0%, transparent 50%),
                radial-gradient(ellipse at 80% 70%, rgba(196, 30, 58, 0.08) 0%, transparent 50%),
                var(--bg-primary);
}

[data-theme="polish"] .number-digit {
    background: linear-gradient(180deg, #FFFFFF 0%, #E8E8E8 40%, #C41E3A 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

[data-theme="polish"] .hero-name {
    background: linear-gradient(135deg, #FFFFFF, #FF8FA8, #FFFFFF);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

[data-theme="polish"] .nav-logo-number {
    background: linear-gradient(135deg, #FFFFFF, #E8E8E8);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Polish theme section icons */
[data-theme="polish"] .section-icon {
    background: linear-gradient(135deg, var(--polish-red-dark), var(--polish-red-light));
    color: white;
    box-shadow: 0 4px 20px rgba(196, 30, 58, 0.3);
}

/* Polish theme section divider */
[data-theme="polish"] .section-divider {
    background: linear-gradient(90deg, white, var(--polish-red), white);
}

/* Polish theme timeline line & dots */
[data-theme="polish"] .timeline-container::before {
    background: linear-gradient(180deg,
        transparent,
        var(--polish-red) 10%,
        var(--polish-red) 90%,
        transparent
    );
}

[data-theme="polish"] .timeline-dot {
    background: white;
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.3);
    border-color: var(--bg-secondary);
}

[data-theme="polish"] .timeline-item.highlight .timeline-dot {
    background: var(--polish-red);
    box-shadow: 0 0 20px rgba(196, 30, 58, 0.5);
}

[data-theme="polish"] .timeline-year {
    color: white;
}

[data-theme="polish"] .timeline-item.highlight .timeline-year {
    color: var(--polish-red-light);
}

[data-theme="polish"] .timeline-item.highlight .timeline-card {
    border-color: rgba(196, 30, 58, 0.4);
    background: rgba(196, 30, 58, 0.08);
}

/* Polish theme song disc */
[data-theme="polish"] .song-artwork-inner {
    background: linear-gradient(135deg, var(--polish-red), #8B0020, var(--polish-red-dark));
    box-shadow: 0 8px 40px rgba(196, 30, 58, 0.3);
}

[data-theme="polish"] .song-artwork-inner::before {
    background: var(--bg-card);
    border-color: white;
}

/* Polish theme scrolled nav */
[data-theme="polish"] #main-nav.scrolled {
    background: rgba(16, 6, 10, 0.95);
}

/* Polish theme nav links hover */
[data-theme="polish"] .nav-links a:hover {
    color: white;
}

/* Polish theme anniversary badge */
[data-theme="polish"] .anniversary-badge {
    background: linear-gradient(135deg, rgba(196, 30, 58, 0.2), rgba(255, 255, 255, 0.05));
    border-color: rgba(255, 255, 255, 0.2);
}

[data-theme="polish"] .anniversary-badge i {
    color: white;
}

[data-theme="polish"] .anniversary-value {
    color: white;
}

/* Polish theme section backgrounds */
[data-theme="polish"] #song {
    background: linear-gradient(180deg, var(--bg-primary), var(--bg-secondary));
}

[data-theme="polish"] #timeline {
    background: var(--bg-secondary);
}

[data-theme="polish"] #map-section {
    background: var(--bg-secondary);
}

/* Polish theme footer */
[data-theme="polish"] .footer-number {
    background: linear-gradient(135deg, var(--polish-red), var(--polish-red-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Polish theme map markers */
[data-theme="polish"] .custom-map-marker {
    background: linear-gradient(135deg, var(--polish-red), #8B0020);
    border-color: white;
}

/* Polish theme mobile nav */
[data-theme="polish"] .nav-links.active {
    background: rgba(16, 6, 10, 0.98);
}

/* Polish theme message signature */
[data-theme="polish"] .signature-name {
    color: white;
}

/* Polish theme hero bg shapes */
[data-theme="polish"] .shape-1 {
    background: var(--polish-red);
    opacity: 0.1;
}

[data-theme="polish"] .shape-2 {
    background: white;
    opacity: 0.03;
}

[data-theme="polish"] .shape-3 {
    background: var(--polish-red-light);
    opacity: 0.06;
}

/* Polish theme polish stripe — more prominent */
[data-theme="polish"] .polish-stripe {
    height: 6px;
    opacity: 0.6;
}

/* Polish theme countdown */
[data-theme="polish"] .countdown-value {
    color: white;
}

/* Polish theme gallery filter buttons */
[data-theme="polish"] .gallery-filter-btn:hover,
[data-theme="polish"] .gallery-filter-btn.active {
    color: white;
    border-color: var(--polish-red);
    background: rgba(196, 30, 58, 0.15);
}

/* Polish theme message strong text */
[data-theme="polish"] .message-content strong {
    color: white;
}
