/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Comic Sans MS', 'Chalkboard SE', 'Arial Rounded MT Bold', sans-serif;
    background: linear-gradient(135deg, #87CEEB 0%, #98FB98 50%, #FFB6C1 100%);
    min-height: 100vh;
    overflow-x: hidden;
}

#game-container {
    width: 100vw;
    height: 100vh;
    position: relative;
    overflow: hidden;
}

/* Scene Management */
.scene {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding: 20px;
    padding-bottom: 100px;
    opacity: 0;
    transition: opacity 0.3s ease;
    overflow-y: auto;
}

.scene.active {
    display: flex;
    opacity: 1;
}

/* Typography */
h1, h2, h3 {
    color: #FF69B4;
    text-shadow:
        3px 3px 0 #fff,
        -1px -1px 0 #FF1493,
        4px 4px 8px rgba(255, 20, 147, 0.3);
    text-align: center;
}

.title {
    font-size: clamp(2rem, 5vw, 3.5rem);
    margin-bottom: 25px;
    margin-top: 25px;
    background: linear-gradient(135deg, #FF69B4 0%, #FF1493 30%, #9932CC 70%, #FF69B4 100%);
    background-size: 200% 200%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: title-shimmer 3s ease-in-out infinite;
    filter: drop-shadow(2px 2px 0 white) drop-shadow(-2px -2px 0 white) drop-shadow(2px -2px 0 white) drop-shadow(-2px 2px 0 white);
    letter-spacing: 1px;
}

@keyframes title-shimmer {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

h2 {
    font-size: clamp(1.5rem, 4vw, 2.5rem);
    margin-bottom: 18px;
    margin-top: 15px;
    background: linear-gradient(135deg, #FF69B4 0%, #9932CC 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    filter: drop-shadow(2px 2px 0 white) drop-shadow(-1px -1px 0 white);
}

h3 {
    font-size: 1.2rem;
    margin-bottom: 10px;
    color: #9932CC;
    text-shadow: 1px 1px 0 white;
}

/* Button Styles */
.btn {
    padding: 15px 40px;
    font-size: 1.3rem;
    font-family: inherit;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.2);
    -webkit-tap-highlight-color: transparent;
    position: relative;
    overflow: hidden;
}

/* Shine effect on buttons */
.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255,255,255,0.3),
        transparent
    );
    transition: left 0.5s ease;
}

.btn:hover::before {
    left: 100%;
}

.btn:hover {
    transform: scale(1.08) translateY(-2px);
    filter: brightness(1.1);
}

.btn:active {
    transform: scale(0.95) translateY(2px);
    filter: brightness(0.95);
}

.btn-start {
    background: linear-gradient(180deg, #FF85C1 0%, #FF69B4 30%, #FF1493 100%);
    color: white;
    font-size: clamp(1.2rem, 3vw, 1.8rem);
    padding: 18px 45px;
    box-shadow:
        0 6px 0 #C71585,
        0 8px 15px rgba(199, 21, 133, 0.4),
        inset 0 1px 0 rgba(255,255,255,0.3);
    letter-spacing: 0.5px;
}

.btn-start:hover {
    box-shadow:
        0 4px 0 #C71585,
        0 12px 25px rgba(199, 21, 133, 0.5),
        inset 0 1px 0 rgba(255,255,255,0.3);
}

.btn-next {
    background: linear-gradient(180deg, #ADFF9E 0%, #98FB98 30%, #32CD32 100%);
    color: white;
    box-shadow:
        0 4px 0 #228B22,
        0 6px 12px rgba(34, 139, 34, 0.3),
        inset 0 1px 0 rgba(255,255,255,0.3);
}

.btn-back {
    background: linear-gradient(180deg, #E8B8E8 0%, #DDA0DD 30%, #BA55D3 100%);
    color: white;
    box-shadow:
        0 4px 0 #8B008B,
        0 6px 12px rgba(139, 0, 139, 0.3),
        inset 0 1px 0 rgba(255,255,255,0.3);
}

.btn-activity {
    background: linear-gradient(180deg, #FFE55C 0%, #FFD700 30%, #FFA500 100%);
    color: #8B4513;
    font-size: 1.1rem;
    font-weight: bold;
    padding: 14px 28px;
    box-shadow:
        0 4px 0 #CC8400,
        0 6px 12px rgba(204, 132, 0, 0.3),
        inset 0 1px 0 rgba(255,255,255,0.4);
    text-shadow: 0 1px 0 rgba(255,255,255,0.5);
}

.btn-dance {
    background: linear-gradient(180deg, #FF85C1 0%, #FF69B4 30%, #FF1493 100%);
    color: white;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.2);
    box-shadow:
        0 4px 0 #C71585,
        0 6px 12px rgba(199, 21, 133, 0.3),
        inset 0 1px 0 rgba(255,255,255,0.3);
}

.btn-dance.active {
    background: linear-gradient(180deg, #7FFF7F 0%, #98FB98 30%, #32CD32 100%);
    box-shadow:
        0 4px 0 #228B22,
        0 6px 12px rgba(34, 139, 34, 0.4),
        inset 0 1px 0 rgba(255,255,255,0.3);
    animation: dance-btn-pulse 0.5s ease-in-out infinite;
}

@keyframes dance-btn-pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.btn-small {
    padding: 12px 22px;
    font-size: 0.9rem;
    font-weight: bold;
    background: linear-gradient(180deg, #A5D8FF 0%, #87CEEB 30%, #4169E1 100%);
    color: white;
    box-shadow:
        0 3px 0 #1E3A8A,
        0 5px 10px rgba(30, 58, 138, 0.3),
        inset 0 1px 0 rgba(255,255,255,0.3);
}

/* Animations */
@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-15px); }
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

@keyframes float {
    0%, 100% { transform: translateY(0) rotate(-2deg); }
    50% { transform: translateY(-10px) rotate(2deg); }
}

@keyframes sparkle {
    0%, 100% { opacity: 0; transform: scale(0); }
    50% { opacity: 1; transform: scale(1); }
}

@keyframes wave-move {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

@keyframes happy-jump {
    0%, 100% { transform: translateY(0) translateX(-50%); }
    50% { transform: translateY(-40px) translateX(-50%); }
}

/* Improved realistic dance animation */
@keyframes unicorn-dance {
    0% { transform: translateX(-50%) rotate(0deg) scale(1) translateY(0); }
    8% { transform: translateX(-50%) rotate(-8deg) scale(1.02) translateY(-5px); }
    16% { transform: translateX(-50%) rotate(8deg) scale(1) translateY(0); }
    24% { transform: translateX(-50%) rotate(-6deg) scale(1.03) translateY(-8px); }
    32% { transform: translateX(-50%) rotate(6deg) scale(1) translateY(-2px); }
    40% { transform: translateX(-50%) rotate(0deg) scale(1.05) translateY(-20px); }
    48% { transform: translateX(-50%) rotate(10deg) scale(1.02) translateY(-10px); }
    56% { transform: translateX(-50%) rotate(-10deg) scale(1) translateY(-5px); }
    64% { transform: translateX(-50%) rotate(5deg) scale(1.03) translateY(-15px); }
    72% { transform: translateX(-50%) rotate(-5deg) scale(1) translateY(-8px); }
    80% { transform: translateX(-50%) rotate(3deg) scale(1.02) translateY(-12px); }
    88% { transform: translateX(-50%) rotate(-3deg) scale(1.01) translateY(-5px); }
    100% { transform: translateX(-50%) rotate(0deg) scale(1) translateY(0); }
}

/* More natural leg movement */
@keyframes leg-dance-front {
    0%, 100% { transform: rotate(0deg) translateY(0); }
    15% { transform: rotate(-25deg) translateY(-3px); }
    30% { transform: rotate(5deg) translateY(0); }
    45% { transform: rotate(-15deg) translateY(-5px); }
    60% { transform: rotate(10deg) translateY(-2px); }
    75% { transform: rotate(-20deg) translateY(-4px); }
    90% { transform: rotate(3deg) translateY(-1px); }
}

@keyframes leg-dance-back {
    0%, 100% { transform: rotate(0deg) translateY(0); }
    12% { transform: rotate(20deg) translateY(-2px); }
    25% { transform: rotate(-8deg) translateY(0); }
    38% { transform: rotate(15deg) translateY(-4px); }
    50% { transform: rotate(-12deg) translateY(-1px); }
    62% { transform: rotate(18deg) translateY(-3px); }
    75% { transform: rotate(-5deg) translateY(0); }
    88% { transform: rotate(10deg) translateY(-2px); }
}

/* Flowing mane animation */
@keyframes mane-dance {
    0%, 100% { transform: translateZ(-1px) rotate(0deg) scale(1) skewX(0deg); }
    15% { transform: translateZ(-1px) rotate(8deg) scale(1.08) skewX(3deg); }
    30% { transform: translateZ(-1px) rotate(-5deg) scale(1.03) skewX(-2deg); }
    45% { transform: translateZ(-1px) rotate(6deg) scale(1.1) skewX(4deg); }
    60% { transform: translateZ(-1px) rotate(-8deg) scale(1.05) skewX(-3deg); }
    75% { transform: translateZ(-1px) rotate(4deg) scale(1.08) skewX(2deg); }
    90% { transform: translateZ(-1px) rotate(-3deg) scale(1.02) skewX(-1deg); }
}

/* Enthusiastic tail wagging */
@keyframes tail-dance {
    0%, 100% { transform: rotate(-10deg) scaleY(1); }
    12% { transform: rotate(35deg) scaleY(1.1); }
    25% { transform: rotate(-25deg) scaleY(0.95); }
    37% { transform: rotate(40deg) scaleY(1.05); }
    50% { transform: rotate(-30deg) scaleY(1); }
    62% { transform: rotate(30deg) scaleY(1.1); }
    75% { transform: rotate(-20deg) scaleY(0.95); }
    87% { transform: rotate(25deg) scaleY(1.05); }
}

/* Head bobbing for dance */
@keyframes head-dance {
    0%, 100% { transform: rotate(0deg) translateY(0); }
    25% { transform: rotate(-5deg) translateY(-3px); }
    50% { transform: rotate(5deg) translateY(-5px); }
    75% { transform: rotate(-3deg) translateY(-2px); }
}

@keyframes tail-wag {
    0%, 100% { transform: skewY(0deg) scaleY(1); }
    25% { transform: skewY(8deg) scaleY(1.05); }
    50% { transform: skewY(0deg) scaleY(1); }
    75% { transform: skewY(-8deg) scaleY(1.05); }
}

.bounce {
    animation: bounce 2s ease-in-out infinite;
}

.pulse {
    animation: pulse 1.5s ease-in-out infinite;
}

.float {
    animation: float 3s ease-in-out infinite;
}

/* =====================================================
   UNICORN STYLES - Cute cartoon unicorn facing right
   ===================================================== */

.unicorn-preview {
    position: relative;
    width: 180px;
    height: 160px;
}

.unicorn-preview.large {
    width: 280px;
    height: 250px;
}

.unicorn-preview.menu-unicorn {
    width: 200px;
    height: 180px;
    margin-bottom: 20px;
    animation: float 3s ease-in-out infinite;
}

/* SVG Unicorn Wrapper */
.unicorn-svg-wrapper {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.unicorn-svg-wrapper svg {
    width: 100%;
    height: 100%;
    max-width: 100%;
    max-height: 100%;
}

.unicorn-character .unicorn-svg-wrapper {
    width: 120px;
    height: 120px;
}

.unicorn-character .unicorn-svg-wrapper svg {
    width: 120px;
    height: 120px;
}

/* Unicorn Body - oval shape */
.unicorn-body {
    position: absolute;
    width: 55%;
    height: 45%;
    bottom: 25%;
    left: 20%;
    background: linear-gradient(180deg, #FFFFFF 0%, #F8F8FF 50%, #E8E8F0 100%);
    border-radius: 50% 45% 45% 50%;
    box-shadow:
        inset -5px -5px 15px rgba(200, 200, 220, 0.4),
        inset 5px 5px 15px rgba(255, 255, 255, 0.8),
        0 4px 8px rgba(0, 0, 0, 0.1);
}

/* Legs */
.unicorn-leg {
    position: absolute;
    width: 12%;
    height: 35%;
    background: linear-gradient(90deg, #F0F0F5 0%, #FFFFFF 50%, #E8E8F0 100%);
    border-radius: 20% 20% 40% 40%;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.unicorn-leg::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 10%;
    width: 80%;
    height: 15%;
    background: linear-gradient(180deg, #DDA0DD, #BA55D3);
    border-radius: 0 0 50% 50%;
}

.leg-front-left {
    bottom: 0;
    left: 25%;
}

.leg-front-right {
    bottom: 0;
    left: 38%;
}

.leg-back-left {
    bottom: 0;
    left: 55%;
}

.leg-back-right {
    bottom: 0;
    left: 68%;
}

/* Tail - flowing horizontally from back of body */
.unicorn-tail {
    position: absolute;
    right: -12%;
    top: 35%;
    width: 20%;
    height: 25%;
    background: linear-gradient(90deg,
        #FF69B4 0%,
        #FF1493 30%,
        #DA70D6 60%,
        #9932CC 85%,
        #4B0082 100%);
    border-radius: 10% 90% 90% 10% / 50% 50% 50% 50%;
    transform-origin: left center;
    /* animation removed for SVG */
    box-shadow: 1px 2px 4px rgba(0,0,0,0.15);
}

/* Head */
.unicorn-head {
    position: absolute;
    width: 35%;
    height: 50%;
    top: 10%;
    left: 5%;
    background: linear-gradient(135deg, #FFFFFF 0%, #F8F8FF 50%, #F0F0F5 100%);
    border-radius: 50% 40% 45% 50%;
    transform-style: preserve-3d;
    box-shadow:
        inset -3px -3px 10px rgba(200, 200, 220, 0.3),
        inset 3px 3px 10px rgba(255, 255, 255, 0.8),
        0 3px 6px rgba(0,0,0,0.1);
}

/* Horn */
.unicorn-horn {
    position: absolute;
    top: -25%;
    left: 35%;
    width: 20%;
    height: 45%;
    background: linear-gradient(135deg, #FFD700 0%, #FFA500 50%, #FF8C00 100%);
    clip-path: polygon(50% 0%, 15% 100%, 85% 100%);
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
    z-index: 10;
}

.unicorn-horn::before {
    content: '';
    position: absolute;
    top: 20%;
    left: 30%;
    width: 40%;
    height: 60%;
    background: linear-gradient(135deg,
        transparent 0%,
        rgba(255,255,255,0.5) 50%,
        transparent 100%);
}

/* Ears */
.unicorn-ear {
    position: absolute;
    width: 18%;
    height: 25%;
    background: linear-gradient(180deg, #FFFFFF 0%, #F0F0F5 100%);
    border-radius: 50% 50% 20% 20%;
    top: -10%;
}

.unicorn-ear::after {
    content: '';
    position: absolute;
    top: 30%;
    left: 25%;
    width: 50%;
    height: 50%;
    background: #FFB6C1;
    border-radius: 50% 50% 20% 20%;
}

.ear-left {
    left: 15%;
    transform: rotate(-15deg);
}

.ear-right {
    left: 55%;
    transform: rotate(15deg);
}

/* Mane - single flowing mane down the back of head */
.unicorn-mane {
    position: absolute;
    top: -5%;
    left: 60%;
    width: 45%;
    height: 115%;
    background: linear-gradient(180deg,
        #FF69B4 0%,
        #FF1493 25%,
        #DA70D6 50%,
        #9932CC 75%,
        #4B0082 100%);
    border-radius: 50% 50% 45% 55% / 10% 10% 90% 90%;
    transform: translateZ(-1px);
    box-shadow: 1px 2px 4px rgba(0,0,0,0.15);
}

/* Face */
.unicorn-face {
    position: absolute;
    width: 100%;
    height: 100%;
}

/* Eyes - Both eyes visible */
.unicorn-eye {
    position: absolute;
    width: 22%;
    height: 28%;
    background: #000;
    border-radius: 50%;
    top: 30%;
}

.unicorn-eye::before {
    content: '';
    position: absolute;
    top: 15%;
    left: 20%;
    width: 35%;
    height: 35%;
    background: white;
    border-radius: 50%;
}

.unicorn-eye::after {
    content: '';
    position: absolute;
    top: 40%;
    left: 50%;
    width: 20%;
    height: 20%;
    background: white;
    border-radius: 50%;
    opacity: 0.6;
}

.eye-left {
    left: 20%;
}

.eye-right {
    left: 55%;
}

/* Snout */
.unicorn-snout {
    position: absolute;
    bottom: 15%;
    left: 5%;
    width: 45%;
    height: 30%;
    background: linear-gradient(180deg, #FFF0F5 0%, #FFE4E1 100%);
    border-radius: 50%;
}

.unicorn-nostril {
    position: absolute;
    top: 35%;
    left: 60%;
    width: 12%;
    height: 20%;
    background: #DDA0DD;
    border-radius: 50%;
}

/* Mouth - cute smile */
.unicorn-mouth {
    position: absolute;
    bottom: 10%;
    left: 25%;
    width: 25%;
    height: 12%;
    border: 3px solid #FF69B4;
    border-top: none;
    border-radius: 0 0 50% 50%;
    background: transparent;
}

/* =====================================================
   OUTFIT STYLES - Realistic and Polished
   ===================================================== */

.unicorn-outfit {
    position: absolute;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 5;
}

/* ==================== TUTU ==================== */
/* Layered ballet tutu with realistic tulle effect */
.unicorn-outfit.tutu::before {
    content: '';
    position: absolute;
    bottom: 20%;
    left: 12%;
    width: 70%;
    height: 30%;
    background:
        /* Top ruffle layer */
        radial-gradient(ellipse 120% 40% at 50% 0%,
            rgba(255,182,193,0.95) 0%,
            rgba(255,105,180,0.9) 40%,
            transparent 50%);
    border-radius: 0 0 50% 50%;
    filter: drop-shadow(0 2px 4px rgba(255,105,180,0.4));
    z-index: 1;
}

.unicorn-outfit.tutu::after {
    content: '';
    position: absolute;
    bottom: 18%;
    left: 10%;
    width: 75%;
    height: 35%;
    background:
        /* Multiple tulle layers */
        repeating-linear-gradient(
            90deg,
            rgba(255,192,203,0.7) 0px,
            rgba(255,182,193,0.9) 2px,
            rgba(255,105,180,0.6) 4px,
            rgba(255,192,203,0.8) 6px
        ),
        radial-gradient(ellipse at 50% 20%,
            rgba(255,255,255,0.4) 0%,
            transparent 60%),
        linear-gradient(180deg,
            rgba(255,182,193,0.95) 0%,
            rgba(255,105,180,0.9) 30%,
            rgba(255,20,147,0.85) 60%,
            rgba(219,112,147,0.7) 100%);
    border-radius: 5% 5% 50% 50% / 10% 10% 100% 100%;
    box-shadow:
        0 4px 12px rgba(255,105,180,0.4),
        inset 0 -5px 15px rgba(255,20,147,0.3),
        inset 0 2px 8px rgba(255,255,255,0.5);
    z-index: 0;
}

/* ==================== FLOWER CROWN ==================== */
/* Realistic woven flower crown with varied flowers */
.unicorn-outfit.flower-crown::before {
    content: '';
    position: absolute;
    top: 5%;
    left: 0%;
    width: 38%;
    height: 22%;
    background:
        /* Green vine/stem base */
        linear-gradient(90deg,
            transparent 0%,
            rgba(34,139,34,0.8) 10%,
            rgba(34,139,34,0.9) 50%,
            rgba(34,139,34,0.8) 90%,
            transparent 100%);
    border-radius: 50% 50% 40% 40%;
    z-index: 14;
}

.unicorn-outfit.flower-crown::after {
    content: '';
    position: absolute;
    top: 2%;
    left: -2%;
    width: 42%;
    height: 25%;
    background:
        /* Rose - large pink flower */
        radial-gradient(circle at 15% 55%,
            #FFB6C1 0%, #FFB6C1 4px,
            #FF69B4 5px, #FF69B4 8px,
            #FF1493 9px, #FF1493 11px,
            transparent 12px),
        /* Daisy - white with yellow center */
        radial-gradient(circle at 32% 40%,
            #FFD700 0%, #FFD700 3px,
            #FFFAF0 4px, #FFFAF0 6px,
            #FFF8DC 7px, #FFF8DC 10px,
            transparent 11px),
        /* Violet - purple flower */
        radial-gradient(circle at 50% 50%,
            #FFD700 0%, #FFD700 2px,
            #9370DB 3px, #9370DB 6px,
            #8A2BE2 7px, #8A2BE2 10px,
            transparent 11px),
        /* Small red flower */
        radial-gradient(circle at 68% 45%,
            #FFD700 0%, #FFD700 2px,
            #FF6B6B 3px, #FF6B6B 5px,
            #DC143C 6px, #DC143C 9px,
            transparent 10px),
        /* Blue forget-me-not */
        radial-gradient(circle at 85% 55%,
            #FFD700 0%, #FFD700 2px,
            #87CEEB 3px, #87CEEB 5px,
            #4169E1 6px, #4169E1 9px,
            transparent 10px),
        /* Small leaves */
        radial-gradient(ellipse 8px 5px at 25% 70%, #228B22 0%, #228B22 80%, transparent 100%),
        radial-gradient(ellipse 7px 4px at 60% 65%, #2E8B57 0%, #2E8B57 80%, transparent 100%),
        radial-gradient(ellipse 6px 4px at 78% 68%, #228B22 0%, #228B22 80%, transparent 100%);
    filter: drop-shadow(1px 2px 2px rgba(0,0,0,0.2));
    z-index: 15;
}

/* ==================== CAPE ==================== */
/* Royal velvet cape with gold trim and clasp */
.unicorn-outfit.cape::before {
    content: '';
    position: absolute;
    top: 22%;
    left: 42%;
    width: 55%;
    height: 60%;
    background:
        /* Velvet sheen effect */
        linear-gradient(135deg,
            rgba(255,255,255,0.1) 0%,
            transparent 30%,
            transparent 70%,
            rgba(0,0,0,0.1) 100%),
        /* Main cape gradient */
        linear-gradient(180deg,
            #9932CC 0%,
            #8B008B 15%,
            #7B2D8E 30%,
            #6B238E 50%,
            #5B1E7E 70%,
            #4B0082 100%);
    clip-path: polygon(0 0, 55% 0, 100% 100%, 0 85%);
    z-index: -1;
    box-shadow:
        4px 4px 15px rgba(0,0,0,0.3),
        inset 2px 0 10px rgba(255,255,255,0.1);
    border-radius: 0 0 10px 5px;
}

/* Gold trim on cape edge */
.unicorn-outfit.cape .cape-trim,
.unicorn-outfit.cape::after {
    content: '';
    position: absolute;
    top: 20%;
    left: 32%;
    width: 18%;
    height: 12%;
    background:
        /* Gem in center */
        radial-gradient(circle at 50% 60%,
            #FF0000 0%, #FF0000 4px,
            #8B0000 5px, #8B0000 6px,
            transparent 7px),
        /* Gold clasp body */
        radial-gradient(ellipse at 50% 50%,
            #FFD700 0%,
            #FFC125 40%,
            #DAA520 70%,
            #B8860B 100%);
    border-radius: 50%;
    box-shadow:
        0 2px 6px rgba(0,0,0,0.3),
        inset 0 1px 3px rgba(255,255,255,0.5),
        inset 0 -1px 3px rgba(0,0,0,0.2);
    z-index: 6;
}

/* ==================== SUNGLASSES ==================== */
/* Stylish aviator sunglasses with gradient lenses */
.unicorn-outfit.sunglasses::before {
    content: '';
    position: absolute;
    top: 14%;
    left: 1%;
    width: 36%;
    height: 14%;
    background:
        /* Bridge */
        linear-gradient(90deg,
            transparent 38%,
            #C0C0C0 40%,
            #A9A9A9 45%,
            #C0C0C0 50%,
            #A9A9A9 55%,
            #C0C0C0 60%,
            transparent 62%);
    z-index: 19;
}

.unicorn-outfit.sunglasses::after {
    content: '';
    position: absolute;
    top: 13%;
    left: 0%;
    width: 38%;
    height: 16%;
    background:
        /* Left lens - gradient tint */
        radial-gradient(ellipse 42% 80% at 28% 50%,
            rgba(30,30,30,0.9) 0%,
            rgba(50,50,50,0.95) 60%,
            rgba(70,70,70,0.85) 75%,
            transparent 76%),
        /* Left lens reflection */
        radial-gradient(ellipse 20% 30% at 22% 35%,
            rgba(255,255,255,0.3) 0%,
            transparent 100%),
        /* Right lens - gradient tint */
        radial-gradient(ellipse 42% 80% at 72% 50%,
            rgba(30,30,30,0.9) 0%,
            rgba(50,50,50,0.95) 60%,
            rgba(70,70,70,0.85) 75%,
            transparent 76%),
        /* Right lens reflection */
        radial-gradient(ellipse 20% 30% at 66% 35%,
            rgba(255,255,255,0.3) 0%,
            transparent 100%),
        /* Left frame */
        radial-gradient(ellipse 46% 85% at 28% 50%,
            transparent 74%,
            #2F2F2F 75%,
            #1a1a1a 80%,
            transparent 81%),
        /* Right frame */
        radial-gradient(ellipse 46% 85% at 72% 50%,
            transparent 74%,
            #2F2F2F 75%,
            #1a1a1a 80%,
            transparent 81%);
    filter: drop-shadow(1px 2px 2px rgba(0,0,0,0.3));
    z-index: 20;
}

/* ==================== LEI ==================== */
/* Hawaiian flower lei with realistic hibiscus and plumeria */
.unicorn-outfit.lei::before {
    content: '';
    position: absolute;
    top: 40%;
    left: 5%;
    width: 45%;
    height: 22%;
    background:
        /* Hibiscus flowers (large, tropical) */
        radial-gradient(circle at 8% 50%,
            #FFD700 0%, #FFD700 3px,
            #FF6B6B 4px, #FF6B6B 8px,
            #FF4757 9px, #FF4757 12px,
            transparent 13px),
        /* Plumeria (white/yellow) */
        radial-gradient(circle at 22% 40%,
            #FFD700 0%, #FFD700 3px,
            #FFFACD 4px, #FFFACD 7px,
            #FFF8DC 8px, #FFF8DC 10px,
            transparent 11px),
        /* Pink hibiscus */
        radial-gradient(circle at 38% 55%,
            #FFD700 0%, #FFD700 3px,
            #FF69B4 4px, #FF69B4 8px,
            #FF1493 9px, #FF1493 12px,
            transparent 13px),
        /* Orange flower */
        radial-gradient(circle at 54% 42%,
            #FFD700 0%, #FFD700 3px,
            #FFA500 4px, #FFA500 7px,
            #FF8C00 8px, #FF8C00 10px,
            transparent 11px),
        /* Red hibiscus */
        radial-gradient(circle at 70% 52%,
            #FFD700 0%, #FFD700 3px,
            #FF6B6B 4px, #FF6B6B 8px,
            #DC143C 9px, #DC143C 12px,
            transparent 13px),
        /* Plumeria */
        radial-gradient(circle at 86% 45%,
            #FFD700 0%, #FFD700 3px,
            #FFFACD 4px, #FFFACD 7px,
            #FFF8DC 8px, #FFF8DC 10px,
            transparent 11px),
        /* Green leaf accents */
        radial-gradient(ellipse 6px 10px at 15% 65%, #228B22 0%, #228B22 80%, transparent 100%),
        radial-gradient(ellipse 5px 9px at 45% 35%, #2E8B57 0%, #2E8B57 80%, transparent 100%),
        radial-gradient(ellipse 6px 8px at 62% 60%, #228B22 0%, #228B22 80%, transparent 100%),
        radial-gradient(ellipse 5px 8px at 78% 38%, #2E8B57 0%, #2E8B57 80%, transparent 100%);
    filter: drop-shadow(1px 2px 3px rgba(0,0,0,0.25));
    z-index: 10;
}

/* Lei string/cord underneath */
.unicorn-outfit.lei::after {
    content: '';
    position: absolute;
    top: 48%;
    left: 6%;
    width: 42%;
    height: 8%;
    background:
        linear-gradient(90deg,
            transparent 0%,
            rgba(139,69,19,0.6) 5%,
            rgba(160,82,45,0.7) 50%,
            rgba(139,69,19,0.6) 95%,
            transparent 100%);
    border-radius: 50%;
    z-index: 9;
}

/* Sparkles - Enhanced magical effect */
.sparkles {
    position: absolute;
    width: 100%;
    height: 100%;
    pointer-events: none;
    opacity: 0;
    z-index: 100;
}

.sparkles.active {
    opacity: 1;
}

.sparkles::before,
.sparkles::after {
    content: '';
    position: absolute;
    animation: sparkle-burst 0.8s ease-out forwards;
}

.sparkles::before {
    top: 0%;
    left: 15%;
    width: 25px;
    height: 25px;
    background:
        radial-gradient(circle at 50% 50%, #FFD700 0%, transparent 50%),
        linear-gradient(45deg, transparent 40%, #FFD700 45%, #FFD700 55%, transparent 60%),
        linear-gradient(-45deg, transparent 40%, #FFD700 45%, #FFD700 55%, transparent 60%);
    filter: drop-shadow(0 0 4px rgba(255, 215, 0, 0.8));
}

.sparkles::after {
    top: 15%;
    right: 10%;
    width: 20px;
    height: 20px;
    background:
        radial-gradient(circle at 50% 50%, #FF69B4 0%, transparent 50%),
        linear-gradient(45deg, transparent 40%, #FF69B4 45%, #FF69B4 55%, transparent 60%),
        linear-gradient(-45deg, transparent 40%, #FF69B4 45%, #FF69B4 55%, transparent 60%);
    filter: drop-shadow(0 0 4px rgba(255, 105, 180, 0.8));
    animation-delay: 0.1s;
}

@keyframes sparkle-burst {
    0% {
        transform: scale(0) rotate(0deg);
        opacity: 0;
    }
    30% {
        transform: scale(1.3) rotate(90deg);
        opacity: 1;
    }
    60% {
        transform: scale(1) rotate(180deg);
        opacity: 1;
    }
    100% {
        transform: scale(0.5) rotate(270deg);
        opacity: 0;
    }
}

/* =====================================================
   CREATOR LAYOUT
   ===================================================== */

.creator-layout {
    display: flex;
    gap: 30px;
    align-items: flex-start;
    flex-wrap: wrap;
    justify-content: center;
    max-width: 900px;
    margin-bottom: 20px;
}

.unicorn-display {
    background: rgba(255, 255, 255, 0.9);
    border-radius: 30px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    display: flex;
    align-items: center;
    justify-content: center;
}

.customization-panels {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-width: 350px;
    max-height: 60vh;
    overflow-y: auto;
    padding-right: 5px;
}

.panel {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    padding: 8px 12px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
}

.panel h3 {
    margin: 0 0 6px 0;
    font-size: 0.9em;
}

/* Color Options */
.color-options {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.color-btn {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    border: 4px solid white;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 3px 10px rgba(0,0,0,0.2);
}

.color-btn:hover {
    transform: scale(1.2);
}

.color-btn.selected {
    border-color: #333;
    box-shadow: 0 0 0 3px #FFD700;
}

/* Metallic button shimmer effect */
.metallic-btn {
    position: relative;
    overflow: hidden;
}

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

@keyframes shimmer {
    100% { left: 100%; }
}

/* Outfit Options */
.outfit-options {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.outfit-btn {
    padding: 8px 16px;
    border-radius: 25px;
    border: 3px solid #DDA0DD;
    background: white;
    cursor: pointer;
    font-family: inherit;
    font-size: 0.9rem;
    transition: all 0.2s;
}

.outfit-btn:hover {
    background: #FFE4E1;
    transform: scale(1.05);
}

.outfit-btn.selected {
    background: #FF69B4;
    color: white;
    border-color: #FF1493;
}

/* Navigation - FIXED positioning */
.nav-buttons {
    display: flex;
    gap: 20px;
    margin-top: 20px;
    padding-bottom: 20px;
    flex-shrink: 0;
}

.play-nav {
    position: fixed;
    top: 50px;
    left: 15px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    z-index: 100;
}

/* =====================================================
   BEACH SELECTOR
   ===================================================== */

.beach-options {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    justify-content: center;
    margin-bottom: 20px;
}

.beach-card {
    width: 250px;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    border: 3px solid transparent;
}

.beach-card:hover {
    transform: scale(1.08) rotate(-2deg);
    box-shadow:
        0 15px 40px rgba(255,105,180,0.3),
        0 5px 15px rgba(0,0,0,0.2);
    border-color: rgba(255,105,180,0.5);
}

.beach-card:active {
    transform: scale(1.02) rotate(-1deg);
}

.beach-preview {
    width: 100%;
    height: 150px;
}

.beach-1 {
    background: linear-gradient(180deg, #87CEEB 0%, #87CEEB 50%, #F4D03F 50%, #F4D03F 100%);
}

.beach-2 {
    background: linear-gradient(180deg, #FF6B6B 0%, #FFD93D 30%, #4ECDC4 50%, #F4D03F 100%);
}

.beach-3 {
    background: linear-gradient(180deg,
        #FF69B4 0%, #FFD700 15%, #98FB98 30%, #87CEEB 45%,
        #87CEEB 50%, #F4D03F 50%, #F4D03F 100%);
}

.beach-name {
    display: block;
    text-align: center;
    padding: 12px;
    background: white;
    font-size: 1.2rem;
    color: #FF69B4;
    font-weight: bold;
}

/* =====================================================
   BEACH PLAY SCENE
   ===================================================== */

#beach-play {
    padding: 0;
    justify-content: flex-start;
    overflow: hidden;
}

.beach-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    overflow: hidden;
}

/* Sky Layer */
.sky {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 45%;
    z-index: 1;
}

.beach-1 .sky {
    background: linear-gradient(180deg, #1e90ff 0%, #87CEEB 40%, #B0E0E6 100%);
}

.beach-2 .sky {
    background: linear-gradient(180deg, #FF6B6B 0%, #FF8C42 30%, #FFD93D 60%, #FFF3B0 100%);
}

.beach-3 .sky {
    background: linear-gradient(180deg, #87CEEB 0%, #98FB98 30%, #FFD700 60%, #FF69B4 100%);
}

/* Sun */
.sun {
    position: absolute;
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: radial-gradient(circle, #FFFF00 0%, #FFD700 50%, #FFA500 100%);
    box-shadow: 0 0 60px 20px rgba(255, 255, 0, 0.4), 0 0 100px 40px rgba(255, 200, 0, 0.2);
    z-index: 2;
}

.beach-1 .sun { top: 10%; right: 15%; }
.beach-2 .sun { top: 5%; right: 10%; width: 100px; height: 100px; background: radial-gradient(circle, #FFFFFF 0%, #FFD700 30%, #FF6347 100%); }
.beach-3 .sun { top: 8%; left: 15%; }

/* Clouds */
.cloud {
    position: absolute;
    background: white;
    border-radius: 50%;
    opacity: 0.9;
    z-index: 3;
}

.cloud::before, .cloud::after {
    content: '';
    position: absolute;
    background: white;
    border-radius: 50%;
}

.cloud-1 {
    width: 100px;
    height: 40px;
    top: 15%;
    left: 10%;
    animation: cloud-drift 30s linear infinite;
}
.cloud-1::before { width: 50px; height: 50px; top: -25px; left: 15px; }
.cloud-1::after { width: 60px; height: 45px; top: -20px; left: 45px; }

.cloud-2 {
    width: 120px;
    height: 45px;
    top: 8%;
    left: 50%;
    animation: cloud-drift 40s linear infinite;
    animation-delay: -15s;
}
.cloud-2::before { width: 60px; height: 55px; top: -30px; left: 20px; }
.cloud-2::after { width: 70px; height: 50px; top: -25px; left: 55px; }

.cloud-3 {
    width: 80px;
    height: 35px;
    top: 20%;
    right: 20%;
    animation: cloud-drift 35s linear infinite;
    animation-delay: -8s;
}
.cloud-3::before { width: 45px; height: 45px; top: -22px; left: 10px; }
.cloud-3::after { width: 50px; height: 40px; top: -18px; left: 35px; }

@keyframes cloud-drift {
    0% { transform: translateX(-100px); }
    100% { transform: translateX(calc(100vw + 100px)); }
}

/* Ocean Layer */
.ocean {
    position: absolute;
    top: 35%;
    left: 0;
    width: 100%;
    height: 20%;
    z-index: 4;
    overflow: hidden;
}

.beach-1 .ocean { background: linear-gradient(180deg, #006994 0%, #0077B6 30%, #00B4D8 60%, #48CAE4 100%); }
.beach-2 .ocean { background: linear-gradient(180deg, #1A5276 0%, #2874A6 30%, #5DADE2 60%, #85C1E9 100%); }
.beach-3 .ocean { background: linear-gradient(180deg, #0E4D64 0%, #137A8D 30%, #20B2AA 60%, #48D1CC 100%); }

.ocean-wave {
    position: absolute;
    width: 200%;
    height: 30px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 100%;
}

.ow-1 { bottom: 0; animation: ocean-wave 3s ease-in-out infinite; }
.ow-2 { bottom: 15px; animation: ocean-wave 4s ease-in-out infinite; animation-delay: -1s; opacity: 0.6; }
.ow-3 { bottom: 25px; animation: ocean-wave 5s ease-in-out infinite; animation-delay: -2s; opacity: 0.4; }

@keyframes ocean-wave {
    0%, 100% { transform: translateX(-25%); }
    50% { transform: translateX(0%); }
}

/* Sand Layer */
.sand {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 50%;
    z-index: 5;
}

.beach-1 .sand { background: linear-gradient(180deg, #F4D03F 0%, #E6BE33 30%, #D4AC2B 60%, #C19A22 100%); }
.beach-2 .sand { background: linear-gradient(180deg, #FFDAB9 0%, #F4C98C 30%, #DEB887 60%, #D2A679 100%); }
.beach-3 .sand { background: linear-gradient(180deg, #FFE4B5 0%, #F5D89A 30%, #E8C872 60%, #DBB860 100%); }

.sand-texture {
    position: absolute;
    width: 100%;
    height: 100%;
    background-image:
        radial-gradient(circle at 20% 30%, rgba(255,255,255,0.3) 1px, transparent 1px),
        radial-gradient(circle at 60% 50%, rgba(255,255,255,0.2) 2px, transparent 2px),
        radial-gradient(circle at 80% 20%, rgba(255,255,255,0.3) 1px, transparent 1px),
        radial-gradient(circle at 40% 70%, rgba(139,90,43,0.2) 2px, transparent 2px),
        radial-gradient(circle at 10% 80%, rgba(255,255,255,0.2) 1px, transparent 1px);
    background-size: 100px 100px;
}

/* Palm Trees */
.palm-tree {
    position: absolute;
    z-index: 6;
}

.palm-1 { left: 5%; bottom: 35%; transform: scale(1.2); }
.palm-2 { right: 8%; bottom: 38%; transform: scale(0.9) scaleX(-1); }

.trunk {
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 20px;
    height: 120px;
    background: linear-gradient(90deg, #5D4037 0%, #8B6914 30%, #A0522D 70%, #6D4C41 100%);
    border-radius: 10px 10px 15px 15px;
    clip-path: polygon(30% 0%, 70% 0%, 100% 100%, 0% 100%);
}

.trunk::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    background: repeating-linear-gradient(
        0deg,
        transparent 0px,
        transparent 8px,
        rgba(0,0,0,0.2) 8px,
        rgba(0,0,0,0.2) 10px
    );
}

.fronds {
    position: absolute;
    bottom: 110px;
    left: 50%;
    transform: translateX(-50%);
}

.frond {
    position: absolute;
    width: 80px;
    height: 15px;
    background: linear-gradient(180deg, #228B22 0%, #32CD32 50%, #90EE90 100%);
    border-radius: 0 80% 0 80%;
    transform-origin: left center;
}

.frond::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    background: repeating-linear-gradient(
        90deg,
        transparent 0px,
        transparent 3px,
        rgba(0,100,0,0.3) 3px,
        rgba(0,100,0,0.3) 4px
    );
}

.f1 { transform: rotate(-60deg); }
.f2 { transform: rotate(-30deg); }
.f3 { transform: rotate(0deg); }
.f4 { transform: rotate(30deg); }
.f5 { transform: rotate(60deg); }

.frond { animation: palm-sway 4s ease-in-out infinite; }
.f1 { animation-delay: 0s; }
.f2 { animation-delay: 0.2s; }
.f3 { animation-delay: 0.4s; }
.f4 { animation-delay: 0.6s; }
.f5 { animation-delay: 0.8s; }

@keyframes palm-sway {
    0%, 100% { transform: rotate(var(--base-rotation, 0deg)); }
    50% { transform: rotate(calc(var(--base-rotation, 0deg) + 5deg)); }
}

.f1 { --base-rotation: -60deg; }
.f2 { --base-rotation: -30deg; }
.f3 { --base-rotation: 0deg; }
.f4 { --base-rotation: 30deg; }
.f5 { --base-rotation: 60deg; }

.coconuts {
    position: absolute;
    bottom: 100px;
    left: 50%;
    transform: translateX(-50%);
    width: 30px;
    height: 20px;
    background:
        radial-gradient(circle at 30% 50%, #8B4513 50%, transparent 50%),
        radial-gradient(circle at 70% 50%, #8B4513 50%, transparent 50%),
        radial-gradient(circle at 50% 80%, #8B4513 40%, transparent 40%);
}

/* Beach Umbrella */
.beach-umbrella {
    position: absolute;
    right: 25%;
    bottom: 42%;
    z-index: 7;
}

.umbrella-top {
    width: 80px;
    height: 45px;
    background: repeating-conic-gradient(
        from 0deg,
        #FF6B6B 0deg 30deg,
        #FFFFFF 30deg 60deg
    );
    border-radius: 100% 100% 0 0;
    position: relative;
}

.umbrella-pole {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 6px;
    height: 60px;
    background: linear-gradient(90deg, #A0522D, #DEB887, #A0522D);
    border-radius: 3px;
}

/* Seagulls */
.seagull {
    position: absolute;
    width: 20px;
    height: 8px;
    z-index: 8;
}

.seagull::before, .seagull::after {
    content: '';
    position: absolute;
    width: 12px;
    height: 3px;
    background: #333;
    border-radius: 50%;
    top: 0;
}

.seagull::before {
    left: 0;
    transform: rotate(-20deg);
}

.seagull::after {
    right: 0;
    transform: rotate(20deg);
}

.seagull-1 {
    top: 12%;
    left: 30%;
    animation: seagull-fly 8s ease-in-out infinite;
}

.seagull-2 {
    top: 18%;
    left: 45%;
    animation: seagull-fly 10s ease-in-out infinite;
    animation-delay: -3s;
}

@keyframes seagull-fly {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    25% { transform: translate(30px, -10px) rotate(5deg); }
    50% { transform: translate(60px, 0) rotate(0deg); }
    75% { transform: translate(30px, 10px) rotate(-5deg); }
}

.play-ui {
    position: fixed;
    top: 50px;
    left: 120px;
    right: 0;
    z-index: 100;
    padding: 12px;
}

.stats-bar {
    display: flex;
    gap: 18px;
    justify-content: center;
    background: linear-gradient(180deg, rgba(255,255,255,0.98) 0%, rgba(248,248,255,0.95) 100%);
    padding: 12px 28px;
    border-radius: 50px;
    box-shadow:
        0 4px 15px rgba(0,0,0,0.1),
        0 1px 3px rgba(0,0,0,0.08),
        inset 0 1px 0 rgba(255,255,255,1);
    width: fit-content;
    margin: 0 auto;
    flex-wrap: wrap;
    border: 1px solid rgba(255,182,193,0.3);
}

.stat {
    font-size: 1rem;
    color: #9932CC;
    font-weight: bold;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 4px 12px;
    background: linear-gradient(180deg, rgba(255,182,193,0.15) 0%, rgba(255,182,193,0.05) 100%);
    border-radius: 20px;
    transition: transform 0.2s ease, background 0.2s ease;
}

.stat:hover {
    transform: scale(1.05);
    background: linear-gradient(180deg, rgba(255,182,193,0.25) 0%, rgba(255,182,193,0.1) 100%);
}

.stat span {
    color: #FF1493;
    font-weight: 800;
}

.encouragement {
    position: fixed;
    top: 70px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 2rem;
    font-weight: bold;
    color: #FF1493;
    text-shadow:
        3px 3px 0 white,
        -3px -3px 0 white,
        3px -3px 0 white,
        -3px 3px 0 white,
        0 0 20px rgba(255,105,180,0.5);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    z-index: 200;
}

.encouragement.show {
    opacity: 1;
    animation: encouragement-pop 0.6s ease-out;
}

@keyframes encouragement-pop {
    0% { transform: translateX(-50%) scale(0.5); opacity: 0; }
    50% { transform: translateX(-50%) scale(1.2); }
    100% { transform: translateX(-50%) scale(1); opacity: 1; }
}

/* Play Area */
.play-area {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 20;
}

/* Unicorn Character in Play */
.unicorn-character {
    position: absolute;
    bottom: 15%;
    left: 50%;
    transform: translateX(-50%);
    width: 140px;
    height: 130px;
    transition: left 0.4s ease-out;
    cursor: pointer;
    z-index: 25;
    filter: drop-shadow(0 4px 8px rgba(0,0,0,0.2));
}

.unicorn-character:hover {
    filter: drop-shadow(0 6px 12px rgba(255,105,180,0.4));
}

.unicorn-character.happy {
    animation: happy-jump 0.5s ease-out;
    filter: drop-shadow(0 0 20px rgba(255,215,0,0.6));
}

.unicorn-character.dancing {
    animation: unicorn-dance 2s cubic-bezier(0.4, 0, 0.2, 1) infinite;
    filter: drop-shadow(0 0 25px rgba(255,105,180,0.5)) drop-shadow(0 0 50px rgba(153,50,204,0.3));
}

/* SVG-compatible dancing animation - applies to wrapper instead of child elements */
.unicorn-character.dancing .unicorn-svg-wrapper {
    animation: svg-dance 1s ease-in-out infinite;
}

@keyframes svg-dance {
    0%, 100% { transform: rotate(0deg) scale(1); }
    25% { transform: rotate(-8deg) scale(1.05); }
    50% { transform: rotate(0deg) scale(1.1); }
    75% { transform: rotate(8deg) scale(1.05); }
}

/* Legacy CSS unicorn dancing animations (disabled for SVG)
.unicorn-character.dancing .leg-front-left {
    animation: leg-dance-front 0.6s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}

.unicorn-character.dancing .leg-front-right {
    animation: leg-dance-front 0.6s cubic-bezier(0.4, 0, 0.2, 1) infinite;
    animation-delay: 0.15s;
}

.unicorn-character.dancing .leg-back-left {
    animation: leg-dance-back 0.6s cubic-bezier(0.4, 0, 0.2, 1) infinite;
    animation-delay: 0.08s;
}

.unicorn-character.dancing .leg-back-right {
    animation: leg-dance-back 0.6s cubic-bezier(0.4, 0, 0.2, 1) infinite;
    animation-delay: 0.22s;
}

.unicorn-character.dancing .unicorn-mane {
    animation: mane-dance 0.8s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}

/* Tail animation removed for SVG
.unicorn-character.dancing .unicorn-tail {
    animation: tail-dance 0.5s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}
*/

.unicorn-character.dancing .unicorn-head {
    animation: head-dance 0.7s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}
*/

/* Walking Animation */
@keyframes unicorn-walk {
    0%, 100% { transform: translateX(-50%) translateY(0); }
    50% { transform: translateX(-50%) translateY(-5px); }
}

@keyframes leg-walk {
    0%, 100% { transform: rotate(0deg); }
    25% { transform: rotate(15deg); }
    75% { transform: rotate(-15deg); }
}

/* SVG-compatible walking animation */
@keyframes svg-walk {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    25% { transform: translateY(-3px) rotate(-2deg); }
    50% { transform: translateY(-5px) rotate(0deg); }
    75% { transform: translateY(-3px) rotate(2deg); }
}

.unicorn-character.walking {
    animation: unicorn-walk 0.3s ease-in-out infinite;
}

.unicorn-character.walking .unicorn-svg-wrapper {
    animation: svg-walk 0.3s ease-in-out infinite;
}

/* Legacy CSS unicorn walking animations (disabled for SVG)
.unicorn-character.walking .leg-front-left,
.unicorn-character.walking .leg-back-right {
    animation: leg-walk 0.3s ease-in-out infinite;
}

.unicorn-character.walking .leg-front-right,
.unicorn-character.walking .leg-back-left {
    animation: leg-walk 0.3s ease-in-out infinite;
    animation-delay: 0.15s;
}
*/

/* Shells */
.shells-container {
    position: absolute;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 21;
}

.shell {
    position: absolute;
    width: 50px;
    height: 42px;
    cursor: pointer;
    pointer-events: auto;
    transition: transform 0.2s, filter 0.2s;
    filter: drop-shadow(2px 3px 4px rgba(0,0,0,0.3));
}

.shell:hover {
    transform: scale(1.25) rotate(-5deg);
    filter: drop-shadow(3px 5px 8px rgba(0,0,0,0.4));
}

/* Main shell body - scallop shape */
.shell::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 85%;
    top: 0;
    background:
        /* Highlight on top */
        radial-gradient(ellipse 60% 30% at 30% 20%, rgba(255,255,255,0.6) 0%, transparent 50%),
        /* Main shell gradient */
        linear-gradient(180deg,
            #FFF5E6 0%,
            #FFE4C4 15%,
            #FFDAB9 30%,
            #F5C4A1 50%,
            #E8B896 70%,
            #DEB887 85%,
            #D4A574 100%);
    border-radius: 50% 50% 8% 8%;
    /* Ridges using repeating gradient */
    background-size: 100% 100%;
}

/* Shell ridges overlay */
.shell::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 85%;
    top: 0;
    background:
        /* Radial ridges emanating from bottom center */
        repeating-conic-gradient(
            from 250deg at 50% 110%,
            transparent 0deg,
            rgba(139, 90, 43, 0.15) 2deg,
            transparent 4deg,
            transparent 8deg
        ),
        /* Inner shadow for depth */
        radial-gradient(ellipse 80% 60% at 50% 90%, rgba(139, 90, 43, 0.3) 0%, transparent 60%);
    border-radius: 50% 50% 8% 8%;
    pointer-events: none;
}

/* Shell hinge at bottom */
.shell .shell-hinge {
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 25%;
    height: 20%;
    background: linear-gradient(180deg, var(--shell-dark, #D4A574) 0%, #A67B5B 100%);
    border-radius: 0 0 50% 50%;
    box-shadow: inset 0 -2px 4px rgba(0,0,0,0.2);
}

/* Color variant support */
.shell::before {
    background:
        radial-gradient(ellipse 60% 30% at 30% 20%, rgba(255,255,255,0.6) 0%, transparent 50%),
        linear-gradient(180deg,
            var(--shell-base, #FFF5E6) 0%,
            var(--shell-mid, #FFDAB9) 40%,
            var(--shell-dark, #D4A574) 100%);
}

/* Conch shell variant - elongated horn/trumpet shape */
.shell.shell-conch {
    width: 38px;
    height: 65px;
    transform: rotate(-25deg);
}

.shell.shell-conch::before {
    height: 100%;
    /* Pointed horn shape - narrow at top, wide at bottom */
    clip-path: polygon(
        35% 0%, 65% 0%,
        80% 15%, 90% 35%,
        95% 55%, 100% 75%,
        95% 90%, 85% 100%,
        15% 100%, 5% 90%,
        0% 75%, 5% 55%,
        10% 35%, 20% 15%
    );
    border-radius: 40% 60% 50% 50% / 15% 15% 85% 85%;
    background:
        radial-gradient(ellipse 35% 20% at 30% 15%, rgba(255,255,255,0.8) 0%, transparent 50%),
        linear-gradient(180deg,
            var(--shell-base, #FFF5E6) 0%,
            var(--shell-mid, #FFDAB9) 30%,
            var(--shell-dark, #D4A574) 70%,
            #B8956A 100%);
}

.shell.shell-conch::after {
    height: 100%;
    clip-path: polygon(
        35% 0%, 65% 0%,
        80% 15%, 90% 35%,
        95% 55%, 100% 75%,
        95% 90%, 85% 100%,
        15% 100%, 5% 90%,
        0% 75%, 5% 55%,
        10% 35%, 20% 15%
    );
    border-radius: 40% 60% 50% 50% / 15% 15% 85% 85%;
    background:
        /* Horizontal ridges for conch texture */
        repeating-linear-gradient(
            180deg,
            transparent 0px,
            transparent 6px,
            rgba(139, 90, 43, 0.15) 7px,
            transparent 8px
        );
}

.shell.shell-conch .shell-hinge {
    display: none;
}

/* Override hover for rotated conch */
.shell.shell-conch:hover {
    transform: scale(1.25) rotate(-30deg);
}

/* Spiral shell variant */
.shell.shell-spiral {
    width: 38px;
    height: 48px;
}

.shell.shell-spiral::before {
    border-radius: 50% 50% 60% 40%;
    background:
        radial-gradient(ellipse 50% 40% at 40% 30%, rgba(255,255,255,0.6) 0%, transparent 50%),
        radial-gradient(ellipse 70% 70% at 50% 50%,
            var(--shell-base, #FFF5E6) 0%,
            var(--shell-mid, #FFDAB9) 50%,
            var(--shell-dark, #D4A574) 100%);
}

.shell.shell-spiral::after {
    border-radius: 50% 50% 60% 40%;
    background:
        /* Spiral pattern */
        conic-gradient(
            from 180deg at 45% 55%,
            transparent 0deg,
            rgba(139, 90, 43, 0.2) 60deg,
            transparent 120deg,
            rgba(139, 90, 43, 0.15) 180deg,
            transparent 240deg,
            rgba(139, 90, 43, 0.2) 300deg,
            transparent 360deg
        );
}

.shell.shell-spiral .shell-hinge {
    display: none;
}

.shell.collected {
    animation: collect 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
    pointer-events: none;
}

@keyframes collect {
    0% {
        transform: scale(1) rotate(0deg);
        opacity: 1;
        filter: drop-shadow(2px 3px 4px rgba(0,0,0,0.3));
    }
    30% {
        transform: scale(1.4) rotate(-15deg) translateY(-20px);
        opacity: 1;
        filter: drop-shadow(0 0 15px rgba(255, 215, 0, 0.8));
    }
    60% {
        transform: scale(1.2) rotate(10deg) translateY(-40px);
        opacity: 0.8;
        filter: drop-shadow(0 0 20px rgba(255, 105, 180, 0.9));
    }
    100% {
        transform: scale(0) rotate(360deg) translateY(-60px);
        opacity: 0;
        filter: drop-shadow(0 0 0 transparent);
    }
}

/* =====================================================
   SHELL MATCHING GAME
   ===================================================== */

/* Shape targets panel - right side */
.shape-targets {
    position: fixed;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    padding: 15px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    z-index: 100;
    display: flex;
    flex-direction: column;
    gap: 10px;
    border: 3px solid rgba(255, 105, 180, 0.3);
}

.shape-targets h3 {
    text-align: center;
    margin: 0 0 5px 0;
    color: #FF69B4;
    font-size: 1.2rem;
}

/* Base target slot - no text, shapes only for kids */
.target-slot {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0;
    color: transparent;
    cursor: pointer;
    transition: all 0.3s ease;
    background: rgba(255, 182, 193, 0.2);
    position: relative;
    border: 4px dashed #DDA0DD;
}

/* Scallop target - fan/shell shape */
.target-slot[data-shape="scallop"] {
    width: 60px;
    height: 48px;
    border-radius: 50% 50% 8% 8%;
}

/* Conch target - pointed elongated horn shape */
.target-slot[data-shape="conch"] {
    width: 45px;
    height: 65px;
    border-radius: 30% 70% 70% 30% / 20% 30% 70% 80%;
    transform: rotate(-25deg);
}

/* Spiral target - round snail shape */
.target-slot[data-shape="spiral"] {
    width: 50px;
    height: 50px;
    border-radius: 50%;
}

.target-slot:hover {
    border-color: #FF69B4;
    background: rgba(255, 182, 193, 0.5);
    transform: scale(1.15);
}

.target-slot[data-shape="conch"]:hover {
    transform: scale(1.15) rotate(-25deg);
}

.target-slot.matched {
    animation: target-flash 0.6s ease-out;
    border-color: #32CD32;
    border-style: solid;
    background: rgba(50, 205, 50, 0.5);
}

@keyframes target-flash {
    0%, 100% { box-shadow: 0 0 0 0 rgba(50, 205, 50, 0); }
    50% { box-shadow: 0 0 25px 12px rgba(50, 205, 50, 0.6); }
}

.match-progress {
    text-align: center;
    font-size: 1.1rem;
    font-weight: bold;
    color: #FF1493;
    padding-top: 5px;
    border-top: 2px solid rgba(255, 105, 180, 0.2);
}

/* Selected shell glow effect */
.shell.selected {
    animation: shell-glow 0.8s ease-in-out infinite;
    z-index: 30;
}

/* Conch needs to keep its rotation when selected */
.shell.shell-conch.selected {
    animation: shell-glow-conch 0.8s ease-in-out infinite;
}

@keyframes shell-glow {
    0%, 100% {
        filter: drop-shadow(0 0 8px rgba(255, 215, 0, 0.8))
                drop-shadow(0 0 15px rgba(255, 105, 180, 0.6));
        transform: scale(1.15);
    }
    50% {
        filter: drop-shadow(0 0 15px rgba(255, 215, 0, 1))
                drop-shadow(0 0 25px rgba(255, 105, 180, 0.8));
        transform: scale(1.2);
    }
}

@keyframes shell-glow-conch {
    0%, 100% {
        filter: drop-shadow(0 0 8px rgba(255, 215, 0, 0.8))
                drop-shadow(0 0 15px rgba(255, 105, 180, 0.6));
        transform: scale(1.15) rotate(-25deg);
    }
    50% {
        filter: drop-shadow(0 0 15px rgba(255, 215, 0, 1))
                drop-shadow(0 0 25px rgba(255, 105, 180, 0.8));
        transform: scale(1.2) rotate(-25deg);
    }
}

/* Wrong match shake animation */
.shell.wrong-match {
    animation: wrong-shake 0.5s ease-in-out;
}

.shell.shell-conch.wrong-match {
    animation: wrong-shake-conch 0.5s ease-in-out;
}

@keyframes wrong-shake {
    0%, 100% { transform: translateX(0) rotate(0deg); }
    20% { transform: translateX(-10px) rotate(-5deg); }
    40% { transform: translateX(10px) rotate(5deg); }
    60% { transform: translateX(-8px) rotate(-3deg); }
    80% { transform: translateX(8px) rotate(3deg); }
}

@keyframes wrong-shake-conch {
    0%, 100% { transform: translateX(0) rotate(-25deg); }
    20% { transform: translateX(-10px) rotate(-30deg); }
    40% { transform: translateX(10px) rotate(-20deg); }
    60% { transform: translateX(-8px) rotate(-28deg); }
    80% { transform: translateX(8px) rotate(-22deg); }
}

/* Flying shell animation */
.shell.flying {
    animation: shell-fly 0.4s ease-in forwards;
    pointer-events: none;
    z-index: 200;
}

@keyframes shell-fly {
    0% {
        transform: scale(1) rotate(0deg);
        opacity: 1;
    }
    50% {
        transform: translate(calc(var(--fly-x) * 0.5), calc(var(--fly-y) * 0.5)) scale(0.8) rotate(180deg);
        opacity: 1;
    }
    100% {
        transform: translate(var(--fly-x), var(--fly-y)) scale(0.3) rotate(360deg);
        opacity: 0;
    }
}

/* =====================================================
   CARRIED SHELL - Shell held by unicorn
   ===================================================== */

.carried-shell {
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 35px;
    height: 30px;
    z-index: 50;
    animation: carried-bob 0.6s ease-in-out infinite;
    filter: drop-shadow(2px 3px 4px rgba(0,0,0,0.3));
}

/* Carried shell shape variants */
.carried-shell.shell-scallop {
    background: linear-gradient(180deg, #FFF5E6 0%, #FFDAB9 50%, #D4A574 100%);
    border-radius: 50% 50% 8% 8%;
}

.carried-shell.shell-conch {
    width: 25px;
    height: 40px;
    background: linear-gradient(180deg, #FFF5E6 0%, #FFDAB9 40%, #D4A574 100%);
    clip-path: polygon(35% 0%, 65% 0%, 80% 15%, 90% 35%, 95% 55%, 100% 75%, 95% 90%, 85% 100%, 15% 100%, 5% 90%, 0% 75%, 5% 55%, 10% 35%, 20% 15%);
    transform: translateX(-50%) rotate(-25deg);
}

.carried-shell.shell-spiral {
    width: 30px;
    height: 30px;
    background: radial-gradient(ellipse 70% 70% at 50% 50%, #FFF5E6 0%, #FFDAB9 50%, #D4A574 100%);
    border-radius: 50%;
}

@keyframes carried-bob {
    0%, 100% { top: -10px; }
    50% { top: -15px; }
}

/* Settled shell inside target slot */
.settled-shell {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.5);
    width: 30px;
    height: 25px;
    pointer-events: none;
}

.settled-shell.shell-scallop {
    width: 28px;
    height: 22px;
    background: linear-gradient(135deg, #FFE4B5 0%, #F0C080 50%, #DEB887 100%);
    border-radius: 50% 50% 8% 8%;
}

.settled-shell.shell-conch {
    width: 20px;
    height: 32px;
    background: linear-gradient(135deg, #FFB6C1 0%, #FF91A4 50%, #E87A90 100%);
    border-radius: 30% 70% 70% 30% / 20% 30% 70% 80%;
    transform: translate(-50%, -50%) scale(0.5) rotate(-25deg);
}

.settled-shell.shell-spiral {
    width: 25px;
    height: 25px;
    background: radial-gradient(circle at 30% 30%, #ADD8E6 0%, #87CEEB 40%, #5F9EA0 100%);
    border-radius: 50%;
}

@keyframes shell-settle {
    0% {
        transform: translate(-50%, -50%) scale(0.8);
        opacity: 0;
    }
    50% {
        transform: translate(-50%, -50%) scale(0.6);
        opacity: 1;
    }
    100% {
        transform: translate(-50%, -50%) scale(0.5);
        opacity: 1;
    }
}

.settled-shell.shell-conch {
    animation: shell-settle-conch 0.3s ease-out forwards !important;
}

@keyframes shell-settle-conch {
    0% {
        transform: translate(-50%, -50%) scale(0.8) rotate(-25deg);
        opacity: 0;
    }
    50% {
        transform: translate(-50%, -50%) scale(0.6) rotate(-25deg);
        opacity: 1;
    }
    100% {
        transform: translate(-50%, -50%) scale(0.5) rotate(-25deg);
        opacity: 1;
    }
}

/* Unicorn shake on wrong match */
.unicorn-character.wrong-match-shake {
    animation: unicorn-wrong-shake 0.5s ease-in-out;
}

@keyframes unicorn-wrong-shake {
    0%, 100% { transform: translateX(-50%) rotate(0deg); }
    20% { transform: translateX(calc(-50% - 15px)) rotate(-8deg); }
    40% { transform: translateX(calc(-50% + 15px)) rotate(8deg); }
    60% { transform: translateX(calc(-50% - 10px)) rotate(-5deg); }
    80% { transform: translateX(calc(-50% + 10px)) rotate(5deg); }
}

/* Swimming unicorn animation */
.unicorn-character.swimming {
    animation: unicorn-swim 0.8s ease-in-out infinite;
    filter: drop-shadow(0 0 30px rgba(72, 202, 228, 0.7));
}

@keyframes unicorn-swim {
    0%, 100% {
        transform: translateX(-50%) rotate(-5deg) translateY(0);
    }
    25% {
        transform: translateX(-50%) rotate(0deg) translateY(-10px);
    }
    50% {
        transform: translateX(-50%) rotate(5deg) translateY(0);
    }
    75% {
        transform: translateX(-50%) rotate(0deg) translateY(-8px);
    }
}

/* SVG-compatible swimming animation */
@keyframes svg-swim {
    0%, 100% { transform: rotate(-3deg) translateY(0); }
    25% { transform: rotate(2deg) translateY(-5px); }
    50% { transform: rotate(3deg) translateY(0); }
    75% { transform: rotate(-2deg) translateY(-3px); }
}

.unicorn-character.swimming .unicorn-svg-wrapper {
    animation: svg-swim 0.4s ease-in-out infinite;
}

/* Legacy CSS unicorn swimming leg animation (disabled for SVG)
.unicorn-character.swimming .unicorn-leg {
    animation: swim-legs 0.4s ease-in-out infinite;
}

@keyframes swim-legs {
    0%, 100% { transform: rotate(-20deg); }
    50% { transform: rotate(20deg); }
}
*/

/* Mobile responsive adjustments for shape targets */
@media (max-width: 768px) {
    .shape-targets {
        right: 10px;
        padding: 8px;
        top: auto;
        bottom: 100px;
        transform: none;
    }

    .target-slot[data-shape="scallop"] {
        width: 50px;
        height: 40px;
    }

    .target-slot[data-shape="conch"] {
        width: 38px;
        height: 55px;
    }

    .target-slot[data-shape="spiral"] {
        width: 42px;
        height: 42px;
    }

    .shape-targets h3 {
        font-size: 1rem;
    }

    .match-progress {
        font-size: 1rem;
    }
}

/* Sandcastle - Realistic beach castle */
.sandcastle-area {
    position: absolute;
    bottom: 22%;
    left: 12%;
    width: 140px;
    display: flex;
    flex-direction: column-reverse;
    align-items: center;
    z-index: 22;
    filter: drop-shadow(3px 4px 6px rgba(0,0,0,0.25));
}

.castle-piece {
    position: relative;
    animation: build-piece 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Base - wide foundation with battlements */
.castle-piece.base {
    width: 100px;
    height: 40px;
    background:
        /* Sand texture overlay */
        repeating-radial-gradient(
            circle at 50% 50%,
            transparent 0px,
            transparent 1px,
            rgba(139,90,43,0.1) 1px,
            transparent 2px
        ),
        /* Main gradient */
        linear-gradient(180deg,
            #F5DEB3 0%,
            #E8C872 20%,
            #DEB887 40%,
            #D2A679 60%,
            #C19660 80%,
            #A67B5B 100%);
    border-radius: 8px 8px 4px 4px;
    box-shadow:
        inset 0 3px 8px rgba(255,255,255,0.3),
        inset 0 -8px 15px rgba(139,90,43,0.3),
        2px 3px 8px rgba(0,0,0,0.2);
}

/* Battlement details on base */
.castle-piece.base::before {
    content: '';
    position: absolute;
    top: -8px;
    left: 5%;
    width: 90%;
    height: 12px;
    background:
        repeating-linear-gradient(
            90deg,
            #DEB887 0px,
            #DEB887 12px,
            transparent 12px,
            transparent 18px
        );
    border-radius: 2px 2px 0 0;
}

/* Middle tier */
.castle-piece.middle {
    width: 75px;
    height: 35px;
    background:
        repeating-radial-gradient(
            circle at 50% 50%,
            transparent 0px,
            transparent 1px,
            rgba(139,90,43,0.08) 1px,
            transparent 2px
        ),
        linear-gradient(180deg,
            #F5DEB3 0%,
            #E8C872 25%,
            #DEB887 50%,
            #C9A66B 75%,
            #B8956A 100%);
    border-radius: 6px 6px 3px 3px;
    box-shadow:
        inset 0 3px 6px rgba(255,255,255,0.25),
        inset 0 -6px 12px rgba(139,90,43,0.25),
        1px 2px 5px rgba(0,0,0,0.15);
}

/* Window details on middle */
.castle-piece.middle::before {
    content: '';
    position: absolute;
    top: 40%;
    left: 50%;
    transform: translateX(-50%);
    width: 10px;
    height: 15px;
    background: linear-gradient(180deg, #5D4037 0%, #3E2723 100%);
    border-radius: 50% 50% 0 0;
    box-shadow: inset 0 2px 3px rgba(0,0,0,0.5);
}

/* Tower - cylindrical with dome top */
.castle-piece.tower {
    width: 50px;
    height: 55px;
    background:
        repeating-radial-gradient(
            circle at 50% 50%,
            transparent 0px,
            transparent 1px,
            rgba(139,90,43,0.06) 1px,
            transparent 2px
        ),
        linear-gradient(180deg,
            #F5DEB3 0%,
            #E8C872 30%,
            #DEB887 60%,
            #C4956A 100%);
    border-radius: 50% 50% 8px 8px;
    box-shadow:
        inset 0 4px 10px rgba(255,255,255,0.3),
        inset 0 -8px 15px rgba(139,90,43,0.25),
        inset -5px 0 10px rgba(139,90,43,0.1),
        2px 3px 6px rgba(0,0,0,0.15);
}

/* Cone roof on tower */
.castle-piece.tower::before {
    content: '';
    position: absolute;
    top: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 20px solid transparent;
    border-right: 20px solid transparent;
    border-bottom: 20px solid #C4956A;
    filter: drop-shadow(0 -2px 3px rgba(0,0,0,0.15));
}

/* Tower window */
.castle-piece.tower::after {
    content: '';
    position: absolute;
    top: 35%;
    left: 50%;
    transform: translateX(-50%);
    width: 8px;
    height: 12px;
    background: linear-gradient(180deg, #5D4037 0%, #3E2723 100%);
    border-radius: 50% 50% 0 0;
    box-shadow: inset 0 2px 2px rgba(0,0,0,0.4);
}

/* Flag on top */
.castle-piece.flag {
    width: 4px;
    height: 35px;
    background: linear-gradient(90deg, #8B4513, #A0522D, #8B4513);
    border-radius: 2px;
    position: relative;
    margin-bottom: 5px;
    box-shadow: 1px 1px 2px rgba(0,0,0,0.2);
}

/* Flag fabric */
.castle-piece.flag::before {
    content: '';
    position: absolute;
    top: 2px;
    left: 4px;
    width: 28px;
    height: 18px;
    background: linear-gradient(135deg, #FF69B4 0%, #FF1493 50%, #C71585 100%);
    clip-path: polygon(0 0, 100% 15%, 100% 85%, 0 100%);
    animation: flag-wave 1.5s ease-in-out infinite;
    box-shadow: 1px 1px 3px rgba(0,0,0,0.2);
}

/* Flag wave animation */
@keyframes flag-wave {
    0%, 100% { transform: skewY(0deg) scaleX(1); }
    25% { transform: skewY(-3deg) scaleX(0.95); }
    50% { transform: skewY(2deg) scaleX(1.02); }
    75% { transform: skewY(-2deg) scaleX(0.98); }
}

@keyframes build-piece {
    0% { transform: scale(0) translateY(60px) rotate(-10deg); opacity: 0; }
    50% { transform: scale(1.15) translateY(-15px) rotate(3deg); }
    70% { transform: scale(0.95) translateY(5px) rotate(-1deg); }
    100% { transform: scale(1) translateY(0) rotate(0deg); opacity: 1; }
}

/* Interactive Waves on beach */
.wave-area {
    position: absolute;
    bottom: 48%;
    left: 0;
    width: 100%;
    height: 70px;
    overflow: hidden;
    cursor: pointer;
    z-index: 15;
}

.wave {
    position: absolute;
    bottom: 0;
    width: 200%;
    height: 40px;
    background: linear-gradient(180deg,
        rgba(255,255,255,0.6) 0%,
        rgba(135,206,250,0.7) 20%,
        rgba(72,202,228,0.8) 50%,
        rgba(32,178,170,0.6) 100%);
    border-radius: 100% 100% 0 0;
    animation: wave-move 4s ease-in-out infinite;
}

/* Foam effect on waves */
.wave::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 8px;
    background:
        radial-gradient(ellipse 15px 6px at 10% 50%, rgba(255,255,255,0.9) 0%, transparent 70%),
        radial-gradient(ellipse 12px 5px at 25% 40%, rgba(255,255,255,0.8) 0%, transparent 70%),
        radial-gradient(ellipse 18px 7px at 45% 60%, rgba(255,255,255,0.85) 0%, transparent 70%),
        radial-gradient(ellipse 14px 5px at 65% 45%, rgba(255,255,255,0.9) 0%, transparent 70%),
        radial-gradient(ellipse 16px 6px at 85% 55%, rgba(255,255,255,0.8) 0%, transparent 70%);
    animation: foam-shimmer 2s ease-in-out infinite;
}

@keyframes foam-shimmer {
    0%, 100% { opacity: 0.8; }
    50% { opacity: 1; }
}

.wave-2 {
    height: 28px;
    background: linear-gradient(180deg,
        rgba(255,255,255,0.5) 0%,
        rgba(135,206,250,0.5) 30%,
        rgba(72,202,228,0.6) 100%);
    animation-duration: 5s;
    animation-delay: -1s;
}

.wave-3 {
    height: 20px;
    background: linear-gradient(180deg,
        rgba(255,255,255,0.4) 0%,
        rgba(135,206,250,0.35) 50%,
        rgba(72,202,228,0.4) 100%);
    animation-duration: 6s;
    animation-delay: -2s;
}

.splash {
    position: absolute;
    pointer-events: none;
}

.splash-drop {
    position: absolute;
    width: 10px;
    height: 10px;
    background: radial-gradient(ellipse at 30% 30%,
        rgba(255,255,255,0.9) 0%,
        rgba(135,206,250,0.8) 30%,
        rgba(0,206,209,0.6) 70%,
        rgba(0,139,139,0.4) 100%);
    border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
    animation: splash-drop 1s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
    box-shadow:
        inset 1px 1px 2px rgba(255,255,255,0.8),
        0 1px 3px rgba(0,139,139,0.3);
}

@keyframes splash-drop {
    0% {
        transform: translate(0, 0) scale(0.5) rotate(0deg);
        opacity: 1;
    }
    30% {
        transform: translate(calc(var(--tx) * 0.4), calc(var(--ty) * 0.6)) scale(1.2) rotate(45deg);
        opacity: 1;
    }
    100% {
        transform: translate(var(--tx), var(--ty)) scale(0.3) rotate(90deg);
        opacity: 0;
    }
}

/* Activity Buttons */
.activity-buttons {
    position: fixed;
    bottom: 7%;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    z-index: 100;
}

/* Stars Display */
.stars-display {
    margin-top: 20px;
    font-size: 1.3rem;
    font-weight: bold;
    color: #FFD700;
    text-shadow:
        1px 1px 2px rgba(0,0,0,0.3),
        0 0 10px rgba(255, 215, 0, 0.5);
    background: linear-gradient(180deg, rgba(255,255,255,0.9) 0%, rgba(255,250,240,0.85) 100%);
    padding: 10px 25px;
    border-radius: 30px;
    box-shadow:
        0 4px 15px rgba(255, 215, 0, 0.3),
        inset 0 1px 0 rgba(255,255,255,0.8);
    border: 2px solid rgba(255, 215, 0, 0.4);
}

/* =====================================================
   RESPONSIVE STYLES
   ===================================================== */

@media (max-width: 768px) {
    .scene {
        padding: 15px;
        padding-bottom: 120px;
    }

    .title {
        margin-top: 10px;
        margin-bottom: 15px;
    }

    .btn {
        padding: 12px 25px;
        font-size: 1rem;
    }

    .btn-start {
        padding: 12px 30px;
    }

    .unicorn-preview.large {
        width: 220px;
        height: 200px;
    }

    .unicorn-preview.menu-unicorn {
        width: 160px;
        height: 145px;
    }

    .beach-card {
        width: 160px;
    }

    .beach-preview {
        height: 100px;
    }

    .beach-name {
        font-size: 1rem;
        padding: 8px;
    }

    .creator-layout {
        flex-direction: column;
        align-items: center;
        gap: 20px;
    }

    .customization-panels {
        width: 100%;
        max-width: none;
    }

    .unicorn-display {
        padding: 20px;
    }

    .stats-bar {
        gap: 8px;
        padding: 6px 12px;
    }

    .stat {
        font-size: 0.85rem;
    }

    .activity-buttons {
        bottom: 15px;
        gap: 8px;
    }

    .btn-activity {
        padding: 10px 14px;
        font-size: 0.85rem;
    }

    .play-nav {
        top: 40px;
        left: 10px;
    }

    .play-ui {
        top: 40px;
        left: 100px;
    }

    .btn-small {
        padding: 8px 14px;
        font-size: 0.8rem;
    }

    .unicorn-character {
        width: 110px;
        height: 100px;
    }

    .encouragement {
        font-size: 1.4rem;
    }
}

@media (max-width: 480px) {
    .unicorn-preview.large {
        width: 180px;
        height: 165px;
    }

    .beach-options {
        gap: 15px;
    }

    .beach-card {
        width: 140px;
    }

    .nav-buttons {
        flex-wrap: wrap;
        justify-content: center;
    }
}
