:root {
    --color-bg: #121212;
    --color-text: #F9F9F9;
    --color-text-dim: #A0A0A0;
    --color-sunset: #ff7b54;
    --color-tulip-red: #ff4d6d;
    --color-tulip-yellow: #ffb703;
    --color-accent: #8338ec;
    --glass-bg: rgba(255, 255, 255, 0.03);
    --glass-border: rgba(255, 255, 255, 0.08);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--color-bg);
    color: var(--color-text);
    font-family: 'Inter', sans-serif;
    overflow-x: hidden;
    line-height: 1.8;
}

h1,
h2,
.title-nature {
    font-family: 'Playfair Display', serif;
    font-weight: 700;
}

.container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 2rem;
}

.relative {
    position: relative;
}

/* Custom Cursor */
.cursor-follower {
    position: fixed;
    width: 12px;
    height: 12px;
    background: var(--color-sunset);
    border-radius: 50%;
    pointer-events: none;
    z-index: 9999;
    box-shadow: 0 0 15px var(--color-sunset);
    transition: transform 0.1s ease;
}

/* Floating Music Control */
.music-control {
    position: fixed;
    bottom: 1.5rem;
    left: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    z-index: 1000;
    animation: muteAppear 0.5s ease forwards;
}

.music-toggle {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.15);
    background: rgba(30, 30, 46, 0.9);
    backdrop-filter: blur(12px);
    color: var(--color-text);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
    flex-shrink: 0;
}

.music-toggle:hover {
    background: rgba(60, 60, 80, 0.95);
    border-color: rgba(255, 255, 255, 0.3);
    transform: scale(1.08);
}

.music-toggle.is-muted {
    border-color: rgba(255, 75, 75, 0.4);
    background: rgba(80, 20, 20, 0.8);
}

.music-vol-wrap {
    display: flex;
    flex-direction: column;
    gap: 4px;
    background: rgba(30, 30, 46, 0.9);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 0.5rem 1rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
    max-width: 200px;
}

.now-playing {
    font-size: 0.7rem;
    color: var(--color-text-dim);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 170px;
}

.vol-slider {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 4px;
    border-radius: 2px;
    background: rgba(255, 255, 255, 0.15);
    outline: none;
    cursor: pointer;
}

.vol-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--color-sunset);
    cursor: pointer;
    box-shadow: 0 0 6px rgba(255, 123, 84, 0.5);
}

.vol-slider::-moz-range-thumb {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--color-sunset);
    cursor: pointer;
    border: none;
    box-shadow: 0 0 6px rgba(255, 123, 84, 0.5);
}

/* Immersive Hero Sunset */
.hero {
    height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.sunset-background {
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, #2c3e50, #000000);
    z-index: -1;
}

.sun {
    position: absolute;
    bottom: 20%;
    left: 50%;
    transform: translateX(-50%);
    width: 250px;
    height: 250px;
    background: radial-gradient(circle, #fbc531 0%, #ff7b54 70%, transparent 100%);
    border-radius: 50%;
    box-shadow: 0 0 100px #ff7b54;
    animation: sunPulse 10s infinite alternate;
}

@keyframes sunPulse {
    from {
        transform: translateX(-50%) scale(1);
        opacity: 0.8;
    }

    to {
        transform: translateX(-50%) scale(1.1);
        opacity: 1;
    }
}

.horizon-glow {
    position: absolute;
    bottom: 0;
    width: 100%;
    height: 40vh;
    background: linear-gradient(to top, var(--color-sunset), transparent);
    opacity: 0.3;
    mix-blend-mode: screen;
}

.hero-content {
    text-align: center;
    z-index: 2;
}

.hero h1 {
    font-size: 6rem;
    margin-bottom: 1rem;
    letter-spacing: -3px;
}

.accent-text {
    background: linear-gradient(to right, var(--color-tulip-red), var(--color-tulip-yellow));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Mountain Dividers */
.mountain-divider {
    width: 100%;
    line-height: 0;
}

/* Content Sections & Glassmorphism */
.content-section {
    padding: 10rem 0;
    background-color: var(--color-bg);
}

.glass-container {
    background: var(--glass-bg);
    backdrop-filter: blur(25px);
    border: 1px solid var(--glass-border);
    border-radius: 40px;
    padding: 5rem;
    max-width: 700px;
    margin: 0 auto;
    position: relative;
    z-index: 5;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5);
}

.glass-container h2 {
    font-size: 3rem;
    margin-bottom: 2rem;
}

/* === Interactive Envelope === */
.envelope-wrapper {
    max-width: 700px;
    margin: 0 auto;
    z-index: 5;
    position: relative;
}

.envelope-closed {
    text-align: center;
}

.envelope-body {
    position: relative;
    width: 320px;
    height: 220px;
    margin: 0 auto 2rem;
    overflow: visible;
    background: linear-gradient(135deg, #2a2a3e, #1e1e2e);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.5);
}

.envelope-front {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 3;
}

.envelope-flap {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 100%;
    background: linear-gradient(180deg, #353548, #2a2a3e);
    clip-path: polygon(0 0, 50% 50%, 100% 0);
    z-index: 2;
    transform-origin: top center;
    transition: transform 0.6s ease;
}

.envelope-label {
    font-family: 'Playfair Display', serif;
    font-size: 1.4rem;
    color: var(--color-text);
    margin-bottom: 0.5rem;
}

.envelope-sub {
    font-size: 0.85rem;
    color: var(--color-text-dim);
}

.envelope-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.envelope-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.9rem 1.8rem;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 50px;
    background: rgba(255, 255, 255, 0.05);
    color: var(--color-text);
    font-family: 'Inter', sans-serif;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.envelope-btn:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

.btn-read {
    border-color: rgba(131, 56, 236, 0.4);
}

.btn-read:hover {
    background: rgba(131, 56, 236, 0.15);
    border-color: rgba(131, 56, 236, 0.6);
    box-shadow: 0 8px 25px rgba(131, 56, 236, 0.2);
}

.btn-listen {
    border-color: rgba(255, 123, 84, 0.4);
}

.btn-listen:hover {
    background: rgba(255, 123, 84, 0.15);
    border-color: rgba(255, 123, 84, 0.6);
    box-shadow: 0 8px 25px rgba(255, 123, 84, 0.2);
}

/* Open state animation */
.envelope-open {
    animation: letterSlideUp 0.8s ease forwards;
}

@keyframes letterSlideUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.letter-content {
    line-height: 2;
}

.letter-content p {
    margin-bottom: 1.2rem;
    font-size: 1.05rem;
}

.letter-content strong {
    color: var(--color-tulip-yellow);
}

.letter-sign-off {
    font-family: 'Playfair Display', serif;
    font-size: 1.3rem !important;
    font-style: italic;
    text-align: center;
    margin-top: 2rem !important;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

/* Floating Mute Toggle */
.mute-toggle {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.15);
    background: rgba(30, 30, 46, 0.9);
    backdrop-filter: blur(12px);
    color: var(--color-text);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
    animation: muteAppear 0.5s ease forwards;
}

.mute-toggle:hover {
    background: rgba(60, 60, 80, 0.95);
    border-color: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

.mute-toggle.is-muted {
    border-color: rgba(255, 75, 75, 0.4);
    background: rgba(80, 20, 20, 0.8);
}

@keyframes muteAppear {
    from {
        opacity: 0;
        transform: scale(0.5);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Hyper-Realistic Tulip Garden */
.tulip-field {
    position: absolute;
    width: 300px;
    height: 500px;
    z-index: 1;
}

.tulip-field.left {
    left: -150px;
    top: 10%;
}

.tulip-field.right {
    right: -150px;
    bottom: 0%;
}

.tulip-cluster {
    display: flex;
    gap: -30px;
    align-items: flex-end;
}

.hyper-tulip {
    width: 120px;
    height: 300px;
    filter: drop-shadow(0 10px 20px rgba(0, 0, 0, 0.4));
    transition: all 0.6s cubic-bezier(0.23, 1, 0.32, 1);
}

.hyper-tulip:nth-child(2) {
    transform: translateY(20px) scale(0.9) rotate(-5deg);
    margin-left: -60px;
}

.hyper-tulip:nth-child(3) {
    transform: translateY(40px) scale(0.8) rotate(5deg);
    margin-left: -60px;
}

.hyper-tulip:hover {
    transform: translateY(-20px) scale(1.1) rotate(0deg) !important;
    filter: drop-shadow(0 0 20px rgba(255, 77, 109, 0.4));
    z-index: 10;
}

/* Reference-Matched Tulip Colors */
.tulip-pink {
    color: #D81B60;
}

.tulip-red {
    color: #E53935;
}

.tulip-orange {
    color: #FB8C00;
}

.tulip-gold {
    color: #FDD835;
}

.hyper-tulip:hover .flower-head {
    transform: scale(1.05) translateY(-10px);
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.hyper-tulip.variant .flower-head {
    transform: rotate(3deg);
}

.tulip-garden-footer {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 2rem;
    padding: 0 5rem;
    flex-wrap: wrap;
}

.scattered-tulip {
    position: absolute;
    width: 60px;
    height: 120px;
    opacity: 0.15;
    transition: transform 0.8s, opacity 0.5s;
    filter: blur(1px);
}

.scattered-tulip:hover {
    opacity: 0.8;
    filter: blur(0);
    transform: scale(1.2) translateY(-10px);
}

.mini-tulip {
    width: 25px;
    height: 50px;
    opacity: 0.4;
    transition: opacity 0.3s, transform 0.3s;
}

.mini-tulip:hover {
    opacity: 1;
    transform: translateY(-5px) scale(1.2);
}

/* Nature Walk - Integrated Mountains */
.nature-walk {
    height: 120vh;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.mountain-backdrop {
    position: absolute;
    inset: 0;
    z-index: -1;
}

.mountain-svg {
    width: 100%;
    height: 100%;
}

.mnt-layer {
    transition: transform 0.1s ease-out;
}

.container.center {
    text-align: center;
    max-width: 600px;
}

.title-nature {
    font-size: 4rem;
    margin-bottom: 2rem;
}

/* Beach & Ocean */
.beach-section {
    padding: 15rem 0 0;
    position: relative;
    overflow: hidden;
    min-height: 100vh;
    background: linear-gradient(to bottom, var(--color-bg), #002b36);
}

.ocean {
    height: 200px;
    width: 100%;
    position: absolute;
    bottom: 0;
    left: 0;
    background: #00d2d3;
    opacity: 0.1;
}

.wave {
    background: url('https://s3-us-west-2.amazonaws.com/s.cdpn.io/85486/wave.svg') repeat-x;
    position: absolute;
    width: 6400px;
    height: 198px;
    top: -198px;
    animation: wave 7s cubic-bezier(0.36, 0.45, 0.63, 0.53) infinite;
    transform: translate3d(0, 0, 0);
}

.wave:nth-of-type(2) {
    top: -175px;
    animation: wave 7s cubic-bezier(0.36, 0.45, 0.63, 0.53) -.125s infinite, swell 7s ease -1.25s infinite;
    opacity: 1;
}

@keyframes wave {
    0% {
        margin-left: 0;
    }

    100% {
        margin-left: -1600px;
    }
}

@keyframes swell {

    0%,
    100% {
        transform: translate3d(0, -25px, 0);
    }

    50% {
        transform: translate3d(0, 5px, 0);
    }
}

/* Music Player Integrated */
.integrated-player {
    margin-top: 4rem;
    padding: 2rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 20px;
}

.player-info {
    display: flex;
    justify-content: space-between;
    margin-bottom: 1rem;
    font-size: 0.9rem;
    color: var(--color-text-dim);
}

.player-controls {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.play-btn {
    background: var(--color-text);
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s, background 0.3s;
}

.play-btn:hover {
    transform: scale(1.1);
    background: var(--color-sunset);
}

.play-btn svg {
    width: 24px;
    height: 24px;
    fill: var(--color-bg);
}

.progress-track {
    flex-grow: 1;
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    overflow: hidden;
}

.progress-bar {
    width: 0%;
    height: 100%;
    background: var(--color-sunset);
}

/* General Polishing */
.reveal {
    opacity: 0;
    transform: translateY(50px);
    transition: all 1s cubic-bezier(0.22, 1, 0.36, 1);
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

.scroll-down {
    position: absolute;
    bottom: 3rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    color: var(--color-text-dim);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.scroll-down .line {
    width: 1px;
    height: 60px;
    background: linear-gradient(to bottom, var(--color-text-dim), transparent);
    animation: scrollLine 2s infinite;
}

@keyframes scrollLine {
    0% {
        transform: scaleY(0);
        transform-origin: top;
    }

    50% {
        transform: scaleY(1);
        transform-origin: top;
    }

    51% {
        transform: scaleY(1);
        transform-origin: bottom;
    }

    100% {
        transform: scaleY(0);
        transform-origin: bottom;
    }
}

.minimal-footer {
    padding: 5rem 0;
    text-align: center;
    color: var(--color-text-dim);
    font-size: 0.8rem;
}

/* === Toast Popup === */
.toast-popup {
    position: fixed;
    bottom: -100px;
    right: 20px;
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    padding: 1rem 1.5rem;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    z-index: 10000;
    display: flex;
    align-items: center;
    gap: 1rem;
    max-width: 320px;
    transition: bottom 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275), opacity 0.5s ease;
    opacity: 0;
    pointer-events: none;
}

.toast-popup.show {
    bottom: 80px;
    /* Above the mute button */
    opacity: 1;
    pointer-events: all;
}

.toast-popup p {
    font-size: 0.85rem;
    margin: 0;
    line-height: 1.4;
    color: var(--color-text);
}

.toast-popup .close-toast {
    background: none;
    border: none;
    color: var(--color-text-dim);
    font-size: 1.5rem;
    cursor: pointer;
    line-height: 1;
    padding: 0;
    transition: color 0.3s ease;
}

.toast-popup .close-toast:hover {
    color: var(--color-text);
}

/* === Mobile Responsiveness === */

/* Tablet & small screens */
@media (max-width: 768px) {
    .hero h1 {
        font-size: 3.5rem;
        letter-spacing: -1px;
    }

    .hero {
        height: auto;
        min-height: 100vh;
        min-height: 100dvh;
        padding-top: 15vh;
        padding-bottom: 4rem;
        justify-content: flex-start;
    }

    .hero-content p {
        font-size: 0.95rem;
        padding: 0 1rem;
    }

    .content-section {
        padding: 5rem 0;
    }

    .glass-container {
        padding: 2.5rem 1.8rem;
        border-radius: 24px;
        max-width: 90%;
    }

    .glass-container h2 {
        font-size: 2rem;
        margin-bottom: 1.5rem;
    }

    /* Envelope */
    .envelope-body {
        width: 280px;
        height: 190px;
    }

    .envelope-label {
        font-size: 1.2rem;
    }

    .envelope-sub {
        font-size: 0.75rem;
    }

    .envelope-btn {
        padding: 0.75rem 1.4rem;
        font-size: 0.85rem;
    }

    /* Letter content */
    .letter-content p {
        font-size: 0.95rem;
        margin-bottom: 1rem;
        line-height: 1.8;
    }

    .letter-sign-off {
        font-size: 1.1rem !important;
    }

    /* Tulip fields */
    .tulip-field {
        width: 180px;
        height: 350px;
    }

    .tulip-field.left {
        left: -100px;
    }

    .tulip-field.right {
        right: -100px;
    }

    /* Sun */
    .sun {
        width: 180px;
        height: 180px;
    }

    /* Music control - Move to top left and stack vertically */
    .music-control {
        top: 1rem;
        bottom: auto;
        left: 1rem;
        flex-direction: column;
    }

    .music-vol-wrap {
        width: 34px;
        height: 110px;
        max-width: none;
        padding: 0;
        align-items: center;
        justify-content: center;
    }

    .vol-slider {
        transform: rotate(-90deg);
        width: 80px;
        margin: 0;
    }

    /* Hide song name on mobile */
    .now-playing {
        display: none;
    }

    .music-toggle {
        width: 38px;
        height: 38px;
    }

    /* Mute toggle */
    .mute-toggle {
        width: 42px;
        height: 42px;
        bottom: 1rem;
        right: 1rem;
    }

    /* Footer */
    .minimal-footer {
        padding: 3rem 1rem;
    }

    .tulip-garden-footer {
        gap: 0.3rem;
    }

    .mini-tulip {
        width: 30px;
        height: 80px;
    }

    /* Scroll indicator */
    .scroll-down {
        bottom: 1.5rem;
        font-size: 0.7rem;
    }

    /* Hide custom cursor on touch devices / mobile */
    .cursor-follower {
        display: none !important;
    }

    /* Mountain divider */
    .mountain-divider {
        margin-top: -2px;
    }
}

/* Small phones */
@media (max-width: 480px) {
    .hero h1 {
        font-size: 2.5rem;
        letter-spacing: 0;
    }

    .hero {
        padding-top: 10vh;
    }

    .hero-content p {
        font-size: 0.85rem;
    }

    .content-section {
        padding: 3rem 0;
    }

    .glass-container {
        padding: 2rem 1.2rem;
        border-radius: 20px;
        max-width: 95%;
    }

    .glass-container h2 {
        font-size: 1.6rem;
        margin-bottom: 1rem;
    }

    /* Envelope */
    .envelope-wrapper {
        padding: 0 0.5rem;
    }

    .envelope-body {
        width: 250px;
        height: 170px;
    }

    .envelope-label {
        font-size: 1rem;
    }

    .envelope-btn {
        padding: 0.7rem 1.2rem;
        font-size: 0.8rem;
    }

    /* Letter */
    .letter-content {
        line-height: 1.7;
    }

    .letter-content p {
        font-size: 0.88rem;
        margin-bottom: 0.8rem;
    }

    .letter-sign-off {
        font-size: 1rem !important;
        margin-top: 1.5rem !important;
    }

    /* Tulip fields - hide on very small screens */
    .tulip-field {
        display: none;
    }

    /* Music control - Top left, vertical */
    .music-control {
        top: 0.8rem;
        bottom: auto;
        left: 0.8rem;
        flex-direction: column;
        gap: 0.6rem;
    }

    .music-vol-wrap {
        width: 32px;
        height: 90px;
        max-width: none;
        padding: 0;
        align-items: center;
        justify-content: center;
    }

    .vol-slider {
        transform: rotate(-90deg);
        width: 70px;
        margin: 0;
    }

    .music-toggle {
        width: 34px;
        height: 34px;
    }

    .mute-toggle {
        width: 38px;
        height: 38px;
        bottom: 0.8rem;
        right: 0.8rem;
    }

    /* Sun */
    .sun {
        width: 140px;
        height: 140px;
    }

    .container {
        padding: 0 1rem;
    }

    .minimal-footer {
        padding: 2rem 1rem;
    }
}

/* Viewport meta for proper scaling */
@media (hover: none) and (pointer: coarse) {

    /* Touch devices - hide cursor */
    .cursor-follower {
        display: none !important;
    }
}