* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif;
}

/* Remove vertical centering */
body {
    background: linear-gradient(135deg, #1a1a2e, #16213e);
    min-height: 100vh;
    color: #fff;
    display: block;       /* Instead of flex */
    padding-top: 0;
}

/* Optional: Reset iframe body margin from outside */
html, body {
    margin: 0;
    padding: 0;
}

/* Content Container */
.game-container {
    width: 90%;
    max-width: 1000px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 2rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    margin: 20px auto;   /* Adjust as needed */
}

.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.score-board {
    display: flex;
    gap: 2rem;
    font-size: 1.2rem;
}

.btn {
    padding: 0.4rem 0.8rem;
    border: none;
    border-radius: 8px;
    background: #4a90e2;
    color: white;
    font-size: 1rem;
    cursor: pointer;
    transition: transform 0.2s, background 0.2s;
}

.btn:hover {
    background: #357abd;
    transform: translateY(-2px);
}

.btn:disabled {
    background: #666;
    cursor: not-allowed;
    transform: none;
}

.game-area {
    height: 500px;
    position: relative;
    background: linear-gradient(180deg, #0f2027 0%, #2c5364 100%);
    border-radius: 20px;
    overflow: hidden;
    margin-bottom: 1rem;
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.37);
    border: 2px solid rgba(255,255,255,0.15);
    transition: box-shadow 0.3s;
}

.game-area::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: radial-gradient(circle at 70% 30%, rgba(0,119,255,0.15) 0%, transparent 70%);
    z-index: 1;
    pointer-events: none;
}

.water-level {
    position: absolute;
    left: 0;
    bottom: 0;
    width: 100%;
    height: 0%;
    background: linear-gradient(180deg, #00c6fb 0%, #005bea 100%);
    opacity: 0.6;
    border-radius: 0 0 24px 24px;
    z-index: 2;
    transition: height 0.6s cubic-bezier(0.4, 1.8, 0.6, 1);
    overflow: hidden;
}

.water-level::before,
.water-level::after {
    content: '';
    position: absolute;
    width: 200%;
    height: 200%;
    top: -50%;
    left: -50%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 30%, transparent 70%);
    animation: wave 4s infinite linear;
    mix-blend-mode: overlay;
    opacity: 0.2;
    pointer-events: none;
    z-index: 1;
}

.water-level::after {
    animation: wave 6s infinite linear reverse;
    opacity: 0.15;
}

@keyframes wave {
    0% {
        transform: translateX(0) translateY(0) rotate(0deg);
    }
    100% {
        transform: translateX(25%) translateY(10%) rotate(360deg);
    }
}



.water-overlay {
    position: absolute;
    left: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 3;
    background-image: url('https://static.vecteezy.com/system/resources/previews/024/290/137/original/aesthetic-wave-border-free-png.png');
    background-repeat: repeat-x;
    background-size: cover;
    background-position: bottom;
    opacity: 0.12;
    mix-blend-mode: screen;
    transition: opacity 0.5s ease;
}

#words-container {
    position: relative;
    height: 100%;
    z-index: 4;
}

.falling-word {
    position: absolute;
    color: #fff;
    font-size: 1.5rem;
    font-weight: 500;
    animation: fall 3s linear forwards;
    padding: 2px 6px;
    border-radius: 8px;
    background: linear-gradient(90deg, #00c6fb 0%, #005bea 100%);
    box-shadow: 0 2px 12px 0 #005bea55;
    text-shadow: 0 2px 8px #005bea99, 0 0 2px #fff;
    border: 2px solid rgba(255,255,255,0.15);
    letter-spacing: 1px;
    transition: background 0.2s;
}

@keyframes fall {
    0% {
        top: -20px;
        transform: translateY(0) rotate(0deg);
    }
    50% {
        transform: translateY(10px) rotate(2deg);
    }
    100% {
        top: 100%;
        transform: translateY(0) rotate(-2deg);
    }
}

.input-area {
    margin-top: 1rem;
    z-index: 5;
    position: relative;
}

#word-input {
    width: 100%;
    padding: 1.2rem;
    font-size: 1.2rem;
    border: none;
    border-radius: 12px;
    background: rgba(255,255,255,0.15);
    color: #fff;
    outline: none;
    box-shadow: 0 2px 8px 0 #005bea33;
    transition: background 0.2s, box-shadow 0.2s;
}

#word-input:focus {
    background: rgba(255,255,255,0.25);
    box-shadow: 0 4px 16px 0 #005bea55;
}

@keyframes waterFlow {
    0%, 100% {
        transform: translateX(-5px) translateY(2px);
    }
    50% {
        transform: translateX(5px) translateY(-2px);
    }
}

.ripple {
    position: absolute;
    border-radius: 50%;
    background: radial-gradient(
        circle,
        rgba(255, 255, 255, 0.8) 0%,
        rgba(255, 255, 255, 0.4) 40%,
        rgba(255, 255, 255, 0.2) 70%,
        transparent 100%
    );
    transform: scale(0);
    pointer-events: none;
    animation: ripple 1s cubic-bezier(0.4, 0, 0.2, 1);
}

#words-container {
    position: relative;
    height: 100%;
}

.input-area {
    margin-top: 1rem;
}

#word-input {
    width: 100%;
    padding: 1rem;
    font-size: 1.1rem;
    border: none;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    outline: none;
}

#word-input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.game-over {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.9);
    padding: 2rem;
    border-radius: 15px;
    text-align: center;
    z-index: 10;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.game-over h2 {
    color: #fff;
    margin-bottom: 1rem;
    font-size: 2rem;
}

.game-over .btn {
    margin-top: 1.5rem;
    background: #4a90e2;
    transition: all 0.3s ease;
}

.game-over .btn:hover {
    background: #357abd;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.hidden {
    display: none;
}

.correct {
    color: #4caf50;
}

.wrong {
    color: #f44336;
}