/**
 * CLIPS & PAPER REWARDPLAY - YAHTZEE
 * 
 * Huisstijl kleuren:
 * - Primair groen: #1b5e3b
 * - Accent oranje: #e85d04
 * - Achtergrond: #f5f9f6
 * 
 * Font: Inter (Google Fonts)
 */

/* ============================================================================
   CSS RESET & VARIABLES
   ============================================================================ */

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

:root {
    --primary: #1b5e3b;
    --primary-dark: #144530;
    --primary-light: #2d7a50;
    --accent: #e85d04;
    --accent-dark: #c44d00;
    --accent-light: #ff7320;
    --background: #f5f9f6;
    --white: #ffffff;
    --text-dark: #1a1a1a;
    --text-light: #666666;
    --text-muted: #999999;
    --success: #4caf50;
    --danger: #e53935;
    --warning: #ffc107;
    --info: #2196f3;
    --shadow: 0 4px 20px rgba(27, 94, 59, 0.1);
    --shadow-hover: 0 8px 30px rgba(27, 94, 59, 0.15);
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--background);
    color: var(--text-dark);
    min-height: 100vh;
    line-height: 1.6;
}

/* ============================================================================
   SITE HEADER
   ============================================================================ */

.site-header {
    background: var(--white);
    padding: 15px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.site-header .logo img {
    height: 50px;
    width: auto;
}

.site-header .back-link {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
    font-size: 16px;
    padding: 10px 20px;
    border-radius: 25px;
    transition: all 0.3s ease;
    border: 2px solid var(--primary);
}

.site-header .back-link:hover {
    background: var(--primary);
    color: var(--white);
}

/* ============================================================================
   SITE FOOTER
   ============================================================================ */

.site-footer {
    background: var(--white);
    padding: 30px;
    margin-top: 40px;
    text-align: center;
    border-top: 1px solid rgba(27, 94, 59, 0.1);
}

.footer-content {
    max-width: 800px;
    margin: 0 auto;
}

.footer-logos {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 40px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.footer-logos img {
    height: 40px;
    width: auto;
}

.footer-powered {
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--white);
    padding: 10px 20px;
    border-radius: 10px;
    border: 1px solid rgba(27, 94, 59, 0.1);
}

.footer-powered span {
    color: var(--text-light);
    font-size: 14px;
}

.footer-powered img {
    height: 30px;
}

.footer-disclaimer {
    color: var(--text-muted);
    font-size: 12px;
    margin-top: 15px;
}

/* ============================================================================
   MAIN CONTAINER
   ============================================================================ */

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 30px 20px;
}

/* ============================================================================
   GAME HEADER
   ============================================================================ */

.game-header {
    text-align: center;
    margin-bottom: 30px;
}

.game-header h1 {
    font-size: 48px;
    color: var(--primary);
    margin-bottom: 10px;
    font-weight: 700;
}

.game-header .subtitle {
    color: var(--text-light);
    font-size: 18px;
}

/* ============================================================================
   CARDS
   ============================================================================ */

.card, .welcome-box, .setup-box, .game-panel, .results-container {
    background: var(--white);
    border-radius: 16px;
    box-shadow: var(--shadow);
    padding: 30px;
    transition: box-shadow 0.3s ease;
}

.card:hover, .welcome-box:hover {
    box-shadow: var(--shadow-hover);
}

/* ============================================================================
   BUTTONS
   ============================================================================ */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 28px;
    border: none;
    border-radius: 25px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    font-family: inherit;
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent-dark) 100%);
    color: var(--white);
    box-shadow: 0 4px 15px rgba(232, 93, 4, 0.3);
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--accent-light) 0%, var(--accent) 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(232, 93, 4, 0.4);
}

.btn-secondary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: var(--white);
    box-shadow: 0 4px 15px rgba(27, 94, 59, 0.3);
}

.btn-secondary:hover {
    background: linear-gradient(135deg, var(--primary-light) 0%, var(--primary) 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(27, 94, 59, 0.4);
}

.btn-success {
    background: linear-gradient(135deg, var(--success) 0%, #388e3c 100%);
    color: var(--white);
    box-shadow: 0 4px 15px rgba(76, 175, 80, 0.3);
}

.btn-success:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(76, 175, 80, 0.4);
}

.btn-warning {
    background: linear-gradient(135deg, var(--warning) 0%, #e6a800 100%);
    color: var(--text-dark);
}

.btn-danger {
    background: linear-gradient(135deg, var(--danger) 0%, #c62828 100%);
    color: var(--white);
}

.btn-large {
    padding: 16px 36px;
    font-size: 18px;
    width: 100%;
    margin-bottom: 15px;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
}

/* ============================================================================
   FORMS & INPUTS
   ============================================================================ */

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--primary);
}

input[type="text"],
input[type="number"],
select {
    width: 100%;
    padding: 14px 18px;
    border: 2px solid rgba(27, 94, 59, 0.2);
    border-radius: 12px;
    font-size: 16px;
    font-family: inherit;
    transition: all 0.3s ease;
    background: var(--white);
    color: var(--text-dark);
}

input[type="text"]:focus,
input[type="number"]:focus,
select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(27, 94, 59, 0.1);
}

/* ============================================================================
   MODE BUTTONS
   ============================================================================ */

.mode-buttons {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin: 25px 0;
}

/* ============================================================================
   RULES BOX
   ============================================================================ */

.rules-box {
    background: var(--background);
    padding: 20px;
    border-radius: 12px;
    margin-top: 25px;
    border-left: 4px solid var(--primary);
}

.rules-box h3 {
    color: var(--primary);
    margin-bottom: 15px;
    font-size: 18px;
}

.rules-box ul {
    list-style: none;
}

.rules-box li {
    padding: 8px 0;
    padding-left: 25px;
    position: relative;
    color: var(--text-light);
}

.rules-box li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--accent);
    font-weight: bold;
}

/* ============================================================================
   SCREENS
   ============================================================================ */

.screen {
    animation: fadeIn 0.3s ease;
}

.screen.hidden {
    display: none !important;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ============================================================================
   LOBBY
   ============================================================================ */

.lobby-container {
    text-align: center;
}

.room-code-display {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: var(--white);
    padding: 25px;
    border-radius: 16px;
    margin: 25px 0;
}

.room-code-display .code {
    font-size: 48px;
    font-weight: 700;
    letter-spacing: 8px;
    font-family: 'Courier New', monospace;
}

.room-code-display .label {
    font-size: 14px;
    opacity: 0.9;
    margin-bottom: 10px;
}

.expiry-timer {
    font-size: 14px;
    opacity: 0.8;
    margin-top: 10px;
}

.players-list {
    background: var(--background);
    border-radius: 12px;
    padding: 20px;
    margin: 20px 0;
}

.players-list h3 {
    color: var(--primary);
    margin-bottom: 15px;
}

.player-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 15px;
    background: var(--white);
    border-radius: 10px;
    margin-bottom: 10px;
    border: 1px solid rgba(27, 94, 59, 0.1);
}

.player-item .player-name {
    font-weight: 600;
    color: var(--text-dark);
}

.player-item .player-badge {
    font-size: 12px;
    padding: 4px 12px;
    border-radius: 20px;
    background: var(--primary);
    color: var(--white);
}

/* ============================================================================
   AI COMMENTARY
   ============================================================================ */

.ai-commentary {
    position: fixed;
    top: 100px;
    right: 20px;
    max-width: 320px;
    background: var(--white);
    border-radius: 16px;
    padding: 20px;
    box-shadow: var(--shadow-hover);
    z-index: 100;
    animation: slideIn 0.3s ease;
    border-left: 4px solid var(--accent);
    color: var(--text-dark);
}

.ai-commentary.hidden {
    display: none;
}

@keyframes slideIn {
    from { opacity: 0; transform: translateX(20px); }
    to { opacity: 1; transform: translateX(0); }
}

.ai-avatar {
    font-size: 40px;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ai-message {
    font-size: 15px;
    color: var(--text-dark);
    line-height: 1.5;
}

.ai-commentary.thinking .ai-avatar {
    animation: spin 2s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* ============================================================================
   GAME LAYOUT
   ============================================================================ */

.game-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 25px;
    margin-bottom: 25px;
}

.game-panel {
    background: var(--white);
    border-radius: 16px;
    padding: 25px;
    box-shadow: var(--shadow);
}

.game-panel h3 {
    color: var(--primary);
    margin-bottom: 20px;
    font-size: 20px;
}

/* ============================================================================
   TURN INFO
   ============================================================================ */

.turn-info {
    text-align: center;
    margin-bottom: 25px;
    padding: 20px;
    background: var(--background);
    border-radius: 12px;
    border-left: 4px solid var(--primary);
}

.turn-info h3 {
    font-size: 22px;
    margin-bottom: 8px;
    color: var(--primary);
}

.rolls-info {
    font-size: 16px;
    color: var(--text-light);
}

#turn-indicator {
    font-weight: 700;
}

/* ============================================================================
   DICE
   ============================================================================ */

.dice-container {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin: 25px 0;
    flex-wrap: wrap;
}

.dice {
    width: 70px;
    height: 70px;
    background: var(--white);
    border: 3px solid var(--primary);
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 4px 10px rgba(27, 94, 59, 0.15);
}

.dice:hover:not(.disabled) {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(27, 94, 59, 0.2);
}

.dice.held {
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent-dark) 100%);
    border-color: var(--accent);
    color: var(--white);
}

.dice.held .dice-face {
    color: var(--white);
}

.dice.disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.dice-face {
    font-size: 32px;
    font-weight: 700;
    color: var(--primary);
}

.hold-indicator {
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    margin-top: 2px;
    opacity: 0;
    color: var(--white);
}

.dice.held .hold-indicator {
    opacity: 1;
}

/* ============================================================================
   GAME CONTROLS
   ============================================================================ */

.game-controls {
    text-align: center;
    margin-top: 20px;
}

.hint {
    font-size: 14px;
    color: var(--text-muted);
    margin-top: 12px;
}

/* ============================================================================
   SCOREBOARD
   ============================================================================ */

.scoreboard {
    overflow-x: auto;
}

.score-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.score-table th,
.score-table td {
    padding: 10px 12px;
    text-align: left;
    border-bottom: 1px solid rgba(27, 94, 59, 0.1);
}

.score-table th {
    background: var(--primary);
    color: var(--white);
    font-weight: 600;
}

.score-table th:first-child {
    border-radius: 8px 0 0 0;
}

.score-table th:last-child {
    border-radius: 0 8px 0 0;
}

.score-table tbody tr:hover {
    background: rgba(27, 94, 59, 0.03);
}

.score-table tr.clickable {
    cursor: pointer;
    transition: all 0.2s ease;
    background: rgba(232, 93, 4, 0.08) !important;
    border-left: 3px solid var(--accent);
}

.score-table tr.clickable:hover {
    background: rgba(232, 93, 4, 0.18) !important;
    transform: scale(1.01);
    box-shadow: 0 2px 8px rgba(232, 93, 4, 0.2);
}

.score-table tr.clickable td {
    font-weight: 500;
}

.score-table tr.clickable:hover td {
    color: var(--accent-dark);
}

.score-table tr.filled {
    opacity: 0.6;
}

.score-table tr.section-header {
    background: var(--primary) !important;
}

.score-table tr.section-header td {
    color: var(--white);
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
}

.score-table tr.subtotal-row {
    background: rgba(27, 94, 59, 0.08);
    font-weight: 600;
    border-top: 2px solid rgba(27, 94, 59, 0.2);
}

.score-table tr.bonus-row {
    background: rgba(232, 93, 4, 0.08);
    font-style: italic;
}

.score-table tr.bonus-row td {
    font-size: 13px;
}

.score-table tr.total-row {
    background: var(--primary);
}

.score-table tr.total-row td {
    color: var(--white);
    font-weight: 700;
    font-size: 16px;
}

.score-available {
    color: var(--accent);
    font-weight: 700;
}

.score-current {
    color: var(--primary);
    font-weight: 600;
}

/* ============================================================================
   CHAT
   ============================================================================ */

.chat-container {
    background: var(--white);
    border-radius: 16px;
    box-shadow: var(--shadow);
    overflow: hidden;
    margin-top: 25px;
}

.chat-header {
    padding: 15px 20px;
    background: var(--primary);
    color: var(--white);
    font-weight: 600;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.chat-header small {
    font-size: 12px;
    opacity: 0.8;
}

.chat-messages {
    height: 200px;
    overflow-y: auto;
    padding: 15px;
    background: var(--background);
}

.chat-message {
    margin-bottom: 12px;
    padding: 10px 14px;
    background: var(--white);
    border-radius: 10px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.chat-message .sender {
    font-weight: 600;
    color: var(--primary);
    font-size: 13px;
    margin-bottom: 4px;
}

.chat-message .text {
    color: var(--text-dark);
}

.chat-message .time {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 4px;
}

.chat-input {
    display: flex;
    padding: 15px;
    gap: 10px;
    background: var(--white);
    border-top: 1px solid rgba(27, 94, 59, 0.1);
}

.chat-input input {
    flex: 1;
    padding: 12px 16px;
    border: 2px solid rgba(27, 94, 59, 0.2);
    border-radius: 25px;
    font-size: 14px;
}

.chat-input input:focus {
    outline: none;
    border-color: var(--primary);
}

.chat-input button {
    padding: 12px 24px;
    border-radius: 25px;
}

/* ============================================================================
   ALERTS
   ============================================================================ */

.alert {
    padding: 15px 20px;
    border-radius: 12px;
    margin-bottom: 20px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 10px;
}

.alert-success {
    background: rgba(76, 175, 80, 0.15);
    color: #2e7d32;
    border-left: 4px solid var(--success);
}

.alert-error {
    background: rgba(229, 57, 53, 0.15);
    color: #c62828;
    border-left: 4px solid var(--danger);
}

.alert-warning {
    background: rgba(255, 193, 7, 0.15);
    color: #f57c00;
    border-left: 4px solid var(--warning);
}

.alert-info {
    background: rgba(33, 150, 243, 0.15);
    color: #1565c0;
    border-left: 4px solid var(--info);
}

/* ============================================================================
   MODALS
   ============================================================================ */

.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    padding: 20px;
    animation: fadeIn 0.2s ease;
}

.modal-content {
    background: var(--white);
    border-radius: 20px;
    padding: 35px;
    max-width: 450px;
    width: 100%;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}

.modal-content h2 {
    color: var(--primary);
    margin-bottom: 20px;
    font-size: 28px;
}

.modal-content .btn-group {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin-top: 25px;
    flex-wrap: wrap;
}

/* ============================================================================
   INSTRUCTION MODAL
   ============================================================================ */

.instruction-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    padding: 20px;
    animation: fadeIn 0.2s ease;
}

.instruction-modal.hidden {
    display: none !important;
}

.instruction-modal-content {
    background: var(--white);
    border-radius: 20px;
    padding: 35px;
    max-width: 450px;
    width: 100%;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}

.instruction-modal-content .instruction-icon {
    font-size: 60px;
    margin-bottom: 15px;
}

.instruction-modal-content h2 {
    color: var(--primary);
    margin-bottom: 15px;
    font-size: 24px;
}

.instruction-modal-content p {
    color: var(--text-light);
    font-size: 16px;
    line-height: 1.6;
    margin-bottom: 25px;
}

/* ============================================================================
   RESULTS
   ============================================================================ */

.results-container {
    text-align: center;
    max-width: 600px;
    margin: 0 auto;
}

.results-container h2 {
    font-size: 36px;
    color: var(--primary);
    margin-bottom: 25px;
}

.winner-announcement {
    font-size: 28px;
    margin-bottom: 30px;
    padding: 25px;
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent-dark) 100%);
    color: var(--white);
    border-radius: 16px;
}

.final-scores {
    margin: 30px 0;
}

.score-item {
    display: flex;
    justify-content: space-between;
    padding: 15px 20px;
    margin-bottom: 10px;
    background: var(--background);
    border-radius: 12px;
    font-size: 18px;
}

.score-item.winner {
    background: linear-gradient(135deg, rgba(232, 93, 4, 0.15) 0%, rgba(232, 93, 4, 0.05) 100%);
    border: 2px solid var(--accent);
}

.score-item .score {
    font-weight: 700;
    color: var(--primary);
}

/* ============================================================================
   LOADING & COUNTDOWN
   ============================================================================ */

.loading-overlay,
.countdown-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(27, 94, 59, 0.95);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 3000;
    color: var(--white);
}

.loading-overlay.hidden,
.countdown-overlay.hidden {
    display: none;
}

.spinner {
    border: 4px solid rgba(255,255,255,0.2);
    border-top: 4px solid var(--white);
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
    margin-bottom: 20px;
}

.countdown-number {
    font-size: 120px;
    font-weight: 700;
    animation: pulse 1s ease-in-out infinite;
}

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

/* ============================================================================
   VERSION BADGE
   ============================================================================ */

.version-badge {
    position: fixed;
    bottom: 10px;
    right: 10px;
    background: var(--primary);
    color: var(--white);
    padding: 8px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    z-index: 9999;
    box-shadow: var(--shadow);
}

/* ============================================================================
   LOBBY / WACHTKAMER
   ============================================================================ */

.lobby-box {
    background: var(--white);
    border-radius: 16px;
    box-shadow: var(--shadow);
    padding: 30px;
    max-width: 500px;
    margin: 0 auto;
    text-align: center;
}

.lobby-box h2 {
    color: var(--primary);
    margin-bottom: 25px;
    font-size: 28px;
}

.pincode-display {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: var(--white);
    padding: 25px;
    border-radius: 16px;
    margin-bottom: 20px;
}

.pincode-label {
    font-size: 14px;
    opacity: 0.9;
    margin-bottom: 10px;
}

.pincode {
    font-size: 48px;
    font-weight: 700;
    letter-spacing: 8px;
    font-family: 'Courier New', monospace;
}

.pincode-timer {
    font-size: 13px;
    opacity: 0.8;
    margin-top: 10px;
}

/* Share Buttons */
.share-buttons {
    margin-bottom: 25px;
    padding: 20px;
    background: var(--background);
    border-radius: 12px;
}

.share-label {
    color: var(--text-light);
    font-size: 14px;
    margin-bottom: 12px;
}

.share-row {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
}

.btn-share {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 18px;
    border: none;
    border-radius: 25px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: inherit;
}

.btn-share svg {
    flex-shrink: 0;
}

.btn-whatsapp {
    background: #25D366;
    color: white;
}

.btn-whatsapp:hover {
    background: #1da851;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(37, 211, 102, 0.4);
}

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

.btn-email:hover {
    background: var(--primary-light);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(27, 94, 59, 0.4);
}

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

.btn-copy:hover {
    background: var(--accent-light);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(232, 93, 4, 0.4);
}

.btn-copy.copied {
    background: var(--success);
}

/* Players Waiting */
.players-waiting {
    margin-bottom: 25px;
}

.players-waiting h3 {
    color: var(--primary);
    margin-bottom: 15px;
    font-size: 18px;
}

.player-list {
    background: var(--background);
    border-radius: 10px;
    padding: 15px;
    margin-bottom: 10px;
    min-height: 60px;
}

.player-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 15px;
    background: var(--white);
    border-radius: 8px;
    margin-bottom: 8px;
    border: 1px solid rgba(27, 94, 59, 0.1);
}

.player-item:last-child {
    margin-bottom: 0;
}

.player-item .name {
    font-weight: 600;
    color: var(--text-dark);
}

.player-item .badge {
    font-size: 11px;
    padding: 4px 10px;
    border-radius: 15px;
    background: var(--primary);
    color: var(--white);
}

.player-count {
    color: var(--text-light);
    font-size: 14px;
}

.lobby-actions {
    margin-top: 20px;
}

.lobby-note {
    color: var(--text-muted);
    font-size: 13px;
    margin-top: 10px;
}

/* ============================================================================
   RESPONSIVE
   ============================================================================ */

@media (max-width: 900px) {
    .game-layout {
        grid-template-columns: 1fr;
    }
    
    .ai-commentary {
        position: relative;
        top: auto;
        right: auto;
        max-width: 100%;
        margin-bottom: 20px;
    }
}

@media (max-width: 600px) {
    .site-header {
        padding: 12px 15px;
    }
    
    .site-header .logo img {
        height: 35px;
    }
    
    .site-header .back-link {
        padding: 8px 15px;
        font-size: 14px;
    }
    
    .container {
        padding: 20px 15px;
    }
    
    .game-header h1 {
        font-size: 32px;
    }
    
    .card, .welcome-box, .setup-box, .game-panel, .lobby-box {
        padding: 20px;
    }
    
    .dice {
        width: 55px;
        height: 55px;
    }
    
    .dice-face {
        font-size: 26px;
    }
    
    .btn-large {
        padding: 14px 24px;
        font-size: 16px;
    }
    
    .modal-content {
        padding: 25px;
    }
    
    .footer-logos {
        flex-direction: column;
        gap: 20px;
    }
    
    /* Lobby / Wachtkamer responsive */
    .pincode {
        font-size: 36px;
        letter-spacing: 5px;
    }
    
    .share-row {
        flex-direction: column;
    }
    
    .btn-share {
        width: 100%;
        justify-content: center;
    }
    
    .lobby-box h2 {
        font-size: 24px;
    }
}

/* ============================================================================
   REWARD PROMO BANNER
   ============================================================================ */

.reward-promo {
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent-dark) 100%);
    color: white;
    padding: 15px 25px;
    border-radius: 16px;
    margin-bottom: 25px;
    box-shadow: 0 4px 20px rgba(232, 93, 4, 0.3);
}

.reward-promo-content {
    display: flex;
    align-items: center;
    gap: 15px;
}

.reward-emoji {
    font-size: 40px;
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-5px); }
}

.reward-text {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.reward-text strong {
    font-size: 18px;
}

.reward-text span {
    font-size: 14px;
    opacity: 0.9;
}

/* ============================================================================
   HOME LAYOUT WITH HIGHSCORES
   ============================================================================ */

.home-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 25px;
}

@media (max-width: 900px) {
    .home-layout {
        grid-template-columns: 1fr;
    }
}

/* ============================================================================
   HIGHSCORES BOX
   ============================================================================ */

.highscores-box {
    background: var(--white);
    border-radius: 16px;
    box-shadow: var(--shadow);
    padding: 25px;
}

.highscores-box h3 {
    color: var(--primary);
    margin-bottom: 20px;
    font-size: 22px;
    text-align: center;
}

.highscores-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.tab-btn {
    flex: 1;
    padding: 10px 15px;
    border: 2px solid var(--primary);
    background: transparent;
    color: var(--primary);
    border-radius: 25px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: inherit;
}

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

.tab-btn:hover:not(.active) {
    background: rgba(27, 94, 59, 0.1);
}

.highscores-list {
    min-height: 200px;
}

.highscores-list.hidden {
    display: none;
}

.loading-scores {
    text-align: center;
    color: var(--text-muted);
    padding: 40px;
}

.highscore-item {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    background: var(--background);
    border-radius: 10px;
    margin-bottom: 8px;
    transition: transform 0.2s ease;
}

.highscore-item:hover {
    transform: translateX(5px);
}

.highscore-item.top-3 {
    background: linear-gradient(135deg, rgba(232, 93, 4, 0.1) 0%, rgba(232, 93, 4, 0.05) 100%);
    border-left: 3px solid var(--accent);
}

.highscore-rank {
    width: 30px;
    font-weight: 700;
    color: var(--primary);
    font-size: 16px;
}

.highscore-item.top-3 .highscore-rank {
    color: var(--accent);
}

.highscore-name {
    flex: 1;
    font-weight: 500;
    color: var(--text-dark);
}

.highscore-score {
    font-weight: 700;
    color: var(--primary);
    font-size: 16px;
}

.no-scores {
    text-align: center;
    color: var(--text-muted);
    padding: 40px;
    font-style: italic;
}

/* ============================================================================
   BOSS KEY
   ============================================================================ */

.boss-key-btn {
    position: fixed;
    bottom: 80px;
    right: 20px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--white);
    border: 2px solid var(--primary);
    font-size: 24px;
    cursor: pointer;
    box-shadow: var(--shadow);
    z-index: 100;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.boss-key-btn:hover {
    transform: scale(1.1);
    box-shadow: var(--shadow-hover);
}

.boss-key-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: #1e1e1e;
    z-index: 10000;
    display: flex;
    flex-direction: column;
}

.boss-key-overlay.hidden {
    display: none;
}

.boss-key-topbar {
    background: #2d2d2d;
    padding: 8px 15px;
    border-bottom: 1px solid #3d3d3d;
}

.boss-key-topbar a {
    color: #888;
    text-decoration: none;
    font-size: 12px;
    font-family: 'Segoe UI', Tahoma, sans-serif;
}

.boss-key-topbar a:hover {
    color: #aaa;
}

.boss-key-image {
    flex: 1;
    width: 100%;
    height: calc(100% - 35px);
    object-fit: cover;
    object-position: top left;
}

/* ============================================================================
   POINTS REWARD MODAL
   ============================================================================ */

.points-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 3000;
    padding: 20px;
    animation: fadeIn 0.3s ease;
}

.points-modal.hidden {
    display: none;
}

.points-modal-content {
    background: var(--white);
    border-radius: 24px;
    padding: 40px;
    max-width: 500px;
    width: 100%;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0,0,0,0.4);
    animation: slideUp 0.4s ease;
    max-height: 90vh;
    overflow-y: auto;
}

@keyframes slideUp {
    from { transform: translateY(50px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.points-celebration {
    font-size: 80px;
    animation: celebrate 0.5s ease;
}

@keyframes celebrate {
    0% { transform: scale(0); }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); }
}

.points-modal-content h2 {
    color: var(--primary);
    font-size: 32px;
    margin: 15px 0;
}

.points-intro {
    color: var(--text-light);
    font-size: 18px;
    margin-bottom: 25px;
}

.points-display {
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent-dark) 100%);
    color: white;
    padding: 30px;
    border-radius: 16px;
    margin-bottom: 30px;
}

.points-icon {
    font-size: 48px;
    margin-bottom: 10px;
}

.points-amount {
    font-size: 56px;
    font-weight: 800;
    line-height: 1;
    margin-bottom: 8px;
}

.points-label {
    font-size: 16px;
    opacity: 0.95;
    margin-bottom: 5px;
}

.points-tier {
    font-size: 14px;
    opacity: 0.85;
    font-style: italic;
}

.points-register-section {
    text-align: left;
    margin-bottom: 20px;
}

.points-register-section p {
    color: var(--text-light);
    text-align: center;
    margin-bottom: 10px;
}

.points-info {
    font-size: 14px;
    color: var(--text-muted);
}

.points-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin: 20px 0;
}

.points-form input {
    padding: 14px 18px;
    border: 2px solid rgba(27, 94, 59, 0.2);
    border-radius: 12px;
    font-size: 15px;
    transition: all 0.2s;
}

.points-form input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(27, 94, 59, 0.1);
}

.points-note {
    background: rgba(232, 93, 4, 0.1);
    border-left: 3px solid var(--accent);
    padding: 12px 15px;
    border-radius: 8px;
    font-size: 13px;
    color: var(--text);
    text-align: left;
    line-height: 1.5;
    margin: 15px 0;
}

.points-note strong {
    color: var(--accent);
}

.points-success-section {
    background: rgba(76, 175, 80, 0.1);
    border: 2px solid #4caf50;
    border-radius: 16px;
    padding: 25px;
    margin: 20px 0;
}

.points-success-section.hidden {
    display: none;
}

.success-icon {
    font-size: 64px;
    margin-bottom: 10px;
}

.points-success-section h3 {
    color: #4caf50;
    font-size: 24px;
    margin-bottom: 10px;
}

.points-success-section p {
    color: var(--text-light);
    margin-bottom: 10px;
}

.success-note {
    font-size: 14px;
    color: var(--text-muted);
    margin-bottom: 20px;
}

.btn-tertiary {
    background: var(--background);
    color: var(--text-light);
    border: 2px solid rgba(27, 94, 59, 0.2);
}

.btn-tertiary:hover {
    background: rgba(27, 94, 59, 0.05);
    border-color: var(--primary);
}

@media (max-width: 600px) {
    .reward-promo {
        padding: 12px 15px;
    }
    
    .reward-promo-content {
        flex-direction: column;
        text-align: center;
        gap: 10px;
    }
    
    .reward-emoji {
        font-size: 32px;
    }
    
    .reward-text strong {
        font-size: 16px;
    }
    
    .reward-text span {
        font-size: 12px;
    }
    
    .highscores-box {
        padding: 20px;
    }
    
    .highscores-tabs {
        flex-direction: column;
        gap: 8px;
    }
    
    .boss-key-btn {
        width: 45px;
        height: 45px;
        font-size: 20px;
        bottom: 70px;
        right: 15px;
    }
    
    .points-modal-content {
        padding: 25px;
        max-height: 85vh;
    }
    
    .points-amount {
        font-size: 48px;
    }
    
    .points-display {
        padding: 20px;
    }
}

@media (max-width: 500px) {
    .coupon-modal-content {
        padding: 25px;
    }
    
    .coupon-email-form {
        flex-direction: column;
    }
    
    .coupon-actions {
        flex-direction: column;
    }
    
    .coupon-code {
        font-size: 18px;
    }
}
