/* Ocean Background & Atmosphere */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* Bubble Animations */
.bubble {
    position: absolute;
    background: radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.8), rgba(255, 255, 255, 0.1));
    border-radius: 50%;
    opacity: 0.6;
    animation: bubble-rise 8s infinite ease-in;
}

.bubble-1 {
    width: 20px;
    height: 20px;
    left: 10%;
    animation-duration: 6s;
    animation-delay: 0s;
}

.bubble-2 {
    width: 15px;
    height: 15px;
    left: 30%;
    animation-duration: 8s;
    animation-delay: 2s;
}

.bubble-3 {
    width: 25px;
    height: 25px;
    left: 60%;
    animation-duration: 7s;
    animation-delay: 4s;
}

.bubble-4 {
    width: 18px;
    height: 18px;
    left: 80%;
    animation-duration: 9s;
    animation-delay: 1s;
}

.bubble-5 {
    width: 22px;
    height: 22px;
    left: 45%;
    animation-duration: 10s;
    animation-delay: 3s;
}

@keyframes bubble-rise {
    0% {
        bottom: -50px;
        transform: translateX(0) scale(1);
        opacity: 0;
    }
    10% {
        opacity: 0.6;
    }
    90% {
        opacity: 0.6;
    }
    100% {
        bottom: 110%;
        transform: translateX(30px) scale(1.2);
        opacity: 0;
    }
}

/* Shark Styling */
.shark-container {
    position: absolute;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: transform 0.1s linear;
    filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.3));
}

.shark-body {
    width: 80px;
    height: 50px;
    position: relative;
    animation: shark-swim 2s ease-in-out infinite;
}

.shark-svg {
    width: 100%;
    height: 100%;
    fill: #64748b;
    stroke: #334155;
    stroke-width: 2;
}

.shark-word {
    background: rgba(15, 23, 42, 0.9);
    border: 2px solid #06b6d4;
    border-radius: 12px;
    padding: 8px 16px;
    font-size: 1.25rem;
    font-weight: bold;
    color: #22d3ee;
    text-transform: uppercase;
    letter-spacing: 2px;
    box-shadow: 0 0 15px rgba(6, 182, 212, 0.3);
    white-space: nowrap;
    position: relative;
    overflow: hidden;
}

.shark-word::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(34, 211, 238, 0.2), transparent);
    animation: shimmer 2s infinite;
}

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

@keyframes shark-swim {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    25% { transform: translateY(-3px) rotate(-2deg); }
    75% { transform: translateY(3px) rotate(2deg); }
}

/* Explosion Effect */
.explosion {
    position: absolute;
    pointer-events: none;
    animation: explode 0.5s ease-out forwards;
}

@keyframes explode {
    0% {
        transform: scale(0);
        opacity: 1;
    }
    50% {
        transform: scale(1.5);
        opacity: 0.8;
    }
    100% {
        transform: scale(2);
        opacity: 0;
    }
}

.explosion-particle {
    position: absolute;
    width: 10px;
    height: 10px;
    background: #22d3ee;
    border-radius: 50%;
    animation: particle-fly 0.6s ease-out forwards;
}

@keyframes particle-fly {
    0% {
        transform: translate(0, 0) scale(1);
        opacity: 1;
    }
    100% {
        transform: translate(var(--tx), var(--ty)) scale(0);
        opacity: 0;
    }
}

/* Level Badge Animation */
.level-up-badge {
    animation: level-pop 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes level-pop {
    0% { transform: scale(0) rotate(-180deg); opacity: 0; }
    50% { transform: scale(1.2) rotate(10deg); }
    100% { transform: scale(1) rotate(0deg); opacity: 1; }
}

/* Input Glow Animation */
.input-glow {
    animation: input-pulse 0.3s ease-in-out;
}

@keyframes input-pulse {
    0%, 100% { box-shadow: 0 0 20px rgba(6, 182, 212, 0.5); }
    50% { box-shadow: 0 0 40px rgba(6, 182, 212, 0.8), 0 0 60px rgba(34, 211, 238, 0.4); }
}
/* Danger Warning */
.danger-zone {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 100px;
    background: linear-gradient(to right, rgba(239, 68, 68, 0.3), transparent);
    border-left: 4px solid rgba(239, 68, 68, 0.8);
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s;
}

.danger-zone.active {
    opacity: 1;
    animation: danger-pulse 1s infinite;
}

@keyframes danger-pulse {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 0.6; }
}

/* Vietnamese Translation Popup */
.translation-popup {
    position: absolute;
    background: linear-gradient(135deg, rgba(6, 182, 212, 0.95), rgba(59, 130, 246, 0.95));
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 16px;
    padding: 12px 20px;
    box-shadow: 0 10px 40px rgba(6, 182, 212, 0.5), 0 0 20px rgba(255, 255, 255, 0.2);
    z-index: 50;
    animation: translation-float 2.5s ease-out forwards;
    pointer-events: none;
    min-width: 150px;
    text-align: center;
    backdrop-filter: blur(10px);
}

.translation-popup .word-en {
    font-size: 1.1rem;
    font-weight: bold;
    color: white;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 4px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.translation-popup .word-vi {
    font-size: 0.95rem;
    color: #e0f2fe;
    font-weight: 500;
    line-height: 1.4;
    text-shadow: 0 1px 2px rgba(0,0,0,0.2);
}

@keyframes translation-float {
    0% {
        opacity: 0;
        transform: translate(-50%, 20px) scale(0.8);
    }
    15% {
        opacity: 1;
        transform: translate(-50%, 0) scale(1.05);
    }
    20% {
        transform: translate(-50%, -5px) scale(1);
    }
    80% {
        opacity: 1;
        transform: translate(-50%, -20px) scale(1);
    }
    100% {
        opacity: 0;
        transform: translate(-50%, -40px) scale(0.9);
    }
}

/* Responsive Adjustments for Translation */
@media (max-width: 768px) {
    .translation-popup {
        padding: 10px 16px;
        min-width: 120px;
        max-width: 200px;
    }
    
    .translation-popup .word-en {
        font-size: 1rem;
    }
    
    .translation-popup .word-vi {
        font-size: 0.85rem;
    }
}
/* Responsive Adjustments */
@media (max-width: 768px) {
    .shark-body {
        width: 60px;
        height: 40px;
    }
    
    .shark-word {
        font-size: 1rem;
        padding: 6px 12px;
    }
    
    #wordInput {
        font-size: 1.25rem;
        padding: 12px 16px;
    }
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #0f172a;
}

::-webkit-scrollbar-thumb {
    background: #0891b2;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #06b6d4;
}