/* ============================================
   Start Screen & Menu Styles
   ============================================ */

#start-screen {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 1rem;
    background:
        radial-gradient(ellipse at 50% 20%, rgba(255, 107, 53, 0.3) 0%, transparent 50%),
        linear-gradient(180deg, var(--bg-cream) 0%, var(--bg-tan) 100%);
}

/* Subtitle */
.subtitle {
    font-family: var(--font-body);
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--text-medium);
    text-align: center;
    margin-bottom: 1.5rem;
}

/* Main Form Container */
.start-form {
    background: white;
    border: 4px solid var(--dark-brown);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    width: 100%;
    max-width: 360px;
    box-shadow: var(--shadow-lg);
}

.start-form input {
    width: 100%;
    padding: 1rem;
    font-family: var(--font-body);
    font-size: 1.1rem;
    font-weight: 600;
    border: 3px solid var(--court-wood);
    border-radius: var(--radius-sm);
    margin-bottom: 1rem;
    text-align: center;
    transition: border-color 0.2s;
}

.start-form input:focus {
    outline: none;
    border-color: var(--primary-orange);
    box-shadow: 0 0 0 3px rgba(255, 107, 0, 0.2);
}

/* ============================================
   Player Identity Section
   ============================================ */

.player-identity {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.player-identity label {
    font-weight: 800;
    color: var(--text-dark);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.name-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.name-input-wrapper input {
    width: 100%;
    padding: 0.75rem 1rem;
    padding-left: 2.5rem;
    padding-right: 2.5rem;
    font-family: var(--font-body);
    font-size: 1.1rem;
    font-weight: 700;
    border: 3px solid var(--court-wood);
    border-radius: var(--radius-sm);
    background: var(--bg-cream);
    color: var(--text-dark);
    transition: border-color 0.2s, box-shadow 0.2s;
}

.name-input-wrapper input:focus {
    outline: none;
    border-color: var(--primary-orange);
    box-shadow: 0 0 0 3px rgba(255, 107, 53, 0.2);
}

.name-input-wrapper::before {
    content: '🏀';
    position: absolute;
    left: 0.75rem;
    font-size: 1.1rem;
    line-height: 1;
}

.name-edit-icon {
    position: absolute;
    right: 0.75rem;
    font-size: 1.1rem;
    line-height: 1;
    opacity: 0.5;
    pointer-events: none;
    transition: opacity 0.2s;
}

.name-input-wrapper:hover .name-edit-icon,
.name-input-wrapper input:focus + .name-edit-icon {
    opacity: 1;
}

/* ============================================
   Continue Game Banner
   ============================================ */

.continue-game-banner {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    padding: 1rem;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, #4CAF50 0%, #2E7D32 100%);
    border: 4px solid var(--dark-brown);
    border-radius: var(--radius-lg);
    box-shadow: 0 4px 0 var(--dark-brown);
    animation: pulse-glow 2s ease-in-out infinite;
}

@keyframes pulse-glow {
    0%, 100% { box-shadow: 0 4px 0 var(--dark-brown), 0 0 10px rgba(76, 175, 80, 0.3); }
    50% { box-shadow: 0 4px 0 var(--dark-brown), 0 0 20px rgba(76, 175, 80, 0.5); }
}

.continue-game-content {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.continue-icon {
    font-size: 1.75rem;
    animation: bounce-ball 0.6s ease-in-out infinite;
}

.continue-text {
    display: flex;
    flex-direction: column;
    color: white;
}

.continue-text strong {
    font-family: var(--font-display);
    font-size: 1rem;
    text-shadow: 1px 1px 0 rgba(0,0,0,0.2);
}

.continue-text span {
    font-size: 0.85rem;
    opacity: 0.9;
}

.continue-actions {
    display: flex;
    gap: 0.5rem;
}

.continue-actions .btn {
    flex: 1;
    padding: 0.6rem 1rem;
    font-size: 0.9rem;
}

.btn-danger-outline {
    background: transparent;
    border: 2px solid rgba(255, 255, 255, 0.7);
    color: white;
    font-weight: 700;
}

.btn-danger-outline:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: white;
}

/* ============================================
   Play Ball Button
   ============================================ */

.btn-play-ball {
    width: 100%;
    font-size: 1.25rem;
    padding: 1rem;
    margin-bottom: 1rem;
    background: linear-gradient(180deg, #4CAF50 0%, var(--success-green) 100%);
    animation: play-pulse 2s ease-in-out infinite;
}

@keyframes play-pulse {
    0%, 100% { box-shadow: 4px 4px 0 var(--dark-brown); }
    50% { box-shadow: 4px 4px 0 var(--dark-brown), 0 0 20px rgba(76, 175, 80, 0.4); }
}

/* ============================================
   Menu Cards Grid
   ============================================ */

.menu-row {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.menu-card {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    padding: 1rem 0.75rem;
    background: var(--bg-cream);
    border: 3px solid var(--court-wood);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.2s ease;
}

.menu-card:hover {
    border-color: var(--primary-orange);
    background: white;
    transform: translateY(-2px);
}

.menu-card-icon {
    font-size: 1.75rem;
}

.menu-card-label {
    font-family: var(--font-body);
    font-weight: 800;
    font-size: 0.85rem;
    color: var(--text-dark);
    text-transform: uppercase;
}

/* Utility buttons row */
.menu-utils {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.menu-util-btn {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.5rem 0.75rem;
    background: white;
    border: 2px solid var(--court-wood);
    border-radius: var(--radius-sm);
    font-family: var(--font-body);
    font-weight: 700;
    font-size: 0.8rem;
    color: var(--text-medium);
    cursor: pointer;
    transition: all 0.2s ease;
}

.menu-util-btn:hover {
    border-color: var(--primary-orange);
    color: var(--primary-orange);
}

.menu-util-btn .icon {
    font-size: 1rem;
}

/* ============================================
   Mode Select Screen
   ============================================ */

#mode-select-screen {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 1.5rem;
    background:
        radial-gradient(ellipse at 50% 20%, rgba(255, 107, 53, 0.3) 0%, transparent 50%),
        linear-gradient(180deg, var(--bg-cream) 0%, var(--bg-tan) 100%);
}

.mode-container {
    width: 100%;
    max-width: 360px;
}

.mode-container h2 {
    text-align: center;
    margin-bottom: 1.5rem;
}

.mode-options {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.mode-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.25rem;
    background: white;
    border: 4px solid var(--court-wood);
    border-radius: var(--radius-lg);
    cursor: pointer;
    transition: all 0.2s ease;
}

.mode-card:hover {
    border-color: var(--primary-orange);
    transform: translateX(4px);
    box-shadow: var(--shadow-md);
}

.mode-icon {
    font-size: 2.5rem;
    flex-shrink: 0;
}

.mode-info {
    flex: 1;
}

.mode-info h3 {
    font-family: var(--font-body);
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--text-dark);
    margin-bottom: 0.25rem;
    text-transform: none;
    text-shadow: none;
}

.mode-info p {
    font-size: 0.85rem;
    color: var(--text-medium);
    line-height: 1.3;
}

.mode-arrow {
    font-size: 1.5rem;
    color: var(--court-wood);
    transition: transform 0.2s;
}

.mode-card:hover .mode-arrow {
    transform: translateX(4px);
    color: var(--primary-orange);
}

/* AI Difficulty Selection */
.difficulty-section {
    margin-bottom: 1.5rem;
}

.difficulty-section h3 {
    font-family: var(--font-body);
    font-weight: 800;
    font-size: 0.9rem;
    color: var(--text-dark);
    text-transform: uppercase;
    margin-bottom: 0.75rem;
    text-align: center;
    text-shadow: none;
}

.difficulty-options {
    display: flex;
    gap: 0.5rem;
}

.difficulty-btn {
    flex: 1;
    padding: 0.75rem 0.5rem;
    background: var(--bg-cream);
    border: 3px solid var(--court-wood);
    border-radius: var(--radius-sm);
    font-family: var(--font-body);
    font-weight: 700;
    font-size: 0.85rem;
    color: var(--text-medium);
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
}

.difficulty-btn:hover {
    border-color: var(--primary-orange);
    color: var(--text-dark);
}

.difficulty-btn.selected {
    background: var(--primary-orange);
    border-color: var(--primary-orange-dark);
    color: white;
}

.difficulty-btn .diff-icon {
    font-size: 1.25rem;
}

.btn-back {
    width: 100%;
    background: linear-gradient(180deg, #9E9E9E 0%, #757575 100%);
}

/* ============================================
   Waiting Screen (Multiplayer)
   ============================================ */

#waiting-screen {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 2rem;
    background:
        radial-gradient(ellipse at 50% 30%, rgba(0, 212, 212, 0.2) 0%, transparent 50%),
        linear-gradient(180deg, var(--bg-cream) 0%, var(--bg-tan) 100%);
}

.waiting-container {
    text-align: center;
    max-width: 400px;
}

.waiting-container h2 {
    margin-bottom: 1.5rem;
}

.game-code-display {
    background: var(--dark-brown);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.game-code-display p {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 0.5rem;
}

.game-code {
    font-family: var(--font-display);
    font-size: 3rem;
    color: var(--pop-yellow);
    letter-spacing: 0.2em;
    text-shadow: 2px 2px 0 rgba(0, 0, 0, 0.3);
}

.waiting-animation {
    margin-bottom: 1.5rem;
}

.bouncing-ball {
    font-size: 3rem;
    animation: bounce-waiting 0.6s ease-in-out infinite;
}

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

.waiting-text {
    font-weight: 700;
    color: var(--text-medium);
    margin-bottom: 1.5rem;
}

/* ============================================
   Join Game Screen
   ============================================ */

#join-screen {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 2rem;
    background:
        radial-gradient(ellipse at 50% 30%, rgba(255, 107, 53, 0.2) 0%, transparent 50%),
        linear-gradient(180deg, var(--bg-cream) 0%, var(--bg-tan) 100%);
}

.join-container {
    width: 100%;
    max-width: 360px;
}

.join-container h2 {
    text-align: center;
    margin-bottom: 1.5rem;
}

.code-input-group {
    margin-bottom: 1.5rem;
}

.code-input-group label {
    display: block;
    font-weight: 800;
    color: var(--text-dark);
    font-size: 0.9rem;
    text-transform: uppercase;
    margin-bottom: 0.5rem;
}

.code-input-group input {
    width: 100%;
    padding: 1rem;
    font-family: var(--font-display);
    font-size: 2rem;
    text-align: center;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    border: 4px solid var(--court-wood);
    border-radius: var(--radius-md);
    background: white;
    color: var(--text-dark);
    transition: border-color 0.2s;
}

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

.join-buttons {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.join-buttons .btn {
    width: 100%;
}

/* ============================================
   Opening Roll Screen (Tip-Off)
   ============================================ */

/* Opening Roll Screen - shown as a card within the start screen */
#opening-roll-screen {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 1.5rem;
    background:
        radial-gradient(ellipse at 50% 40%, rgba(255, 215, 0, 0.3) 0%, transparent 60%),
        linear-gradient(180deg, var(--dark-brown) 0%, #1a0f05 100%);
    /* Override start-form max-width for better display */
    max-width: 420px;
}

/* Tip-Off title - needs explicit white color on dark background */
#opening-roll-screen h2 {
    color: white;
    font-size: 2rem;
    text-shadow: 3px 3px 0 var(--primary-orange);
    margin-bottom: 1rem;
}

.opening-roll-container {
    text-align: center;
    max-width: 400px;
}

.opening-roll-container h2 {
    color: white;
    text-shadow: 3px 3px 0 var(--primary-orange);
    margin-bottom: 0.5rem;
}

.tip-off-subtitle {
    font-family: var(--font-body);
    font-weight: 700;
    color: var(--pop-yellow);
    margin-bottom: 1rem;
}

/* Tip-off dice container */
.roll-dice {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.roll-player {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
}

/* Player names in tip-off (targets the span directly) */
.roll-player > span:first-child {
    font-family: var(--font-display);
    font-size: 1.25rem;
    color: white;
    text-shadow: 2px 2px 0 rgba(0, 0, 0, 0.5);
    letter-spacing: 0.02em;
}

/* VS divider */
.roll-vs {
    font-family: var(--font-display);
    font-size: 1.5rem;
    color: var(--pop-yellow);
    text-shadow: 2px 2px 0 rgba(0, 0, 0, 0.5);
    align-self: center;
    margin: 0.5rem 0;
}

/* Roll total (= 8) */
.roll-total {
    font-family: var(--font-display);
    font-size: 1.5rem;
    color: var(--pop-yellow);
    text-shadow: 2px 2px 0 rgba(0, 0, 0, 0.4);
    margin-left: 0.5rem;
}

/* Winner message */
.roll-winner {
    font-family: var(--font-display);
    font-size: 1.25rem;
    color: var(--pop-yellow);
    text-shadow: 2px 2px 0 rgba(0, 0, 0, 0.3);
    margin: 1rem 0;
}

/* Individual die in tip-off */
.roll-dice .die {
    width: 70px;
    height: 70px;
    background: linear-gradient(145deg, #FFFFFF 0%, #E8E8E8 100%);
    border: 5px solid var(--dark-brown);
    border-radius: var(--radius-md);
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(3, 1fr);
    gap: 2px;
    padding: 8px;
    box-shadow:
        6px 6px 0 var(--dark-brown),
        inset 0 2px 4px rgba(255,255,255,0.8);
}

.roll-dice .die.rolling {
    animation: dice-shake 0.15s ease-in-out infinite;
}

@keyframes dice-shake {
    0%, 100% { transform: rotate(0deg) scale(1); }
    25% { transform: rotate(8deg) scale(1.05); }
    75% { transform: rotate(-8deg) scale(1.05); }
}

/* Pip styling */
.roll-dice .die .pip {
    width: 12px;
    height: 12px;
    background: var(--dark-brown);
    border-radius: 50%;
    justify-self: center;
    align-self: center;
}

/* Pip positions for each die value */
.roll-dice .die[data-value="1"] .pip:nth-child(1) { grid-area: 2 / 2; }

.roll-dice .die[data-value="2"] .pip:nth-child(1) { grid-area: 1 / 3; }
.roll-dice .die[data-value="2"] .pip:nth-child(2) { grid-area: 3 / 1; }

.roll-dice .die[data-value="3"] .pip:nth-child(1) { grid-area: 1 / 3; }
.roll-dice .die[data-value="3"] .pip:nth-child(2) { grid-area: 2 / 2; }
.roll-dice .die[data-value="3"] .pip:nth-child(3) { grid-area: 3 / 1; }

.roll-dice .die[data-value="4"] .pip:nth-child(1) { grid-area: 1 / 1; }
.roll-dice .die[data-value="4"] .pip:nth-child(2) { grid-area: 1 / 3; }
.roll-dice .die[data-value="4"] .pip:nth-child(3) { grid-area: 3 / 1; }
.roll-dice .die[data-value="4"] .pip:nth-child(4) { grid-area: 3 / 3; }

.roll-dice .die[data-value="5"] .pip:nth-child(1) { grid-area: 1 / 1; }
.roll-dice .die[data-value="5"] .pip:nth-child(2) { grid-area: 1 / 3; }
.roll-dice .die[data-value="5"] .pip:nth-child(3) { grid-area: 2 / 2; }
.roll-dice .die[data-value="5"] .pip:nth-child(4) { grid-area: 3 / 1; }
.roll-dice .die[data-value="5"] .pip:nth-child(5) { grid-area: 3 / 3; }

.roll-dice .die[data-value="6"] .pip:nth-child(1) { grid-area: 1 / 1; }
.roll-dice .die[data-value="6"] .pip:nth-child(2) { grid-area: 1 / 3; }
.roll-dice .die[data-value="6"] .pip:nth-child(3) { grid-area: 2 / 1; }
.roll-dice .die[data-value="6"] .pip:nth-child(4) { grid-area: 2 / 3; }
.roll-dice .die[data-value="6"] .pip:nth-child(5) { grid-area: 3 / 1; }
.roll-dice .die[data-value="6"] .pip:nth-child(6) { grid-area: 3 / 3; }

/* Die result flash */
.roll-dice .die.winner {
    animation: die-winner 0.5s ease-out;
    box-shadow:
        6px 6px 0 var(--dark-brown),
        0 0 30px var(--pop-yellow);
}

@keyframes die-winner {
    0% { transform: scale(1); }
    50% { transform: scale(1.15); }
    100% { transform: scale(1); }
}

.roll-result {
    font-family: var(--font-display);
    font-size: 1.75rem;
    color: var(--pop-yellow);
    margin-bottom: 1.5rem;
    min-height: 2.5rem;
    text-shadow: 2px 2px 0 rgba(0, 0, 0, 0.3);
}

.roll-result.player1-wins {
    color: var(--primary-orange);
}

.roll-result.player2-wins {
    color: var(--accent-cyan);
}

#btn-roll-tip-off {
    font-size: 1.25rem;
    padding: 1rem 2.5rem;
    animation: roll-btn-pulse 1.5s ease-in-out infinite;
}

@keyframes roll-btn-pulse {
    0%, 100% { box-shadow: 4px 4px 0 var(--dark-brown); }
    50% { box-shadow: 4px 4px 0 var(--dark-brown), 0 0 25px rgba(255, 215, 0, 0.5); }
}

#btn-start-game {
    font-size: 1.25rem;
    padding: 1rem 2.5rem;
    background: linear-gradient(180deg, #4CAF50 0%, var(--success-green) 100%);
}

/* ============================================
   Stats Screen
   ============================================ */

#stats-screen {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    padding: 1.5rem;
    background:
        radial-gradient(ellipse at 50% 10%, rgba(255, 215, 0, 0.2) 0%, transparent 40%),
        linear-gradient(180deg, var(--bg-cream) 0%, var(--bg-tan) 100%);
}

.stats-screen-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.stats-screen-header h2 {
    margin: 0;
}

.stats-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* Stats card styling */
.stats-card {
    background: white;
    border: 3px solid var(--court-wood);
    border-radius: var(--radius-md);
    padding: 1rem;
}

.stats-card h3 {
    font-family: var(--font-body);
    font-size: 0.9rem;
    font-weight: 800;
    color: var(--text-medium);
    text-transform: uppercase;
    margin-bottom: 0.75rem;
    text-shadow: none;
}

.stat-row {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--bg-tan);
}

.stat-row:last-child {
    border-bottom: none;
}

.stat-row .label {
    font-weight: 600;
    color: var(--text-medium);
}

.stat-row .value {
    font-weight: 800;
    color: var(--text-dark);
}

/* Opponent list */
.opponent-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.opponent-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem;
    background: var(--bg-cream);
    border: 2px solid var(--court-wood);
    border-radius: var(--radius-sm);
}

.opponent-info {
    display: flex;
    flex-direction: column;
}

.opponent-name {
    font-weight: 800;
    color: var(--text-dark);
}

.opponent-record {
    font-size: 0.85rem;
    color: var(--text-medium);
}

.opponent-action .btn {
    padding: 0.5rem 1rem;
    font-size: 0.8rem;
}

/* ============================================
   Player Record Display (Main Menu)
   ============================================ */

.player-record {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, var(--bg-tan) 0%, var(--bg-cream) 100%);
    border: 3px solid var(--dark-brown);
    border-radius: var(--radius-md);
    font-family: var(--font-body);
    font-weight: 700;
    font-size: 1rem;
    box-shadow: var(--shadow-sm);
}

.player-record .record-label {
    color: var(--text-medium);
    font-weight: 600;
    margin-right: 0.25rem;
}

.player-record .record-wins {
    color: var(--success-green);
    font-size: 1.25rem;
    font-weight: 800;
}

.player-record .record-separator {
    color: var(--text-medium);
    font-weight: 600;
}

.player-record .record-losses {
    color: var(--danger-red);
    font-size: 1.25rem;
    font-weight: 800;
}

.player-record .record-pct {
    color: var(--text-medium);
    font-size: 0.9rem;
    font-weight: 600;
    margin-left: 0.25rem;
}

.player-record .view-stats-hint {
    color: var(--primary-orange);
    font-size: 0.85rem;
    font-weight: 700;
    margin-left: 0.5rem;
    opacity: 0;
    transition: opacity 0.2s;
}

.player-record-link {
    text-decoration: none;
    display: block;
    cursor: pointer;
    transition: transform 0.15s;
}

.player-record-link:hover {
    transform: scale(1.02);
}

.player-record-link:hover .player-record {
    border-color: var(--primary-orange);
    box-shadow: 0 4px 12px rgba(255, 107, 0, 0.2);
}

.player-record-link:hover .view-stats-hint {
    opacity: 1;
}

/* ============================================
   Multiplayer Options
   ============================================ */

.multiplayer-options {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
    animation: slide-down 0.2s ease-out;
}

.multiplayer-options .btn {
    flex: 1;
    padding: 0.75rem 1rem;
    font-size: 0.9rem;
}

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

/* ============================================
   Session Code Display (Multiplayer)
   ============================================ */

.session-code-display {
    background: var(--bg-tan);
    border: 3px dashed var(--court-wood-dark);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    margin: 1rem 0;
}

.code-label {
    display: block;
    font-size: 0.875rem;
    color: var(--text-medium);
    margin-bottom: 0.5rem;
}

.session-code {
    font-family: var(--font-display);
    font-size: 2.5rem;
    color: var(--primary-orange);
    letter-spacing: 0.1em;
}

.hint {
    font-size: 0.875rem;
    color: var(--text-medium);
    margin: 1rem 0;
}

/* ============================================
   Rejoin Game Section
   ============================================ */

.rejoin-section {
    margin: 1.5rem 0;
    padding: 1rem;
    background: var(--bg-tan);
    border-radius: var(--radius-md);
    border: 2px dashed var(--court-wood);
}

.rejoin-label {
    font-size: 0.875rem;
    color: var(--text-medium);
    margin-bottom: 0.5rem;
}

.rejoin-input-group {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    justify-content: center;
}

.session-code-input {
    font-family: var(--font-display);
    font-size: 1.25rem;
    text-transform: uppercase;
    text-align: center;
    letter-spacing: 0.1em;
    padding: 0.5rem 1rem;
    border: 2px solid var(--court-wood);
    border-radius: var(--radius-sm);
    width: 8rem;
    background: white;
}

.session-code-input:focus {
    outline: none;
    border-color: var(--primary-orange);
    box-shadow: 0 0 0 2px rgba(255, 165, 0, 0.2);
}

/* ============================================
   Opening Roll Display
   ============================================ */

.opening-roll-display {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    margin: 0.75rem auto;
}

/* ============================================
   Back to Ballin' Suite
   ============================================ */

.back-to-suite {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
    padding: 0.5rem 1rem;
    margin-bottom: 0.5rem;
    font-family: var(--font-body);
    font-weight: 700;
    font-size: 0.85rem;
    color: var(--text-medium);
    text-decoration: none;
    border: 2px solid var(--court-wood);
    border-radius: var(--radius-sm);
    background: white;
    cursor: pointer;
    transition: all 0.2s ease;
}

.back-to-suite:hover {
    border-color: var(--primary-orange);
    color: var(--primary-orange);
    transform: translateX(-2px);
}

.back-to-suite .back-arrow {
    font-size: 1.2rem;
    line-height: 1;
}

/* ============================================
   Dev Tools (Hidden by default)
   ============================================ */

.dev-tools {
    margin-top: 0.5rem;
    font-size: 0.75rem;
    color: var(--text-medium);
}

.dev-tools summary {
    cursor: pointer;
    padding: 0.25rem;
    opacity: 0.5;
    transition: opacity 0.2s;
}

.dev-tools summary:hover {
    opacity: 1;
}

.dev-tools-content {
    display: flex;
    gap: 1rem;
    padding: 0.5rem;
    justify-content: center;
}

.dev-tools-content a {
    color: var(--text-medium);
    text-decoration: none;
    font-weight: 600;
}

.dev-tools-content a:hover {
    color: var(--primary-orange);
}
