/* ========================================= */
/* === START SCREEN STYLES === */
/* === Phase 1 - Extracted from index.html === */
/* ========================================= */

/* === START SCREEN LAYOUT === */
#start-screen {
    display: flex;
    flex-direction: column;
    align-items: center;
    overflow-y: auto;
    height: 100vh;
    padding: 10px 0;
    box-sizing: border-box;
    gap: 8px !important;
}

#start-screen,
#color-select-screen {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, #1a1a1a 0%, #000000 100%);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    pointer-events: auto;
    z-index: 100;
}

/* Helper Class for Button Rows */
.btn-row {
    display: flex;
    gap: 10px;
    width: 100%;
    max-width: 400px;
    justify-content: center;
    margin-bottom: 20px;
}

/* Ensure buttons inside rows share space equally */
.btn-row .btn,
.btn-row .theme-btn {
    flex: 1;
    white-space: nowrap;
    padding: 10px 5px;
    font-size: 14px;
    min-width: 0;
}

/* === TITLE STYLING === */
.title {
    font-size: 90px;
    color: #e0c090;
    font-weight: 900;
    letter-spacing: 15px;
    text-shadow: 0 0 40px rgba(255, 165, 0, 0.3);
    margin: 0;
}

/* === THEME BUTTONS === */
.theme-btn {
    background: transparent;
    border: 1px solid #8d6e63;
    color: #8d6e63;
    padding: 8px 16px;
    font-size: 12px;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.2s;
    opacity: 0.6;
}

.theme-btn:hover {
    transform: translateY(-2px);
    opacity: 1;
}

.theme-btn.selected {
    background: rgba(255, 255, 255, 0.1);
    opacity: 1;
    font-weight: bold;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
}

/* === CPU BUTTON VARIANT === */
.btn.cpu {
    border-color: #4caf50;
    color: #a5d6a7;
}

.btn.cpu:hover {
    background: #1b5e20;
}

/* === COIN DISPLAY (Start Screen) === */
.coin-display {
    display: flex;
    flex-direction: row;
    gap: 10px;
    margin: 10px 0 20px 0;
}

.coin-ui {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 30%, #ffd54f, #ff6f00);
    border: 2px solid #fff8e1;
    display: flex;
    justify-content: center;
    align-items: center;
    color: #3e2723;
    font-weight: bold;
    font-size: 14px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.6);
}

.coin-ui.tail {
    background: radial-gradient(circle at 30% 30%, #e0e0e0, #757575);
    border-color: #9e9e9e;
    color: #212121;
}

/* === NAME INPUT STYLES === */
.name-input {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-bottom: 2px solid #888;
    color: #FFD700;
    font-family: 'Inter', 'Noto Sans', sans-serif;
    font-size: 20px;
    text-align: center;
    padding: 10px;
    width: 80%;
    max-width: 300px;
    outline: none;
    margin-bottom: 15px;
    transition: all 0.3s;
    text-transform: uppercase;
}

.name-input:focus {
    border-bottom-color: #FFD700;
    background: rgba(255, 255, 255, 0.2);
    letter-spacing: 2px;
}

.name-input::placeholder {
    color: #555;
    font-style: italic;
    letter-spacing: normal;
}

#name-inputs-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    margin-bottom: 20px;
    max-height: 50vh;
    overflow-y: auto;
}

/* === AUTH SECTION STYLES === */
.auth-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: none;
    font-weight: bold;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    font-family: sans-serif;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
}

.auth-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.3);
}

/* Brand Colors */
.google {
    background: #db4437;
}

.facebook {
    background: #4267B2;
}

.twitter {
    background: #000000;
    border: 1px solid #333;
}

.github {
    background: #24292e;
}

.apple {
    background: #000000;
    border: 1px solid #333;
}

.discord {
    background: #5865F2;
}

.steam {
    background: #171a21;
}

.auth-form-row {
    display: flex;
    gap: 8px;
    justify-content: center;
    margin-top: 15px;
}

.auth-input {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid #555;
    color: #ddd;
    padding: 10px;
    border-radius: 4px;
    width: 60%;
    font-family: 'Inter', 'Noto Sans', sans-serif;
}

.auth-input:focus {
    border-color: #FFD700;
    outline: none;
    background: rgba(0, 0, 0, 0.5);
}

.auth-submit {
    background: #FFD700;
    border: none;
    padding: 0 20px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
    color: #000;
}

.auth-submit:hover {
    background: #fff;
}

.guest-notice {
    color: #888;
    font-size: 11px;
    margin-top: 8px;
    font-style: italic;
    letter-spacing: 0.5px;
    opacity: 0.8;
}

/* ========================================= */
/* === MODERN ARCADE UI OVERRIDES === */
/* ========================================= */

:root {
    --font-hero: 'Fredoka One', cursive;
    --font-body: 'Nunito', sans-serif;
    --bg-deep: radial-gradient(circle at center, #1a1a2e 0%, #0f0f1a 100%);
    --grad-hero: linear-gradient(180deg, #ffb300 0%, #ff6f00 100%);
    --grad-blue: linear-gradient(180deg, #00d2ff 0%, #0077ff 100%);
    --grad-green: linear-gradient(180deg, #66bb6a 0%, #2e7d32 100%);
    --grad-glass: rgba(255, 255, 255, 0.08);
}

/* Ensure fonts apply correctly */
#start-screen {
    background: var(--bg-deep) !important;
    font-family: 'Nunito', sans-serif !important;
    gap: 10px;
}

/* Target the Title specifically */
#start-screen .title {
    font-family: 'Fredoka One', cursive !important;
    font-weight: 400;
    font-size: 60px !important;
    text-transform: uppercase;
    letter-spacing: 2px !important;
    margin-bottom: 0 !important;
    line-height: 1.1 !important;
    background: linear-gradient(180deg, #ffffff 0%, #aaaaaa 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 4px 0 rgba(0, 0, 0, 0.5));
}

/* Fix the "Square" Icons */
.glass-settings .btn span:first-child {
    font-family: "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", sans-serif !important;
    font-size: 24px !important;
    line-height: 1;
    margin-bottom: 5px;
    filter: drop-shadow(0 2px 5px rgba(0, 0, 0, 0.5));
}

/* The "Hero" Button (Online Play) */
.btn-hero {
    position: relative;
    width: 90% !important;
    max-width: 380px !important;
    padding: 10px;
    font-family: var(--font-hero);
    font-size: 32px;
    color: white;
    background: var(--grad-hero);
    border: none;
    border-radius: 50px;
    box-shadow: 0 8px 0 #b34700, 0 20px 30px rgba(255, 111, 0, 0.3);
    cursor: pointer;
    transition: transform 0.1s;
    text-shadow: 0 2px 0 rgba(0, 0, 0, 0.2);
    margin-bottom: 20px;
    animation: heartbeat 3s infinite ease-in-out;
}

.btn-hero:active {
    transform: translateY(8px);
    box-shadow: 0 0 0 #b34700, 0 0 0 rgba(0, 0, 0, 0);
}

.btn-hero span {
    display: block;
    font-family: var(--font-body);
    font-size: 14px;
    opacity: 0.9;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-top: -5px;
}

/* The Secondary Button (Vs CPU) */
.btn-secondary {
    width: 80%;
    max-width: 300px;
    padding: 12px !important;
    font-family: var(--font-hero);
    font-size: 22px;
    color: white;
    background: var(--grad-blue);
    border: none;
    border-radius: 20px;
    box-shadow: 0 6px 0 #0056b3, 0 15px 20px rgba(0, 100, 255, 0.2);
    cursor: pointer;
    transition: transform 0.1s;
    margin-bottom: 0 !important;
}

.btn-secondary:active {
    transform: translateY(6px);
    box-shadow: none;
}

/* The Tertiary Row (Pass & Play) */
.tertiary-row {
    display: flex;
    gap: 10px;
    background: var(--grad-glass);
    padding: 10px;
    border-radius: 15px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.btn-ghost {
    background: transparent;
    border: 2px solid rgba(255, 255, 255, 0.2);
    color: rgba(255, 255, 255, 0.7);
    padding: 8px 16px;
    border-radius: 10px;
    font-weight: bold;
    cursor: pointer;
    font-family: var(--font-body);
}

.btn-ghost:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    border-color: #fff;
}

/* The Tertiary Button (Local 3D Green) */
.btn-tertiary {
    flex: 1;
    white-space: nowrap;
    padding: 10px 5px;
    font-family: var(--font-body);
    font-size: 14px;
    font-weight: 800;
    color: white;
    background: var(--grad-green);
    border: none;
    border-radius: 12px;
    box-shadow: 0 4px 0 #1b5e20, 0 8px 15px rgba(46, 125, 50, 0.3);
    cursor: pointer;
    transition: transform 0.1s;
    text-transform: uppercase;
}

.btn-tertiary:active {
    transform: translateY(4px);
    box-shadow: none;
}

/* Specific Gradients for Local Buttons (All Green) */
#btn-local-2p,
#btn-local-3p,
#btn-local-4p {
    background: radial-gradient(circle at top left, #00e676, #2e7d32);
    box-shadow: 0 4px 0 #1b5e20, 0 8px 15px rgba(27, 94, 32, 0.4);
}

/* Glassmorphism Settings Container */
.glass-settings {
    background: var(--grad-glass);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 15px;
    margin-top: 20px;
    width: 90%;
    max-width: 400px;
}

@keyframes heartbeat {
    0% {
        transform: scale(1);
    }

    5% {
        transform: scale(1.02);
    }

    10% {
        transform: scale(1);
    }

    100% {
        transform: scale(1);
    }
}

/* === CUSTOMIZATION CORNER STYLES === */
.corner-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.5);
    border-radius: 50%;
    width: 50px;
    height: 50px;
    cursor: pointer;
    font-size: 24px;
    transition: transform 0.2s, background 0.2s;
}

.corner-btn:hover {
    transform: scale(1.1);
    background: rgba(255, 255, 255, 0.2);
}

/* Force the bottom icon row to stay horizontal on mobile */
#start-icon-row {
    flex-direction: row !important;
    width: auto !important;
    gap: 20px !important;
}

/* FORCE SQUARE ICONS: Fixes the "squashed" Haptic button */
#start-icon-row .btn {
    width: 60px !important;
    height: 60px !important;
    padding: 0 !important;
    display: flex !important;
    justify-content: center;
    align-items: center;
    line-height: 1 !important;
}

/* FIX: Make icons sharp and bright when hovering */
#start-icon-row .btn:hover {
    opacity: 1 !important;
    color: #ffffff !important;
    filter: none !important;
    border-color: #8d6e63 !important;
}

/* === MODERN RESUME BUTTON STYLES === */

/* The Container for side-by-side buttons */
.resume-split-row {
    display: flex;
    gap: 15px;
    width: 85%;
    max-width: 380px;
    margin-bottom: 20px;
    justify-content: center;
    align-items: stretch;
}

/* The New Gold Resume Button */
.btn-resume {
    flex: 1;
    min-width: 140px;
    white-space: nowrap;
    padding: 15px 10px;
    font-family: var(--font-hero);
    font-size: 20px;
    color: #3e2723;
    background: linear-gradient(180deg, #FFD700 0%, #FFCA28 100%);
    border: none;
    border-radius: 20px;
    box-shadow: 0 6px 0 #b38f00, 0 10px 20px rgba(255, 215, 0, 0.3);
    cursor: pointer;
    transition: transform 0.1s;
    text-transform: uppercase;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    line-height: 1.1;
    position: relative;
    overflow: hidden;
    animation: pulseGold 3s infinite ease-in-out;
}

.btn-resume:active {
    transform: translateY(6px);
    box-shadow: 0 0 0 #b38f00;
}

/* Subtext (e.g. "Red vs Blue") */
.btn-resume span {
    font-family: var(--font-body);
    font-size: 10px;
    font-weight: 900;
    opacity: 0.8;
    margin-top: 4px;
}

/* Shine Effect */
.btn-resume::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 50%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    transform: skewX(-20deg);
    animation: shine 4s infinite;
}

@keyframes pulseGold {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.02);
        box-shadow: 0 6px 0 #b38f00, 0 0 25px rgba(255, 215, 0, 0.5);
    }
}

@keyframes shine {
    0% {
        left: -100%;
    }

    20% {
        left: 200%;
    }

    100% {
        left: 200%;
    }
}

/* === FIX: START SCREEN SCROLLING === */
#start-screen {
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch;
    height: 100% !important;
    pointer-events: auto;
}