:root {
    --primary-green: #2bb673;
    --primary-orange: #f7931e;
    --dark-bg: #0f172a;
    --glass-bg: rgba(255, 255, 255, 0.07);
    --glass-border: rgba(255, 255, 255, 0.15);
    --text-light: #f8fafc;
    --text-muted: #94a3b8;
    --accent-yellow: #fbbf24;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Yeseva One', serif;
}

body {
    background: radial-gradient(circle at 50% 0%, #1e293b 0%, #0f172a 100%);
    color: var(--text-light);
    min-height: 100vh;
}

header {
    padding: 1.5rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--glass-border);
}

.logo-text {
    font-size: 1.8rem;
    font-weight: 900;
    letter-spacing: -1px;
    color: var(--primary-green);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-in {
    animation: fadeIn 0.6s ease-out forwards;
}

/* Grid Layout */
.game-layout {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 2.5rem;
    align-items: start;
}

.board-container {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 2rem;
    padding: 3rem;
    backdrop-filter: blur(10px);
}

.phrase-board {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.75rem;
    margin: 2.5rem 0;
    width: 100%;
}

.word-group {
    display: flex;
    gap: 0.5rem;
    white-space: nowrap;
    margin-bottom: 0.5rem;
}

.letter-slot {
    width: clamp(30px, 4vw, 55px);
    height: clamp(45px, 6vw, 75px);
    background: #fff;
    border-radius: 6px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: clamp(1.2rem, 3vw, 2.5rem);
    font-weight: 900;
    color: #1a1a1a;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    transition: all 0.3s;
}

.letter-slot.hidden {
    background: linear-gradient(135deg, #2bb673, #1d975d);
    color: transparent;
    box-shadow: inset 0 0 15px rgba(0, 0, 0, 0.2);
}

.letter-slot.space {
    width: 30px;
    background: transparent;
    box-shadow: none;
}

.hint-box {
    display: inline-block;
    background: var(--primary-orange);
    padding: 0.6rem 1.5rem;
    border-radius: 50px;
    font-weight: 800;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 4px 15px rgba(247, 147, 30, 0.4);
}

/* Keyboard */
#keyboard {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
    width: 100%;
}

.keyboard-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: center;
}

.key {
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: 800;
    font-size: 1.2rem;
    transition: all 0.2s;
    cursor: default;
}

.key.enabled {
    border-color: var(--primary-green);
    cursor: pointer;
    background: rgba(43, 182, 115, 0.1);
}

.key.enabled:hover {
    background: var(--primary-green);
    color: white;
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(43, 182, 115, 0.4);
}

.key.vowel.enabled {
    border-color: var(--primary-orange);
    background: rgba(247, 147, 30, 0.1);
}

.key.vowel.enabled:hover {
    background: var(--primary-orange);
    box-shadow: 0 5px 15px rgba(247, 147, 30, 0.4);
}

.key.used {
    opacity: 0.2;
    filter: grayscale(1);
    cursor: not-allowed;
}

/* Buttons */
.controls {
    display: flex;
    gap: 1.5rem;
    margin-top: 3rem;
    justify-content: center;
}

button {
    padding: 1rem 2.5rem;
    border-radius: 1rem;
    border: none;
    font-weight: 900;
    font-size: 1.1rem;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-spin {
    background: var(--primary-orange);
    color: white;
    box-shadow: 0 4px 15px rgba(247, 147, 30, 0.3);
}

.btn-solve {
    background: #3b82f6;
    color: white;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
}

button:hover:not(.disabled) {
    transform: translateY(-3px);
    filter: brightness(1.1);
}

button.disabled {
    background: #475569 !important;
    opacity: 0.4;
    cursor: not-allowed;
    transform: none !important;
}

/* Status Panel */
.status-panel {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 2rem;
    padding: 2rem;
    text-align: center;
}

.player-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--glass-border);
    border-radius: 1.2rem;
    padding: 1.2rem;
    margin-bottom: 0.8rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s;
}

.player-card.active {
    background: rgba(43, 182, 115, 0.15);
    border-color: var(--primary-green);
    transform: scale(1.05);
}

.player-name {
    font-weight: 700;
    font-size: 1rem;
}

.player-score {
    font-weight: 900;
    color: var(--accent-yellow);
    font-size: 1.4rem;
}

/* Responsive */
@media (max-width: 1000px) {
    .game-layout {
        grid-template-columns: 1fr;
    }

    .status-panel {
        order: -1;
    }

    .letter-slot {
        width: 40px;
        height: 55px;
        font-size: 1.8rem;
    }
}