/* Score Board */
.score-board-vertical {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 2rem;
}

.score-item-vertical {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem;
    background: var(--bs-light);
    border-radius: 0.5rem;
    border: 1px solid var(--bs-border-color);
    transition: all 0.3s ease;
}

.score-item-vertical:hover {
    background: var(--bs-primary-bg-subtle);
    border-color: var(--bs-primary);
    transform: translateY(-1px);
}

.score-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    background: var(--bs-primary);
    color: white;
    border-radius: 50%;
    font-size: 1.1rem;
}

.score-content {
    display: flex;
    flex-direction: column;
    flex: 1;
}

.score-label {
    font-size: 0.75rem;
    color: var(--bs-secondary);
    margin-bottom: 0.25rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.score-value {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--bs-primary);
}

/* ============================================
   Games page - Aligned with plans page
   ============================================ */

.games-page {
    max-width: 1100px;
    margin: 0 auto;
    padding: 1rem 1.5rem 4rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

@media (min-width: 768px) {
    .games-page {
        padding: 1rem 2rem 5rem;
    }
}

/* ============================================
   Game Setup (shared: Numbers, Der/Die/Das)
   ============================================ */

.games-page .game-setup {
    max-width: 720px;
    margin: 0 auto;
    padding: 0;
    flex: 1;
}

.game-setup-card {
    background: var(--bs-body-bg);
    border-radius: 1rem;
    border: 1px solid var(--bs-border-color);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
    padding: 2rem 2.5rem;
    transition: all 0.25s ease;
}

[data-bs-theme="dark"] .game-setup-card {
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.game-setup-card:hover {
    border-color: rgba(var(--bs-primary-rgb), 0.3);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

[data-bs-theme="dark"] .game-setup-card:hover {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
}

.game-setup-header {
    text-align: center;
    margin-bottom: 2.5rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--bs-border-color);
}

.game-setup-badge {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--bs-primary);
    background: rgba(var(--bs-primary-rgb), 0.12);
    padding: 0.4rem 1rem;
    border-radius: 9999px;
    margin-bottom: 0.75rem;
}

[data-bs-theme="dark"] .game-setup-badge {
    background: rgba(var(--bs-primary-rgb), 0.2);
}

.game-setup-title {
    font-size: clamp(1.75rem, 3.5vw, 2.25rem);
    font-weight: 800;
    letter-spacing: -0.03em;
    margin-bottom: 0.5rem;
    background: linear-gradient(135deg, var(--bs-body-color) 0%, var(--bs-primary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.game-setup-subtitle {
    font-size: 1.125rem;
    color: var(--bs-secondary-color);
    margin: 0;
    max-width: 480px;
    margin-left: auto;
    margin-right: auto;
}

.game-setup-sections {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.game-setup-section {
    position: relative;
    padding-left: 2.5rem;
}

.game-setup-step {
    position: absolute;
    left: 0;
    top: 0;
    width: 1.75rem;
    height: 1.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 700;
    color: #fff;
    background: var(--bs-primary);
    border-radius: 50%;
}

.game-setup-section-title {
    font-size: 0.9375rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--bs-secondary-color);
    margin-bottom: 1rem;
}

.game-option {
    cursor: pointer;
    padding: 1.5rem 1.25rem;
    border-radius: 1rem;
    border: 1px solid var(--bs-border-color);
    background: var(--bs-body-bg);
    transition: all 0.25s ease;
    text-align: center;
    height: 100%;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

[data-bs-theme="dark"] .game-option {
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.game-option:hover {
    border-color: rgba(var(--bs-primary-rgb), 0.4);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
    transform: translateY(-2px);
}

[data-bs-theme="dark"] .game-option:hover {
    border-color: rgba(var(--bs-primary-rgb), 0.5);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
}

.game-option.selected {
    border-color: #e55a2b;
    background: rgba(229, 90, 43, 0.08);
    box-shadow: 0 4px 16px rgba(229, 90, 43, 0.15);
    position: relative;
}

.game-option.selected::after {
    content: '✓';
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    width: 1.5rem;
    height: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 700;
    color: #fff;
    background: #e55a2b;
    border-radius: 50%;
}

.game-option-icon {
    width: 2.5rem;
    height: 2.5rem;
    margin: 0 auto 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    color: var(--bs-primary);
}

.game-option.selected .game-option-icon {
    color: #e55a2b;
}

.game-option-icon-speak {
    color: var(--bs-success);
}
.game-option.selected .game-option-icon-speak {
    color: #00a896;
}

.game-option-icon-listen {
    color: var(--bs-info);
}
.game-option.selected .game-option-icon-listen {
    color: #00a8e8;
}

.game-option-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--bs-body-color);
    margin-bottom: 0.35rem;
}

.game-option-desc {
    font-size: 0.85rem;
    color: var(--bs-secondary-color, #6c757d);
    margin: 0;
}

.game-setup-length {
    max-width: 280px;
}

.game-setup-select {
    border-radius: 0.5rem;
    border: 1px solid var(--bs-border-color);
}

.game-setup-select:focus {
    border-color: var(--bs-primary);
    box-shadow: 0 0 0 3px rgba(0, 52, 89, 0.15);
}

.game-setup-footer {
    text-align: center;
    margin-top: 2.5rem;
    padding-top: 2rem;
    border-top: 1px solid var(--bs-border-color);
}

/* Dark mode */
[data-bs-theme="dark"] .game-setup-card {
    border-color: rgba(255, 255, 255, 0.1);
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.3);
}

[data-bs-theme="dark"] .game-option.selected {
    background: rgba(255, 107, 53, 0.12);
    border-color: #ff6b35;
}

[data-bs-theme="dark"] .game-option.selected .game-option-icon {
    color: #ff6b35;
}

[data-bs-theme="dark"] .game-option.selected::after {
    background: #ff6b35;
}

/* Orange primary CTA for Start button - aligned with plans-card__cta */
.btn-start-primary {
    background: linear-gradient(135deg, #c2410c 0%, #ea580c 100%);
    border: none;
    color: #fff;
    font-size: 1.125rem;
    font-weight: 600;
    border-radius: 10px;
    padding: 0.75rem 1.5rem;
    box-shadow: 0 4px 12px rgba(194, 65, 12, 0.35);
}
.btn-start-primary:hover,
.btn-start-primary:focus,
.btn-start-primary:active {
    color: #fff;
    box-shadow: 0 6px 16px rgba(194, 65, 12, 0.45);
    transform: translateY(-1px);
}
[data-bs-theme="dark"] .btn-start-primary {
    background: linear-gradient(135deg, #c2410c 0%, #ea580c 100%);
    box-shadow: 0 4px 12px rgba(194, 65, 12, 0.35);
}
[data-bs-theme="dark"] .btn-start-primary:hover,
[data-bs-theme="dark"] .btn-start-primary:focus,
[data-bs-theme="dark"] .btn-start-primary:active {
    box-shadow: 0 6px 16px rgba(194, 65, 12, 0.45);
}

/* Game card & header (shared) - aligned with plans-card */
.games-page .game-card {
    background: var(--bs-body-bg);
    border: 1px solid var(--bs-border-color);
    border-radius: 1rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
    overflow: hidden;
}

[data-bs-theme="dark"] .games-page .game-card {
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.game-card .card-body {
    background: var(--bs-body-bg);
}

.game-header {
    background: var(--bs-body-bg);
    border-bottom: 1px solid var(--bs-border-color);
    padding: 1rem 1.25rem;
}

.game-title {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--bs-body-color);
    letter-spacing: -0.02em;
}

.game-title .bi {
    color: var(--bs-primary);
}

/* ============================================
   Game Play (Numbers: Speaking & Listening)
   ============================================ */

.game-play {
    max-width: 480px;
    margin: 0 auto;
    padding: 2rem;
    text-align: center;
}

.game-play-label {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--bs-secondary-color, #6c757d);
    margin-bottom: 0.5rem;
}

.game-play-speak .game-play-label {
    color: var(--bs-success);
}

.game-play-listen .game-play-label {
    color: var(--bs-info);
}

.game-play-prompt {
    font-size: 1rem;
    color: var(--bs-body-color);
    margin-bottom: 1.5rem;
}

.game-play-value {
    font-size: 3.5rem;
    font-weight: 700;
    color: var(--bs-primary);
    margin-bottom: 2rem;
    letter-spacing: 0.02em;
}

.game-play-action {
    margin-bottom: 1.5rem;
}

.game-play-btn-mic {
    background: rgba(var(--bs-success-rgb), 0.95) !important;
    -webkit-tap-highlight-color: rgba(0, 168, 150, 0.3);
}

.game-play-btn-mic.recording {
    background: rgba(var(--bs-success-rgb), 1) !important;
}

.game-play-btn-play {
    background: rgba(var(--bs-info-rgb), 0.95) !important;
    -webkit-tap-highlight-color: rgba(0, 168, 232, 0.3);
}

.game-play-feedback {
    min-height: 2.5rem;
    margin-bottom: 1.5rem;
}

.game-play-recognized {
    font-size: 1.5rem;
    font-weight: 500;
    color: var(--bs-body-color);
}

.game-play-answer {
    margin-bottom: 1.5rem;
    max-width: 280px;
    margin-left: auto;
    margin-right: auto;
}

.game-play-input {
    font-size: 1.125rem;
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    border: 2px solid var(--bs-border-color);
    text-align: center;
}

.game-play-input:focus {
    border-color: var(--bs-primary);
    box-shadow: 0 0 0 3px rgba(0, 52, 89, 0.15);
}

.game-play-error {
    text-align: center;
    padding: 2rem;
}

/* ============================================
   Game Complete Modal (shared)
   ============================================ */

#numbersGameCompleteModal,
#derDieDasGameCompleteModal {
    /* Shared game-complete modal styles */
}

#numbersGameCompleteModal .modal-header,
#derDieDasGameCompleteModal .modal-header,
#numbersGameCompleteModal .modal-footer,
#derDieDasGameCompleteModal .modal-footer {
    border-color: var(--bs-border-color);
}

#numbersGameCompleteModal .modal-title,
#derDieDasGameCompleteModal .modal-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--bs-body-color);
}

#numbersGameCompleteModal .modal-body,
#derDieDasGameCompleteModal .modal-body {
    padding: 1.5rem 1.5rem 2rem;
}

#numbersGameCompleteModal .game-complete-icon,
#derDieDasGameCompleteModal .game-complete-icon {
    color: var(--bs-success);
}

#numbersGameCompleteModal .modal-footer,
#derDieDasGameCompleteModal .modal-footer {
    padding: 1rem 1.5rem;
}

.game-complete {
    text-align: center;
    max-width: 480px;
    margin: 0 auto;
}

.game-complete-badge {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--bs-body-color);
    background: var(--bs-primary-bg-subtle);
    padding: 0.35rem 0.75rem;
    border-radius: 2rem;
    margin-bottom: 0.75rem;
}

.game-complete-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
    margin-bottom: 1rem;
    text-align: center;
}

.game-complete-stat {
    padding: 0.75rem;
    border-radius: 0.5rem;
    border: 1px solid var(--bs-border-color);
    background: var(--bs-body-bg);
}

.game-complete-stat-label {
    display: block;
    font-size: 0.65rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--bs-secondary-color, #6c757d);
    margin-bottom: 0.2rem;
}

.game-complete-stat-value {
    font-size: 1rem;
    font-weight: 600;
    color: var(--bs-body-color);
}

.game-complete-perfect {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--bs-success);
    margin: 0;
}

.game-complete-mistakes {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--bs-border-color);
}

.game-complete-mistakes-list {
    max-height: 200px;
    overflow-y: auto;
    font-size: 0.875rem;
}

.game-complete-mistake {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.35rem 0;
    color: var(--bs-body-color);
}

.game-complete-mistake-item {
    font-weight: 500;
}

.game-complete-mistake-arrow {
    color: var(--bs-secondary-color, #6c757d);
    font-size: 0.75rem;
}

/* ============================================
   Der/Die/Das Game (play area specific)
   ============================================ */

.der-die-das-play {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
}

.der-die-das-prompt {
    font-size: 0.9rem;
    color: var(--bs-secondary-color, #6c757d);
    margin: 0;
}

.der-die-das-noun {
    font-size: 2rem;
    font-weight: 700;
    color: var(--bs-body-color);
    margin: 0.5rem 0;
}

.der-die-das-translation {
    font-size: 1rem;
    color: var(--bs-secondary-color, #6c757d);
    margin-bottom: 0.5rem;
}

.der-die-das-buttons {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
    margin-top: 1rem;
}

.der-die-das-btn {
    min-width: 100px;
    font-weight: 600;
    border: 2px solid transparent;
}

.der-die-das-btn-das {
    background-color: #198754;
    border-color: #198754;
    color: #fff;
}
.der-die-das-btn-das:hover:not(:disabled) {
    background-color: #157347;
    border-color: #157347;
    color: #fff;
    transform: translateY(-1px);
}

.der-die-das-btn-der {
    background-color: #dc3545;
    border-color: #dc3545;
    color: #fff;
}
.der-die-das-btn-der:hover:not(:disabled) {
    background-color: #bb2d3b;
    border-color: #bb2d3b;
    color: #fff;
    transform: translateY(-1px);
}

.der-die-das-btn-die {
    background-color: #0d6efd;
    border-color: #0d6efd;
    color: #fff;
}
.der-die-das-btn-die:hover:not(:disabled) {
    background-color: #0b5ed7;
    border-color: #0b5ed7;
    color: #fff;
    transform: translateY(-1px);
}

.der-die-das-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

/* Fix feature-card click blocking issue */
.feature-card::before {
    pointer-events: none;
}
/* Ensure voice button is clickable inside feature-card */
.feature-card .btn-record {
    position: relative;
    z-index: 10;
    pointer-events: auto;
}
