/* ========================================
   CSS Custom Properties
   ======================================== */
:root {
    /* Church-inspired colors */
    --primary: #007da5;
    --primary-dark: #003057;
    --primary-light: #0098c9;
    --accent: #FDB515;
    --accent-light: #ffc233;
    --white: #ffffff;
    --gray-light: #f4f4f4;
    --gray: #63666a;
    --gray-dark: #333;
    --border-color: #d8d8d8;
    --error: #d32f2f;
    --success: #4caf50;

    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 2px 8px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 4px 20px rgba(0, 0, 0, 0.12);
    --shadow-xl: 0 8px 30px rgba(0, 0, 0, 0.15);

    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;
    --radius-pill: 50px;

    --transition: 0.25s ease;
    --transition-fast: 0.15s ease;
}

/* ========================================
   Base Reset & Typography
   ======================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Source Sans 3', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    min-height: 100vh;
    padding: 20px;
    color: var(--gray-dark);
    line-height: 1.6;
}

.container {
    max-width: 900px;
    margin: 0 auto;
}

/* ========================================
   Sticky Navigation Bar
   ======================================== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    height: 60px;
}

.navbar-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--primary-dark);
    font-size: 1.15rem;
    font-weight: 600;
}

.navbar-brand .brand-icon {
    font-size: 1.3rem;
}

.navbar-nav {
    display: flex;
    align-items: center;
    gap: 4px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.navbar-nav > li {
    position: relative;
}

.navbar-nav > li > a {
    display: block;
    padding: 8px 16px;
    text-decoration: none;
    color: var(--gray);
    font-weight: 500;
    border-radius: var(--radius-sm);
    transition: all var(--transition-fast);
}

.navbar-nav > li > a:hover,
.navbar-nav > li > a.active {
    background: transparent;
    color: var(--primary);
}

/* Dropdown */
.navbar-nav .dropdown-toggle::after {
    content: '▾';
    margin-left: 6px;
    font-size: 0.8rem;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: var(--white);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-color);
    min-width: 200px;
    padding: 6px 0;
    list-style: none;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all var(--transition-fast);
    z-index: 1000;
}

.navbar-nav li:hover .dropdown-menu,
.navbar-nav li:focus-within .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-menu li a {
    display: block;
    padding: 10px 20px;
    text-decoration: none;
    color: var(--gray-dark);
    transition: all var(--transition-fast);
}

.dropdown-menu li a:hover {
    background: var(--gray-light);
    color: var(--primary);
}

/* Hamburger Menu Toggle */
.navbar-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 40px;
    height: 40px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
}

.navbar-toggle span {
    display: block;
    width: 24px;
    height: 3px;
    background: var(--primary);
    border-radius: 2px;
    transition: all var(--transition-fast);
}

.navbar-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 6px);
}

.navbar-toggle.active span:nth-child(2) {
    opacity: 0;
}

.navbar-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -6px);
}

/* Body padding to account for fixed navbar */
body.has-navbar {
    padding-top: 80px;
}

/* Mobile Navigation */
@media (max-width: 768px) {
    .navbar-toggle {
        display: flex;
    }

    .navbar-nav {
        position: fixed;
        top: 60px;
        left: 0;
        right: 0;
        background: var(--white);
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        padding: 10px;
        box-shadow: var(--shadow-lg);
        transform: translateY(-100%);
        opacity: 0;
        visibility: hidden;
        transition: all var(--transition);
    }

    .navbar-nav.active {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
    }

    .navbar-nav > li > a {
        padding: 15px 20px;
        border-radius: var(--radius-sm);
    }

    .navbar-nav > li > a:hover {
        background: var(--gray-light);
        color: var(--primary);
    }

    .dropdown-menu {
        position: static;
        box-shadow: none;
        opacity: 1;
        visibility: visible;
        transform: none;
        display: none;
        background: var(--gray-light);
        border-radius: var(--radius-sm);
        margin-top: 5px;
    }

    .navbar-nav li.dropdown.active .dropdown-menu {
        display: block;
    }

    .dropdown-menu li a {
        padding-left: 35px;
    }
}

/* ========================================
   Header Styles
   ======================================== */
header {
    text-align: center;
    color: var(--white);
    margin-bottom: 30px;
}

header h1 {
    font-size: clamp(1.8rem, 5vw, 2.5rem);
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

/* Back Button */
.back-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    margin-bottom: 20px;
    padding: 8px 0;
    transition: color var(--transition-fast);
}

.back-btn:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

header p {
    font-size: clamp(1rem, 2.5vw, 1.1rem);
    opacity: 0.95;
}

/* ========================================
   Button Styles
   ======================================== */
.btn {
    display: inline-block;
    background-color: var(--accent);
    color: var(--primary-dark);
    border: none;
    padding: 12px 24px;
    font-size: 1rem;
    font-weight: bold;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all var(--transition);
    box-shadow: var(--shadow-md);
    text-decoration: none;
    text-align: center;
}

.btn:hover {
    background-color: var(--accent-light);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn:active {
    transform: translateY(0);
}

.btn:focus {
    outline: 3px solid rgba(253, 181, 21, 0.5);
    outline-offset: 2px;
}

.btn-primary {
    background-color: var(--primary);
    color: var(--white);
}

.btn-primary:hover {
    background-color: var(--primary-light);
}

.btn-small {
    padding: 10px 20px;
    font-size: 0.9rem;
}

/* ========================================
   Controls / Navigation
   ======================================== */
.controls {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-bottom: 25px;
    flex-wrap: wrap;
}

/* ========================================
   Homepage Styles
   ======================================== */
.hero {
    text-align: center;
    padding: clamp(30px, 8vw, 60px) 20px;
    margin-bottom: 40px;
}

.hero h1 {
    font-size: clamp(2rem, 6vw, 3rem);
    margin-bottom: 15px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.hero p {
    font-size: clamp(1rem, 3vw, 1.3rem);
    opacity: 0.95;
}

.home-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 25px;
    margin-bottom: 50px;
}

.home-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: clamp(25px, 4vw, 35px) clamp(20px, 3vw, 25px);
    text-decoration: none;
    color: inherit;
    box-shadow: var(--shadow-md);
    transition: all var(--transition);
    display: flex;
    flex-direction: column;
    border: 3px solid transparent;
}

.home-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-xl);
    border-color: var(--accent);
}

.home-card:focus {
    outline: 3px solid var(--accent);
    outline-offset: 2px;
}

.home-card h2 {
    color: var(--primary);
    font-size: clamp(1.4rem, 3vw, 1.8rem);
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.home-card .icon {
    font-size: clamp(1.5rem, 4vw, 2rem);
}

.home-card p {
    color: var(--gray);
    font-size: clamp(0.95rem, 2vw, 1.1rem);
    margin-bottom: 20px;
    flex-grow: 1;
}

.home-card ul {
    list-style: none;
    padding: 0;
    margin: 0 0 20px 0;
}

.home-card li {
    color: var(--primary-dark);
    padding: 5px 0;
    font-size: 0.95rem;
}

.home-card li::before {
    content: ">";
    color: var(--accent);
    font-weight: bold;
    margin-right: 8px;
}

.card-cta {
    color: var(--primary);
    font-weight: bold;
    font-size: 1.1rem;
    margin-top: auto;
    transition: color var(--transition);
}

.home-card:hover .card-cta {
    color: var(--accent);
}

.featured-section {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: clamp(20px, 4vw, 30px);
    text-align: center;
    box-shadow: var(--shadow-md);
}

.featured-section h2 {
    color: var(--primary);
    font-size: 1.5rem;
    margin-bottom: 25px;
}

.game-buttons {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
}

.game-buttons .btn {
    min-width: 140px;
}

/* ========================================
   Shared Game Styles
   ======================================== */
.game-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 20px;
}

.question-card,
.game-card {
    background: var(--white);
    border-radius: var(--radius-md);
    padding: clamp(25px, 5vw, 40px);
    box-shadow: var(--shadow-md);
    margin-bottom: 20px;
}

.question-text {
    font-size: clamp(1.1rem, 3vw, 1.4rem);
    color: var(--primary-dark);
    margin-bottom: 30px;
    line-height: 1.6;
}

.category-badge {
    background: var(--accent);
    color: var(--primary-dark);
    padding: 8px 16px;
    border-radius: var(--radius-pill);
    font-size: 0.9rem;
    font-weight: bold;
    display: inline-block;
    margin-bottom: 20px;
}

.answer-btn {
    background: var(--white);
    border: 3px solid var(--primary);
    border-radius: var(--radius-md);
    padding: clamp(15px, 3vw, 20px);
    font-size: clamp(0.95rem, 2vw, 1.1rem);
    cursor: pointer;
    transition: all var(--transition);
    text-align: left;
    color: var(--primary-dark);
    width: 100%;
}

.answer-btn:hover {
    background: #f0f8ff;
    transform: translateX(8px);
}

.answer-btn:focus {
    outline: 3px solid rgba(0, 98, 184, 0.3);
    outline-offset: 2px;
}

.answer-btn.correct {
    background: var(--success);
    border-color: var(--success);
    color: var(--white);
}

.answer-btn.incorrect {
    background: var(--error);
    border-color: var(--error);
    color: var(--white);
}

.answer-btn.disabled {
    cursor: not-allowed;
    opacity: 0.6;
}

.answers-grid {
    display: grid;
    gap: 15px;
}

.feedback {
    margin-top: 20px;
    padding: 15px;
    border-radius: var(--radius-sm);
    font-size: 1.1rem;
    text-align: center;
}

.feedback.correct {
    background: #e8f5e9;
    color: #2e7d32;
    border: 2px solid var(--success);
}

.feedback.incorrect {
    background: #ffebee;
    color: #c62828;
    border: 2px solid var(--error);
}

.score-display {
    font-size: 1.5rem;
    color: var(--primary);
    font-weight: bold;
}

.progress-display {
    color: var(--gray);
}

.results-screen {
    text-align: center;
    padding: clamp(30px, 5vw, 40px);
}

.results-screen h2 {
    color: var(--primary);
    font-size: clamp(1.8rem, 5vw, 2.5rem);
    margin-bottom: 20px;
}

.final-score {
    font-size: clamp(2rem, 6vw, 3rem);
    color: var(--accent);
    font-weight: bold;
    margin: 20px 0;
}

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

.next-btn:hover {
    background: var(--primary-light);
    transform: translateY(-2px);
}

/* ========================================
   Bingo Board Styles
   ======================================== */
.bingo-board {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 10px;
    background-color: var(--white);
    padding: 15px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
}

.bingo-cell {
    background-color: var(--gray-light);
    border: 3px solid var(--primary);
    border-radius: var(--radius-md);
    padding: 15px;
    min-height: 120px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    cursor: pointer;
    transition: all var(--transition);
    position: relative;
    overflow: hidden;
}

.bingo-cell:hover {
    background-color: #e9ecef;
    transform: scale(1.05);
    box-shadow: 0 5px 15px rgba(0, 98, 184, 0.3);
}

.bingo-cell:focus {
    outline: 3px solid var(--accent);
    outline-offset: 2px;
}

.bingo-cell.marked {
    background-color: var(--primary);
    color: var(--white);
    border-color: var(--primary-dark);
}

.bingo-cell.marked::after {
    content: '✓';
    position: absolute;
    top: 5px;
    right: 8px;
    font-size: 1.5rem;
    font-weight: bold;
}

.bingo-cell.free {
    background-color: var(--accent);
    color: var(--primary-dark);
    font-weight: bold;
    border-color: var(--accent);
}

.bingo-cell.winning {
    background-color: var(--success);
    border-color: var(--success);
    animation: winPulse 0.5s ease infinite alternate;
}

@keyframes winPulse {
    from { transform: scale(1); box-shadow: 0 0 0 0 rgba(76, 175, 80, 0.4); }
    to { transform: scale(1.05); box-shadow: 0 0 20px 5px rgba(76, 175, 80, 0.6); }
}

.bingo-cell span {
    font-size: 0.9rem;
    line-height: 1.3;
    word-wrap: break-word;
}

/* ========================================
   Win Message / Overlay
   ======================================== */
.win-message {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.win-message.hidden {
    display: none;
}

.win-content {
    background-color: var(--white);
    padding: clamp(30px, 6vw, 50px);
    border-radius: var(--radius-xl);
    text-align: center;
    box-shadow: 0 10px 50px rgba(0, 0, 0, 0.5);
    animation: popIn 0.5s ease;
    margin: 20px;
    max-width: 90%;
}

@keyframes popIn {
    0% {
        transform: scale(0.5);
        opacity: 0;
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.win-content h2 {
    font-size: clamp(2rem, 6vw, 3rem);
    color: var(--primary);
    margin-bottom: 20px;
}

.win-content p {
    font-size: clamp(1.2rem, 3vw, 1.5rem);
    margin-bottom: 30px;
    color: var(--gray-dark);
}

/* ========================================
   Modal Styles
   ======================================== */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    overflow-y: auto;
    padding: 20px;
}

.modal.hidden {
    display: none;
}

.modal-content {
    background-color: var(--white);
    border-radius: var(--radius-lg);
    max-width: 700px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 10px 50px rgba(0, 0, 0, 0.5);
    animation: popIn 0.3s ease;
}

.modal-header {
    background-color: var(--primary);
    color: var(--white);
    padding: 20px;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h2 {
    margin: 0;
    font-size: clamp(1.2rem, 3vw, 1.8rem);
}

.close-btn {
    background: none;
    border: none;
    color: var(--white);
    font-size: 2rem;
    cursor: pointer;
    padding: 0;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform var(--transition-fast);
    border-radius: var(--radius-sm);
}

.close-btn:hover {
    transform: scale(1.2);
}

.close-btn:focus {
    outline: 2px solid var(--white);
    outline-offset: 2px;
}

.modal-body {
    padding: clamp(20px, 4vw, 30px);
}

.add-prompt-section,
.prompts-list-section,
.preset-section {
    margin-bottom: 30px;
}

.modal-body h3 {
    color: var(--primary-dark);
    margin-bottom: 15px;
    font-size: 1.3rem;
}

.input-group {
    display: flex;
    gap: 10px;
}

.input-group input {
    flex: 1;
    padding: 12px;
    border: 2px solid var(--primary);
    border-radius: var(--radius-sm);
    font-size: 1rem;
    font-family: inherit;
}

.input-group input:focus {
    outline: none;
    border-color: var(--primary-dark);
    box-shadow: 0 0 0 3px rgba(0, 98, 184, 0.1);
}

.hint {
    color: var(--gray);
    font-size: 0.9rem;
    margin-bottom: 15px;
    font-style: italic;
}

.prompts-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    max-height: 400px;
    overflow-y: auto;
    padding: 15px;
    background-color: var(--gray-light);
    border-radius: var(--radius-md);
    border: 2px solid #e9ecef;
}

.prompt-item {
    background-color: var(--primary);
    color: var(--white);
    padding: 8px 15px;
    border-radius: var(--radius-pill);
    cursor: pointer;
    transition: all var(--transition-fast);
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
}

.prompt-item:hover {
    background-color: var(--error);
    transform: scale(1.05);
}

.prompt-item::after {
    content: '×';
    font-size: 1.2rem;
    font-weight: bold;
}

.preset-section {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

/* ========================================
   Toast Notifications
   ======================================== */
.fhe-toast-container {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 99999;
    display: flex;
    flex-direction: column-reverse;
    gap: 12px;
    pointer-events: none;
}

.fhe-toast {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 24px;
    border-radius: var(--radius-md);
    background: var(--white);
    box-shadow: var(--shadow-xl);
    transform: translateX(120%);
    opacity: 0;
    transition: all 0.3s ease;
    pointer-events: auto;
    max-width: 350px;
    font-size: 1rem;
}

.fhe-toast--visible {
    transform: translateX(0);
    opacity: 1;
}

.fhe-toast__icon {
    font-size: 1.4rem;
    flex-shrink: 0;
}

.fhe-toast__message {
    flex: 1;
    color: var(--gray-dark);
}

.fhe-toast--success {
    border-left: 4px solid var(--success);
}

.fhe-toast--success .fhe-toast__icon {
    color: var(--success);
}

.fhe-toast--error {
    border-left: 4px solid var(--error);
}

.fhe-toast--error .fhe-toast__icon {
    color: var(--error);
}

.fhe-toast--info {
    border-left: 4px solid var(--primary);
}

.fhe-toast--info .fhe-toast__icon {
    color: var(--primary);
}

.fhe-toast--warning {
    border-left: 4px solid var(--accent);
}

.fhe-toast--warning .fhe-toast__icon {
    color: var(--accent);
}

/* ========================================
   Celebration Animations
   ======================================== */
.fhe-shake {
    animation: fheShake 0.5s ease;
}

@keyframes fheShake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); }
    20%, 40%, 60%, 80% { transform: translateX(5px); }
}

.fhe-pulse {
    animation: fhePulse 0.6s ease;
}

@keyframes fhePulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

.fhe-bounce {
    animation: fheBounce 0.5s ease;
}

@keyframes fheBounce {
    0%, 100% { transform: translateY(0); }
    40% { transform: translateY(-20px); }
    60% { transform: translateY(-10px); }
}

.fhe-pop-in {
    animation: fhePopIn 0.3s ease;
}

@keyframes fhePopIn {
    0% { transform: scale(0.8); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}

/* Score counter animation */
.score-animate {
    animation: scoreUp 0.4s ease;
}

@keyframes scoreUp {
    0% { transform: scale(1); }
    50% { transform: scale(1.3); color: var(--accent); }
    100% { transform: scale(1); }
}

/* Streak badge animation */
.streak-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: linear-gradient(135deg, var(--accent), #ff9800);
    color: var(--primary-dark);
    padding: 6px 14px;
    border-radius: var(--radius-pill);
    font-size: 0.9rem;
    font-weight: bold;
    animation: streakPop 0.5s ease;
}

@keyframes streakPop {
    0% { transform: scale(0) rotate(-10deg); }
    50% { transform: scale(1.2) rotate(5deg); }
    100% { transform: scale(1) rotate(0); }
}

/* ========================================
   Game Color Themes
   ======================================== */
[data-game="bingo"] {
    --game-primary: #4CAF50;
    --game-accent: #81C784;
    --game-bg: linear-gradient(135deg, #4CAF50, #2E7D32);
}

[data-game="trivia"] {
    --game-primary: #2196F3;
    --game-accent: #64B5F6;
    --game-bg: linear-gradient(135deg, #2196F3, #1565C0);
}

[data-game="charades"] {
    --game-primary: #FF9800;
    --game-accent: #FFB74D;
    --game-bg: linear-gradient(135deg, #FF9800, #E65100);
}

[data-game="hymn"] {
    --game-primary: #9C27B0;
    --game-accent: #BA68C8;
    --game-bg: linear-gradient(135deg, #9C27B0, #6A1B9A);
}

[data-game="wyr"] {
    --game-primary: #E91E63;
    --game-accent: #F06292;
    --game-bg: linear-gradient(135deg, #E91E63, #AD1457);
}

/* ========================================
   Team/Player UI Components
   ======================================== */
.player-setup {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: clamp(25px, 5vw, 40px);
    box-shadow: var(--shadow-lg);
    max-width: 500px;
    margin: 0 auto;
}

.player-setup h2 {
    color: var(--primary);
    text-align: center;
    margin-bottom: 25px;
}

.player-input-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 25px;
}

.player-input-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.player-input-row input {
    flex: 1;
    padding: 12px;
    border: 2px solid var(--primary);
    border-radius: var(--radius-sm);
    font-size: 1rem;
}

.player-input-row .player-avatar {
    font-size: 1.5rem;
    cursor: pointer;
}

.player-input-row .remove-player {
    background: none;
    border: none;
    color: var(--error);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 5px;
}

.add-player-btn {
    width: 100%;
    padding: 12px;
    margin-bottom: 20px;
}

.team-presets {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-bottom: 25px;
    flex-wrap: wrap;
}

.team-preset-btn {
    padding: 10px 20px;
    background: var(--white);
    border: 2px solid var(--primary);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all var(--transition);
    font-weight: bold;
    color: var(--primary);
}

.team-preset-btn:hover,
.team-preset-btn.active {
    background: var(--primary);
    color: var(--white);
}

/* Team Scoreboard */
.team-scoreboard {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.team-score-card {
    background: var(--white);
    border-radius: var(--radius-md);
    padding: 15px 25px;
    text-align: center;
    box-shadow: var(--shadow-md);
    min-width: 120px;
    border-top: 4px solid var(--game-primary, var(--primary));
}

.team-score-card.active {
    transform: scale(1.05);
    box-shadow: var(--shadow-lg);
}

.team-score-card .team-name {
    font-size: 1rem;
    font-weight: bold;
    color: var(--gray-dark);
    margin-bottom: 5px;
}

.team-score-card .team-score {
    font-size: 2rem;
    font-weight: bold;
    color: var(--primary);
}

/* Current Turn Indicator */
.turn-indicator {
    text-align: center;
    padding: 15px;
    background: var(--accent);
    color: var(--primary-dark);
    border-radius: var(--radius-md);
    margin-bottom: 20px;
    font-size: 1.2rem;
    font-weight: bold;
}

.turn-indicator .turn-name {
    font-size: 1.5rem;
}

/* TV Mode - Large Display */
.tv-mode .team-scoreboard {
    gap: 30px;
}

.tv-mode .team-score-card {
    padding: 25px 40px;
}

.tv-mode .team-score-card .team-name {
    font-size: 1.5rem;
}

.tv-mode .team-score-card .team-score {
    font-size: 4rem;
}

.tv-mode .turn-indicator {
    font-size: 1.8rem;
    padding: 25px;
}

.tv-mode .turn-indicator .turn-name {
    font-size: 2.5rem;
}

/* ========================================
   Sound Toggle Button
   ======================================== */
.sound-toggle {
    position: fixed;
    bottom: 20px;
    left: 20px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--white);
    border: 2px solid var(--primary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    box-shadow: var(--shadow-md);
    transition: all var(--transition);
    z-index: 1000;
}

.sound-toggle:hover {
    transform: scale(1.1);
    box-shadow: var(--shadow-lg);
}

.sound-toggle.muted {
    opacity: 0.5;
}

.sound-toggle.muted::after {
    content: '';
    position: absolute;
    width: 3px;
    height: 30px;
    background: var(--error);
    transform: rotate(45deg);
    border-radius: 2px;
}

/* ========================================
   Responsive: Tablet Landscape (1024px)
   ======================================== */
@media (max-width: 1024px) {
    .container {
        max-width: 100%;
        padding: 0 15px;
    }

    .home-grid {
        gap: 20px;
    }
}

/* ========================================
   Responsive: Tablet Portrait (768px)
   ======================================== */
@media (max-width: 768px) {
    body {
        padding: 15px;
    }

    header {
        margin-bottom: 20px;
    }

    .controls {
        gap: 10px;
    }

    .btn {
        padding: 10px 20px;
        font-size: 0.9rem;
    }

    .home-grid {
        gap: 15px;
        margin-bottom: 30px;
    }

    .bingo-board {
        gap: 8px;
        padding: 10px;
    }

    .bingo-cell {
        min-height: 100px;
        padding: 10px;
    }

    .bingo-cell span {
        font-size: 0.8rem;
    }

    .modal-content {
        margin: 10px;
    }

    .modal-body {
        padding: 20px;
    }

    .input-group {
        flex-direction: column;
    }

    .game-container {
        padding: 15px;
    }

    .question-card,
    .game-card {
        padding: 25px;
    }

    /* Toast responsive */
    .fhe-toast-container {
        bottom: 20px;
        right: 20px;
        left: 20px;
    }

    .fhe-toast {
        max-width: 100%;
    }

    /* Team UI responsive */
    .team-scoreboard {
        gap: 15px;
    }

    .team-score-card {
        padding: 12px 20px;
        min-width: 100px;
    }

    .team-score-card .team-score {
        font-size: 1.5rem;
    }
}

/* ========================================
   Responsive: Mobile (480px)
   ======================================== */
@media (max-width: 480px) {
    body {
        padding: 10px;
    }

    .controls {
        gap: 8px;
    }

    .btn {
        padding: 10px 16px;
        font-size: 0.85rem;
    }

    .home-card {
        padding: 20px 15px;
    }

    .home-card h2 {
        font-size: 1.3rem;
    }

    .game-buttons .btn {
        min-width: 120px;
        padding: 10px 12px;
    }

    .bingo-board {
        gap: 5px;
        padding: 8px;
    }

    .bingo-cell {
        min-height: 70px;
        padding: 6px;
        border-width: 2px;
    }

    .bingo-cell span {
        font-size: 0.65rem;
    }

    .bingo-cell.marked::after {
        font-size: 1rem;
        top: 2px;
        right: 4px;
    }

    .question-card,
    .game-card {
        padding: 20px 15px;
    }

    .answer-btn {
        padding: 12px;
    }

    .modal-header {
        padding: 15px;
    }

    .modal-body {
        padding: 15px;
    }

    .prompts-list {
        padding: 10px;
        max-height: 250px;
    }

    .win-content {
        padding: 25px 20px;
    }
}

/* ========================================
   Responsive: Small Phones (375px)
   ======================================== */
@media (max-width: 375px) {
    body {
        padding: 8px;
    }

    .btn {
        padding: 8px 12px;
        font-size: 0.8rem;
    }

    .home-card {
        padding: 15px 12px;
    }

    .bingo-cell {
        min-height: 60px;
        padding: 4px;
    }

    .bingo-cell span {
        font-size: 0.6rem;
    }

    .game-buttons {
        gap: 8px;
    }

    .game-buttons .btn {
        min-width: 100px;
        font-size: 0.75rem;
    }
}

/* ========================================
   Accessibility: Reduced Motion
   ======================================== */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* ========================================
   Focus Visible (Keyboard Navigation)
   ======================================== */
:focus-visible {
    outline: 3px solid var(--accent);
    outline-offset: 2px;
}

button:focus:not(:focus-visible),
a:focus:not(:focus-visible) {
    outline: none;
}
