/* Memory Game Styles (Sadness Swamp) */
.memory-game {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 20px;
}

.rain-container {
    position: relative;
    width: 600px;
    height: 400px;
    background: linear-gradient(180deg, #667eea 0%, #a0a0ff 100%);
    border-radius: 20px;
    overflow: hidden;
    cursor: none;
}

.lily-pad {
    position: absolute;
    bottom: 20px;
    width: 80px;
    height: 60px;
    background: radial-gradient(circle, #90EE90 0%, #228B22 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 30px;
    transition: left 0.1s ease;
}

.lily-pad::after {
    content: '🍃';
    position: absolute;
}

.teardrop {
    position: absolute;
    width: 20px;
    height: 25px;
    background: linear-gradient(180deg, rgba(135, 206, 250, 0.8) 0%, rgba(100, 149, 237, 0.8) 100%);
    border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
    animation: fall linear;
    top: -30px;
}

@keyframes fall {
    to {
        transform: translateY(450px);
    }
}

.memory-flowers {
    position: absolute;
    bottom: 0;
    width: 100%;
    height: 100px;
    pointer-events: none;
}

.memory-flower {
    position: absolute;
    font-size: 30px;
    animation: bloom 0.5s ease, sway 3s ease-in-out infinite;
}

@keyframes bloom {
    0% { transform: scale(0) rotate(0deg); }
    50% { transform: scale(1.3) rotate(180deg); }
    100% { transform: scale(1) rotate(360deg); }
}

@keyframes sway {
    0%, 100% { transform: translateX(0) rotate(-5deg); }
    50% { transform: translateX(10px) rotate(5deg); }
}

.score-display {
    font-size: 20px;
    font-weight: 600;
    color: white;
    background: rgba(0, 0, 0, 0.3);
    padding: 10px 20px;
    border-radius: 20px;
}

/* Lantern Game Styles (Fear Forest) */
.lantern-game {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 20px;
}

.dark-forest {
    position: relative;
    width: 600px;
    height: 400px;
    background: radial-gradient(circle at center, #1a1a2e 0%, #0a0a15 100%);
    border-radius: 20px;
    overflow: hidden;
    cursor: none;
}

.lantern-light {
    position: absolute;
    width: 150px;
    height: 150px;
    background: radial-gradient(circle, 
        rgba(255, 220, 100, 0.8) 0%, 
        rgba(255, 200, 50, 0.4) 40%, 
        transparent 70%);
    border-radius: 50%;
    pointer-events: none;
    transform: translate(-50%, -50%);
    box-shadow: 0 0 100px rgba(255, 200, 50, 0.3);
}

.shadow-object {
    position: absolute;
    width: 60px;
    height: 60px;
    text-align: center;
    transition: all 0.5s ease;
}

.scary-shadow {
    font-size: 40px;
    filter: blur(2px);
    opacity: 0.8;
    animation: spooky 2s ease-in-out infinite;
}

@keyframes spooky {
    0%, 100% { transform: scale(1) rotate(-5deg); }
    50% { transform: scale(1.1) rotate(5deg); }
}

.real-object {
    font-size: 35px;
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
}

.object-label {
    position: absolute;
    bottom: -20px;
    left: 50%;
    transform: translateX(-50%);
    color: white;
    font-size: 12px;
    background: rgba(0, 0, 0, 0.5);
    padding: 2px 8px;
    border-radius: 10px;
    white-space: nowrap;
}

.shadow-object.revealed .scary-shadow {
    animation: fadeOut 0.5s forwards;
}

.shadow-object.revealed .real-object {
    animation: revealObject 0.5s forwards;
}

@keyframes fadeOut {
    to { opacity: 0; transform: scale(0.5); }
}

@keyframes revealObject {
    0% { opacity: 0; transform: translateX(-50%) scale(0); }
    100% { opacity: 1; transform: translateX(-50%) scale(1); }
}

.revealed-count {
    font-size: 20px;
    font-weight: 600;
    color: white;
    background: rgba(0, 0, 0, 0.3);
    padding: 10px 20px;
    border-radius: 20px;
}

/* Joy Spreading Game Styles (Happiness Hills) */
.spreading-game {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 20px;
}

.hills-container {
    position: relative;
    width: 600px;
    height: 400px;
    background: linear-gradient(180deg, #87CEEB 0%, #98FB98 100%);
    border-radius: 20px;
    overflow: hidden;
}

.joy-source {
    position: absolute;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 60px;
    cursor: pointer;
    animation: sunPulse 2s ease-in-out infinite;
    filter: drop-shadow(0 0 20px rgba(255, 200, 0, 0.5));
}

@keyframes sunPulse {
    0%, 100% { transform: translateX(-50%) scale(1); }
    50% { transform: translateX(-50%) scale(1.1); }
}

.joy-source:active {
    transform: translateX(-50%) scale(0.95);
}

.flower-bud {
    position: absolute;
    font-size: 30px;
    transition: all 0.5s ease;
}

.flower-bud.bloomed {
    animation: bloomFlower 0.5s ease;
    filter: drop-shadow(0 0 10px rgba(255, 100, 200, 0.5));
}

@keyframes bloomFlower {
    0% { transform: scale(1) rotate(0deg); }
    50% { transform: scale(1.3) rotate(180deg); }
    100% { transform: scale(1) rotate(360deg); }
}

.joy-spark {
    position: absolute;
    font-size: 25px;
    cursor: grab;
    transition: opacity 0.5s;
    animation: sparkle 0.5s ease infinite;
    z-index: 10;
}

@keyframes sparkle {
    0%, 100% { transform: scale(1) rotate(0deg); }
    50% { transform: scale(1.2) rotate(180deg); }
}

.flowers-bloomed {
    font-size: 20px;
    font-weight: 600;
    color: white;
    background: rgba(0, 0, 0, 0.3);
    padding: 10px 20px;
    border-radius: 20px;
}

/* River Steering Game Styles (Excitement Rapids) */
.steering-game {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 20px;
}

.river {
    position: relative;
    width: 600px;
    height: 400px;
    background: linear-gradient(180deg, #4FC3F7 0%, #1976D2 100%);
    border-radius: 20px;
    overflow: hidden;
    animation: riverFlow 3s linear infinite;
}

@keyframes riverFlow {
    0% { background-position: 0 0; }
    100% { background-position: 0 100px; }
}

.boat {
    position: absolute;
    font-size: 35px;
    transition: all 0.2s ease;
    filter: drop-shadow(0 2px 5px rgba(0, 0, 0, 0.3));
}

.calm-ring {
    position: absolute;
    font-size: 40px;
    color: rgba(255, 255, 255, 0.6);
    animation: ringPulse 2s ease-in-out infinite;
}

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

.calm-ring.passed {
    animation: ringSuccess 0.5s ease;
}

@keyframes ringSuccess {
    0% { transform: scale(1); }
    50% { transform: scale(1.5); }
    100% { transform: scale(1); }
}

.river-rock {
    position: absolute;
    font-size: 30px;
    animation: bobbing 2s ease-in-out infinite;
}

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

.rings-passed {
    font-size: 20px;
    font-weight: 600;
    color: white;
    background: rgba(0, 0, 0, 0.3);
    padding: 10px 20px;
    border-radius: 20px;
}

/* Dolphin Harmony Game Styles (Tenderness Cove) */
.harmony-game {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 20px;
}

.ocean-scene {
    position: relative;
    width: 600px;
    height: 250px;
    background: linear-gradient(180deg, #E3F2FD 0%, #64B5F6 100%);
    border-radius: 20px;
    overflow: hidden;
}

.dolphin {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 60px;
    transition: all 0.3s ease;
}

@keyframes dolphin-jump {
    0%, 100% { transform: translate(-50%, -50%); }
    50% { transform: translate(-50%, -80%); }
}

@keyframes dolphin-flip {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    50% { transform: translate(-50%, -80%) rotate(360deg); }
    100% { transform: translate(-50%, -50%) rotate(720deg); }
}

.bubble-sequence {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
}

.color-bubble {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    animation: bubbleUp 0.5s ease;
    transition: opacity 0.5s;
    box-shadow: inset 0 0 10px rgba(255, 255, 255, 0.5);
}

@keyframes bubbleUp {
    0% { transform: translateY(20px) scale(0); opacity: 0; }
    50% { transform: translateY(-10px) scale(1.2); opacity: 1; }
    100% { transform: translateY(0) scale(1); opacity: 1; }
}

.shell-container {
    display: flex;
    gap: 20px;
    justify-content: center;
    margin-top: 20px;
}

.shell {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 30px;
    cursor: pointer;
    transition: transform 0.2s ease;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.shell:hover {
    transform: translateY(-3px);
}

.shell:active {
    transform: scale(0.95);
}

.melodies-played {
    font-size: 20px;
    font-weight: 600;
    color: white;
    background: rgba(0, 0, 0, 0.3);
    padding: 10px 20px;
    border-radius: 20px;
}

/* Common Mini-game Styles */

.hidden {
    display: none !important;
}

/* Try Again Message Styles */
.try-again-message {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 2000;
    animation: tryAgainAppear 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.try-again-content {
    background: linear-gradient(135deg, 
        rgba(255, 200, 100, 0.98) 0%, 
        rgba(255, 150, 50, 0.95) 100%);
    border-radius: 25px;
    padding: 30px;
    text-align: center;
    box-shadow: 
        0 10px 40px rgba(255, 150, 0, 0.3),
        0 20px 60px rgba(255, 100, 0, 0.2),
        inset 0 1px 3px rgba(255, 255, 255, 0.9);
    border: 2px solid rgba(255, 255, 255, 0.5);
    backdrop-filter: blur(10px);
    min-width: 300px;
}

.try-again-icon {
    font-size: 50px;
    margin-bottom: 15px;
    animation: rotateIcon 1s ease-in-out;
}

@keyframes rotateIcon {
    0% { transform: rotate(0deg) scale(0); }
    50% { transform: rotate(180deg) scale(1.2); }
    100% { transform: rotate(360deg) scale(1); }
}

.try-again-content p {
    font-size: 18px;
    color: #fff;
    font-weight: 600;
    margin-bottom: 10px;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.2);
}

.encouragement {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.9);
    font-style: italic;
    margin-top: 10px;
    animation: fadeIn 0.5s ease-out 0.3s both;
}

@keyframes tryAgainAppear {
    0% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.5) rotate(-10deg);
    }
    50% {
        transform: translate(-50%, -50%) scale(1.1) rotate(5deg);
    }
    100% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1) rotate(0deg);
    }
}

.try-again-message.fade-out {
    animation: tryAgainDisappear 0.5s ease-out forwards;
}

@keyframes tryAgainDisappear {
    to {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.8);
    }
}

/* Story Ending Styles */
.story-ending {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.story-container {
    background: linear-gradient(135deg, 
        rgba(255, 255, 255, 0.98) 0%, 
        rgba(240, 240, 255, 0.95) 100%);
    border-radius: 30px;
    padding: 40px;
    max-width: 700px;
    width: 90%;
    box-shadow: 
        0 10px 40px rgba(100, 100, 200, 0.3),
        0 20px 60px rgba(150, 100, 255, 0.2),
        inset 0 1px 3px rgba(255, 255, 255, 0.9);
    animation: storyAppear 0.8s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
    backdrop-filter: blur(10px);
}

@keyframes storyAppear {
    0% {
        transform: scale(0.3) rotate(10deg);
        opacity: 0;
    }
    50% {
        transform: scale(1.05) rotate(-2deg);
    }
    100% {
        transform: scale(1) rotate(0deg);
        opacity: 1;
    }
}

.story-title {
    color: #667eea;
    font-size: 36px;
    text-align: center;
    margin-bottom: 20px;
    font-weight: 700;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
    animation: titleGlow 2s ease-in-out infinite;
}

@keyframes titleGlow {
    0%, 100% {
        text-shadow: 
            2px 2px 4px rgba(0, 0, 0, 0.1),
            0 0 20px rgba(102, 126, 234, 0.3);
    }
    50% {
        text-shadow: 
            2px 2px 4px rgba(0, 0, 0, 0.1),
            0 0 30px rgba(102, 126, 234, 0.5);
    }
}

.story-content {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.story-text {
    font-size: 18px;
    line-height: 1.6;
    color: #333;
    text-align: center;
    animation: fadeInText 1s ease-out 0.3s both;
}

@keyframes fadeInText {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.lesson-box {
    background: linear-gradient(135deg, #ffeaa7 0%, #fdcb6e 100%);
    border-radius: 20px;
    padding: 20px;
    margin: 10px 0;
    box-shadow: 0 5px 15px rgba(253, 203, 110, 0.3);
    animation: fadeInText 1s ease-out 0.5s both;
}

.lesson-box h3 {
    color: #6c5ce7;
    font-size: 20px;
    margin-bottom: 10px;
    text-align: center;
}

.lesson-box p {
    color: #2d3436;
    font-size: 16px;
    line-height: 1.5;
    text-align: center;
}

.reward-display {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    margin: 20px 0;
    animation: rewardBounce 1s ease-out 0.7s both;
}

@keyframes rewardBounce {
    0% {
        transform: scale(0) rotate(180deg);
        opacity: 0;
    }
    50% {
        transform: scale(1.2) rotate(360deg);
    }
    100% {
        transform: scale(1) rotate(360deg);
        opacity: 1;
    }
}

.reward-text {
    font-size: 24px;
    font-weight: 600;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-align: center;
}

.charm-earned {
    font-size: 60px;
    animation: charmFloat 3s ease-in-out infinite;
    filter: drop-shadow(0 5px 15px rgba(0, 0, 0, 0.2));
}

@keyframes charmFloat {
    0%, 100% {
        transform: translateY(0) scale(1);
    }
    25% {
        transform: translateY(-10px) scale(1.1) rotate(5deg);
    }
    75% {
        transform: translateY(-10px) scale(1.1) rotate(-5deg);
    }
}

.continue-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 30px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    margin: 20px auto 0;
    display: block;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 
        0 4px 15px rgba(102, 126, 234, 0.3),
        inset 0 1px 2px rgba(255, 255, 255, 0.4);
    animation: fadeInText 1s ease-out 0.9s both;
}

.continue-btn:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 
        0 8px 25px rgba(102, 126, 234, 0.4),
        inset 0 1px 2px rgba(255, 255, 255, 0.4);
}

.continue-btn:active {
    transform: translateY(-1px) scale(0.98);
}

/* Celebration Effects */
.celebration-sparkle {
    position: absolute;
    font-size: 30px;
    animation: sparkleFloat 3s ease-out forwards;
    pointer-events: none;
}

@keyframes sparkleFloat {
    0% {
        transform: translateY(100vh) rotate(0deg);
        opacity: 1;
    }
    100% {
        transform: translateY(-100px) rotate(360deg);
        opacity: 0;
    }
}

.confetti {
    position: absolute;
    width: 10px;
    height: 10px;
    top: -10px;
    animation: confettiFall linear forwards;
    pointer-events: none;
}

@keyframes confettiFall {
    0% {
        transform: translateY(0) rotate(0deg);
        opacity: 1;
    }
    100% {
        transform: translateY(100vh) rotate(720deg);
        opacity: 0;
    }
}

/* Mobile responsiveness for story */
@media (max-width: 768px) {
    .story-container {
        padding: 30px 20px;
    }
    
    .story-title {
        font-size: 28px;
    }
    
    .story-text {
        font-size: 16px;
    }
    
    .reward-text {
        font-size: 20px;
    }
    
    .charm-earned {
        font-size: 50px;
    }
}

/* Innovative Instructions Panel */
.instructions-toggle {
    position: fixed;
    top: 50%;
    right: 20px;
    transform: translateY(-50%);
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, 
        rgba(102, 126, 234, 0.95) 0%, 
        rgba(118, 75, 162, 0.95) 100%);
    border: 3px solid rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(10px);
    box-shadow: 
        0 8px 25px rgba(102, 126, 234, 0.4),
        0 15px 35px rgba(118, 75, 162, 0.3),
        inset 0 1px 2px rgba(255, 255, 255, 0.3);
    cursor: pointer;
    z-index: 2500;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    animation: pulseGlow 3s ease-in-out infinite;
}

.instructions-toggle:hover {
    transform: translateY(-50%) scale(1.1);
    background: linear-gradient(135deg, 
        rgba(112, 136, 244, 0.98) 0%, 
        rgba(138, 95, 182, 0.98) 100%);
    box-shadow: 
        0 12px 35px rgba(102, 126, 234, 0.5),
        0 20px 45px rgba(118, 75, 162, 0.4),
        inset 0 1px 2px rgba(255, 255, 255, 0.4);
}

.instructions-toggle:active {
    transform: translateY(-50%) scale(1.05);
}

.toggle-icon {
    color: white;
    font-size: 28px;
    font-weight: bold;
    font-family: 'Fredoka', sans-serif;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

@keyframes pulseGlow {
    0%, 100% { 
        box-shadow: 
            0 8px 25px rgba(102, 126, 234, 0.4),
            0 15px 35px rgba(118, 75, 162, 0.3),
            inset 0 1px 2px rgba(255, 255, 255, 0.3);
    }
    50% { 
        box-shadow: 
            0 12px 35px rgba(102, 126, 234, 0.6),
            0 20px 45px rgba(118, 75, 162, 0.5),
            inset 0 1px 2px rgba(255, 255, 255, 0.4);
    }
}

.instructions-panel {
    position: fixed;
    top: 0;
    right: -420px;
    width: 400px;
    height: 100vh;
    background: linear-gradient(135deg, 
        rgba(102, 126, 234, 0.15) 0%, 
        rgba(118, 75, 162, 0.15) 50%,
        rgba(87, 100, 200, 0.15) 100%);
    backdrop-filter: blur(20px);
    border-left: 2px solid rgba(255, 255, 255, 0.2);
    box-shadow: 
        -10px 0 40px rgba(0, 0, 0, 0.2),
        inset 1px 0 2px rgba(255, 255, 255, 0.1);
    z-index: 2400;
    transition: right 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    overflow-y: auto;
}

.instructions-panel.show {
    right: 0;
}

.instructions-panel::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, 
        rgba(255, 255, 255, 0.1) 0%, 
        transparent 50%,
        rgba(255, 255, 255, 0.05) 100%);
    pointer-events: none;
}

.instructions-content {
    padding: 30px 25px;
    height: 100%;
    position: relative;
    z-index: 2;
}

.instructions-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 2px solid rgba(255, 255, 255, 0.2);
}

.instructions-header h3 {
    color: white;
    font-size: 24px;
    font-weight: 700;
    font-family: 'Fredoka', sans-serif;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    margin: 0;
    background: linear-gradient(45deg, #ffffff, #e3f2fd);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.close-instructions-btn {
    background: rgba(255, 255, 255, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 24px;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.close-instructions-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
    box-shadow: 0 4px 15px rgba(255, 255, 255, 0.3);
}

.instructions-body {
    color: white;
    line-height: 1.6;
    font-family: 'Fredoka', sans-serif;
    font-size: 16px;
}

.instruction-section {
    margin-bottom: 25px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(5px);
    animation: slideInRight 0.5s ease;
}

.instruction-section h4 {
    color: #ffeb3b;
    margin-bottom: 15px;
    font-size: 18px;
    font-weight: 600;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    gap: 8px;
}

.instruction-section p {
    margin-bottom: 10px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.instruction-step {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 15px;
    padding: 12px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    border-left: 3px solid #4fc3f7;
}

.instruction-step .step-number {
    background: linear-gradient(135deg, #4fc3f7, #29b6f6);
    color: white;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
    flex-shrink: 0;
    margin-top: 2px;
}

.instruction-step .step-text {
    flex: 1;
    font-size: 15px;
}

.instruction-emoji {
    font-size: 20px;
    margin-right: 5px;
}

.tip-box {
    background: linear-gradient(135deg, 
        rgba(255, 235, 59, 0.2) 0%, 
        rgba(255, 193, 7, 0.2) 100%);
    border: 2px solid rgba(255, 235, 59, 0.4);
    border-radius: 12px;
    padding: 15px;
    margin-top: 15px;
    backdrop-filter: blur(5px);
}

.tip-box .tip-icon {
    color: #ffeb3b;
    font-size: 18px;
    margin-right: 8px;
}

@keyframes slideInRight {
    from {
        transform: translateX(30px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Smooth scrollbar for instruction panel */
.instructions-panel::-webkit-scrollbar {
    width: 8px;
}

.instructions-panel::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
}

.instructions-panel::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 10px;
    transition: background 0.3s ease;
}

.instructions-panel::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.5);
}

/* Auto-show instruction panel hint for first-time users */
.instructions-toggle.pulse-hint {
    animation: pulseHint 2s ease-in-out 3;
}

@keyframes pulseHint {
    0%, 100% { 
        transform: translateY(-50%) scale(1);
        box-shadow: 
            0 8px 25px rgba(102, 126, 234, 0.4),
            0 15px 35px rgba(118, 75, 162, 0.3),
            inset 0 1px 2px rgba(255, 255, 255, 0.3);
    }
    50% { 
        transform: translateY(-50%) scale(1.2);
        box-shadow: 
            0 15px 40px rgba(102, 126, 234, 0.7),
            0 25px 55px rgba(118, 75, 162, 0.6),
            inset 0 1px 2px rgba(255, 255, 255, 0.5);
    }
}

/* Responsive design for instructions panel */
@media (max-width: 768px) {
    .instructions-toggle {
        right: 15px;
        width: 50px;
        height: 50px;
        top: 60%;
    }
    
    .toggle-icon {
        font-size: 22px;
    }
    
    .instructions-panel {
        width: 100vw;
        right: -100vw;
        border-left: none;
        border-top: 2px solid rgba(255, 255, 255, 0.2);
    }
    
    .instructions-content {
        padding: 20px 15px;
    }
    
    .instructions-header h3 {
        font-size: 20px;
    }
    
    .instruction-section {
        padding: 15px;
        margin-bottom: 20px;
    }
    
    .instructions-body {
        font-size: 14px;
    }
    
    .instruction-section h4 {
        font-size: 16px;
    }
    
    .instruction-step .step-text {
        font-size: 13px;
    }
}