:root {
    --purple-dark: #12001a;
    --purple-mid: #3a0ca3;
    --purple-neon: #b5179e;
    --glass-bg: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);
    --text-light: #f8f9fa;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

body {
    background-color: var(--purple-dark);
    color: var(--text-light);
    font-family: 'Poppins', sans-serif;
    overflow-x: hidden;
    min-height: 100vh;
    position: relative;
}

.bg-animation {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    overflow: hidden;
}

.sphere {
    position: absolute;
    border-radius: 50%;
    background: radial-gradient(circle, var(--purple-neon) 0%, transparent 70%);
    opacity: 0.4;
    animation: float 15s infinite ease-in-out alternate;
}

.sphere:nth-child(1) { width: 300px; height: 300px; top: -10%; left: -10%; animation-duration: 12s; }
.sphere:nth-child(2) { width: 400px; height: 400px; bottom: -20%; right: -10%; animation-duration: 18s; animation-delay: -5s; }
.sphere:nth-child(3) { width: 200px; height: 200px; top: 40%; left: 50%; animation-duration: 20s; animation-delay: -2s; opacity: 0.2; }

@keyframes float {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(30px, -50px) scale(1.1); }
}

.container {
    max-width: 480px;
    margin: 0 auto;
    padding: 2rem 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

h1, h2, .handwritten {
    font-family: 'Caveat', cursive;
}

h1 {
    text-align: center;
    font-size: 3.5rem;
    color: #ff99ff;
    text-shadow: 0 0 15px var(--purple-neon);
    margin-bottom: 0.5rem;
}

h2 {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: #e0aaff;
    text-align: center;
}

.glass-panel {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 1.5rem;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3);
}

.spotify-panel {
    padding: 10px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.spotify-panel iframe {
    border-radius: 12px;
    display: block;
}

.player-info {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
}

.player-cover {
    width: 60px;
    height: 60px;
    background: linear-gradient(45deg, var(--purple-mid), var(--purple-neon));
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    box-shadow: 0 4px 15px rgba(181, 23, 158, 0.4);
}

.player-text h3 {
    font-size: 1.1rem;
    font-weight: 600;
}

.player-text p {
    font-size: 0.85rem;
    color: #c7c7c7;
}

.progress-bar {
    width: 100%;
    height: 6px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    width: 100%;
    background: var(--purple-neon);
    animation: infiniteProgress 4s linear infinite;
    transform-origin: left;
}

@keyframes infiniteProgress {
    0% { transform: scaleX(0); }
    50% { transform: scaleX(1); }
    100% { transform: scaleX(0); transform-origin: right; }
}

.timer-text {
    text-align: center;
    font-size: 1.2rem;
    font-weight: 300;
    line-height: 1.5;
}

.reveal-card {
    position: relative;
    width: 100%;
    height: 100px;
    border-radius: 15px;
    overflow: hidden;
}

#scratchCanvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2;
    cursor: crosshair;
}

.reveal-content {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.2rem;
    color: #ff99ff;
    z-index: 1;
}

.grid-library {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.grid-item {
    background: rgba(181, 23, 158, 0.2);
    border: 1px solid var(--purple-neon);
    padding: 1rem;
    border-radius: 12px;
    text-align: center;
    font-size: 0.9rem;
    transition: transform 0.2s;
}

.grid-item:active {
    transform: scale(0.95);
}

.btn-more {
    margin-top: 15px;
    width: 100%;
    padding: 12px;
    background: linear-gradient(45deg, var(--purple-mid), var(--purple-neon));
    color: white;
    border: none;
    border-radius: 12px;
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    font-size: 1rem;
    box-shadow: 0 4px 15px rgba(181, 23, 158, 0.4);
    cursor: pointer;
    transition: transform 0.2s;
}

.btn-more:active {
    transform: scale(0.95);
}

.more-loves {
    display: none;
    margin-top: 15px;
}

.more-loves.show {
    display: block;
    animation: fadeIn 0.5s ease;
}

.more-loves ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.more-loves li {
    background: rgba(181, 23, 158, 0.1);
    padding: 10px 15px;
    border-radius: 10px;
    border-left: 3px solid var(--purple-neon);
    font-size: 0.9rem;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

.heart-particle {
    position: fixed;
    color: var(--purple-neon);
    font-size: 1.5rem;
    pointer-events: none;
    animation: floatHeart 1s ease-out forwards;
    z-index: 9999;
}

@keyframes floatHeart {
    0% { transform: translateY(0) scale(1); opacity: 1; }
    100% { transform: translateY(-100px) scale(1.5); opacity: 0; }
}