:root {
    --p1: #FF1493;
    /* Deep Pink */
    --p2: #FF69B4;
    /* Hot Pink */
    --s1: #00CED1;
    /* Teal */
    --s2: #40E0D0;
    /* Turquoise */
    --bg: #010a0a;
    --glass: rgba(255, 255, 255, 0.03);
    --glass-border: rgba(255, 255, 255, 0.08);
    --text: #ffffff;
    --shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
    --glow: 0 0 20px rgba(255, 20, 147, 0.3);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    cursor: none;
    user-select: none;
}

body {
    background: var(--bg);
    color: var(--text);
    font-family: 'Outfit', sans-serif;
    overflow-x: hidden;
    scroll-behavior: smooth;
}

/* Background & Canvas */
#particles-js {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

#particle-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9998;
    pointer-events: none;
}

/* Floating Nav */
.floating-nav {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000;
    padding: 10px 30px;
    border-radius: 100px;
    display: flex;
    gap: 20px;
    border: 1px solid var(--glass-border);
}

.floating-nav a {
    color: var(--text);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    opacity: 0.6;
    transition: 0.3s;
}

.floating-nav a:hover {
    opacity: 1;
    color: var(--s1);
}

/* Glassmorphism Classes */
.glass {
    background: var(--glass);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    border: 1px solid var(--glass-border);
    box-shadow: var(--shadow);
}

/* Hero Section */
.hero {
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: relative;
    z-index: 10;
}

.glow-text {
    font-size: clamp(3rem, 12vw, 8rem);
    font-weight: 800;
    text-align: center;
    line-height: 1;
    letter-spacing: -4px;
    background: linear-gradient(135deg, #fff 30%, var(--p1) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 0 30px rgba(255, 20, 147, 0.4));
}

.glow-text span {
    color: var(--s1);
    -webkit-text-fill-color: initial;
    background: none;
}

.subtitle {
    font-size: 1.2rem;
    opacity: 0.7;
    margin-top: 10px;
}

/* Main Countdown */
.main-countdown {
    margin: 40px 0;
    padding: 25px 60px;
    border-radius: 40px;
    display: flex;
    gap: 40px;
}

.time-unit span {
    font-size: 3.5rem;
    font-weight: 800;
    color: var(--s1);
    line-height: 1;
}

.time-unit label {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    opacity: 0.5;
}

/* 3D Cube */
.cube-container {
    width: 60px;
    height: 60px;
    perspective: 600px;
    margin: 20px auto;
}

.cube {
    width: 100%;
    height: 100%;
    position: relative;
    transform-style: preserve-3d;
    animation: rotate-cube 10s infinite linear;
}

.face {
    position: absolute;
    width: 60px;
    height: 60px;
    background: var(--glass);
    border: 1px solid var(--p1);
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.5rem;
    font-weight: 800;
}

.front {
    transform: rotateY(0deg) translateZ(30px);
}

.back {
    transform: rotateY(180deg) translateZ(30px);
}

.right {
    transform: rotateY(90deg) translateZ(30px);
}

.left {
    transform: rotateY(-90deg) translateZ(30px);
}

.top {
    transform: rotateX(90deg) translateZ(30px);
}

.bottom {
    transform: rotateX(-90deg) translateZ(30px);
}

@keyframes rotate-cube {
    from {
        transform: rotateX(0deg) rotateY(0deg);
    }

    to {
        transform: rotateX(360deg) rotateY(360deg);
    }
}

/* Love Wall */
#love-wall {
    position: relative;
    overflow: hidden;
    cursor: cell !important;
}

.wall-heart {
    position: absolute;
    pointer-events: none;
    animation: pop-in 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

@keyframes pop-in {
    0% {
        transform: scale(0);
        opacity: 0;
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

/* Glass Texture */
.glass {
    position: relative;
    overflow: hidden;
}

.glass::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url('data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSI0IiBoZWlnaHQ9IjQiPjxyZWN0IHdpZHRoPSIxIiBoZWlnaHQ9IjEiIGZpbGw9InJnYmEoMjU1LDI1NSwyNTUsMC4wMSkiLz48L3N2Zz4=');
    pointer-events: none;
    z-index: -1;
}

.section-heading {
    font-size: 3rem;
    text-align: center;
    margin-bottom: 40px;
    color: var(--s1);
    letter-spacing: -1px;
}

/* 3D Heart V2 */
.heart-container-3d {
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.heart-3d-v2 {
    width: 100px;
    height: 100px;
    background: var(--p1);
    position: relative;
    transform: rotate(-45deg);
    animation: pulse 1s infinite alternate;
    box-shadow: 0 0 50px var(--p1);
}

.heart-3d-v2::before,
.heart-3d-v2::after {
    content: '';
    width: 100px;
    height: 100px;
    background: var(--p1);
    border-radius: 50%;
    position: absolute;
}

.heart-3d-v2::before {
    top: -50px;
    left: 0;
}

.heart-3d-v2::after {
    left: 50px;
    top: 0;
}

@keyframes pulse {
    to {
        transform: rotate(-45deg) scale(1.2);
    }
}

/* Buttons */
.btn {
    padding: 15px 35px;
    border-radius: 100px;
    border: none;
    font-weight: 700;
    transition: 0.3s;
}

.btn-primary {
    background: var(--p1);
    color: white;
}

.btn-glass {
    background: var(--glass);
    color: white;
    border: 1px solid var(--glass-border);
}

.btn:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
}

/* Meter V2 */
.meter-v2 {
    height: 12px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 100px;
    margin: 20px 0;
    overflow: hidden;
}

#love-meter-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--s1), var(--p1));
    transition: width 2s ease-in-out;
}

/* Ticker */
.memory-ticker {
    width: 100%;
    padding: 40px 0;
    background: rgba(0, 0, 0, 0.5);
    white-space: nowrap;
    overflow: hidden;
}

.ticker-content {
    display: inline-block;
    animation: scroll 30s linear infinite;
}

.lang-item {
    margin: 0 50px;
    font-weight: 300;
    opacity: 0.5;
}

@keyframes scroll {
    from {
        transform: translateX(0);
    }

    to {
        transform: translateX(-50%);
    }
}

/* Letter Card */
.letter-card {
    max-width: 900px;
    margin: 0 auto;
    padding: 60px;
    line-height: 1.8;
}

.sig {
    margin-top: 40px;
    font-style: italic;
    color: var(--p2);
}

/* Bento Grid */
.section {
    padding: 80px 5%;
    position: relative;
    z-index: 10;
}

.bento-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-auto-rows: minmax(220px, auto);
    gap: 24px;
    max-width: 1300px;
    margin: 0 auto;
    width: 100%;
}

.bento-item {
    border-radius: 32px;
    padding: 32px;
    transition: 0.5s cubic-bezier(0.19, 1, 0.22, 1);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 220px;
}

.bento-item h3 {
    font-size: 1.4rem;
    margin-bottom: 12px;
    font-weight: 700;
}

.item-large {
    grid-column: span 2;
    grid-row: span 2;
    min-height: 460px;
}

.item-medium {
    grid-column: span 2;
    grid-row: span 1;
}

.item-small {
    grid-column: span 1;
    grid-row: span 1;
}

.section-heading {
    font-size: clamp(2rem, 5vw, 3.5rem);
    text-align: center;
    margin-bottom: 60px;
    color: var(--s1);
    letter-spacing: -1px;
    font-weight: 800;
}

/* Footer */
footer {
    padding: 50px;
    text-align: center;
    opacity: 0.4;
    font-size: 0.8rem;
}

/* Animations */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: 1s cubic-bezier(0.19, 1, 0.22, 1);
}

.fade-in.active {
    opacity: 1;
    transform: translateY(0);
}

/* Mood Selector */
.mood-options {
    display: flex;
    gap: 15px;
    margin-top: 10px;
}

.mood-btn {
    background: var(--glass);
    border: 1px solid var(--glass-border);
    font-size: 1.5rem;
    padding: 10px;
    border-radius: 15px;
    cursor: pointer;
    transition: 0.3s;
}

.mood-btn:hover {
    transform: translateY(-3px);
    background: rgba(255, 255, 255, 0.1);
}

/* Song Rows */
.song-row {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
}

.song-icon {
    font-size: 1.5rem;
    animation: bounce 2s infinite;
}

@keyframes bounce {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-5px);
    }
}

.song-name {
    font-weight: 700;
    font-size: 0.9rem;
}

.song-artist {
    opacity: 0.5;
    font-size: 0.7rem;
}

/* Digital Hug Overlay */
#hug-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, var(--p1) 0%, transparent 70%);
    z-index: 99999;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.5s ease;
}

#hug-overlay.active {
    opacity: 0.4;
    animation: hug-pulse 2s infinite alternate;
}

@keyframes hug-pulse {
    from {
        transform: scale(1);
        opacity: 0.3;
    }

    to {
        transform: scale(1.1);
        opacity: 0.6;
    }
}

.hug-zone {
    max-width: 600px;
    margin: 0 auto;
    padding: 40px;
    text-align: center;
    border-radius: 40px;
}

#hug-btn {
    margin-top: 30px;
    font-size: 1.2rem;
    padding: 20px 50px;
}

/* Polaroids */
#polaroid-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 5;
}

.polaroid {
    position: absolute;
    width: 200px;
    background: white;
    padding: 10px 10px 30px 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    border-radius: 4px;
    animation: polaroid-float 20s infinite linear;
}

.polaroid img {
    width: 100%;
    height: 150px;
    object-fit: cover;
    filter: sepia(0.2);
}

@keyframes polaroid-float {
    0% {
        transform: translate(0, 0) rotate(0deg);
    }

    25% {
        transform: translate(50px, 100px) rotate(5deg);
    }

    50% {
        transform: translate(100px, 0) rotate(-5deg);
    }

    75% {
        transform: translate(50px, -100px) rotate(5deg);
    }

    100% {
        transform: translate(0, 0) rotate(0deg);
    }
}

/* MP3 Player */
.player-section {
    padding-bottom: 20px;
}

.music-player {
    max-width: 800px;
    margin: 0 auto;
    padding: 40px;
    border-radius: 50px;
    display: flex;
    align-items: center;
    gap: 50px;
    overflow: hidden;
}

.player-left {
    flex-shrink: 0;
}

.disc-container {
    width: 180px;
    height: 180px;
    position: relative;
}

#player-disc {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    border: 5px solid rgba(255, 255, 255, 0.1);
    animation: rotate-disc 10s infinite linear;
    animation-play-state: paused;
}

.disc-dot {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 30px;
    height: 30px;
    background: var(--bg);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.8);
}

@keyframes rotate-disc {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

.player-right {
    flex-grow: 1;
}

.song-header h2 {
    font-size: 2rem;
    color: var(--p1);
}

.song-header p {
    opacity: 0.6;
    margin-bottom: 30px;
}

.progress-container {
    width: 100%;
    height: 6px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    margin-bottom: 30px;
    cursor: pointer;
}

.progress-bar {
    width: 0%;
    height: 100%;
    background: linear-gradient(90deg, var(--s1), var(--p1));
    border-radius: 10px;
    position: relative;
    transition: width 0.1s linear;
}

.player-controls {
    display: flex;
    gap: 30px;
    align-items: center;
}

.ctrl-btn {
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    transition: 0.3s;
    opacity: 0.6;
}

.ctrl-btn:hover {
    opacity: 1;
    transform: scale(1.1);
}

.play-main {
    width: 60px;
    height: 60px;
    background: var(--p1) !important;
    border-radius: 50% !important;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.2rem;
    opacity: 1;
}

/* Splash Screen */
#splash-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg);
    z-index: 999999;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: 0.8s cubic-bezier(0.19, 1, 0.22, 1);
}

.splash-content {
    text-align: center;
    padding: 60px;
    border-radius: 50px;
    max-width: 500px;
}

#splash-screen.fade-out {
    opacity: 0;
    pointer-events: none;
    transform: scale(1.1);
}

/* Layering Fixes */
.floating-nav {
    z-index: 10001;
}

#cursor {
    position: fixed;
    width: 20px;
    height: 20px;
    background: var(--p1);
    border-radius: 50%;
    pointer-events: none;
    z-index: 9999999;
    mix-blend-mode: screen;
    transform: translate(-50%, -50%);
    box-shadow: 0 0 10px var(--p1);
}

/* 📱 Final Ultra Mobile Lock (iPhone/Tablet) */
@media (max-width: 900px) {
    .bento-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 15px !important;
    }
    .item-large, .item-medium, .item-small {
        grid-column: span 2 !important;
    }
}

@media (max-width: 600px) {
    .glow-text {
        font-size: 2.2rem !important;
        letter-spacing: -1px !important;
    }

    .main-countdown {
        flex-direction: column !important; /* 🔥 VERTICAL STACK FIX */
        align-items: center !important;
        width: 100% !important;
        padding: 20px !important;
        gap: 20px !important;
        margin: 20px 0 !important;
    }

    .time-unit span {
        font-size: 2rem !important;
    }

    .music-player {
        flex-direction: column !important; /* 🔥 VERTICAL STACK FIX */
        width: 100% !important;
        padding: 20px !important;
        text-align: center !important;
        gap: 15px !important;
    }

    .disc-container {
        width: 100px !important;
        height: 100px !important;
        margin: 0 auto !important;
    }

    .song-header h2 {
        font-size: 1.4rem !important;
    }

    .bento-grid {
        grid-template-columns: 1fr !important;
        width: 100% !important;
    }

    .item-large, .item-medium, .item-small {
        grid-column: span 1 !important;
        min-height: auto !important;
        padding: 20px !important;
    }

    .polaroid {
        width: 120px !important;
    }

    .floating-nav {
        display: none !important;
    }

    .hero {
        padding: 60px 20px !important;
        height: auto !important;
    }
}