:root {
    --bg-color: #ffffff;
    --accent: #ff4d6d;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--bg-color);
    overflow: hidden;
    height: 100vh;
    width: 100vw;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.scene {
    position: relative;
    width: 100vw;
    height: 100vh;
    background: #fff5f8; /* Soft Pastel Pink */
    overflow: hidden;
}

/* Character Glow */
.power-glow {
    position: absolute;
    width: 60vh;
    height: 60vh;
    background: radial-gradient(circle, rgba(255, 77, 109, 0.2) 0%, rgba(255, 237, 175, 0.1) 50%, transparent 70%);
    border-radius: 50%;
    filter: blur(40px);
    z-index: 1;
    /* Lowest child layer */
    animation: pulseGlow 4s ease-in-out infinite;
}

@keyframes pulseGlow {

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

    50% {
        transform: scale(1.2);
        opacity: 0.8;
    }
}

/* Animations */
@keyframes float {

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

    50% {
        transform: translateY(-20px) rotate(2deg);
    }
}

/* Character Positioning */
.character-center {
    width: 38vh;
    max-width: 380px;
    z-index: 10;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation: floatVertical 6s ease-in-out infinite;
    pointer-events: none;
    display: flex;
    justify-content: center;
    align-items: center;
    /* Soft shadow applied to the transparent container */
    filter: drop-shadow(0 20px 40px rgba(0,0,0,0.15));
}

@keyframes floatVertical {

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

    50% {
        transform: translate(-50%, -50%) translateY(-20px);
    }
}

.character-center img {
    width: 100%;
    height: auto;
    /* Apply SVG filter directly to image to remove white before shadow is drawn */
    filter: url(#remove-white);
}

/* Background Scrolling System */
#emoji-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 20;
    /* Float on top of EVERYTHING */
    display: none;
}

.floating-emoji {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 80px;
    height: 80px;
    opacity: 0.85;
    will-change: transform;
    mix-blend-mode: multiply;
}

/* Controls (Clean & Polished) */
.controls {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 9999;
    display: flex;
    gap: 15px;
}

.premium-btn {
    padding: 15px 30px;
    background: linear-gradient(135deg, #ff7f50, #ff4d6d);
    color: white;
    border: none;
    border-radius: 30px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(255, 77, 109, 0.3);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    justify-content: center;
    align-items: center;
    white-space: nowrap;
}

.premium-btn:hover {
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 8px 25px rgba(255, 77, 109, 0.5);
}

/* Print Styles */
.printable-sheet {
    display: none;
}

@media print {
    body {
        background: white;
    }

    .no-print {
        display: none !important;
    }

    /* Snapshot Mode Styles */
    body.mode-snapshot .scene {
        display: flex !important;
        justify-content: center;
        align-items: center;
        position: fixed;
        top: 0;
        left: 0;
        width: 100vw;
        height: 100vh;
        background: white;
    }

    body.mode-snapshot .printable-sheet {
        display: none !important;
    }

    body.mode-snapshot .floating-emoji {
        position: absolute !important;
        animation: none !important;
        mix-blend-mode: multiply;
    }

    body.mode-snapshot .character-center {
        z-index: 2;
        animation: none !important;
    }

    /* Sheet Mode Styles */
    body.mode-sheet .scene {
        display: none !important;
    }

    body.mode-sheet .printable-sheet {
        display: block !important;
        padding: 20px;
    }

    body.mode-sheet .print-grid {
        display: grid;
        grid-template-columns: repeat(4, 1fr);
        /* 4 columns for good size */
        gap: 30px;
        justify-items: center;
        align-items: center;
        text-align: center;
    }

    body.mode-sheet .print-grid-item {
        display: flex;
        flex-direction: column;
        align-items: center;
        width: 150px;
    }

    body.mode-sheet .print-grid img {
        width: 100%;
        max-width: 150px;
        /* Smaller for the grid */
        height: auto;
        page-break-inside: avoid;
        mix-blend-mode: multiply;
        margin-bottom: 5px;
    }

    body.mode-sheet .emoji-label {
        font-family: 'Inter', sans-serif;
        font-size: 12px;
        color: #666;
        margin: 0;
        text-transform: capitalize;
    }

    body.mode-sheet .print-item-large {
        grid-column: span 2;
        /* Power Girl twice as big */
        max-width: 320px !important;
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    body.mode-sheet .print-item-large p {
        font-size: 18px;
        font-weight: bold;
        margin-top: 10px;
    }
}

.only-print {
    display: none;
}

/* Centered Logo Logo Styles */
.logo-overlay {
    position: absolute;
    top: 20%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 30; /* Above emojis (20) */
    text-align: center;
    pointer-events: none;
    user-select: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    filter: drop-shadow(0 5px 15px rgba(0,0,0,0.2));
}

.logo-line {
    font-family: 'Dancing Script', cursive;
    font-size: 8vh;
    color: #8B0000; /* Deep Red/Burgundy from the image */
    line-height: 0.9;
    white-space: nowrap;
    text-shadow: 2px 2px 4px rgba(255,255,255,0.5);
}

.logo-line:nth-child(2) {
    font-size: 12vh;
    margin-top: -1vh;
}

/* Password Box Styles */
.password-container {
    position: absolute;
    top: 72%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 100;
    width: 200px;
}

#passwordInput {
    width: 100%;
    padding: 12px 20px;
    border: 2px solid rgba(139, 0, 0, 0.2);
    border-radius: 25px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(5px);
    color: #8B0000;
    font-size: 16px;
    text-align: center;
    outline: none;
    transition: all 0.3s ease;
}

#passwordInput:focus {
    border-color: #8B0000;
    background: rgba(255, 255, 255, 0.2);
    box-shadow: 0 0 15px rgba(139, 0, 0, 0.1);
}

#passwordInput::placeholder {
    color: rgba(139, 0, 0, 0.4);
    font-weight: 300;
}