body {
    margin: 0;
    padding: 0;
    background-color: #2e8b57;
    font-family: 'Poppins', sans-serif;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100vh;
    overflow: hidden;
}

#game-container {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 30px;
}

.score-board {
    padding: 10px 30px;
    background: white;
    border-radius: 10px;
    font-size: 20px;
    font-weight: bold;
    z-index: 10;
    box-shadow: 0 4px 6px rgba(0,0,0,0.3);
    margin-bottom: 10px;
}

#message {
    color: #4a90e2;
    margin-left: 10px;
}

#game-board {
    position: relative;
    width: 900px;
    height: 600px;
    background: repeating-linear-gradient(
        to right,
        #4CAF50,
        #4CAF50 60px,
        #45a049 60px,
        #45a049 120px
    );
    border: 5px solid white;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    overflow: hidden;
}

/* Soccer Stadium Lines */
.halfway-line {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    width: 5px;
    background-color: white;
    transform: translateX(-50%);
}

.center-circle {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 150px;
    height: 150px;
    border: 5px solid white;
    border-radius: 50%;
    transform: translate(-50%, -50%);
}

.penalty-area {
    position: absolute;
    top: 50%;
    width: 150px;
    height: 300px;
    border: 5px solid white;
    transform: translateY(-50%);
}

.penalty-area.left {
    left: 0;
    border-left: none;
}

.penalty-area.right {
    right: 0;
    border-right: none;
}

.goal-area {
    position: absolute;
    top: 50%;
    width: 60px;
    height: 150px;
    border: 5px solid white;
    transform: translateY(-50%);
    background-color: rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
}

.goal-area.left {
    left: -10px;
    border-left: none;
    border-radius: 0 10px 10px 0;
}

.goal-area.right {
    right: -10px;
    border-right: none;
    border-radius: 10px 0 0 10px;
    box-shadow: inset 0 0 20px rgba(255, 255, 255, 0.2);
}

.goal-net {
    width: 100%;
    height: 100%;
    background: 
        linear-gradient(90deg, rgba(255,255,255,.3) 1px, transparent 1px),
        linear-gradient(rgba(255,255,255,.3) 1px, transparent 1px);
    background-size: 8px 8px;
    opacity: 0.8;
}

#target-word-display {
    position: absolute;
    top: 50%;
    right: 70px;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.9);
    padding: 5px 15px;
    border-radius: 10px;
    border: 3px solid #4a90e2;
    font-size: 20px;
    font-weight: 900;
    color: #333;
    display: flex;
    gap: 5px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
    z-index: 10;
}

#korean-meaning-display {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0);
    background: rgba(255, 255, 255, 0.95);
    padding: 30px 60px;
    border-radius: 30px;
    border: 6px solid #4a90e2;
    font-size: 70px;
    font-weight: 900;
    color: #e67e22;
    box-shadow: 0 15px 50px rgba(0,0,0,0.6);
    z-index: 150;
    pointer-events: none;
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
    min-width: 300px;
}

#korean-meaning-display.show {
    transform: translate(-50%, -50%) scale(1);
}

/* Key Maker Controller */
#key-maker {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    background: #333;
    padding: 20px;
    border-radius: 20px;
    box-shadow: 0 10px 20px rgba(0,0,0,0.5);
    border: 4px solid #555;
}

.ctrl-row {
    display: flex;
    gap: 10px;
}

.ctrl-btn {
    width: 60px;
    height: 60px;
    background: #444;
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 24px;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 0 4px #222;
    transition: all 0.1s;
}

.ctrl-btn:active, .ctrl-btn.active {
    transform: translateY(2px);
    box-shadow: 0 2px #222;
    background: #666;
}

.push-btn {
    width: 100px;
    background: #e74c3c;
    font-size: 16px;
}

.push-btn:active, .push-btn.active {
    background: #ff7675;
}

#cat {
    position: absolute;
    font-size: 50px;
    user-select: none;
    z-index: 5;
    pointer-events: none;
    transform: translate(-50%, -50%);
    text-shadow: 2px 2px 5px rgba(0,0,0,0.5);
}

.bug {
    position: absolute;
    font-size: 35px;
    user-select: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    transform: translate(-50%, -50%);
    filter: drop-shadow(0 0 5px rgba(255, 255, 255, 0.5));
    transition: transform 0.2s;
}

.bug:hover {
    transform: translate(-50%, -50%) scale(1.1);
}

#goal-animation {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0);
    font-size: 100px;
    font-weight: 900;
    color: #f1c40f;
    text-shadow: 0 0 30px rgba(241, 196, 15, 1), 5px 5px 0 #e67e22;
    z-index: 100;
    pointer-events: none;
    transition: transform 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    background: rgba(255, 255, 255, 0.2);
    padding: 20px 50px;
    border-radius: 50px;
    backdrop-filter: blur(5px);
}

#goal-animation.show {
    transform: translate(-50%, -50%) scale(1);
}

.bug .letter {
    font-size: 18px;
    background: linear-gradient(135deg, #ffffff 0%, #f0f0f0 100%);
    border-radius: 50%;
    width: 28px;
    height: 28px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: 900;
    margin-top: -15px;
    border: 2px solid #333;
    z-index: 2;
    color: #333;
    box-shadow: 0 2px 4px rgba(0,0,0,0.3);
}
