:root {
    --primary-color: #dc2626;
    /* Red */
    --secondary-color: #ef4444;
    --accent-color: #facc15;
    --background-color: #1e293b;
    --text-color: #f8fafc;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    user-select: none;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--background-color);
    color: var(--text-color);
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

#game-container {
    width: 100%;
    max-width: 800px;
    height: 100vh;
    max-height: 600px;
    background-color: #0f172a;
    border-radius: 20px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: relative;
    border: 2px solid #334155;
}

#game-header {
    height: 60px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
    color: white;
    z-index: 10;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
}

.game-title {
    font-size: 1.5rem;
    font-weight: bold;
}

.icon-btn {
    background: transparent;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: white;
}

#game-area {
    flex: 1;
    display: flex;
    flex-direction: column;
    position: relative;
}

.word-stream {
    flex: 1;
    position: relative;
    overflow: hidden;
    background: radial-gradient(circle, #1e293b 0%, #0f172a 100%);
}

.falling-word {
    position: absolute;
    color: #facc15;
    font-size: 1.5rem;
    font-weight: bold;
    text-shadow: 0 0 5px #facc15;
    padding: 5px 10px;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 5px;
    white-space: nowrap;
}

.falling-word.matched {
    color: #22c55e;
    text-shadow: 0 0 10px #22c55e;
    transform: scale(1.2);
    transition: all 0.2s;
    opacity: 0;
}

.input-zone {
    height: 80px;
    background: #1e293b;
    display: flex;
    justify-content: center;
    align-items: center;
    border-top: 2px solid #334155;
}

#type-input {
    font-size: 1.5rem;
    padding: 10px;
    width: 300px;
    text-align: center;
    border-radius: 10px;
    border: 2px solid #475569;
    background: #334155;
    color: white;
    outline: none;
}

#type-input:focus {
    border-color: #facc15;
}

.score-board {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.5);
    padding: 10px;
    border-radius: 10px;
    font-family: monospace;
    font-size: 1.2rem;
    z-index: 5;
    pointer-events: none;
}

/* Modal */
.modal {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 100;
}

.modal-content {
    background: white;
    color: #0f172a;
    padding: 30px;
    border-radius: 20px;
    text-align: center;
    width: 320px;
}

.hidden {
    display: none !important;
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 30px;
    font-size: 1.1rem;
    cursor: pointer;
    margin-top: 15px;
}

.btn-secondary {
    background-color: transparent;
    color: #64748b;
    border: 2px solid #cbd5e1;
    padding: 10px 20px;
    border-radius: 30px;
    cursor: pointer;
    margin-top: 10px;
}