:root {
    --bg-color: #f8f9fa;
    --text-color: #212529;
    --accent-success: #198754;
    --accent-primary: #0d6efd;
    --key-bg: #ffffff;
    --key-border: #dee2e6;
    --modal-bg: #ffffff;
    --shadow: 0 4px 6px rgba(0,0,0,0.05);
}

[data-theme="dark"] {
    --bg-color: #121213;
    --text-color: #ffffff;
    --key-bg: #3a3a3c;
    --key-border: #565758;
    --modal-bg: #1a1a1b;
    --shadow: 0 4px 6px rgba(0,0,0,0.3);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    margin: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    transition: background-color 0.3s ease;
}

#game-container {
    width: 100%;
    max-width: 450px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    box-sizing: border-box;
}

.top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    max-width: 320px;
}

#main-stage {
    height: 180px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
}

.word-display {
    font-size: clamp(2.5rem, 10vw, 3.5rem);
    font-weight: 800;
    letter-spacing: 4px;
    text-transform: uppercase;
}

#solution-display {
    margin-top: 10px;
    font-style: italic;
    font-size: 0.9rem;
    color: var(--accent-primary);
}

#controls { display: flex; gap: 10px; margin-bottom: 20px; }

button {
    padding: 12px 24px;
    border-radius: 8px;
    border: none;
    font-weight: 700;
    cursor: pointer;
}

.btn-claim { background: var(--text-color); color: var(--bg-color); }
.btn-pass { background: var(--accent-primary); color: white; }

#keyboard-container { width: 100%; display: flex; flex-direction: column; gap: 8px; }
.keyboard-row { display: flex; justify-content: center; gap: 5px; }

.key {
    background: var(--key-bg);
    border: 1px solid var(--key-border);
    border-bottom: 3px solid var(--key-border);
    border-radius: 6px;
    width: clamp(32px, 8vw, 42px);
    height: 54px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    cursor: pointer;
}

.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0; top: 0; width: 100%; height: 100%;
    background-color: rgba(0,0,0,0.6);
}

.modal-content {
    background-color: var(--modal-bg);
    margin: 15vh auto;
    padding: 30px;
    border-radius: 15px;
    width: 80%;
    max-width: 320px;
    position: relative;
    color: var(--text-color);
}

.close-btn {
    position: absolute;
    right: 15px; top: 10px;
    font-size: 24px; cursor: pointer;
}

.icon-btn {
    background: none; border: none; font-size: 1.5rem; cursor: pointer; color: var(--text-color);
}

.share-btn { 
    background: var(--accent-success); color: white; display: none; margin-top: 10px;
}
