/* ========================================
   Valentine's Invitation - Global Styles
   ======================================== */

/* CSS Variables */
:root {
    /* Color Palette */
    --ice-light: #a8d5e5;
    --ice-medium: #5b9aa0;
    --ice-dark: #3d7a80;
    --snow-white: #f0f8ff;
    --cream: #fff8f0;

    --strawberry-pink: #ff6b8a;
    --strawberry-red: #c44569;
    --strawberry-dark: #a13d59;
    --coral: #ff8a7a;

    --aurora-purple: #9b6dff;
    --aurora-green: #6dffb3;
    --aurora-blue: #6db3ff;

    --penguin-black: #2d3436;
    --penguin-white: #fefefe;
    --penguin-orange: #ff9f43;
    --penguin-blush: #ffb8c6;

    /* Gradients */
    --bg-gradient: linear-gradient(180deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    --cave-gradient: linear-gradient(180deg, #0d1b2a 0%, #1b263b 50%, #415a77 100%);
    --aurora-gradient: linear-gradient(135deg, var(--aurora-purple) 0%, var(--aurora-blue) 50%, var(--aurora-green) 100%);

    /* Shadows */
    --glow-pink: 0 0 20px rgba(255, 107, 138, 0.5);
    --glow-ice: 0 0 20px rgba(168, 213, 229, 0.5);
    --glow-gold: 0 0 20px rgba(255, 215, 0, 0.5);

    /* Typography */
    --font-main: 'Segoe UI', 'Arial Rounded MT Bold', sans-serif;
    --font-fancy: Georgia, 'Times New Roman', serif;

    /* Spacing */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 1.5rem;
    --spacing-lg: 2rem;
    --spacing-xl: 3rem;

    /* Transitions */
    --transition-fast: 0.2s ease;
    --transition-medium: 0.4s ease;
    --transition-slow: 0.8s ease;
}

/* Reset & Base */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html, body {
    height: 100%;
    overflow: hidden;
}

body {
    font-family: var(--font-main);
    background: var(--bg-gradient);
    color: var(--cream);
    line-height: 1.6;
}

#app {
    width: 100%;
    height: 100%;
    position: relative;
    overflow: hidden;
}

/* Scene Container */
.scene {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity var(--transition-slow), visibility var(--transition-slow);
    z-index: 1;
}

.scene.active {
    opacity: 1;
    visibility: visible;
    z-index: 10;
}

.scene-content {
    width: 100%;
    max-width: 600px;
    padding: var(--spacing-md);
    text-align: center;
    position: relative;
    z-index: 50;
}

/* Snow Container */
#snow-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 10;
    overflow: hidden;
}

.snowflake {
    position: absolute;
    top: -10px;
    color: white;
    font-size: 1rem;
    opacity: 0.8;
    animation: snowfall linear infinite;
}

/* Typography */
h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: var(--spacing-sm);
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

h2 {
    font-size: 1.8rem;
    font-weight: 600;
    margin-bottom: var(--spacing-sm);
}

h3 {
    font-size: 1.4rem;
    font-weight: 600;
}

p {
    font-size: 1.1rem;
}

.name {
    color: var(--strawberry-pink);
    font-style: italic;
}

/* Buttons */
button {
    font-family: var(--font-main);
    cursor: pointer;
    border: none;
    outline: none;
    transition: all var(--transition-fast);
}

.enter-btn {
    background: linear-gradient(135deg, var(--strawberry-pink), var(--strawberry-red));
    color: white;
    font-size: 1.3rem;
    font-weight: 600;
    padding: var(--spacing-sm) var(--spacing-lg);
    border-radius: 50px;
    box-shadow: var(--glow-pink), 0 4px 15px rgba(0, 0, 0, 0.3);
    position: relative;
    overflow: hidden;
    margin-top: var(--spacing-lg);
    z-index: 200;
    cursor: pointer;
}

.enter-btn:hover {
    transform: scale(1.05);
    box-shadow: var(--glow-pink), 0 6px 20px rgba(0, 0, 0, 0.4);
}

.enter-btn:active {
    transform: scale(0.98);
}

.btn-sparkle {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    height: 100%;
    transform: translate(-50%, -50%);
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
    animation: shimmer 2s infinite;
}

.back-btn {
    background: rgba(255, 255, 255, 0.1);
    color: var(--cream);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
}

.back-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

.continue-btn, .start-game-btn {
    background: linear-gradient(135deg, var(--ice-light), var(--ice-medium));
    color: var(--penguin-black);
    font-size: 1.2rem;
    font-weight: 600;
    padding: var(--spacing-sm) var(--spacing-lg);
    border-radius: 50px;
    box-shadow: var(--glow-ice);
    margin-top: var(--spacing-md);
}

.continue-btn:hover, .start-game-btn:hover {
    transform: scale(1.05);
}

.yes-btn {
    background: linear-gradient(135deg, var(--strawberry-pink), var(--strawberry-red));
    color: white;
    font-size: 1.2rem;
    font-weight: 600;
    padding: var(--spacing-sm) var(--spacing-lg);
    border-radius: 50px;
    box-shadow: var(--glow-pink);
    margin: var(--spacing-xs);
}

.yes-btn.alt {
    background: linear-gradient(135deg, var(--coral), var(--strawberry-pink));
}

.yes-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 0 30px rgba(255, 107, 138, 0.7);
}

/* Penguin Base Styles */
.penguin {
    position: relative;
    width: 120px;
    height: 150px;
    margin: 0 auto;
}

.penguin.mini {
    width: 60px;
    height: 75px;
}

.penguin-body {
    position: relative;
    width: 100%;
    height: 100%;
}

.penguin-body::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 85%;
    bottom: 10%;
    left: 0;
    background: var(--penguin-black);
    border-radius: 50% 50% 45% 45%;
}

.penguin-belly {
    position: absolute;
    width: 70%;
    height: 60%;
    bottom: 15%;
    left: 15%;
    background: var(--penguin-white);
    border-radius: 50% 50% 45% 45%;
}

.penguin-face {
    position: absolute;
    top: 10%;
    left: 50%;
    transform: translateX(-50%);
    width: 60%;
    height: 35%;
}

.penguin-eye {
    position: absolute;
    width: 18%;
    height: 35%;
    background: var(--penguin-black);
    border-radius: 50%;
    top: 20%;
}

.penguin-eye::after {
    content: '';
    position: absolute;
    width: 40%;
    height: 40%;
    background: white;
    border-radius: 50%;
    top: 15%;
    left: 15%;
}

.penguin-eye.left {
    left: 15%;
}

.penguin-eye.right {
    right: 15%;
}

.penguin-eye.happy {
    height: 10%;
    border-radius: 50% 50% 0 0;
    top: 30%;
}

.penguin-beak {
    position: absolute;
    bottom: 10%;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 10px solid transparent;
    border-right: 10px solid transparent;
    border-top: 15px solid var(--penguin-orange);
}

.mini .penguin-beak {
    border-left-width: 5px;
    border-right-width: 5px;
    border-top-width: 8px;
}

.penguin-blush {
    position: absolute;
    width: 20%;
    height: 15%;
    background: var(--penguin-blush);
    border-radius: 50%;
    top: 45%;
    opacity: 0.7;
}

.penguin-blush.left {
    left: 5%;
}

.penguin-blush.right {
    right: 5%;
}

.penguin-wing {
    position: absolute;
    width: 25%;
    height: 45%;
    background: var(--penguin-black);
    top: 35%;
    border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
}

.penguin-wing.left {
    left: -5%;
    transform: rotate(-15deg);
    transform-origin: top center;
}

.penguin-wing.right {
    right: -5%;
    transform: rotate(15deg);
    transform-origin: top center;
}

.penguin-feet .foot {
    position: absolute;
    bottom: 0;
    width: 30%;
    height: 12%;
    background: var(--penguin-orange);
    border-radius: 50%;
}

.penguin-feet .foot.left {
    left: 15%;
}

.penguin-feet .foot.right {
    right: 15%;
}

/* Strawberry */
.strawberry {
    width: 30px;
    height: 35px;
    background: var(--strawberry-red);
    border-radius: 50% 50% 50% 50% / 40% 40% 60% 60%;
    position: relative;
    margin: 0 auto;
}

.strawberry.small {
    width: 20px;
    height: 24px;
}

.strawberry.large {
    width: 60px;
    height: 70px;
}

.strawberry-leaves {
    position: absolute;
    top: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 20px;
    height: 12px;
    background: #4CAF50;
    border-radius: 50% 50% 0 0;
}

.strawberry-leaves::before,
.strawberry-leaves::after {
    content: '';
    position: absolute;
    width: 8px;
    height: 10px;
    background: #4CAF50;
    border-radius: 50%;
    top: 2px;
}

.strawberry-leaves::before {
    left: -4px;
    transform: rotate(-30deg);
}

.strawberry-leaves::after {
    right: -4px;
    transform: rotate(30deg);
}

.strawberry-seeds {
    position: absolute;
    width: 100%;
    height: 100%;
}

.strawberry-seeds::before,
.strawberry-seeds::after {
    content: '...';
    position: absolute;
    color: #fff8dc;
    font-size: 8px;
    letter-spacing: 3px;
}

.strawberry-seeds::before {
    top: 30%;
    left: 10%;
}

.strawberry-seeds::after {
    top: 55%;
    left: 15%;
}

.strawberry-held {
    position: absolute;
    bottom: 25%;
    right: -10%;
}

/* Sparkles */
.sparkles {
    position: absolute;
    width: 60px;
    height: 60px;
    top: -15px;
    left: -15px;
}

.sparkles span {
    position: absolute;
    width: 8px;
    height: 8px;
    background: gold;
    border-radius: 50%;
    animation: sparkle 1.5s infinite;
}

.sparkles span:nth-child(1) { top: 0; left: 50%; animation-delay: 0s; }
.sparkles span:nth-child(2) { top: 50%; right: 0; animation-delay: 0.3s; }
.sparkles span:nth-child(3) { bottom: 0; left: 50%; animation-delay: 0.6s; }
.sparkles span:nth-child(4) { top: 50%; left: 0; animation-delay: 0.9s; }

/* Strawberry Counter */
.strawberry-counter {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-xs);
    font-size: 1.2rem;
    font-weight: 600;
}

.strawberry-icon {
    width: 24px;
    height: 28px;
    background: var(--strawberry-red);
    border-radius: 50% 50% 50% 50% / 40% 40% 60% 60%;
    position: relative;
}

.strawberry-icon::before {
    content: '';
    position: absolute;
    top: -5px;
    left: 50%;
    transform: translateX(-50%);
    width: 14px;
    height: 8px;
    background: #4CAF50;
    border-radius: 50% 50% 0 0;
}

/* Cave Complete Overlay */
.cave-complete-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-medium);
    z-index: 50;
}

.cave-complete-overlay.show {
    opacity: 1;
    visibility: visible;
}

.complete-content {
    text-align: center;
    animation: popIn 0.5s ease;
}

.complete-message {
    font-size: 1.2rem;
    margin-top: var(--spacing-sm);
    color: var(--strawberry-pink);
}

/* Speech Bubble */
.speech-bubble {
    background: white;
    color: var(--penguin-black);
    padding: var(--spacing-sm) var(--spacing-md);
    border-radius: 20px;
    position: relative;
    margin-top: var(--spacing-sm);
    font-size: 0.95rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.speech-bubble::before {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    border-left: 10px solid transparent;
    border-right: 10px solid transparent;
    border-top: 12px solid white;
}

/* Responsive */
@media (max-width: 480px) {
    h1 {
        font-size: 1.8rem;
    }

    h2 {
        font-size: 1.4rem;
    }

    .penguin {
        width: 100px;
        height: 125px;
    }

    .enter-btn {
        font-size: 1.1rem;
        padding: 0.8rem 1.5rem;
    }

    .scene-content {
        padding: var(--spacing-sm);
    }
}
