:root {
    /* Color Palette - Dark theme with warm subtle accents */
    --bg-color: #0d0c0f;
    /* Deep, almost black, warm gray */
    --text-primary: #e6e4dc;
    /* Soft off-white */
    --text-secondary: #999589;
    /* Muted stone */
    --accent-1: #c29f6b;
    /* Warm muted gold/amber (Cat) */
    --accent-2: #a38995;
    /* Dusty rose/mauve (Rabbit) */
    --glow-color: rgba(194, 159, 107, 0.15);

    /* Typography */
    --font-heading: 'Playfair Display', serif;
    --font-body: 'Lato', sans-serif;

    /* Transitions */
    --transition-slow: 1.2s cubic-bezier(0.25, 1, 0.5, 1);
    --transition-med: 0.8s cubic-bezier(0.25, 1, 0.5, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--bg-color);
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 18px;
    line-height: 1.8;
    overflow-x: hidden;
    position: relative;
}

#stardust {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    pointer-events: none;
    opacity: 0.6;
}

::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: var(--bg-color);
}

::-webkit-scrollbar-thumb {
    background: var(--text-secondary);
    border-radius: 10px;
}

/* Typography styles */
h1,
h2,
.title,
.section-title,
.fin {
    font-family: var(--font-heading);
    font-weight: 400;
    letter-spacing: 0.05em;
    color: var(--text-primary);
}

.title {
    font-size: clamp(3rem, 6vw, 5rem);
    margin-bottom: 1rem;
    font-style: italic;
}

.subtitle {
    font-family: var(--font-body);
    font-size: 1.1rem;
    color: var(--text-secondary);
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.section-title {
    font-size: clamp(2rem, 4vw, 3.5rem);
    margin-bottom: 2rem;
    font-style: italic;
    color: var(--accent-1);
}

.large-text {
    font-family: var(--font-heading);
    font-size: clamp(1.5rem, 3vw, 2.5rem);
    line-height: 1.4;
    color: var(--text-secondary);
}

p {
    margin-bottom: 1.5rem;
    max-width: 600px;
}

/* Layout */
.story-container {
    position: relative;
    width: 100%;
}

.story-section {
    min-height: 100vh;
    width: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 10vh 10vw;
    position: relative;
}

.split-layout {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    max-width: 1200px;
}

.chapter.reverse .split-layout {
    flex-direction: row-reverse;
}

.text-block {
    flex: 1;
    padding: 2rem;
    z-index: 2;
}

.scene-graphic {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0.8;
}

/* Character Specifics */
.accent-color-1 {
    color: var(--accent-1);
}

.accent-color-2 {
    color: var(--accent-2);
}

/* SVG Animations */
svg {
    overflow: visible;
}

.character-art path,
.character-art circle {
    transition: var(--transition-med);
}

/* Cat Animations */
@keyframes catEarTwitch {

    0%,
    90%,
    100% {
        transform: rotate(0deg);
    }

    92% {
        transform: rotate(-10deg) translateY(2px);
    }

    94% {
        transform: rotate(5deg) translateY(-1px);
    }

    96% {
        transform: rotate(-5deg);
    }
}

@keyframes catTailWag {

    0%,
    100% {
        transform: rotate(0deg);
    }

    50% {
        transform: rotate(8deg) translateX(-2px) translateY(2px);
    }
}

@keyframes breathe {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.02) translateY(-2px);
    }
}

.anim-ear-left {
    transform-origin: 25px 20px;
    animation: catEarTwitch 7s infinite ease-in-out;
}

.anim-ear-right {
    transform-origin: 75px 20px;
    animation: catEarTwitch 7s infinite ease-in-out reverse;
    animation-delay: 2s;
}

.anim-tail {
    transform-origin: 80px 40px;
    animation: catTailWag 4s infinite ease-in-out;
}

.cat-art {
    animation: breathe 5s infinite ease-in-out;
}

/* Rabbit Animations */
@keyframes rabbitEarTwitch {

    0%,
    85%,
    100% {
        transform: rotate(0deg);
    }

    88% {
        transform: rotate(-15deg);
    }

    90% {
        transform: rotate(10deg);
    }

    92% {
        transform: rotate(-5deg);
    }
}

@keyframes rabbitHop {

    0%,
    95%,
    100% {
        transform: translateY(0);
    }

    97.5% {
        transform: translateY(-5px);
    }
}

.anim-ear-left.rabbit {
    transform-origin: 40px 30px;
    animation: rabbitEarTwitch 6s infinite ease-in-out;
}

.anim-ear-right.rabbit {
    transform-origin: 60px 30px;
    animation: rabbitEarTwitch 6s infinite ease-in-out 1s;
}

.rabbit-art {
    animation: breathe 4.5s infinite ease-in-out, rabbitHop 8s infinite ease-in-out;
}

/* Hero Section specific */
.hero-section {
    text-align: center;
}

.scroll-indicator {
    position: absolute;
    bottom: 10vh;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    opacity: 0.6;
}

.scroll-indicator SPAN {
    font-size: 0.8rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
}

.scroll-indicator .line {
    width: 1px;
    height: 60px;
    background: linear-gradient(to bottom, var(--text-secondary), transparent);
    animation: scrollLine 2s infinite cubic-bezier(0.25, 1, 0.5, 1);
    transform-origin: top;
}

@keyframes scrollLine {
    0% {
        transform: scaleY(0);
        opacity: 0;
    }

    50% {
        transform: scaleY(1);
        opacity: 1;
    }

    100% {
        transform: scaleY(1) translateY(10px);
        opacity: 0;
    }
}

/* Ending Section specific */
.finale-scene {
    position: relative;
    width: 350px;
    height: 250px;
    margin-bottom: 4rem;
    display: flex;
    justify-content: center;
    align-items: flex-end;
}

.celestial-body {
    position: absolute;
    bottom: 40px;
    width: 200px;
    height: 200px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(194, 159, 107, 0.15) 0%, transparent 60%);
    box-shadow: 0 0 80px rgba(194, 159, 107, 0.1);
    z-index: 0;
}

.ground-line {
    position: absolute;
    bottom: 20px;
    width: 100%;
    height: 1px;
    background: linear-gradient(to right, transparent, rgba(230, 228, 220, 0.3), transparent);
}

.character-wrapper {
    position: absolute;
    bottom: 20px;
    /* Aligned with ground line */
    z-index: 1;
}

.cat-pos {
    left: 70px;
}

.rabbit-pos {
    right: 70px;
    transform: scaleX(-1);
    /* Face the cat */
}

.closing-text {
    text-align: center;
    font-size: 1.3rem;
    color: var(--text-secondary);
    font-style: italic;
    margin-bottom: 2rem;
    line-height: 1.8;
}

.fin {
    font-size: 2rem;
    color: var(--text-primary);
    text-align: center;
    opacity: 0.5;
}


/* Scroll Animations (triggered by JS intersection observer) */
.fade-in {
    opacity: 0;
    transition: opacity var(--transition-slow), transform var(--transition-slow);
}

.fade-in.is-visible {
    opacity: 1;
}

.fade-in-up {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity var(--transition-slow), transform var(--transition-slow);
}

.fade-in-up.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.fade-in-left {
    opacity: 0;
    transform: translateX(-40px);
    transition: opacity var(--transition-slow), transform var(--transition-slow);
}

.fade-in-left.is-visible {
    opacity: 1;
    transform: translateX(0);
}

.fade-in-right {
    opacity: 0;
    transform: translateX(40px);
    transition: opacity var(--transition-slow), transform var(--transition-slow);
}

.fade-in-right.is-visible {
    opacity: 1;
    transform: translateX(0);
}

.delay-1 {
    transition-delay: 0.3s;
}

/* Preloader */
.preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: var(--bg-color);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 1s ease-out;
}

.preloader.hidden {
    opacity: 0;
    pointer-events: none;
}

.glow-orb {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: radial-gradient(circle, var(--accent-1) 0%, transparent 70%);
    animation: pulse 2s infinite alternate;
}

@keyframes pulse {
    0% {
        transform: scale(0.8);
        opacity: 0.3;
    }

    100% {
        transform: scale(1.5);
        opacity: 0.8;
    }
}

/* Ambient Particles (for Meeting chapter) */
.ambient-particles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
}

.particle {
    position: absolute;
    background: radial-gradient(circle, var(--accent-1) 0%, transparent 80%);
    border-radius: 50%;
    opacity: 0;
    animation: floatParticle 8s infinite linear;
}

@keyframes floatParticle {
    0% {
        transform: translateY(0) scale(0.5);
        opacity: 0;
    }

    20% {
        opacity: 0.3;
    }

    80% {
        opacity: 0.3;
    }

    100% {
        transform: translateY(-100px) scale(1.5);
        opacity: 0;
    }
}

/* Memories Section (The Hanging String) */
.memories-section {
    padding-top: 10vh;
}

.clothesline-container {
    position: relative;
    width: 100%;
    max-width: 1000px;
    height: 400px;
    margin: 0 auto;
}

.string-svg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100px;
}

.hanging-items {
    position: absolute;
    top: 40px;
    /* Aligned roughly to where string dips */
    left: 0;
    width: 100%;
    display: flex;
    justify-content: space-around;
    padding: 0 5%;
}

.hanging-card-wrapper {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    transform-origin: top center;
    animation: swing 6s infinite ease-in-out alternate;
}

.hanging-card-wrapper:hover {
    animation-play-state: paused;
}

/* Stagger swinging animations */
.hanging-card-wrapper:nth-child(1) {
    animation-delay: 0s;
    animation-duration: 7s;
}

.hanging-card-wrapper:nth-child(2) {
    animation-delay: -2s;
    animation-duration: 5s;
}

.hanging-card-wrapper:nth-child(3) {
    animation-delay: -4s;
    animation-duration: 6.5s;
}

@keyframes swing {
    0% {
        transform: rotate(-4deg);
    }

    100% {
        transform: rotate(4deg);
    }
}

.clip {
    width: 12px;
    height: 25px;
    background: #4a453e;
    /* wood/clip color */
    border-radius: 4px;
    margin-bottom: -10px;
    z-index: 2;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.memory-card {
    background: rgba(20, 19, 22, 0.7);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.6);
    width: 250px;
    transition: transform 0.4s cubic-bezier(0.25, 1, 0.5, 1);
}

.memory-card:hover {
    transform: scale(1.05) translateY(-5px);
    z-index: 10;
    border-color: rgba(194, 159, 107, 0.3);
}

/* Chat Card specific */
.chat-card {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.chat-header {
    font-size: 0.9rem;
    color: var(--accent-1);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 8px;
    margin-bottom: 5px;
    font-family: var(--font-heading);
    letter-spacing: 1px;
}

/* Image Card specific */
.image-card {
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 280px;
    /* Slightly wider to accommodate chat screenshots */
    padding: 1rem;
}

.memory-image {
    width: 100%;
    height: auto;
    border-radius: 8px;
    object-fit: contain;
    max-height: 400px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.5);
}

.chat-bubble {
    padding: 10px 14px;
    border-radius: 18px;
    font-size: 0.85rem;
    max-width: 90%;
    line-height: 1.4;
    position: relative;
}

.chat-bubble.received {
    align-self: flex-start;
    background: rgba(255, 255, 255, 0.1);
    border-bottom-left-radius: 4px;
}

.chat-bubble.sent {
    align-self: flex-end;
    background: var(--accent-2);
    color: #1a1a1c;
    font-weight: 500;
    border-bottom-right-radius: 4px;
}

.chat-time {
    font-size: 0.7rem;
    color: var(--text-secondary);
    align-self: center;
    margin-top: 5px;
}

/* Photo Placeholder Polaroid */
.photo-placeholder {
    padding: 12px 12px 24px 12px;
    background: #e6e4dc;
    /* Polaroid white/cream */
    color: #0d0c0f;
    border: none;
}

.photo-placeholder.memory-card:hover {
    border-color: transparent;
}

.photo-inner {
    width: 100%;
    aspect-ratio: 1;
    background: #2a2a2c;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: #888;
    font-size: 0.8rem;
    overflow: hidden;
    box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.5);
}

.polaroid-caption {
    font-family: var(--font-heading);
    text-align: center;
    margin-top: 15px;
    font-size: 1.1rem;
    font-style: italic;
    color: #2a2a2c;
}

/* Premium Photo Card */
.portrait-section .card-graphic {
    display: flex;
    justify-content: center;
    align-items: center;
}

.premium-photo-card {
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0.01) 100%);
    border: 1px solid rgba(194, 159, 107, 0.2);
    border-radius: 20px;
    padding: 24px;
    width: 100%;
    max-width: 420px;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5), inset 0 0 0 1px rgba(255, 255, 255, 0.05);
    transform-style: preserve-3d;
    transition: transform 0.8s cubic-bezier(0.25, 1, 0.5, 1), box-shadow 0.8s ease;
}

.premium-photo-card:hover {
    transform: translateY(-10px) rotateY(-5deg) rotateX(5deg);
    box-shadow: -20px 30px 60px rgba(0, 0, 0, 0.6), inset 0 0 0 1px rgba(194, 159, 107, 0.4);
}

.carousel-container {
    width: 100%;
    aspect-ratio: 3/4;
    border-radius: 12px;
    overflow: hidden;
    position: relative;
    box-shadow: inset 0 5px 20px rgba(0, 0, 0, 0.8);
    background: linear-gradient(to bottom right, #1a1a1c, #0d0c0f);
}

.carousel-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.8s ease-in-out;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1;
}

.carousel-slide.active {
    opacity: 1;
    z-index: 2;
}

.image-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}

.carousel-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 12px;
}

.carousel-indicators {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 15px;
}

.dot {
    width: 8px;
    height: 8px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    cursor: pointer;
    transition: background 0.3s ease;
}

.dot.active {
    background: var(--accent-1);
    box-shadow: 0 0 5px var(--accent-1);
}

.card-details {
    padding-top: 24px;
    text-align: center;
}

.card-date {
    font-family: var(--font-heading);
    color: var(--accent-1);
    font-style: italic;
    font-size: 1.4rem;
    letter-spacing: 2px;
}

/* List Section (Things I Like) */
.list-section {
    background-color: #121114;
    /* Slightly different shade for contrast */
}

.grid-layout {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    width: 100%;
    max-width: 1000px;
    margin: 3rem auto 0;
}

.grid-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(194, 159, 107, 0.1);
    padding: 2.5rem 2rem;
    border-radius: 12px;
    transition: transform 0.4s ease, border-color 0.4s ease;
    text-align: center;
}

.grid-card:hover {
    transform: translateY(-5px);
    border-color: rgba(194, 159, 107, 0.4);
}

.grid-card h3 {
    font-family: var(--font-heading);
    color: var(--accent-1);
    font-size: 1.6rem;
    margin-bottom: 1rem;
    font-style: italic;
}

.grid-card p {
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 0;
}

/* Timeline Section (Things I Remember) */
.timeline-section {
    position: relative;
}

.timeline {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
}

.timeline::after {
    content: '';
    position: absolute;
    width: 1px;
    background: linear-gradient(to bottom, transparent, var(--accent-2), transparent);
    top: 0;
    bottom: 0;
    left: 50%;
    margin-left: -0.5px;
}

.timeline-item {
    padding: 10px 40px;
    position: relative;
    background-color: inherit;
    width: 50%;
}

.timeline-item::after {
    content: '';
    position: absolute;
    width: 10px;
    height: 10px;
    right: -5px;
    background-color: var(--bg-color);
    border: 2px solid var(--accent-2);
    top: 30px;
    border-radius: 50%;
    z-index: 1;
}

.timeline-item.left {
    left: 0;
}

.timeline-item.right {
    left: 50%;
}

.timeline-item.left::before {
    content: " ";
    height: 0;
    position: absolute;
    top: 26px;
    width: 0;
    z-index: 1;
    right: 30px;
    border: medium solid rgba(255, 255, 255, 0.03);
    border-width: 10px 0 10px 10px;
    border-color: transparent transparent transparent rgba(255, 255, 255, 0.03);
}

.timeline-item.right::before {
    content: " ";
    height: 0;
    position: absolute;
    top: 26px;
    width: 0;
    z-index: 1;
    left: 30px;
    border: medium solid rgba(255, 255, 255, 0.03);
    border-width: 10px 10px 10px 0;
    border-color: transparent rgba(255, 255, 255, 0.03) transparent transparent;
}

.timeline-item.right::after {
    left: -5px;
}

.timeline-content {
    padding: 20px 30px;
    background: rgba(255, 255, 255, 0.03);
    position: relative;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.timeline-date {
    font-family: var(--font-heading);
    color: var(--accent-2);
    font-size: 1.4rem;
    font-style: italic;
    display: block;
    margin-bottom: 10px;
}

/* Media Queries */
@media (max-width: 768px) {

    .split-layout,
    .chapter.reverse .split-layout {
        flex-direction: column;
        text-align: center;
    }

    .scene-graphic {
        margin-bottom: 2rem;
    }

    .story-section {
        padding: 5vh 5vw;
    }

    .title {
        font-size: 2.5rem;
    }

    .hanging-items {
        flex-direction: column;
        align-items: center;
        gap: 2rem;
        position: static;
        margin-top: 2rem;
    }

    .string-svg {
        display: none;
    }

    .clothesline-container {
        height: auto;
        margin-top: 0 !important;
    }

    .hanging-card-wrapper {
        animation: none !important;
        transform: none !important;
        margin-top: 0 !important;
    }

    .clip {
        display: none;
    }

    /* Timeline Mobile */
    .timeline::after {
        left: 20px;
    }

    .timeline-item {
        width: 100%;
        padding-left: 50px;
        padding-right: 0px;
    }

    .timeline-item.left::before,
    .timeline-item.right::before {
        left: 40px;
        border: medium solid rgba(255, 255, 255, 0.03);
        border-width: 10px 10px 10px 0;
        border-color: transparent rgba(255, 255, 255, 0.03) transparent transparent;
    }

    .timeline-item.left::after,
    .timeline-item.right::after {
        left: 15px;
    }

    .timeline-item.right {
        left: 0%;
    }
}

/* LDR Distance Map Section (Leaflet) */
.ldr-section {
    position: relative;
    z-index: 1;
}

.map-container {
    width: 100%;
    margin: 0 auto 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
}

#interactive-map {
    width: 100%;
    max-width: 800px;
    height: 400px;
    border-radius: 12px;
    border: 1px solid rgba(194, 159, 107, 0.2);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.8);
    z-index: 2;
}

/* Custom pulsing marker for Leaflet */
.leaflet-pulse-icon {
    border-radius: 50%;
    background: var(--accent-1);
    box-shadow: 0 0 15px var(--accent-1);
    animation: radarPing 2s infinite ease-out;
}

.leaflet-pulse-icon.indo {
    background: var(--accent-2);
    box-shadow: 0 0 15px var(--accent-2);
    animation-delay: 1s;
}

@keyframes radarPing {
    0% {
        transform: scale(0.5);
        opacity: 0.8;
    }

    100% {
        transform: scale(3.5);
        opacity: 0;
    }
}

.distance-text {
    margin-top: 2rem;
    text-align: center;
}

/* Time Together Counter */
.timer-section {
    padding-top: 5vh;
}

.timer-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    margin-top: 2rem;
}

.time-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(194, 159, 107, 0.2);
    padding: 15px 20px;
    border-radius: 12px;
    min-width: 90px;
    backdrop-filter: blur(10px);
}

.time-num {
    font-size: 2.5rem;
    font-family: var(--font-heading);
    color: var(--accent-1);
    font-weight: bold;
}

.time-label {
    font-size: 0.85rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-top: 5px;
}

.time-colon {
    font-size: 2.5rem;
    color: var(--text-secondary);
    font-family: var(--font-heading);
    padding-bottom: 25px;
}

/* Floating Music Player */
.music-player {
    position: fixed;
    top: 30px;
    right: 30px;
    background: rgba(22, 20, 24, 0.75);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 50px;
    padding: 10px 20px 10px 10px;
    display: flex;
    align-items: center;
    gap: 15px;
    z-index: 100;
    cursor: pointer;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.5);
    transition: transform 0.3s ease;
}

.music-player:hover {
    transform: scale(1.05);
    border-color: rgba(194, 159, 107, 0.3);
}

.vinyl-record {
    width: 40px;
    height: 40px;
    background: #111;
    border-radius: 50%;
    border: 2px solid #333;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.vinyl-record.playing {
    animation: spin 3s linear infinite;
}

.vinyl-center {
    width: 12px;
    height: 12px;
    background: var(--accent-1);
    border-radius: 50%;
    border: 2px solid #000;
}

@keyframes spin {
    100% {
        transform: rotate(360deg);
    }
}

.player-info {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    white-space: nowrap;
}

.song-title {
    font-size: 0.9rem;
    color: var(--text-primary);
    font-weight: 500;
    text-overflow: ellipsis;
    overflow: hidden;
}

.song-artist {
    font-size: 0.7rem;
    color: var(--accent-2);
}

@media (max-width: 768px) {
    .music-player {
        top: auto;
        bottom: 30px;
        right: 20px;
        left: 20px;
        justify-content: center;
    }

    .timer-container {
        flex-wrap: wrap;
        gap: 10px;
    }

    .time-colon {
        display: none;
    }
}

/* Apology Letter Section */
.letter-section {
    position: relative;
    z-index: 5;
}

.letter-container {
    position: relative;
    width: 100%;
    max-width: 650px;
    margin: 0 auto;
}

.letter-content {
    background: rgba(22, 20, 24, 0.75);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-top: 1px solid rgba(194, 159, 107, 0.3);
    border-radius: 12px;
    padding: 3rem;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5), inset 0 0 0 1px rgba(255, 255, 255, 0.02);
    position: relative;
    z-index: 2;
}

.letter-header {
    margin-bottom: 2rem;
    text-align: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding-bottom: 1.5rem;
}

.script-title {
    font-family: 'Dancing Script', cursive;
    color: var(--accent-1);
    font-size: 3.5rem;
    font-weight: 600;
    text-shadow: 0 2px 10px rgba(194, 159, 107, 0.3);
}

.letter-body p {
    font-size: 1.05rem;
    line-height: 1.9;
    color: var(--text-secondary);
    margin-bottom: 1.2rem;
    max-width: 100%;
}

.sign-off {
    font-family: 'Dancing Script', cursive;
    font-size: 2rem !important;
    color: var(--accent-2) !important;
    margin-top: 2rem;
    text-align: right;
}

/* Background Glowing Orbs for the Letter */
.glow-blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(60px);
    z-index: 1;
    opacity: 0.15;
    animation: drift 10s infinite alternate ease-in-out;
}

.blob-1 {
    width: 300px;
    height: 300px;
    background: var(--accent-1);
    top: -50px;
    left: -50px;
}

.blob-2 {
    width: 250px;
    height: 250px;
    background: var(--accent-2);
    bottom: -50px;
    right: -50px;
    animation-delay: -5s;
}

@keyframes drift {
    0% {
        transform: translate(0, 0) scale(1);
    }

    100% {
        transform: translate(30px, 20px) scale(1.1);
    }
}

@media (max-width: 768px) {
    .letter-content {
        padding: 2rem 1.5rem;
    }

    .script-title {
        font-size: 2.8rem;
    }
}

/* Secret Message Envelope */
.secret-section {
    position: relative;
    padding: 10vh 0;
    z-index: 10;
}

.envelope-wrapper {
    position: relative;
    width: 300px;
    height: 200px;
    margin: 2rem auto;
    perspective: 1000px;
}

.envelope {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(30, 28, 34, 0.9), rgba(20, 18, 22, 0.9));
    border: 1px solid rgba(194, 159, 107, 0.4);
    border-radius: 10px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.6);
    position: absolute;
    top: 0;
    left: 0;
    z-index: 3;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.5s ease, box-shadow 0.5s ease;
    transform-style: preserve-3d;
}

.envelope:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 45px rgba(0, 0, 0, 0.8), 0 0 15px rgba(194, 159, 107, 0.2);
}

.envelope-body {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 4;
}

.envelope-flap {
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    height: 0;
    border-left: 150px solid transparent;
    border-right: 150px solid transparent;
    border-top: 100px solid rgba(40, 38, 44, 0.9);
    border-bottom: none;
    z-index: 5;
    transform-origin: top center;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
}

.envelope-wrapper.open .envelope-flap {
    transform: rotateX(180deg);
}

.envelope-wrapper.open .envelope {
    transform: translateY(150px);
    opacity: 0;
    pointer-events: none;
}

.letter-reveal {
    position: absolute;
    top: 0;
    left: -20px;
    width: 340px;
    background: rgba(22, 20, 24, 0.95);
    border: 1px solid rgba(194, 159, 107, 0.5);
    border-radius: 12px;
    padding: 2.5rem;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.8);
    opacity: 0;
    transform: translateY(50px) scale(0.9);
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
    z-index: 2;
}

.envelope-wrapper.open .letter-reveal {
    opacity: 1;
    transform: translateY(-50px) scale(1.1);
    pointer-events: auto;
    z-index: 10;
}

@media (max-width: 768px) {
    .envelope-wrapper.open .letter-reveal {
        width: 100%;
        max-width: 320px;
        left: 0;
        transform: translateY(-30px) scale(1);
    }
}

/* --- GAME SECTION (Mobile Legends Origin) --- */
.game-section {
    position: relative;
    z-index: 5;
    padding-top: 5vh;
}

.game-card {
    background: rgba(22, 20, 24, 0.6);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 20px;
    padding: 4rem 2rem;
    max-width: 800px;
    margin: 0 auto;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.5), inset 0 0 0 1px rgba(194, 159, 107, 0.1);
}

.heroes-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 3rem;
    margin-top: 2rem;
}

.hero-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.hero-avatar {
    width: 120px;
    height: 120px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0.01) 100%);
    border: 1px solid rgba(194, 159, 107, 0.2);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 1.5rem;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.4);
    position: relative;
    transition: transform 0.4s ease, border-color 0.4s ease;
}

.hero-card:hover .hero-avatar {
    transform: translateY(-10px);
    border-color: rgba(194, 159, 107, 0.5);
}

.hero-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    opacity: 0.9;
    transition: opacity 0.3s ease;
}

.hero-card:hover .hero-image {
    opacity: 1;
}

.hero-icon {
    width: 60%;
    height: 60%;
}

.animated-float {
    animation: floatParticle 4s infinite ease-in-out alternate;
}

.vs-badge {
    background: var(--bg-color);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);
}

.pulse-heart {
    animation: pulse 1.5s infinite alternate;
}

@media (max-width: 768px) {
    .heroes-container {
        flex-direction: column;
        gap: 2rem;
    }

    .game-card {
        padding: 3rem 1.5rem;
    }
}

/* --- FINAL POLISH (Custom Scrollbar & Music Hint) --- */

/* Custom Scrollbar for Premium Feel */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: var(--bg-color);
}

::-webkit-scrollbar-thumb {
    background: rgba(194, 159, 107, 0.3);
    /* Accent 1 with opacity */
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(194, 159, 107, 0.6);
}

/* Pulsing Music Player to draw attention until clicked */
.music-player:not(.playing-started) {
    animation: attentionPulse 2.5s infinite ease-in-out;
}

@keyframes attentionPulse {
    0% {
        box-shadow: 0 5px 20px rgba(0, 0, 0, 0.5), 0 0 0 0 rgba(194, 159, 107, 0.4);
    }

    50% {
        box-shadow: 0 5px 20px rgba(0, 0, 0, 0.5), 0 0 20px 10px rgba(194, 159, 107, 0.1);
        transform: scale(1.02);
        border-color: rgba(194, 159, 107, 0.4);
    }

    100% {
        box-shadow: 0 5px 20px rgba(0, 0, 0, 0.5), 0 0 0 0 rgba(194, 159, 107, 0);
    }
}