/* 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-reset {
    background: rgba(100, 100, 100, 0.5);
    color: #ccc;
    font-size: 0.8rem;
    padding: 8px 16px;
    margin-top: 20px;
    box-shadow: none;
}

.btn-reset:hover {
    background: rgba(255, 100, 100, 0.7);
    color: white;
}

.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 {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    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:hover {
    transform: translateY(-2px);
    box-shadow:
        0 6px 0 #C71585,
        0 8px 16px rgba(199, 21, 133, 0.5),
        inset 0 1px 0 rgba(255,255,255,0.3);
}

.btn-dance:active {
    transform: translateY(2px);
    box-shadow:
        0 2px 0 #C71585,
        0 4px 8px 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); }
}

/* Sandcastle Icon Button */
.btn-castle {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(180deg, #F5DEB3 0%, #DEB887 50%, #C19660 100%);
    box-shadow:
        0 4px 0 #A67B5B,
        0 6px 12px rgba(166, 123, 91, 0.4),
        inset 0 1px 0 rgba(255,255,255,0.4);
}

.btn-castle:hover {
    transform: translateY(-2px);
    box-shadow:
        0 6px 0 #A67B5B,
        0 8px 16px rgba(166, 123, 91, 0.5),
        inset 0 1px 0 rgba(255,255,255,0.4);
}

.btn-castle:active {
    transform: translateY(2px);
    box-shadow:
        0 2px 0 #A67B5B,
        0 4px 8px rgba(166, 123, 91, 0.3),
        inset 0 1px 0 rgba(255,255,255,0.4);
}

.castle-icon {
    position: relative;
    width: 50px;
    height: 50px;
}

/* Castle base (wall) */
.castle-icon::before {
    content: '';
    position: absolute;
    bottom: 5px;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 22px;
    background: linear-gradient(180deg, #D2B48C 0%, #C19660 50%, #A67B5B 100%);
    border-radius: 3px 3px 0 0;
    box-shadow: inset 2px 2px 4px rgba(255,255,255,0.3), inset -2px -2px 4px rgba(0,0,0,0.2);
}

/* Castle tower with battlements */
.castle-icon::after {
    content: '';
    position: absolute;
    bottom: 25px;
    left: 50%;
    transform: translateX(-50%);
    width: 24px;
    height: 25px;
    background: linear-gradient(180deg, #DEB887 0%, #C19660 50%, #A67B5B 100%);
    clip-path: polygon(
        0% 30%, 15% 30%, 15% 0%, 35% 0%, 35% 30%,
        50% 30%, 50% 10%, 65% 10%, 65% 30%,
        85% 30%, 85% 0%, 100% 0%, 100% 100%, 0% 100%
    );
    box-shadow: inset 2px 2px 4px rgba(255,255,255,0.3);
}

/* Splash Icon Button */
.btn-splash {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(180deg, #87CEEB 0%, #48CAE4 50%, #0077B6 100%);
    box-shadow:
        0 4px 0 #005f92,
        0 6px 12px rgba(0, 119, 182, 0.4),
        inset 0 1px 0 rgba(255,255,255,0.4);
}

.btn-splash:hover {
    transform: translateY(-2px);
    box-shadow:
        0 6px 0 #005f92,
        0 8px 16px rgba(0, 119, 182, 0.5),
        inset 0 1px 0 rgba(255,255,255,0.4);
}

.btn-splash:active {
    transform: translateY(2px);
    box-shadow:
        0 2px 0 #005f92,
        0 4px 8px rgba(0, 119, 182, 0.3),
        inset 0 1px 0 rgba(255,255,255,0.4);
}

.splash-icon {
    position: relative;
    width: 50px;
    height: 50px;
}

/* Center water drop */
.splash-icon::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 16px;
    height: 22px;
    background: radial-gradient(ellipse at 30% 30%, #E0FFFF 0%, #48CAE4 40%, #0077B6 100%);
    border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
    box-shadow: inset 2px 2px 4px rgba(255,255,255,0.6);
}

/* Radiating droplets */
.splash-icon::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 44px;
    height: 44px;
    background:
        radial-gradient(ellipse 15% 20% at 20% 25%, #48CAE4 50%, transparent 55%),
        radial-gradient(ellipse 12% 18% at 80% 30%, #00B4D8 50%, transparent 55%),
        radial-gradient(ellipse 14% 16% at 15% 70%, #0077B6 50%, transparent 55%),
        radial-gradient(ellipse 13% 19% at 85% 75%, #48CAE4 50%, transparent 55%),
        radial-gradient(ellipse 10% 14% at 50% 10%, #00B4D8 50%, transparent 55%),
        radial-gradient(ellipse 11% 15% at 50% 90%, #0077B6 50%, transparent 55%);
}

/* SVG Music note icon */
.music-note-svg {
    width: 40px;
    height: 40px;
}

/* Activity button icons */
.activity-icon {
    width: 40px;
    height: 40px;
    filter: drop-shadow(1px 1px 2px rgba(0,0,0,0.3));
}


.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);
}

/* Icon-only navigation buttons */
.btn-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 20px;
}

/* Arrow icons */
.arrow-left-icon,
.arrow-right-icon {
    width: 24px;
    height: 24px;
    position: relative;
}

.arrow-left-icon::before,
.arrow-right-icon::before {
    content: '';
    display: block;
    width: 100%;
    height: 100%;
    border: 4px solid white;
    border-top: none;
    border-right: none;
}

.arrow-left-icon::before {
    transform: rotate(45deg);
}

.arrow-right-icon::before {
    transform: rotate(-135deg);
}

/* Play icon (triangle) */
.play-icon {
    width: 24px;
    height: 24px;
    position: relative;
}

.play-icon::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 0;
    height: 0;
    border-left: 20px solid white;
    border-top: 12px solid transparent;
    border-bottom: 12px solid transparent;
}

/* Reset icon (circular arrow) */
.reset-icon {
    width: 20px;
    height: 20px;
    position: relative;
}

.reset-icon::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    border: 3px solid white;
    border-radius: 50%;
    border-top-color: transparent;
    transform: rotate(-45deg);
}

.reset-icon::after {
    content: '';
    position: absolute;
    top: -2px;
    right: 4px;
    width: 0;
    height: 0;
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-bottom: 8px solid white;
    transform: rotate(45deg);
}

/* Emoji icons for navigation buttons */
.emoji-icon {
    font-size: 28px;
    line-height: 1;
    filter: drop-shadow(1px 1px 2px rgba(0,0,0,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: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    max-width: 500px;
}

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

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

/* Panel Header Icons - SVG-based using actual unicorn paths */
.panel-header {
    display: flex;
    justify-content: center;
    margin-bottom: 6px;
}

.panel-icon-svg {
    width: 32px;
    height: 32px;
    filter: drop-shadow(1px 1px 2px rgba(0,0,0,0.2));
    overflow: visible;
}

/* SVG path fills - default colors */
#body-icon .icon-path { fill: #FFB6C1; }
#horn-icon .icon-path { fill: #FFD700; }
#mane-icon .icon-path { fill: #FF69B4; }
#tail-icon .icon-path { fill: #FF69B4; }
#eye-icon .eye-outer { fill: #000000; }
#eye-icon .eye-inner { fill: white; }
#hoof-icon .icon-path { fill: #FFB6C1; }

/* Animation on selection */
.panel-icon-svg.icon-pulse {
    animation: icon-pulse 0.5s ease-out;
}

@keyframes icon-pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); }
}

/* Color Options */
.color-options {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    justify-content: center;
}

.color-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 3px solid white;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 2px 8px 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%; }
}

/* ===========================================
   Carousel Color Selection UI
   =========================================== */

/* Carousel Container */
.color-carousel {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    max-width: 400px;
    margin: 0 auto;
    padding: 10px 0;
}

/* Carousel Content (center column) */
.carousel-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

/* Unicorn Preview in Carousel */
.carousel-unicorn-preview {
    width: 200px;
    height: 200px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 16px;
    padding: 10px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

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

.carousel-unicorn-preview svg {
    width: 100%;
    height: 100%;
}

/* Carousel Arrow Buttons */
.carousel-arrow {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 0 3px 10px rgba(0,0,0,0.15);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s, box-shadow 0.2s;
    flex-shrink: 0;
}

.carousel-arrow:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.carousel-arrow:active {
    transform: scale(0.95);
}

.carousel-arrow:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    transform: none;
}

.carousel-arrow:disabled:hover {
    transform: none;
    box-shadow: 0 3px 10px rgba(0,0,0,0.15);
}

/* Dot Indicators */
.carousel-dots {
    display: flex;
    gap: 8px;
    justify-content: center;
}

.carousel-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.2);
    cursor: pointer;
    transition: background 0.2s, transform 0.2s;
}

.carousel-dot:hover {
    transform: scale(1.2);
}

.carousel-dot.active {
    background: #FF69B4;
    transform: scale(1.2);
}

/* Color Panel */
.carousel-color-panel {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 16px;
    padding: 15px;
    box-shadow: 0 3px 12px rgba(0,0,0,0.1);
    width: 100%;
    max-width: 320px;
}

/* Swipe hint animation */
@keyframes swipeHint {
    0%, 100% { transform: translateX(0); }
    50% { transform: translateX(-5px); }
}

/* Color change pulse animation */
.carousel-color-pulse {
    animation: colorPulse 0.3s ease-out;
}

@keyframes colorPulse {
    0% { filter: brightness(1); }
    50% { filter: brightness(1.3); }
    100% { filter: brightness(1); }
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .carousel-unicorn-preview {
        width: 160px;
        height: 160px;
    }

    .carousel-arrow {
        width: 40px;
        height: 40px;
    }

    .carousel-dot {
        width: 10px;
        height: 10px;
    }

    .carousel-color-panel {
        padding: 12px;
    }
}

@media (max-width: 480px) {
    .color-carousel {
        gap: 5px;
    }

    .carousel-unicorn-preview {
        width: 140px;
        height: 140px;
        padding: 8px;
    }

    .carousel-arrow {
        width: 36px;
        height: 36px;
    }

    .carousel-color-panel {
        max-width: 280px;
    }
}

/* ===========================================
   End Carousel Styles
   =========================================== */

/* 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);
}

/* Locked beach cards */
.beach-card.locked {
    opacity: 0.6;
    cursor: not-allowed;
    filter: grayscale(0.5);
}

.beach-card.locked:hover {
    transform: none;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    border-color: transparent;
}

.beach-card.locked .lock-icon {
    font-size: 16px;
    margin-left: 5px;
}

.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: none;
}

/* Beach icon overlay */
.beach-preview {
    position: relative;
}

.beach-icon {
    position: absolute;
    bottom: 10px;
    right: 10px;
    width: 36px;
    height: 36px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

/* Sun icon */
.sun-icon::before {
    content: '';
    width: 20px;
    height: 20px;
    background: #FFD700;
    border-radius: 50%;
    box-shadow: 0 0 8px #FFD700;
}

/* Sunset icon */
.sunset-icon::before {
    content: '';
    width: 24px;
    height: 12px;
    background: linear-gradient(to bottom, #FF6B35, #F7931E, #FFD700);
    border-radius: 24px 24px 0 0;
}

/* Rainbow icon */
.rainbow-icon::before {
    content: '';
    width: 24px;
    height: 12px;
    background: linear-gradient(to bottom,
        #FF0000 0%, #FF0000 14%,
        #FF7F00 14%, #FF7F00 28%,
        #FFFF00 28%, #FFFF00 42%,
        #00FF00 42%, #00FF00 57%,
        #0000FF 57%, #0000FF 71%,
        #4B0082 71%, #4B0082 85%,
        #9400D3 85%, #9400D3 100%);
    border-radius: 24px 24px 0 0;
}

/* =====================================================
   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%); }
}

/* Sea Creatures Container */
.sea-creatures {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    pointer-events: none;
    z-index: 3;
}

/* Shark */
.sea-creature.shark {
    position: absolute;
    width: 90px;
    height: 45px;
    top: 40%;
}

.sea-creature.shark::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, #5D6D7E 0%, #7F8C8D 50%, #BDC3C7 100%);
    border-radius: 60% 40% 40% 60% / 50% 50% 50% 50%;
    box-shadow: inset 2px 2px 4px rgba(255,255,255,0.2), inset -2px -2px 4px rgba(0,0,0,0.2);
}

/* Shark dorsal fin */
.sea-creature.shark::after {
    content: '';
    position: absolute;
    top: -20px;
    left: 35%;
    width: 25px;
    height: 30px;
    background: linear-gradient(90deg, #5D6D7E 0%, #7F8C8D 100%);
    clip-path: polygon(50% 0%, 100% 100%, 0% 100%);
}

/* Shark tail */
.sea-creature.shark .tail {
    position: absolute;
    right: -15px;
    top: 5px;
    width: 25px;
    height: 35px;
    background: linear-gradient(180deg, #5D6D7E 0%, #7F8C8D 100%);
    clip-path: polygon(0% 50%, 100% 0%, 80% 50%, 100% 100%);
}

/* Shark eye */
.sea-creature.shark .eye {
    position: absolute;
    left: 15px;
    top: 15px;
    width: 8px;
    height: 8px;
    background: #1a1a1a;
    border-radius: 50%;
    box-shadow: inset 1px 1px 2px rgba(255,255,255,0.3);
}

/* Dolphin */
.sea-creature.dolphin {
    position: absolute;
    width: 85px;
    height: 40px;
    top: 35%;
}

.sea-creature.dolphin::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, #5DADE2 0%, #85C1E9 50%, #D6EAF8 100%);
    border-radius: 70% 30% 30% 70% / 50% 50% 50% 50%;
    box-shadow: inset 2px 2px 4px rgba(255,255,255,0.4), inset -2px -2px 4px rgba(0,0,0,0.1);
}

/* Dolphin snout */
.sea-creature.dolphin::after {
    content: '';
    position: absolute;
    left: -18px;
    top: 12px;
    width: 25px;
    height: 16px;
    background: linear-gradient(180deg, #5DADE2 0%, #85C1E9 100%);
    border-radius: 50% 0 0 50%;
    transform: rotate(-5deg);
}

/* Dolphin dorsal fin */
.sea-creature.dolphin .fin {
    position: absolute;
    top: -15px;
    left: 40%;
    width: 20px;
    height: 22px;
    background: linear-gradient(90deg, #5DADE2 0%, #85C1E9 100%);
    clip-path: polygon(30% 100%, 50% 0%, 100% 100%);
}

/* Dolphin tail */
.sea-creature.dolphin .tail {
    position: absolute;
    right: -12px;
    top: 5px;
    width: 22px;
    height: 30px;
    background: linear-gradient(180deg, #5DADE2 0%, #85C1E9 100%);
    clip-path: polygon(0% 50%, 100% 0%, 70% 50%, 100% 100%);
}

/* Dolphin eye */
.sea-creature.dolphin .eye {
    position: absolute;
    left: 12px;
    top: 12px;
    width: 7px;
    height: 7px;
    background: #1a1a1a;
    border-radius: 50%;
    box-shadow: inset 1px 1px 2px rgba(255,255,255,0.3);
}

/* Swimming animations */
.sea-creature.swim-right {
    animation: swim-right 8s ease-in-out forwards;
}

.sea-creature.swim-left {
    animation: swim-left 8s ease-in-out forwards;
    transform: scaleX(-1);
}

@keyframes swim-right {
    0% {
        left: -100px;
        transform: translateY(0) scaleX(1);
    }
    25% {
        transform: translateY(-30px) scaleX(1);
    }
    45% {
        transform: translateY(-80px) scaleX(1);
    }
    55% {
        transform: translateY(-80px) scaleX(1);
    }
    75% {
        transform: translateY(-30px) scaleX(1);
    }
    100% {
        left: calc(100% + 100px);
        transform: translateY(0) scaleX(1);
    }
}

@keyframes swim-left {
    0% {
        right: -100px;
        left: auto;
        transform: translateY(0) scaleX(-1);
    }
    25% {
        transform: translateY(-30px) scaleX(-1);
    }
    45% {
        transform: translateY(-80px) scaleX(-1);
    }
    55% {
        transform: translateY(-80px) scaleX(-1);
    }
    75% {
        transform: translateY(-30px) scaleX(-1);
    }
    100% {
        right: calc(100% + 100px);
        left: auto;
        transform: translateY(0) scaleX(-1);
    }
}

/* Creature splash on jump */
.creature-splash {
    position: absolute;
    width: 60px;
    height: 30px;
    pointer-events: none;
}

.creature-splash::before,
.creature-splash::after {
    content: '';
    position: absolute;
    background: radial-gradient(ellipse at center, rgba(255,255,255,0.8) 0%, rgba(135,206,235,0.6) 50%, transparent 70%);
    border-radius: 50%;
    animation: creature-splash-drop 0.6s ease-out forwards;
}

.creature-splash::before {
    width: 12px;
    height: 12px;
    left: 20%;
    bottom: 0;
}

.creature-splash::after {
    width: 10px;
    height: 10px;
    left: 60%;
    bottom: 0;
    animation-delay: 0.1s;
}

@keyframes creature-splash-drop {
    0% {
        transform: translateY(0) scale(1);
        opacity: 1;
    }
    100% {
        transform: translateY(-40px) scale(0.5);
        opacity: 0;
    }
}

/* Giant Dancing Crab */
.giant-crab {
    position: absolute;
    width: 120px;
    height: 80px;
    z-index: 25;
    pointer-events: none;
}

/* Crab body */
.giant-crab .crab-body {
    position: absolute;
    width: 80px;
    height: 55px;
    left: 20px;
    top: 15px;
    background: linear-gradient(180deg, #E74C3C 0%, #C0392B 40%, #922B21 100%);
    border-radius: 50% 50% 40% 40%;
    box-shadow:
        inset 4px 4px 10px rgba(255,150,150,0.4),
        inset -4px -4px 10px rgba(100,20,20,0.3),
        3px 4px 8px rgba(0,0,0,0.3);
}

/* Crab shell pattern */
.giant-crab .crab-body::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: inherit;
    background:
        radial-gradient(ellipse 30% 20% at 30% 35%, rgba(255,200,200,0.3) 0%, transparent 50%),
        radial-gradient(ellipse 25% 15% at 70% 40%, rgba(255,180,180,0.2) 0%, transparent 50%);
}

/* Crab eyes */
.giant-crab .crab-eye {
    position: absolute;
    width: 14px;
    height: 22px;
    top: 0;
    background: linear-gradient(180deg, #E74C3C 0%, #C0392B 100%);
    border-radius: 50% 50% 30% 30%;
}

.giant-crab .crab-eye.left {
    left: 35px;
    transform: rotate(-10deg);
}

.giant-crab .crab-eye.right {
    left: 70px;
    transform: rotate(10deg);
}

.giant-crab .crab-eye::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 50%;
    transform: translateX(-50%);
    width: 10px;
    height: 10px;
    background: radial-gradient(circle at 30% 30%, #fff 0%, #1a1a1a 40%, #000 100%);
    border-radius: 50%;
}

/* Crab claws */
.giant-crab .crab-claw {
    position: absolute;
    top: 25px;
}

.giant-crab .crab-claw.left {
    left: -15px;
    transform: rotate(-30deg);
}

.giant-crab .crab-claw.right {
    right: -15px;
    transform: rotate(30deg) scaleX(-1);
}

/* Claw arm */
.giant-crab .claw-arm {
    width: 30px;
    height: 14px;
    background: linear-gradient(180deg, #E74C3C 0%, #C0392B 100%);
    border-radius: 8px;
}

/* Claw pincer */
.giant-crab .claw-pincer {
    position: absolute;
    left: 22px;
    top: -8px;
    width: 28px;
    height: 30px;
}

.giant-crab .claw-pincer::before,
.giant-crab .claw-pincer::after {
    content: '';
    position: absolute;
    background: linear-gradient(90deg, #E74C3C 0%, #C0392B 50%, #922B21 100%);
    border-radius: 0 60% 60% 0;
}

.giant-crab .claw-pincer::before {
    width: 25px;
    height: 14px;
    top: 0;
    transform: rotate(-15deg);
}

.giant-crab .claw-pincer::after {
    width: 22px;
    height: 12px;
    bottom: 0;
    transform: rotate(15deg);
}

/* Crab legs */
.giant-crab .crab-legs {
    position: absolute;
    width: 100%;
    height: 100%;
}

.giant-crab .crab-leg {
    position: absolute;
    width: 35px;
    height: 6px;
    background: linear-gradient(180deg, #C0392B 0%, #922B21 100%);
    border-radius: 3px;
    transform-origin: left center;
}

.giant-crab .crab-leg.left-1 { left: 25px; top: 45px; transform: rotate(-40deg); }
.giant-crab .crab-leg.left-2 { left: 22px; top: 55px; transform: rotate(-20deg); }
.giant-crab .crab-leg.left-3 { left: 22px; top: 65px; transform: rotate(10deg); }

.giant-crab .crab-leg.right-1 { right: 25px; left: auto; top: 45px; transform: rotate(40deg) scaleX(-1); transform-origin: right center; }
.giant-crab .crab-leg.right-2 { right: 22px; left: auto; top: 55px; transform: rotate(20deg) scaleX(-1); transform-origin: right center; }
.giant-crab .crab-leg.right-3 { right: 22px; left: auto; top: 65px; transform: rotate(-10deg) scaleX(-1); transform-origin: right center; }

/* Crab crawling animation */
.giant-crab.crawling {
    animation: crab-crawl 4s ease-out forwards;
}

@keyframes crab-crawl {
    0% {
        bottom: 45%;
        opacity: 1;
    }
    100% {
        bottom: 20%;
        opacity: 1;
    }
}

/* Crab dancing animation */
.giant-crab.dancing {
    animation: crab-dance-body 0.4s ease-in-out infinite;
}

.giant-crab.dancing .crab-claw.left {
    animation: crab-claw-left 0.4s ease-in-out infinite;
}

.giant-crab.dancing .crab-claw.right {
    animation: crab-claw-right 0.4s ease-in-out infinite;
}

.giant-crab.dancing .crab-leg {
    animation: crab-leg-dance 0.2s ease-in-out infinite alternate;
}

@keyframes crab-dance-body {
    0%, 100% { transform: translateY(0) rotate(-3deg); }
    50% { transform: translateY(-8px) rotate(3deg); }
}

@keyframes crab-claw-left {
    0%, 100% { transform: rotate(-30deg) translateY(0); }
    50% { transform: rotate(-60deg) translateY(-15px); }
}

@keyframes crab-claw-right {
    0%, 100% { transform: rotate(30deg) scaleX(-1) translateY(0); }
    50% { transform: rotate(60deg) scaleX(-1) translateY(-15px); }
}

@keyframes crab-leg-dance {
    0% { transform: rotate(var(--leg-angle, 0deg)) translateY(0); }
    100% { transform: rotate(calc(var(--leg-angle, 0deg) + 10deg)) translateY(-3px); }
}

/* Crab leaving animation */
.giant-crab.leaving {
    animation: crab-leave 3s ease-in forwards;
}

@keyframes crab-leave {
    0% {
        opacity: 1;
    }
    100% {
        bottom: 50%;
        opacity: 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;
}

/* Compact Stats Bar */
.stats-bar.compact {
    padding: 8px 16px;
    gap: 12px;
}

.stat-icon {
    width: 24px;
    height: 24px;
    display: inline-block;
    position: relative;
    flex-shrink: 0;
}

/* Star Icon - 5-point star using clip-path */
.star-icon::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    background: #FFD700;
    clip-path: polygon(50% 0%, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%);
}

/* Shell Icon - reuse shell SVG as mask */
.shell-icon::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    background: #FF69B4;
    -webkit-mask-image: url('assets/shells/clam-shell.svg');
    mask-image: url('assets/shells/clam-shell.svg');
    -webkit-mask-size: contain;
    mask-size: contain;
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
}

/* Castle Icon - simplified version of activity button */
.castle-stat-icon::before {
    content: '';
    position: absolute;
    bottom: 2px;
    left: 50%;
    transform: translateX(-50%);
    width: 20px;
    height: 12px;
    background: #DEB887;
    border-radius: 2px 2px 0 0;
}
.castle-stat-icon::after {
    content: '';
    position: absolute;
    bottom: 12px;
    left: 50%;
    transform: translateX(-50%);
    width: 12px;
    height: 12px;
    background: #C19660;
    clip-path: polygon(0% 40%, 25% 40%, 25% 0%, 50% 0%, 50% 40%, 75% 40%, 75% 0%, 100% 0%, 100% 100%, 0% 100%);
}

/* Splash Icon - simplified water drop */
.splash-stat-icon::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 12px;
    height: 16px;
    background: #48CAE4;
    border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
}

.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: 70px;
    height: 60px;
    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));
}

/* SVG-based shell images - hidden, used for mask reference */
.shell-svg {
    display: none;
}

/* Shell SVG styling - display colored SVGs directly */
.shell.shell-scallop,
.shell.shell-conch,
.shell.shell-spiral,
.shell.shell-pearl {
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}

/* SVG backgrounds for each shell type */
.shell.shell-scallop {
    width: 88px;
    height: 88px;
    background-image: url('assets/shells/clam-shell.svg');
}

.shell.shell-conch {
    width: 88px;
    height: 88px;
    background-image: url('assets/shells/konch-shell.svg');
}

.shell.shell-spiral {
    width: 81px;
    height: 81px;
    background-image: url('assets/shells/cowrie-shell.svg');
}

.shell.shell-pearl {
    width: 94px;
    height: 94px;
    background-image: url('assets/shells/shell-pearl.svg');
}

/* Pearl shells keep their original cyan-blue color - no filter variations */
.shell.shell-pearl,
.carried-shell.shell-pearl,
.settled-shell.shell-pearl {
    filter: drop-shadow(2px 3px 4px rgba(0,0,0,0.3)) !important;
}

/* Hide old CSS pseudo-element drawings */
.shell.shell-scallop::before,
.shell.shell-scallop::after,
.shell.shell-conch::before,
.shell.shell-conch::after,
.shell.shell-spiral::before,
.shell.shell-spiral::after,
.shell.shell-pearl::before,
.shell.shell-pearl::after,
.shell .shell-hinge {
    display: none !important;
}

/* LEGACY: Main shell body - scallop shape (kept for reference, hidden by SVG) */
.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 - distinctive spiral shape like a real conch */
.shell.shell-conch {
    width: 70px;
    height: 70px;
    transform: rotate(0deg);
}

/* Main conch body - teardrop shape with spiral point */
.shell.shell-conch::before {
    width: 100%;
    height: 100%;
    /* Conch shape - curved body with spiral tip at top-right */
    clip-path: polygon(
        /* Spiral tip */
        75% 0%, 85% 5%, 90% 12%, 88% 20%,
        /* Right curve down */
        92% 30%, 95% 45%, 93% 60%, 88% 75%,
        /* Bottom curve */
        78% 88%, 60% 95%, 40% 95%, 25% 90%,
        /* Left side up */
        12% 80%, 5% 65%, 3% 50%, 8% 35%,
        /* Curve back to lip */
        18% 22%, 35% 15%, 55% 12%, 70% 8%
    );
    border-radius: 60% 40% 50% 50%;
    background:
        /* Highlight shine */
        radial-gradient(ellipse 40% 30% at 25% 35%, rgba(255,255,255,0.85) 0%, transparent 50%),
        /* Secondary highlight */
        radial-gradient(ellipse 20% 15% at 80% 15%, rgba(255,255,255,0.7) 0%, transparent 50%),
        /* Main gradient */
        linear-gradient(135deg,
            var(--shell-base, #FFF5E6) 0%,
            var(--shell-mid, #FFDAB9) 35%,
            var(--shell-dark, #D4A574) 70%,
            #B8956A 100%);
    box-shadow: inset -3px -3px 8px rgba(0,0,0,0.15);
}

/* Decorative swirl line on conch */
.shell.shell-conch::after {
    width: 100%;
    height: 100%;
    clip-path: polygon(
        75% 0%, 85% 5%, 90% 12%, 88% 20%,
        92% 30%, 95% 45%, 93% 60%, 88% 75%,
        78% 88%, 60% 95%, 40% 95%, 25% 90%,
        12% 80%, 5% 65%, 3% 50%, 8% 35%,
        18% 22%, 35% 15%, 55% 12%, 70% 8%
    );
    border-radius: 60% 40% 50% 50%;
    background:
        /* Spiral swirl line */
        radial-gradient(ellipse 80% 60% at 40% 55%,
            transparent 25%,
            rgba(139, 90, 43, 0.25) 27%,
            transparent 30%,
            rgba(139, 90, 43, 0.2) 35%,
            transparent 38%
        ),
        /* Inner spiral rings */
        radial-gradient(ellipse 50% 40% at 35% 50%,
            transparent 40%,
            rgba(139, 90, 43, 0.15) 42%,
            transparent 45%
        ),
        /* Ridges texture */
        repeating-linear-gradient(
            120deg,
            transparent 0px,
            transparent 4px,
            rgba(139, 90, 43, 0.1) 5px,
            transparent 6px
        );
}

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

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

/* Spiral shell variant */
.shell.shell-spiral {
    width: 54px;
    height: 68px;
}

.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 (narrow layout) */
.shape-targets {
    position: fixed;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    width: 110px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 16px;
    padding: 10px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    z-index: 100;
    display: flex;
    flex-direction: column;
    gap: 8px;
    border: 3px solid rgba(255, 105, 180, 0.3);
}

/* Target slots container */
.target-slots-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
}

/* Base target slot - shell silhouettes for easy matching */
/* Enhanced for children's touch interaction */
.target-slot {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0;
    color: transparent;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    border: none;
    background-color: transparent;
    /* Touch improvements for kids */
    touch-action: manipulation;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    user-select: none;
    /* Extend touch area with padding - 14px for child-friendly touch targets */
    padding: 14px;
    margin: -14px;
}

/* Target slot inner shape with shell image mask */
.target-slot::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(255,182,193,0.4) 0%, rgba(221,160,221,0.5) 100%);
    box-sizing: border-box;
    transition: all 0.2s ease;
}

/* Scallop target - uses clam shell silhouette */
.target-slot[data-shape="scallop"] {
    width: 80px;
    height: 74px;
}

.target-slot[data-shape="scallop"]::before {
    -webkit-mask-image: url('assets/shells/clam-shell.svg');
    mask-image: url('assets/shells/clam-shell.svg');
    -webkit-mask-size: contain;
    mask-size: contain;
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    -webkit-mask-position: center;
    mask-position: center;
    border: none;
    background: linear-gradient(180deg,
        rgba(255,107,107,0.3) 0%,
        rgba(255,182,193,0.5) 50%,
        rgba(255,107,107,0.4) 100%);
    box-shadow: inset 0 0 20px rgba(255,105,180,0.3);
}

/* Conch target - uses konch shell silhouette */
.target-slot[data-shape="conch"] {
    width: 74px;
    height: 74px;
}

.target-slot[data-shape="conch"]::before {
    -webkit-mask-image: url('assets/shells/konch-shell.svg');
    mask-image: url('assets/shells/konch-shell.svg');
    -webkit-mask-size: contain;
    mask-size: contain;
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    -webkit-mask-position: center;
    mask-position: center;
    border: none;
    background: linear-gradient(180deg,
        rgba(255,165,0,0.3) 0%,
        rgba(255,218,185,0.5) 50%,
        rgba(255,140,0,0.4) 100%);
    box-shadow: inset 0 0 20px rgba(255,165,0,0.3);
}

/* Spiral target - uses cowrie shell silhouette */
.target-slot[data-shape="spiral"] {
    width: 63px;
    height: 80px;
}

.target-slot[data-shape="spiral"]::before {
    -webkit-mask-image: url('assets/shells/cowrie-shell.svg');
    mask-image: url('assets/shells/cowrie-shell.svg');
    -webkit-mask-size: contain;
    mask-size: contain;
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    -webkit-mask-position: center;
    mask-position: center;
    border: none;
    background: linear-gradient(180deg,
        rgba(138,43,226,0.3) 0%,
        rgba(230,230,250,0.5) 50%,
        rgba(148,0,211,0.4) 100%);
    box-shadow: inset 0 0 20px rgba(138,43,226,0.3);
}

/* Pearl target - uses pearl shell silhouette */
.target-slot[data-shape="pearl"] {
    width: 80px;
    height: 80px;
}

.target-slot[data-shape="pearl"]::before {
    -webkit-mask-image: url('assets/shells/shell-pearl.svg');
    mask-image: url('assets/shells/shell-pearl.svg');
    -webkit-mask-size: contain;
    mask-size: contain;
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    -webkit-mask-position: center;
    mask-position: center;
    border: none;
    background: linear-gradient(180deg,
        rgba(255,215,0,0.3) 0%,
        rgba(255,250,205,0.5) 50%,
        rgba(218,165,32,0.4) 100%);
    box-shadow: inset 0 0 20px rgba(255,215,0,0.3);
}

/* Hover/touch feedback for better kid interaction */
.target-slot:hover::before,
.target-slot:active::before {
    background: linear-gradient(135deg, rgba(255,182,193,0.7) 0%, rgba(255,105,180,0.6) 100%);
    transform: scale(1.1);
}

.target-slot:hover,
.target-slot:active {
    transform: scale(1.1);
}

.target-slot.matched::before {
    animation: target-flash-fill 0.6s ease-out;
    background: linear-gradient(135deg, rgba(50,205,50,0.6) 0%, rgba(144,238,144,0.7) 100%);
}

/* Locked/grayed state for slots not yet unlocked */
.target-slot.locked {
    filter: grayscale(1) opacity(0.35);
    pointer-events: none;
    cursor: default;
}

.target-slot.locked::before {
    background: rgba(150, 150, 150, 0.3) !important;
    box-shadow: none !important;
}

/* Unlock animation when shell type is unlocked */
.target-slot.unlocking {
    animation: slot-unlock 0.6s ease-out forwards;
}

@keyframes slot-unlock {
    0% {
        filter: grayscale(1) opacity(0.35);
        transform: scale(0.8);
    }
    50% {
        filter: grayscale(0) opacity(1);
        transform: scale(1.15);
    }
    100% {
        filter: none;
        transform: scale(1);
    }
}

@keyframes target-flash-fill {
    0%, 100% { box-shadow: inset 0 0 20px rgba(50, 205, 50, 0.3); }
    50% { box-shadow: inset 0 0 40px rgba(50, 205, 50, 0.8), 0 0 30px rgba(50, 205, 50, 0.6); }
}

/* Visual hint - pulses correct target when child is carrying a shell */
.target-slot.hint-active {
    animation: target-hint-pulse 1s ease-in-out infinite;
}

.target-slot.hint-active::before {
    box-shadow: 0 0 20px rgba(50, 205, 50, 0.6),
                inset 0 0 15px rgba(50, 205, 50, 0.3);
    background: linear-gradient(135deg, rgba(144,238,144,0.5) 0%, rgba(50,205,50,0.4) 100%);
}

@keyframes target-hint-pulse {
    0%, 100% {
        transform: scale(1);
        filter: brightness(1);
    }
    50% {
        transform: scale(1.08);
        filter: brightness(1.15);
    }
}

.match-progress {
    text-align: center;
    padding-bottom: 8px;
    border-bottom: 2px solid rgba(255, 105, 180, 0.2);
}

.progress-shells {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 8px;
    justify-items: center;
    margin-bottom: 4px;
}

.progress-shell {
    width: 22px;
    height: 22px;
    background: rgba(180, 180, 180, 0.4);
    -webkit-mask-image: url('assets/shells/cowrie-shell.svg');
    mask-image: url('assets/shells/cowrie-shell.svg');
    -webkit-mask-size: contain;
    mask-size: contain;
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    transition: background 0.3s ease, transform 0.3s ease;
}

.progress-shell.filled {
    background: linear-gradient(135deg, #FF69B4 0%, #FF1493 100%);
    animation: shell-fill 0.4s ease-out;
}

@keyframes shell-fill {
    0% { transform: scale(0.5); opacity: 0.5; }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); opacity: 1; }
}

.progress-count {
    font-size: 0.9rem;
    color: #FF1493;
    font-weight: bold;
    text-align: center;
}

/* Target icon for match panel header */
.target-icon {
    width: 30px;
    height: 30px;
    margin: 0 auto 8px;
}

.shell-target-icon::before {
    content: '';
    display: block;
    width: 100%;
    height: 100%;
    background: #FF69B4;
    -webkit-mask-image: url('assets/shells/clam-shell.svg');
    mask-image: url('assets/shells/clam-shell.svg');
    -webkit-mask-size: contain;
    mask-size: contain;
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
}

/* 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 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);
    }
}

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

.shell.shell-conch.wrong-match {
    animation: wrong-shake 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); }
}

/* 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%);
    z-index: 50;
    animation: carried-bob 0.6s ease-in-out infinite;
    filter: drop-shadow(2px 3px 4px rgba(0,0,0,0.3));
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}

/* Carried shell backgrounds for each type */
.carried-shell.shell-scallop {
    width: 35px;
    height: 35px;
    background-image: url('assets/shells/clam-shell.svg');
}

.carried-shell.shell-conch {
    width: 35px;
    height: 35px;
    background-image: url('assets/shells/konch-shell.svg');
}

.carried-shell.shell-spiral {
    width: 32px;
    height: 32px;
    background-image: url('assets/shells/cowrie-shell.svg');
}

.carried-shell.shell-pearl {
    width: 38px;
    height: 38px;
    background-image: url('assets/shells/shell-pearl.svg');
}

@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.6);
    pointer-events: none;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}

/* Settled shell backgrounds for each type */
.settled-shell.shell-scallop {
    width: 38px;
    height: 38px;
    background-image: url('assets/shells/clam-shell.svg');
}

.settled-shell.shell-conch {
    width: 36px;
    height: 36px;
    background-image: url('assets/shells/konch-shell.svg');
}

.settled-shell.shell-spiral {
    width: 34px;
    height: 34px;
    background-image: url('assets/shells/cowrie-shell.svg');
}

.settled-shell.shell-pearl {
    width: 40px;
    height: 40px;
    background-image: url('assets/shells/shell-pearl.svg');
}

@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); }
}
*/

/* Unicorn Splash Jump Animation */
.unicorn-character.splash-jumping {
    animation: splash-jump 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
    z-index: 150;
}

@keyframes splash-jump {
    0% {
        transform: translateX(-50%) translateY(0) rotate(0deg);
    }
    30% {
        transform: translateX(-50%) translateY(-80px) rotate(-10deg);
    }
    50% {
        transform: translateX(-50%) translateY(-100px) rotate(-5deg);
    }
    70% {
        transform: translateX(-50%) translateY(-60px) rotate(5deg);
    }
    100% {
        transform: translateX(-50%) translateY(0) rotate(0deg);
    }
}

/* Unicorn in water after splash */
.unicorn-character.in-water {
    animation: unicorn-in-water 0.5s ease-out forwards;
}

@keyframes unicorn-in-water {
    0% {
        transform: translateX(-50%) translateY(20px) scale(1.1);
    }
    100% {
        transform: translateX(-50%) translateY(0) scale(1);
    }
}

/* Splashing state glow */
.unicorn-character.splashing {
    filter: drop-shadow(0 0 20px rgba(72, 202, 228, 0.8))
            drop-shadow(0 0 40px rgba(0, 191, 255, 0.5));
}

/* Big Splash Win Celebration */
.big-splash-drop {
    position: absolute;
    width: var(--size, 12px);
    height: var(--size, 12px);
    background: radial-gradient(ellipse at 30% 30%,
        rgba(255,255,255,0.9) 0%,
        rgba(135,206,235,0.8) 40%,
        rgba(0,119,182,0.7) 100%);
    border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
    pointer-events: none;
    z-index: 100;
    animation: big-splash-drop var(--duration, 1.2s) ease-out forwards;
}

@keyframes big-splash-drop {
    0% {
        transform: translate(0, 0) scale(1) rotate(0deg);
        opacity: 1;
    }
    30% {
        transform: translate(var(--tx), calc(var(--ty) * 0.5)) scale(1.2) rotate(90deg);
        opacity: 1;
    }
    60% {
        transform: translate(calc(var(--tx) * 1.5), var(--ty)) scale(0.9) rotate(180deg);
        opacity: 0.8;
    }
    100% {
        transform: translate(calc(var(--tx) * 2), calc(var(--ty) * 0.7)) scale(0.3) rotate(360deg);
        opacity: 0;
    }
}

/* Swim splash trail */
.swim-splash {
    position: absolute;
    width: 30px;
    height: 15px;
    background: radial-gradient(ellipse at center,
        rgba(255,255,255,0.6) 0%,
        rgba(135,206,235,0.4) 50%,
        transparent 70%);
    border-radius: 50%;
    pointer-events: none;
    z-index: 99;
    animation: swim-splash-fade 0.6s ease-out forwards;
}

@keyframes swim-splash-fade {
    0% {
        transform: scale(0.5);
        opacity: 1;
    }
    50% {
        transform: scale(1.2);
        opacity: 0.6;
    }
    100% {
        transform: scale(1.5);
        opacity: 0;
    }
}

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

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

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

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

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

    /* Mobile touch padding - slightly smaller but still forgiving */
    .target-slot {
        padding: 12px;
        margin: -12px;
    }

    .progress-shell {
        width: 14px;
        height: 14px;
    }

    .progress-count {
        font-size: 0.8rem;
    }
}

/* 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;
    z-index: 50;
}

/* Central water column burst */
.splash-column {
    position: absolute;
    width: 40px;
    height: 80px;
    left: 50%;
    bottom: 0;
    transform: translateX(-50%);
    background: linear-gradient(180deg,
        rgba(255,255,255,0.9) 0%,
        rgba(135,206,250,0.7) 30%,
        rgba(0,191,255,0.5) 60%,
        transparent 100%);
    border-radius: 50% 50% 0 0;
    animation: splash-column 0.6s ease-out forwards;
}

@keyframes splash-column {
    0% {
        height: 0;
        opacity: 1;
        transform: translateX(-50%) scaleX(0.5);
    }
    40% {
        height: 120px;
        opacity: 1;
        transform: translateX(-50%) scaleX(1.2);
    }
    100% {
        height: 60px;
        opacity: 0;
        transform: translateX(-50%) scaleX(0.8);
    }
}

/* Mega splash column for big splashes */
.splash-column.mega {
    width: 70px;
    animation: mega-splash-column 0.9s ease-out forwards;
}

@keyframes mega-splash-column {
    0% {
        height: 0;
        opacity: 1;
        transform: translateX(-50%) scaleX(0.3);
    }
    25% {
        height: 200px;
        opacity: 1;
        transform: translateX(-50%) scaleX(1.5);
    }
    50% {
        height: 180px;
        opacity: 1;
        transform: translateX(-50%) scaleX(1.2);
    }
    100% {
        height: 80px;
        opacity: 0;
        transform: translateX(-50%) scaleX(0.6);
    }
}

/* Water droplets */
.splash-drop {
    position: absolute;
    width: var(--size, 10px);
    height: var(--size, 10px);
    background: radial-gradient(ellipse at 30% 30%,
        rgba(255,255,255,0.95) 0%,
        rgba(135,206,250,0.85) 25%,
        rgba(0,191,255,0.7) 50%,
        rgba(0,139,139,0.5) 100%);
    border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
    animation: splash-drop var(--duration, 1s) cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
    animation-delay: var(--delay, 0s);
    box-shadow:
        inset 2px 2px 4px rgba(255,255,255,0.9),
        0 2px 6px rgba(0,139,139,0.4);
}

@keyframes splash-drop {
    0% {
        transform: translate(0, 0) scale(0.3) rotate(0deg);
        opacity: 1;
    }
    20% {
        transform: translate(calc(var(--tx) * 0.3), calc(var(--ty) * 0.5)) scale(1.1) rotate(30deg);
        opacity: 1;
    }
    60% {
        transform: translate(calc(var(--tx) * 0.8), calc(var(--ty) * 0.9)) scale(0.9) rotate(60deg);
        opacity: 0.8;
    }
    100% {
        transform: translate(var(--tx), calc(var(--ty) + 30px)) scale(0.2) rotate(90deg);
        opacity: 0;
    }
}

/* Expanding wave ripples */
.splash-ripple {
    position: absolute;
    left: 50%;
    bottom: 0;
    width: 20px;
    height: 10px;
    border: 3px solid rgba(255,255,255,0.7);
    border-radius: 50%;
    transform: translateX(-50%);
    animation: splash-ripple var(--duration, 1s) ease-out forwards;
    animation-delay: var(--delay, 0s);
}

@keyframes splash-ripple {
    0% {
        width: 20px;
        height: 10px;
        opacity: 1;
        border-width: 4px;
    }
    100% {
        width: 200px;
        height: 60px;
        opacity: 0;
        border-width: 1px;
    }
}

/* Foam/mist cloud */
.splash-foam {
    position: absolute;
    left: 50%;
    bottom: 10px;
    transform: translateX(-50%);
    width: 80px;
    height: 40px;
    background: radial-gradient(ellipse at center,
        rgba(255,255,255,0.8) 0%,
        rgba(255,255,255,0.5) 40%,
        transparent 70%);
    border-radius: 50%;
    animation: splash-foam 0.8s ease-out forwards;
}

@keyframes splash-foam {
    0% {
        width: 30px;
        height: 15px;
        opacity: 1;
    }
    50% {
        width: 120px;
        height: 50px;
        opacity: 0.9;
    }
    100% {
        width: 180px;
        height: 70px;
        opacity: 0;
    }
}

/* Secondary spray drops (smaller, faster) */
.splash-spray {
    position: absolute;
    width: var(--size, 5px);
    height: var(--size, 5px);
    background: radial-gradient(circle at 30% 30%,
        rgba(255,255,255,0.9) 0%,
        rgba(200,230,255,0.6) 100%);
    border-radius: 50%;
    animation: splash-spray var(--duration, 0.6s) ease-out forwards;
    animation-delay: var(--delay, 0s);
}

@keyframes splash-spray {
    0% {
        transform: translate(0, 0) scale(1);
        opacity: 1;
    }
    100% {
        transform: translate(var(--tx), var(--ty)) scale(0.3);
        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;
        grid-template-columns: repeat(2, 1fr);
    }

    .color-btn {
        width: 38px;
        height: 38px;
    }

    .panel-icon-svg {
        width: 28px;
        height: 28px;
    }

    .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;
    }

    /* Icon button responsive */
    .btn-castle, .btn-splash {
        width: 65px;
        height: 65px;
    }

    .castle-icon, .splash-icon {
        width: 40px;
        height: 40px;
    }

    .castle-icon::before {
        width: 32px;
        height: 18px;
    }

    .castle-icon::after {
        width: 20px;
        height: 20px;
    }

    /* Shell responsive */
    .shell {
        width: 75px;
        height: 65px;
    }

    .shell.shell-conch {
        width: 69px;
        height: 69px;
    }

    .shell.shell-spiral {
        width: 58px;
        height: 73px;
    }

    /* Sea creature responsive */
    .sea-creature.shark {
        width: 70px;
        height: 35px;
    }

    .sea-creature.dolphin {
        width: 65px;
        height: 32px;
    }

    .sea-creature.shark::after {
        width: 20px;
        height: 24px;
        top: -16px;
    }

    .sea-creature.dolphin .fin {
        width: 16px;
        height: 18px;
        top: -12px;
    }

    /* Giant crab responsive */
    .giant-crab {
        width: 90px;
        height: 60px;
    }

    .giant-crab .crab-body {
        width: 60px;
        height: 42px;
        left: 15px;
        top: 12px;
    }

    .giant-crab .crab-eye {
        width: 10px;
        height: 16px;
    }

    .giant-crab .crab-eye.left { left: 26px; }
    .giant-crab .crab-eye.right { left: 52px; }

    .giant-crab .crab-claw.left { left: -10px; top: 20px; }
    .giant-crab .crab-claw.right { right: -10px; top: 20px; }

    .giant-crab .claw-arm {
        width: 22px;
        height: 10px;
    }

    .giant-crab .claw-pincer {
        left: 16px;
        top: -6px;
        width: 20px;
        height: 22px;
    }

    .giant-crab .crab-leg {
        width: 26px;
        height: 5px;
    }

    .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;
    }
}

/* ============================================
   PROGRESSION SYSTEM CSS
   ============================================ */

/* Phase 3: Tunnel Portal and Crab Digging */
.tunnel-portal {
    position: absolute;
    width: 120px;
    height: 120px;
    cursor: pointer;
    z-index: 50;
    animation: portal-appear 0.5s ease-out;
}

@keyframes portal-appear {
    from {
        opacity: 0;
        transform: translateX(-50%) scale(0.5);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) scale(1);
    }
}

.tunnel-hole {
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at center,
        rgba(0, 0, 0, 0.9) 0%,
        rgba(50, 30, 20, 0.8) 40%,
        transparent 70%);
    border-radius: 50%;
    animation: tunnel-pulse 2s ease-in-out infinite;
}

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

.tunnel-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80%;
    height: 80%;
    background: radial-gradient(circle at center,
        rgba(255, 215, 0, 0.3),
        rgba(255, 105, 180, 0.2),
        transparent);
    border-radius: 50%;
    animation: tunnel-glow 1.5s ease-in-out infinite alternate;
}

@keyframes tunnel-glow {
    from { opacity: 0.5; transform: translate(-50%, -50%) scale(0.8); }
    to { opacity: 1; transform: translate(-50%, -50%) scale(1.2); }
}

.tunnel-label {
    position: absolute;
    bottom: -30px;
    left: 50%;
    transform: translateX(-50%);
    color: #FFD700;
    font-size: 1rem;
    font-weight: bold;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.8);
    white-space: nowrap;
    animation: label-bounce 0.5s ease-out 0.5s both;
}

@keyframes label-bounce {
    0% { opacity: 0; transform: translateX(-50%) translateY(-10px); }
    60% { transform: translateX(-50%) translateY(5px); }
    100% { opacity: 1; transform: translateX(-50%) translateY(0); }
}

.giant-crab.digging {
    animation: crab-dig 3s ease-in-out;
}

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

/* Phase 4: Wave Propagation and Sandcastle Knockdown */
.propagating-wave {
    position: absolute;
    width: 100px;
    height: 40px;
    background: linear-gradient(180deg,
        rgba(255,255,255,0.8) 0%,
        rgba(72,202,228,0.6) 50%,
        transparent 100%);
    border-radius: 50% 50% 0 0;
    transform: translateX(-50%);
    opacity: 0;
    z-index: 30;
}

.propagating-wave.spreading {
    animation: wave-spread 1.5s ease-out forwards;
}

@keyframes wave-spread {
    0% {
        width: 100px;
        opacity: 0.8;
        transform: translateX(-50%) scaleY(1);
    }
    50% {
        width: 400px;
        opacity: 0.6;
        transform: translateX(-50%) scaleY(0.8);
    }
    100% {
        width: 100%;
        opacity: 0;
        transform: translateX(-50%) scaleY(0.3);
    }
}

.castle-piece.falling {
    animation: castle-fall 0.8s ease-in forwards;
    animation-delay: var(--fall-delay, 0s);
}

@keyframes castle-fall {
    0% {
        transform: translateY(0) rotate(0deg);
        opacity: 1;
    }
    100% {
        transform: translateY(100px) translateX(calc(30px * var(--fall-direction, 1))) rotate(calc(45deg * var(--fall-direction, 1)));
        opacity: 0;
    }
}

/* Phase 5: Locked Color Buttons */
.color-btn.locked {
    background: #555 !important;
    cursor: not-allowed;
    opacity: 0.6;
    position: relative;
}

.color-btn.locked .lock-icon {
    font-size: 16px;
    display: block;
}

.color-btn.locked:hover {
    transform: none;
    box-shadow: none;
}

/* Phase 6: Shell Prestige Visual Effects (mask-based shells) */

/* Rainbow prestige - animated rainbow gradient */
.shell.prestige-rainbow {
    animation: rainbow-shimmer 2s linear infinite;
}

@keyframes rainbow-shimmer {
    0% {
        background: linear-gradient(135deg, #FF6B6B 0%, #4ECDC4 50%, #45B7D1 100%);
    }
    25% {
        background: linear-gradient(135deg, #96CEB4 0%, #FFEAA7 50%, #DDA0DD 100%);
    }
    50% {
        background: linear-gradient(135deg, #74b9ff 0%, #a29bfe 50%, #fd79a8 100%);
    }
    75% {
        background: linear-gradient(135deg, #fdcb6e 0%, #e17055 50%, #00cec9 100%);
    }
    100% {
        background: linear-gradient(135deg, #FF6B6B 0%, #4ECDC4 50%, #45B7D1 100%);
    }
}

/* Silver prestige - metallic silver gradient */
.shell.prestige-silver {
    background: linear-gradient(135deg, #E8E8E8 0%, #C0C0C0 30%, #A8A8A8 50%, #D0D0D0 70%, #F5F5F5 100%) !important;
    position: relative;
}

/* Gold prestige - metallic gold gradient */
.shell.prestige-gold {
    background: linear-gradient(135deg, #FFF8DC 0%, #FFD700 30%, #DAA520 50%, #FFD700 70%, #FFFACD 100%) !important;
    position: relative;
    box-shadow: 0 0 10px rgba(255, 215, 0, 0.6);
}

/* Phase 7: Victory Screen */
.victory-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at center,
        rgba(255, 215, 0, 0.95) 0%,
        rgba(255, 105, 180, 0.95) 50%,
        rgba(138, 43, 226, 0.95) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    animation: victory-fade-in 1s ease-out;
}

@keyframes victory-fade-in {
    from { opacity: 0; }
    to { opacity: 1; }
}

.victory-content {
    text-align: center;
    padding: 40px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 30px;
    backdrop-filter: blur(10px);
    max-width: 600px;
}

.victory-title {
    font-size: 4em;
    color: #FFD700;
    text-shadow: 3px 3px 0 #FF69B4, 6px 6px 0 #9400D3;
    animation: victory-bounce 0.5s ease infinite alternate;
    margin: 0 0 20px 0;
}

@keyframes victory-bounce {
    from { transform: scale(1) rotate(-2deg); }
    to { transform: scale(1.1) rotate(2deg); }
}

.victory-unicorn {
    width: 200px;
    height: 180px;
    margin: 0 auto 20px;
}

.victory-message {
    font-size: 1.5em;
    color: white;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
    margin: 20px 0;
}

.victory-stats {
    background: rgba(255, 255, 255, 0.3);
    padding: 20px;
    border-radius: 15px;
    margin: 20px 0;
}

.victory-stats p {
    margin: 10px 0;
    font-size: 1.2em;
    color: white;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
}

.victory-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
    margin-top: 30px;
}

.victory-buttons .btn {
    padding: 15px 30px;
    font-size: 1.2em;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    border-radius: 15px;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
}

.victory-buttons .btn:hover {
    transform: scale(1.1);
    box-shadow: 0 10px 25px rgba(0,0,0,0.3);
}

.confetti {
    position: absolute;
    width: 10px;
    height: 10px;
    background-color: #FFD700;
    animation: confetti-fall 3s linear infinite;
}

@keyframes confetti-fall {
    0% {
        top: -10%;
        transform: translateX(0) rotateZ(0deg);
    }
    100% {
        top: 110%;
        transform: translateX(100px) rotateZ(360deg);
    }
}

/* Unlock Modal */
.unlock-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    animation: fade-in 0.3s ease-out;
}

@keyframes fade-in {
    from { opacity: 0; }
    to { opacity: 1; }
}

.unlock-modal-content {
    background: linear-gradient(135deg, #FFD700 0%, #FF69B4 50%, #00FFFF 100%);
    padding: 40px;
    border-radius: 30px;
    text-align: center;
    max-width: 400px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
    animation: pop-in 0.4s ease-out;
}

@keyframes pop-in {
    0% { transform: scale(0.5); opacity: 0; }
    70% { transform: scale(1.1); }
    100% { transform: scale(1); opacity: 1; }
}

.unlock-title {
    font-size: 2em;
    color: white;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    margin: 0 0 20px 0;
}

.unlock-item {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    width: 120px;
    height: 120px;
    margin: 0 auto 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.unlock-name {
    font-size: 1.5em;
    color: white;
    margin: 0 0 10px 0;
}

.unlock-description {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.1em;
    margin: 0 0 20px 0;
}
