:root {
    --bg-deep: #050b14;
    --bg-warm: #1e1b4b;
    --accent-gold: #ffd700;
    --accent-glow: #ffaa00;
    --accent-cyan: #00f3ff;
    --accent-pink: #ff0099;
    --glass-bg: rgba(20, 20, 30, 0.4);
    --glass-border: rgba(255, 255, 255, 0.1);
    --text-main: #ffffff;
    --text-muted: #a0a0b0;
    --orb-glow: radial-gradient(circle, rgba(255,215,0,1) 0%, rgba(255,100,0,0.4) 60%, rgba(0,0,0,0) 70%);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: 'Playfair Display', serif;
    color: var(--text-main);
    background-color: var(--bg-deep);
    overflow: hidden;
    height: 100vh;
    height: 100dvh;
    width: 100vw;
    display: flex;
    justify-content: center;
    align-items: center;
}

h1, h2, h3 {
    font-family: 'Playfair Display', serif;
    text-transform: none;
}

.app-container {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.bg-gradient {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 50% 120%, #1a0b2e, #0a0a1a, #000000);
    z-index: -5;
}

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

#fireworks-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1; /* Above stars, below screens (z-index 10) */
    pointer-events: none;
}

.star {
    position: absolute;
    background: white;
    border-radius: 50%;
    opacity: 0.8;
    animation: twinkle var(--duration, 3s) infinite ease-in-out;
}

@keyframes twinkle {
    0%, 100% { opacity: 0.3; transform: scale(0.8); }
    50% { opacity: 1; transform: scale(1.2); }
}

.planet {
    position: absolute;
    border-radius: 50%;
}

.planet-1 {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #ff0099, #7700ff);
    top: 10%;
    right: 10%;
    box-shadow: 0 0 20px rgba(255, 0, 153, 0.4);
    animation: float 20s infinite ease-in-out;
}

.planet-2 {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #00f3ff, #0055ff);
    bottom: 15%;
    left: 8%;
    box-shadow: 0 0 15px rgba(0, 243, 255, 0.4);
    animation: float 15s infinite ease-in-out reverse;
}

.planet-ring {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(75deg);
    width: 110px;
    height: 25px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-15px); }
}

.screen {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.6s ease;
    padding: 20px;
    padding-bottom: 20px;
    text-align: center;
    z-index: 10;
}

.screen.active {
    opacity: 1;
    pointer-events: auto;
}

.hidden {
    display: none !important;
}

.glass {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 25px 20px;
    box-shadow: 0 10px 40px 0 rgba(0, 0, 0, 0.5);
    width: 95%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    
    margin: auto;
    
    transform: translateY(20px);
    animation: slideUp 0.8s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
    
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.glass::-webkit-scrollbar {
    display: none;
}

@keyframes slideUp {
    to { transform: translateY(0); }
}

h1 {
    font-weight: 700;
    font-size: 1.6rem;
    margin-bottom: 0.3em;
    letter-spacing: 1px;
    line-height: 1.2;
    background: linear-gradient(to bottom, #fff, #a0a0b0);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.year-text {
    font-size: 3rem;
    font-weight: 700;
    letter-spacing: -1px;
    margin: 5px 0;
    background: linear-gradient(135deg, #00f3ff, #ffffff, #ff0099);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    filter: drop-shadow(0 0 10px rgba(0, 243, 255, 0.5));
    animation: pulseGlow 3s infinite alternate;
}

.celebration-content h1 {
    font-size: 2.2rem;
    background: linear-gradient(to right, #fbbf24, #f59e0b, #d97706);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    animation: shine 3s infinite linear;
    background-size: 200%;
    margin: 5px 0;
}

@keyframes pulseGlow {
    from { filter: drop-shadow(0 0 10px rgba(0, 243, 255, 0.5)); }
    to { filter: drop-shadow(0 0 25px rgba(255, 0, 153, 0.7)); }
}

@keyframes shine {
    to { background-position: 200% center; }
}

p {
    font-size: 1.1rem;
    color: var(--text-muted);
    margin-bottom: 20px;
    line-height: 1.4;
    font-weight: 500;
}

.input-group {
    margin-bottom: 20px;
    width: 100%;
}

input, select {
    width: 100%;
    padding: 15px;
    border-radius: 15px;
    border: 1px solid var(--glass-border);
    background: rgba(0, 0, 0, 0.3);
    color: white;
    font-size: 1rem;
    font-weight: 600;
    outline: none;
    text-align: center;
    transition: all 0.3s ease;
    font-family: 'Playfair Display', serif;
    -webkit-appearance: none;
}

input:focus, select:focus {
    background: rgba(0, 0, 0, 0.5);
    border-color: var(--accent-cyan);
}

.primary-btn {
    position: relative;
    width: 100%;
    padding: 18px 0;
    border-radius: 18px;
    border: none;
    font-size: 1.1rem;
    cursor: pointer;
    font-family: 'Playfair Display', serif;
    font-weight: 700;
    letter-spacing: 1px;
    color: #ffffff;
    background: linear-gradient(135deg, #ff0099, #7700ff);
    box-shadow: 0 0 20px rgba(255, 0, 153, 0.4);
    transition: transform 0.2s;
    overflow: hidden;
}

.primary-btn::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(255,255,255,0.8), transparent);
    transform: rotate(45deg) translateY(-100%);
    transition: transform 0.5s;
}

.primary-btn:hover::after {
    transform: rotate(45deg) translateY(100%);
}

.primary-btn.small {
    padding: 12px;
    font-size: 0.9rem;
}

.secondary-btn {
    padding: 12px 25px;
    border-radius: 50px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    background: rgba(255, 255, 255, 0.05);
    color: white;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.3s;
    font-family: 'Playfair Display', serif;
    font-weight: 700;
    margin-top: 15px;
    text-transform: uppercase;
}

.share-container {
    width: 100%;
    animation: fadeIn 0.5s ease;
}

.share-form {
    background: rgba(0,0,0,0.4);
    border-radius: 20px;
    padding: 15px;
    margin-top: 15px;
}

.link-box {
    display: flex;
    gap: 5px;
    margin-top: 10px;
}

.link-box input {
    padding: 10px;
    font-size: 0.8rem;
}

#copy-btn {
    background: #ff0099;
    color: white;
    border: none;
    border-radius: 12px;
    padding: 0 10px;
    font-weight: bold;
    font-family: 'Playfair Display', serif;
    cursor: pointer;
    font-size: 0.8rem;
}

/* Game Elements - Mobile Optimized */
.orb {
    position: absolute;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--orb-glow);
    cursor: pointer;
    touch-action: manipulation;
    /* Combine vertical float with horizontal sway */
    animation: floatUp linear forwards, sway ease-in-out infinite alternate;
}

@keyframes floatUp {
    0% { top: 110%; opacity: 0; transform: scale(0.5); }
    10% { opacity: 1; }
    90% { opacity: 1; }
    100% { top: -10%; opacity: 0; transform: scale(1.2); }
}

@keyframes sway {
    from { margin-left: -15px; }
    to { margin-left: 15px; }
}

.game-ui {
    position: absolute;
    top: 80px;
    width: 100%;
    text-align: center;
    pointer-events: none;
    z-index: 20;
}

.gentle-message {
    font-size: 1.3rem;
    text-shadow: 0 2px 10px black;
}

.icon-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    z-index: 100;
    backdrop-filter: blur(10px);
}

@media (min-width: 768px) {
    h1 { font-size: 3rem; }
    .year-text { font-size: 6rem; }
    .glass { padding: 50px; width: auto; min-width: 450px; max-height: 85vh; }
    .planet-1 { width: 150px; height: 150px; }
    .planet-2 { width: 100px; height: 100px; }
    .orb { width: 80px; height: 80px; }
}

.fade-out { opacity: 0 !important; }
.fade-in { opacity: 1 !important; }
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}