/* ============================================
   SCREENS CSS - Matching Original Game Style
   ============================================ */

/* Base Screen Styles */
.screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: none;
    flex-direction: column;
    /* Design A — Guided Journey. Warm indigo falling to navy, so white
       cards and gold buttons both sit hard against the ground. */
    background:
        radial-gradient(1200px 620px at 18% -12%, rgba(99, 91, 255, 0.55) 0%, rgba(99, 91, 255, 0) 62%),
        linear-gradient(180deg, #312e81 0%, #1e1b4b 46%, #0f172a 100%);
    z-index: 10;
    overflow: hidden;
}

.screen.active {
    display: flex;
}

/* Screen Header */
.screen-header {
    display: flex;
    align-items: center;
    padding: 20px 30px;
    position: relative;
}

.screen-title {
    flex: 1;
    text-align: center;
    font-size: 2rem;
    font-weight: 600;
    color: white;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

/* Back Button */
.btn-back {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #8BC34A 0%, #689F38 100%);
    border: none;
    border-radius: 15px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
    transition: transform 0.2s, box-shadow 0.2s;
    position: absolute;
    left: 30px;
    z-index: 10;
}

.btn-back:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(0,0,0,0.4);
}

.btn-back span {
    font-size: 2rem;
    font-weight: 700;
    color: white;
}

/* Progress rail — the six steps of setup, on every screen */
.progress-rail {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0 30px 6px;
    flex: 0 0 auto;
    overflow-x: auto;
    scrollbar-width: none;
}

.progress-rail::-webkit-scrollbar {
    display: none;
}

.pr-step {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #a5b4fc;
    white-space: nowrap;
}

.pr-step i {
    width: 21px;
    height: 21px;
    border-radius: 50%;
    display: inline-grid;
    place-items: center;
    font-style: normal;
    font-size: 0.7rem;
    border: 1px solid #6366f1;
    color: #c7d2fe;
}

.pr-step.done i {
    background: #22c55e;
    border-color: #22c55e;
    color: #052e16;
}

.pr-step.now {
    color: #fff;
}

.pr-step.now i {
    background: #fff;
    border-color: #fff;
    color: #312e81;
}

.progress-rail em {
    flex: 1;
    min-width: 10px;
    height: 1px;
    background: rgba(165, 180, 252, 0.35);
}

@media (max-width: 820px) {
    .pr-step {
        font-size: 0.6rem;
    }

    .progress-rail {
        padding: 0 14px 4px;
    }
}

/* Screen Content */
.screen-content {
    flex: 1 1 auto;
    /* A flex child defaults to min-height:auto, so it refuses to shrink below
       its own content — overflow-y never engaged and long card lists (trades,
       military branches, jobs) were simply unreachable. */
    min-height: 0;
    display: flex;
    align-items: center;
    /* Centering a child taller than the box clips its top with no way to
       scroll back up. "safe" falls back to flex-start as soon as the content
       overflows. Browsers that do not know the keyword ignore this line and
       keep the plain center above it. */
    align-items: safe center;
    justify-content: center;
    padding: 20px 40px 40px;
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
}

/* A picker screen (military branches, service trades) puts an intro
   paragraph above its card grid. .screen-content is a row, so without this
   the paragraph and the grid sit side by side and the cards squeeze into a
   narrow column. safe center keeps them centred until they overflow. */
.screen-content.stacked {
    flex-direction: column;
    justify-content: safe center;
}

.screen-content.centered {
    flex-direction: column;
    text-align: center;
}

/* ============================================
   SCREEN 1: INTRODUCTION
   ============================================ */

.game-title-large {
    font-size: 4.5rem;
    font-weight: 800;
    color: white;
    text-shadow: 3px 3px 6px rgba(0,0,0,0.4);
    margin-bottom: 30px;
    letter-spacing: 2px;
}

.intro-description {
    max-width: 700px;
    font-size: 1.3rem;
    color: rgba(255,255,255,0.9);
    line-height: 1.8;
    margin-bottom: 50px;
}

.intro-buttons {
    display: flex;
    flex-direction: column;
    gap: 16px;
    align-items: center;
}

#btn-continue {
    background: linear-gradient(135deg, #FFD54F 0%, #FFC107 100%);
    color: #1a237e;
}

.intro-save-status {
    margin-top: 14px;
    font-size: 1rem;
    color: #1a237e;
    font-weight: 600;
}
.intro-save-status.subtle { color: rgba(26, 35, 126, 0.75); font-size: 0.95rem; font-weight: 500; }

/* "Loading Saved Game..." pill shown while we wait on auth + the save
   lookup. Dark-blue palette so it reads cleanly against the page's
   light background. */
.intro-save-loading {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    margin-top: 16px;
    padding: 12px 22px;
    background: linear-gradient(135deg, #1a237e 0%, #283593 100%);
    border: 2px solid #1a237e;
    border-radius: 999px;
    color: #ffffff;
    font-size: 1.05rem;
    font-weight: 700;
    box-shadow: 0 4px 12px rgba(26, 35, 126, 0.25);
}
.intro-spinner {
    width: 18px; height: 18px;
    border: 3px solid rgba(255, 255, 255, 0.35);
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: introSpin 0.9s linear infinite;
}
@keyframes introSpin { to { transform: rotate(360deg); } }

/* Animated bouncing dots after "Loading Saved Game" */
.intro-dots span {
    display: inline-block;
    opacity: 0.3;
    animation: introDot 1.2s infinite;
}
.intro-dots span:nth-child(2) { animation-delay: 0.2s; }
.intro-dots span:nth-child(3) { animation-delay: 0.4s; }
@keyframes introDot {
    0%, 80%, 100% { opacity: 0.3; }
    40% { opacity: 1; }
}

/* "Start a New Game and It Will Be Saved Here" — large dark-blue CTA
   that's readable against the light intro-screen background. */
#btn-start-new.btn-start-new {
    background: linear-gradient(135deg, #1a237e 0%, #283593 100%);
    color: #ffffff;
    margin-top: 10px;
    padding: 22px 48px;
    font-size: 1.5rem;
    font-weight: 700;
    border: 2px solid #1a237e;
    box-shadow: 0 6px 18px rgba(26, 35, 126, 0.30);
    letter-spacing: 0.01em;
}
#btn-start-new.btn-start-new:hover {
    background: linear-gradient(135deg, #283593 0%, #303f9f 100%);
    box-shadow: 0 8px 22px rgba(26, 35, 126, 0.40);
    transform: translateY(-1px);
}

.save-toast {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: rgba(40, 167, 69, 0.95);
    color: white;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 600;
    box-shadow: 0 4px 16px rgba(0,0,0,0.3);
    z-index: 10000;
    opacity: 0;
    transition: opacity 0.3s;
    pointer-events: none;
}

.save-toast.visible { opacity: 1; }
.save-toast.error { background: rgba(220, 53, 69, 0.95); }

.save-toast.warn {
    background: rgba(245, 158, 11, 0.92);
    color: #1F1300;
}

/* Primary Button */
.btn-primary {
    padding: 18px 60px;
    font-size: 1.4rem;
    font-weight: 700;
    font-family: inherit;
    background: linear-gradient(135deg, #8BC34A 0%, #689F38 100%);
    border: none;
    border-radius: 50px;
    color: white;
    cursor: pointer;
    box-shadow: 0 6px 20px rgba(0,0,0,0.3);
    transition: transform 0.2s, box-shadow 0.2s;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.4);
}

.btn-primary.btn-large {
    padding: 22px 80px;
    font-size: 1.5rem;
}

/* Gold Button */
.btn-gold {
    padding: 12px 30px;
    font-size: 1.1rem;
    font-weight: 700;
    font-family: inherit;
    background: linear-gradient(135deg, #FFD54F 0%, #FFC107 100%);
    border: none;
    border-radius: 25px;
    color: #1a237e;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    transition: transform 0.2s, box-shadow 0.2s;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.btn-gold:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.3);
}

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

/* Accept Button */
.btn-accept {
    padding: 18px 80px;
    font-size: 1.5rem;
    font-weight: 700;
    font-family: inherit;
    background: linear-gradient(135deg, #8BC34A 0%, #689F38 100%);
    border: none;
    border-radius: 50px;
    color: white;
    cursor: pointer;
    box-shadow: 0 6px 20px rgba(0,0,0,0.3);
    transition: transform 0.2s, box-shadow 0.2s;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-top: 20px;
}

.btn-accept:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.4);
}

/* Job offer modal action row: "See Other Job Offers" + Accept */
#job-modal .job-modal-actions {
    position: sticky;
    bottom: -1px;
    background: #fff;
    padding-top: 14px;
    margin-top: 6px;
    border-top: 2px solid #eceff1;
    z-index: 2;
}

.job-modal-actions {
    flex-basis: 100%;
    width: 100%;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin-top: 10px;
}
.btn-job-back {
    padding: 16px 36px;
    font-size: 1.05rem;
    font-weight: 700;
    font-family: inherit;
    background: #ffffff;
    color: #475569;
    border: 2px solid #cbd5e1;
    border-radius: 50px;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s, background 0.2s;
}
.btn-job-back:hover {
    transform: translateY(-2px);
    background: #f1f5f9;
    box-shadow: 0 6px 18px rgba(0,0,0,0.15);
}

/* Expenses page — Family Expenses info panel (pregnancy/children food + daycare) */
.family-expense-panel {
    background: linear-gradient(135deg, #fdf2f8 0%, #fce7f3 100%);
    border: 2px solid #f9a8d4;
    border-radius: 14px;
    padding: 14px 18px;
    margin: 0 0 16px 0;
}
.family-expense-panel .fx-title {
    font-weight: 800;
    color: #9d174d;
    margin-bottom: 8px;
    font-size: 1.05rem;
}
.family-expense-panel .fx-row {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 4px 0;
    color: #6b1840;
    font-size: 0.95rem;
}
.family-expense-panel .fx-amt {
    font-weight: 700;
    color: #be123c;
    white-space: nowrap;
}

/* ============================================
   SCREEN 2: SIMULATION SELECTION
   ============================================ */

.card-row {
    display: flex;
    gap: 40px;
    justify-content: center;
}

.simulation-card {
    background: linear-gradient(180deg, #e3f2fd 0%, #bbdefb 100%);
    border-radius: 20px;
    padding: 40px;
    width: 400px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    transition: transform 0.3s, box-shadow 0.3s;
}

.simulation-card.available {
    cursor: pointer;
}

.simulation-card.available:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.4);
}

.simulation-card.disabled {
    opacity: 0.5;
    filter: grayscale(50%);
}

.sim-card-content {
    flex: 1;
    margin-bottom: 30px;
}

.sim-icon {
    font-size: 4rem;
    margin-bottom: 20px;
}

.simulation-card h3 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1a237e;
    margin-bottom: 15px;
}

.simulation-card p {
    font-size: 1rem;
    color: #37474f;
    line-height: 1.6;
}

/* ============================================
   SCREEN 3: INTRODUCE YOURSELF
   ============================================ */

.intro-form {
    background: white;
    border-radius: 20px;
    padding: 50px 60px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    min-width: 450px;
}

.intro-form.with-avatar {
    display: flex;
    gap: 50px;
    align-items: flex-start;
    min-width: 700px;
}

/* Avatar creator */
.intro-form.creator {
    min-width: min(960px, 94vw);
    gap: 36px;
    padding: 36px 44px;
}

.avatar-display.avatar-3d {
    width: 260px;
    height: 320px;
    cursor: grab;
}

.avatar-display.avatar-3d canvas {
    display: block;
    width: 100% !important;
    height: 100% !important;
}

.avatar-label small {
    display: block;
    font-weight: 400;
    color: #607d8b;
    font-size: 0.75rem;
}

/* Ten ready-made characters, as picture cards */
.avatar-presets-label {
    margin: 14px 0 0;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #5c6bc0;
}

.avatar-presets {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 7px;
    margin-top: 14px;
    width: 100%;
    max-width: 300px;
}

.avatar-preset {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    border: 2px solid #e3e8ef;
    background: linear-gradient(180deg, #f7f9ff 0%, #eceff9 100%);
    border-radius: 10px;
    padding: 4px 3px 5px;
    cursor: pointer;
    transition: transform 0.15s, border-color 0.15s, box-shadow 0.15s;
}

.avatar-preset:hover {
    transform: translateY(-2px);
    border-color: #7986cb;
    box-shadow: 0 6px 14px rgba(26, 35, 126, 0.18);
}

.avatar-preset.selected {
    border-color: #1a237e;
    box-shadow: 0 0 0 2px rgba(26, 35, 126, 0.25);
}

.ap-shot {
    width: 100%;
    aspect-ratio: 1 / 1;
    border-radius: 7px;
    background: radial-gradient(circle at 50% 35%, #e8eaf6 0%, #c5cae9 100%);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.ap-name {
    font-size: 0.66rem;
    font-weight: 700;
    color: #283593;
    line-height: 1;
}

@media (max-width: 900px) {
    .avatar-presets {
        max-width: 360px;
        grid-template-columns: repeat(5, 1fr);
    }
}

.avatar-controls .av-row {
    display: grid;
    grid-template-columns: 96px 1fr;
    gap: 8px;
    align-items: center;
    margin-bottom: 7px;
}

.avatar-controls .av-row label {
    margin: 0;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #5c6bc0;
}

.avatar-controls .av-opts {
    display: flex;
    gap: 5px;
    flex-wrap: wrap;
}

.avatar-controls .av-swatch {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 2px solid #fff;
    box-shadow: 0 0 0 1px #cfd8dc;
    cursor: pointer;
    padding: 0;
}

.avatar-controls .av-swatch.on {
    box-shadow: 0 0 0 2px #1a237e;
}

.avatar-controls .av-swatch.av-none {
    background: #fff;
    color: #607d8b;
    font-size: 0.8rem;
    line-height: 1;
}

.avatar-controls .av-seg {
    border: 1px solid #cfd8dc;
    background: #fff;
    color: #37474f;
    border-radius: 999px;
    padding: 3px 10px;
    font-size: 0.76rem;
    cursor: pointer;
}

.avatar-controls .av-seg.on {
    background: #1a237e;
    border-color: #1a237e;
    color: #fff;
    font-weight: 700;
}

@media (max-width: 900px) {
    .intro-form.creator {
        flex-direction: column;
        align-items: center;
        min-width: 0;
        padding: 24px;
    }
}

.avatar-section {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.avatar-display {
    width: 180px;
    height: 200px;
    background: linear-gradient(180deg, #64B5F6 0%, #42A5F5 100%);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0,0,0,0.2);
}

.avatar-display img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.avatar-placeholder {
    font-size: 5rem;
}

.avatar-label {
    margin-top: 15px;
    font-size: 1rem;
    font-weight: 600;
    color: #1a237e;
}

.form-fields {
    flex: 1;
}

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

.form-group label {
    display: block;
    font-size: 1.2rem;
    font-weight: 600;
    color: #1a237e;
    margin-bottom: 15px;
}

.form-group input[type="text"] {
    width: 100%;
    padding: 15px 20px;
    font-size: 1.1rem;
    font-family: inherit;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    outline: none;
    transition: border-color 0.3s;
}

.form-group input[type="text"]:focus {
    border-color: #3949ab;
}

.gender-toggle {
    display: flex;
    gap: 15px;
}

.gender-btn {
    flex: 1;
    padding: 15px;
    font-size: 1.1rem;
    font-weight: 600;
    font-family: inherit;
    background: #e0e0e0;
    border: 3px solid #e0e0e0;
    border-radius: 10px;
    color: #616161;
    cursor: pointer;
    transition: all 0.3s;
}

.gender-btn.active {
    background: linear-gradient(135deg, #42A5F5 0%, #1E88E5 100%);
    border-color: #1E88E5;
    color: white;
}

/* Skin Tone Selector */
.skin-tone-selector {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

.skin-swatch {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    cursor: pointer;
    border: 4px solid transparent;
    transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.skin-swatch:hover {
    transform: scale(1.1);
}

.skin-swatch.selected {
    border-color: #1E88E5;
    box-shadow: 0 0 15px rgba(30, 136, 229, 0.5);
}

/* Hair Color Selector */
.hair-color-selector {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

.hair-swatch {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    cursor: pointer;
    border: 4px solid transparent;
    transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.hair-swatch:hover {
    transform: scale(1.1);
}

.hair-swatch.selected {
    border-color: #1E88E5;
    box-shadow: 0 0 15px rgba(30, 136, 229, 0.5);
}

/* Outfit Selector */
.outfit-selector {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
}

.outfit-btn {
    padding: 12px 20px;
    font-size: 1rem;
    font-weight: 600;
    font-family: inherit;
    background: #e0e0e0;
    border: 3px solid #e0e0e0;
    border-radius: 10px;
    color: #616161;
    cursor: pointer;
    transition: all 0.3s;
}

.outfit-btn:hover {
    background: #d0d0d0;
}

.outfit-btn.selected {
    background: linear-gradient(135deg, #66BB6A 0%, #43A047 100%);
    border-color: #43A047;
    color: white;
}

.hidden {
    display: none !important;
}

/* ============================================
   SCREEN 4: GRADUATION
   ============================================ */

.graduation-content {
    max-width: 700px;
}

.graduation-icon {
    font-size: 6rem;
    margin-bottom: 30px;
}

.graduation-content h3 {
    font-size: 2.5rem;
    font-weight: 700;
    color: white;
    margin-bottom: 30px;
}

.graduation-text {
    font-size: 1.3rem;
    color: rgba(255,255,255,0.9);
    line-height: 1.8;
    margin-bottom: 50px;
}

/* ============================================
   SCREEN 5: TRADE SELECTION
   ============================================ */

.trade-cards {
    display: flex;
    gap: 40px;
    justify-content: center;
    /* Six industries now — wrap into two rows on standard screens */
    flex-wrap: wrap;
}

.trade-card {
    background: linear-gradient(180deg, #e3f2fd 0%, #bbdefb 100%);
    border-radius: 20px;
    padding: 30px;
    width: 320px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    transition: transform 0.3s, box-shadow 0.3s;
}

.trade-card.available {
    cursor: pointer;
}

.trade-card.available:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.4);
}

.trade-card.disabled {
    opacity: 0.5;
    filter: grayscale(50%);
    cursor: not-allowed;
}

.trade-avatar {
    width: 180px;
    height: 200px;
    margin: 0 auto 20px;
    background: linear-gradient(180deg, #64B5F6 0%, #42A5F5 100%);
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.trade-avatar::after {
    font-size: 5rem;
}

.trade-avatar.medical::after { content: '🩺'; }
.trade-avatar.technology::after { content: '💻'; }
.trade-avatar.construction::after { content: '👷'; }
.trade-avatar.education::after { content: '📚'; }
.trade-avatar.science::after { content: '🔬'; }
.trade-avatar.retail::after { content: '🛒'; }
.trade-avatar.finance::after { content: '💰'; }
.trade-avatar.culinary::after { content: '🍳'; }

/* Military: one industry card that opens a branch picker, then one
   avatar per branch (each branch is its own career). */
.trade-avatar.military::after { content: '🎖️'; }
.trade-avatar.airforce::after { content: '✈️'; }
.trade-avatar.coastguard::after { content: '⚓'; }
.trade-avatar.army::after { content: '🪖'; }
.trade-avatar.navy::after { content: '⚓'; }
.trade-avatar.marines::after { content: '🦅'; }

.trade-avatar.spaceforce::after { content: '🛰️'; }
.trade-avatar.navyseals::after { content: '🔱'; }
.trade-avatar.energy::after { content: '⚡'; }
.trade-avatar.servicetrades::after { content: '🛠️'; }
.trade-avatar.plumbing::after { content: '🔧'; }
.trade-avatar.electrical::after { content: '💡'; }
.trade-avatar.welding::after { content: '🔥'; }
.trade-avatar.hvac::after { content: '❄️'; }
.trade-avatar.servicetrades { background: linear-gradient(180deg, #4A4033 0%, #241E17 100%); }
.trade-avatar.plumbing { background: linear-gradient(180deg, #2B4452 0%, #16242C 100%); }
.trade-avatar.electrical { background: linear-gradient(180deg, #4A4222 0%, #241F10 100%); }
.trade-avatar.welding { background: linear-gradient(180deg, #4A3122 0%, #241610 100%); }
.trade-avatar.hvac { background: linear-gradient(180deg, #24414A 0%, #101F24 100%); }
.trade-avatar.logistics::after { content: '🚚'; }
.trade-avatar.energy { background: linear-gradient(180deg, #3E4A57 0%, #1E2733 100%); }
.trade-avatar.logistics { background: linear-gradient(180deg, #4A4433 0%, #241F16 100%); }

/* Every branch is built now, so they all get the full-colour tile. */
.trade-avatar.airforce, .trade-avatar.coastguard,
.trade-avatar.army, .trade-avatar.marines,
.trade-avatar.navy, .trade-avatar.spaceforce, .trade-avatar.navyseals {
    background: linear-gradient(180deg, #4A5340 0%, #2E3328 100%);
}
.trade-avatar.navy { background: linear-gradient(180deg, #2B3D57 0%, #16233A 100%); }
.trade-avatar.spaceforce { background: linear-gradient(180deg, #223047 0%, #101828 100%); }
.trade-avatar.navyseals { background: linear-gradient(180deg, #3B3524 0%, #1A1F26 100%); }

/* Branch picker intro copy above the branch cards */
.branch-intro {
    max-width: 820px;
    margin: 0 auto 34px;
    text-align: center;
    font-size: 1.15rem;
    line-height: 1.7;
    color: rgba(255, 255, 255, 0.9);
}

.branch-cards .trade-card {
    width: 300px;
}


/* Camera perspective toggle button — floats over the 3D simulator,
   just below the HUD on the right */
.view-toggle-btn {
    position: absolute;
    top: 92px;
    right: 20px;
    z-index: 60;
    background: rgba(20, 30, 46, 0.85);
    color: #E8F1F5;
    border: 2px solid rgba(96, 165, 250, 0.6);
    border-radius: 24px;
    padding: 9px 18px;
    font-family: 'Poppins', sans-serif;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    backdrop-filter: blur(4px);
    transition: background 0.15s, transform 0.1s, border-color 0.15s;
}

.view-toggle-btn:hover {
    background: rgba(59, 130, 246, 0.35);
    border-color: #60A5FA;
    transform: translateY(-1px);
}

/* ============================================
   MOBILE PLAY MODE
   Touch controls (joystick + action/zoom buttons) injected by
   MobileControls.js — only rendered on touch-capable devices.
   ============================================ */

.mobile-controls {
    position: absolute;
    inset: 0;
    pointer-events: none;   /* children opt back in */
    z-index: 70;
}

.mc-joystick {
    position: absolute;
    left: 18px;
    bottom: 92px;
    width: 132px;
    height: 132px;
    border-radius: 50%;
    background: rgba(20, 30, 46, 0.45);
    border: 2px solid rgba(96, 165, 250, 0.55);
    backdrop-filter: blur(3px);
    pointer-events: auto;
    touch-action: none;
}

.mc-stick {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 58px;
    height: 58px;
    margin: -29px 0 0 -29px;
    border-radius: 50%;
    background: rgba(96, 165, 250, 0.8);
    border: 2px solid #BFDBFE;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.4);
    transition: transform 0.05s linear;
}

.mc-buttons {
    position: absolute;
    right: 18px;
    bottom: 92px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    pointer-events: auto;
}

.mc-action {
    width: 82px;
    height: 82px;
    border-radius: 50%;
    background: rgba(59, 130, 246, 0.85);
    border: 3px solid #93C5FD;
    color: white;
    font-size: 1.6rem;
    font-family: 'Poppins', sans-serif;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    line-height: 1.1;
    touch-action: none;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.4);
}

.mc-action span {
    font-size: 0.58rem;
    font-weight: 800;
    letter-spacing: 1px;
}

.mc-action.pressed {
    background: rgba(37, 99, 235, 1);
    transform: scale(0.93);
}

.mc-zoom {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: rgba(20, 30, 46, 0.7);
    border: 2px solid rgba(96, 165, 250, 0.55);
    color: #E8F1F5;
    font-size: 1.3rem;
    font-weight: 700;
    font-family: 'Poppins', sans-serif;
    touch-action: none;
}

/* On touch devices, retire the keyboard-specific footer styling a bit */
.touch-device .game-footer .footer-btn {
    display: none;
}

/* Responsive HUD for phone-sized screens */
@media (max-width: 820px) {
    .game-hud {
        flex-wrap: wrap;
        padding: 6px 8px;
        gap: 4px;
    }

    .player-info .player-name { font-size: 0.75rem; }
    .player-info .player-job { font-size: 0.65rem; }
    .happiness-bar-container { display: none; }

    .time-display {
        font-size: 0.68rem;
        gap: 4px;
    }

    .wallet-display .wallet-amount { font-size: 0.85rem; }

    /* Keep the perspective toggle clear of the wrapped HUD and the
       touch buttons */
    .view-toggle-btn {
        top: auto;
        bottom: 250px;
        right: 14px;
        padding: 7px 12px;
        font-size: 0.75rem;
    }

    .trade-cards { gap: 16px; }
    .trade-card { width: 260px; padding: 20px; }
}

.trade-card .btn-gold {
    margin-bottom: 20px;
}

.trade-card p {
    font-size: 0.95rem;
    color: #37474f;
    line-height: 1.5;
}

/* ============================================
   SCREEN 6: EDUCATION PATH
   ============================================ */

.path-cards {
    display: flex;
    gap: 40px;
    justify-content: center;
}

.path-card {
    background: white;
    border-radius: 20px;
    padding: 0;
    width: 320px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    cursor: pointer;
    transition: transform 0.3s, box-shadow 0.3s;
    overflow: hidden;
}

.path-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.4);
}

.path-header {
    background: linear-gradient(135deg, #FFD54F 0%, #FFC107 100%);
    padding: 20px;
    font-size: 1.3rem;
    font-weight: 700;
    color: #1a237e;
    letter-spacing: 1px;
}

.path-icon {
    font-size: 5rem;
    padding: 30px 0;
}

.path-card p {
    padding: 0 25px 30px;
    font-size: 0.95rem;
    color: #37474f;
    line-height: 1.6;
}

/* --------------------------------------------
   SCREEN 6: YOUR PATH — two or three columns
   -------------------------------------------- */

.screen-content.path-screen {
    align-items: stretch;
    /* Hug the top: the columns grow downwards as the player picks, and a
       centred block would jump about between two and three columns. */
    justify-content: flex-start;
    padding: 10px 28px 28px;
}

.path-columns {
    display: grid;
    gap: 18px;
    width: 100%;
    max-width: 1360px;
    align-items: start;
    margin: 0 auto;
}

.path-columns[data-cols="2"] {
    grid-template-columns: minmax(280px, 1fr) minmax(320px, 1.25fr);
    max-width: 1060px;
}

.path-columns[data-cols="3"] {
    grid-template-columns: minmax(260px, 1fr) minmax(260px, 1fr) minmax(300px, 1.2fr);
}

/* The third column only exists on the college route. */
.path-columns[data-cols="2"] #path-col-jobs {
    display: none;
}

.path-col {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 18px;
    padding: 14px;
    display: flex;
    flex-direction: column;
    min-height: 0;
    max-height: calc(100vh - 210px);
}

.path-col.is-active {
    border-color: rgba(245, 158, 11, 0.55);
    background: rgba(245, 158, 11, 0.07);
}

.path-col-head {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 2px 4px 12px;
    flex: 0 0 auto;
}

.path-col-head h3 {
    margin: 0;
    font-size: 1rem;
    color: #fff;
    font-weight: 700;
}

.path-col-step {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: rgba(255, 255, 255, 0.12);
    color: #c7d2fe;
    font-size: 0.78rem;
    font-weight: 700;
    flex: 0 0 auto;
}

.path-col.is-active .path-col-step {
    background: #F59E0B;
    color: #1c1917;
}

.path-col-body {
    display: flex;
    flex-direction: column;
    gap: 9px;
    overflow-y: auto;
    min-height: 0;
    padding-right: 2px;
}

.path-col-empty {
    margin: 0;
    padding: 22px 10px;
    text-align: center;
    color: rgba(199, 210, 254, 0.75);
    font-size: 0.85rem;
    line-height: 1.5;
}

/* Path and degree options */
.path-option,
.degree-option {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    width: 100%;
    text-align: left;
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 14px;
    padding: 13px 14px;
    color: #fff;
    cursor: pointer;
    font: inherit;
    transition: background 0.15s, border-color 0.15s, transform 0.15s;
}

.path-option:hover,
.degree-option:hover {
    background: rgba(255, 255, 255, 0.12);
    transform: translateY(-2px);
}

.path-option.selected,
.degree-option.selected {
    background: rgba(245, 158, 11, 0.16);
    border-color: #F59E0B;
}

.po-icon {
    font-size: 1.9rem;
    line-height: 1;
    flex: 0 0 auto;
}

.po-text,
.do-text {
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
}

.po-text b,
.do-text b {
    font-size: 1rem;
}

.po-text small,
.do-text small {
    color: rgba(199, 210, 254, 0.85);
    font-size: 0.78rem;
    line-height: 1.45;
}

.do-years {
    flex: 0 0 auto;
    width: 46px;
    text-align: center;
    font-size: 1.6rem;
    font-weight: 800;
    color: #FFD54F;
    line-height: 1;
}

.do-years small {
    display: block;
    font-size: 0.6rem;
    letter-spacing: 0.1em;
    color: rgba(199, 210, 254, 0.8);
    font-weight: 600;
}

/* Job rows — white so they read as the thing you are buying into */
.job-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    width: 100%;
    text-align: left;
    background: #fff;
    border: 2px solid transparent;
    border-radius: 12px;
    padding: 11px 13px;
    cursor: pointer;
    font: inherit;
    transition: transform 0.15s, box-shadow 0.15s, border-color 0.15s;
}

.job-row:hover {
    transform: translateY(-2px);
    border-color: #F59E0B;
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.3);
}

.jr-main {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.jr-main b {
    color: #1a237e;
    font-size: 0.92rem;
}

.jr-main small {
    color: #546e7a;
    font-size: 0.72rem;
}

.jr-pay {
    flex: 0 0 auto;
    color: #4338ca;
    font-weight: 800;
    font-size: 1rem;
    white-space: nowrap;
}

.jr-pay small {
    font-size: 0.65rem;
    font-weight: 600;
    color: #7986cb;
}

@media (max-width: 900px) {
    .path-columns[data-cols="2"],
    .path-columns[data-cols="3"] {
        grid-template-columns: 1fr;
    }

    .path-col {
        max-height: none;
    }
}

/* ============================================
   SCREEN 7: DEGREE SELECTION (legacy styles)
   ============================================ */

.degree-cards {
    display: flex;
    gap: 40px;
    justify-content: center;
}

.degree-card {
    background: white;
    border-radius: 20px;
    padding: 0;
    width: 320px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    cursor: pointer;
    transition: transform 0.3s, box-shadow 0.3s;
    overflow: hidden;
}

.degree-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.4);
}

.degree-header {
    background: linear-gradient(135deg, #FFD54F 0%, #FFC107 100%);
    padding: 20px;
    font-size: 1.1rem;
    font-weight: 700;
    color: #1a237e;
    letter-spacing: 1px;
}

.degree-years {
    font-size: 2.5rem;
    font-weight: 700;
    color: #1a237e;
    padding: 30px 0 20px;
}

.degree-card p {
    padding: 0 25px 30px;
    font-size: 0.95rem;
    color: #37474f;
    line-height: 1.6;
}

/* ============================================
   SCREEN 8: JOB SELECTION
   ============================================ */

#screen-jobs .screen-content {
    overflow-y: auto;
    padding-bottom: 40px;
}

.jobs-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
    justify-content: center;
    max-width: 1000px;
    margin: 0 auto;
}

.job-card {
    background: white;
    border-radius: 15px;
    padding: 0;
    width: 280px;
    text-align: center;
    box-shadow: 0 8px 25px rgba(0,0,0,0.25);
    cursor: pointer;
    transition: transform 0.3s, box-shadow 0.3s;
    overflow: hidden;
}

.job-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 35px rgba(0,0,0,0.35);
}

.job-card-header {
    background: linear-gradient(135deg, #FFD54F 0%, #FFC107 100%);
    padding: 15px;
    font-size: 1rem;
    font-weight: 700;
    color: #1a237e;
    text-transform: uppercase;
}

.job-card p {
    padding: 14px 20px 20px;
    font-size: 0.9rem;
    color: #37474f;
    line-height: 1.5;
    min-height: 100px;
    text-align: left;
}

.job-card-meta {
    display: flex;
    justify-content: center;
    gap: 14px;
    padding: 12px 16px 0;
    font-size: 0.85rem;
    font-weight: 600;
    color: #1a237e;
}

/* Job modal sections */
.job-modal-head {
    display: flex;
    align-items: center;
    gap: 20px;
    padding-bottom: 16px;
    border-bottom: 2px solid #eceff1;
    margin-bottom: 18px;
}

.job-modal-head h3 {
    margin: 0 0 8px;
    font-size: 1.6rem;
    color: #1a237e;
}

.job-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.job-chip {
    background: #e8eaf6;
    color: #283593;
    border-radius: 999px;
    padding: 5px 12px;
    font-size: 0.85rem;
    font-weight: 600;
}

.job-sections {
    display: grid;
    grid-template-columns: 1.4fr 1fr;
    gap: 18px 26px;
}

.job-section {
    background: #f7f9fc;
    border: 1px solid #e3e8ef;
    border-radius: 12px;
    padding: 14px 16px;
}

.job-section h4 {
    margin: 0 0 10px;
    font-size: 0.95rem;
    color: #1a237e;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.job-section-about {
    grid-row: span 3;
}

.job-section-about p {
    margin: 0 0 10px;
    color: #37474f;
    line-height: 1.55;
    font-size: 0.95rem;
}

.job-section .salary-table {
    margin: 0;
}

/* The salary table is a blue panel, so deductions and take-home need
   light tints, not the dark red/green used on white. */
.job-section .salary-row.deduction span:last-child {
    color: #FFCDD2;
}

.job-section .salary-row.total {
    border-top: 2px solid rgba(255, 255, 255, 0.5);
    margin-top: 4px;
    padding-top: 8px;
    font-weight: 700;
}

.job-section .salary-row.total span:last-child {
    color: #A5F3B0;
}

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

    .job-section-about {
        grid-row: auto;
    }
}


/* Job Modal */
#job-modal .modal-content.job-modal-content {
    background: white;
    border-radius: 20px;
    padding: 40px;
    max-width: 1400px !important;
    width: 98% !important;
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    position: relative;
    /* Long-form career descriptions: keep the modal on screen and
       let it scroll internally when needed */
    max-height: 92vh;
    overflow-y: auto;
}

.job-detail-left {
    flex: 1;
    display: flex;
    gap: 20px;
    min-width: 300px;
}

.job-avatar {
    width: 150px;
    height: 180px;
    background: linear-gradient(180deg, #64B5F6 0%, #42A5F5 100%);
    border-radius: 15px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4rem;
}

.job-info h3 {
    font-size: 1.4rem;
    font-weight: 700;
    color: #1a237e;
    margin-bottom: 10px;
}

.job-info p {
    font-size: 1rem;
    color: #37474f;
    line-height: 1.65;
    margin-bottom: 15px;
}

.salary-row small {
    font-size: 0.72rem;
    opacity: 0.85;
    display: block;
}

.job-schooling {
    font-size: 0.9rem;
    color: #616161;
    font-style: italic;
}

.job-detail-right {
    min-width: 280px;
}

.salary-table {
    background: linear-gradient(135deg, #1976D2 0%, #1565C0 100%);
    border-radius: 15px;
    padding: 20px;
}

.salary-row {
    display: flex;
    justify-content: space-between;
    padding: 12px 0;
    color: white;
    border-bottom: 1px solid rgba(255,255,255,0.2);
}

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

.salary-row span:first-child {
    font-weight: 500;
}

.salary-row span:last-child {
    font-weight: 700;
}

/* ============================================
   SCREEN 9: PRIORITIES
   ============================================ */

.priority-cards {
    display: flex;
    gap: 30px;
    justify-content: center;
}

.priority-card {
    background: white;
    border-radius: 20px;
    padding: 30px;
    width: 250px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    cursor: pointer;
    transition: transform 0.3s, box-shadow 0.3s;
}

.priority-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.4);
}

.priority-icon {
    font-size: 4rem;
    margin-bottom: 15px;
}

.priority-card h4 {
    font-size: 1.3rem;
    font-weight: 700;
    color: #1a237e;
    margin-bottom: 15px;
}

.priority-card p {
    font-size: 0.9rem;
    color: #37474f;
    line-height: 1.5;
}

/* ============================================
   SCREEN 10: GOALS
   ============================================ */

.goals-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-bottom: 40px;
    max-width: 600px;
    width: 100%;
}

.goal-card {
    background: white;
    border-radius: 15px;
    padding: 25px 30px;
    display: flex;
    align-items: center;
    gap: 25px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.25);
    text-align: left;
}

.goal-number {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #1976D2 0%, #1565C0 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 700;
    color: white;
    flex-shrink: 0;
}

.goal-content {
    flex: 1;
}

.goal-content h4 {
    font-size: 1.2rem;
    font-weight: 700;
    color: #1a237e;
    margin-bottom: 5px;
}

.goal-content p {
    font-size: 0.9rem;
    color: #616161;
    margin-bottom: 5px;
}

.goal-amount {
    font-size: 1.1rem;
    font-weight: 700;
    color: #43A047;
}

/* ============================================
   SCREEN 11: EXPENSES
   ============================================ */

.expenses-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 30px;
    background: linear-gradient(180deg, #1a237e 0%, #283593 100%);
}

.btn-start-sim {
    padding: 15px 30px;
    font-size: 1.2rem;
    font-weight: 700;
    font-family: inherit;
    background: linear-gradient(135deg, #8BC34A 0%, #689F38 100%);
    border: none;
    border-radius: 10px;
    color: white;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
    transition: transform 0.2s;
}

.btn-start-sim:hover {
    transform: scale(1.05);
}

.expenses-title {
    font-size: 2rem;
    font-weight: 600;
    color: white;
}

.savings-display {
    background: linear-gradient(135deg, #FFD54F 0%, #FFC107 100%);
    padding: 15px 30px;
    border-radius: 10px;
    font-size: 1.3rem;
    font-weight: 700;
    color: #1a237e;
}

.expenses-content {
    flex: 1;
    padding: 20px 30px;
    overflow-y: auto;
    background: linear-gradient(180deg, #283593 0%, #3949ab 100%);
}

.expense-columns {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.expense-category {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0,0,0,0.2);
}

.category-header {
    background: linear-gradient(135deg, #FFD54F 0%, #FFC107 100%);
    padding: 15px 20px;
    font-size: 1.1rem;
    font-weight: 700;
    color: #1a237e;
}

.expense-options {
    padding: 15px;
    max-height: 250px;
    overflow-y: auto;
}

.expense-option {
    display: flex;
    align-items: flex-start;
    padding: 10px 15px;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.2s;
    margin-bottom: 5px;
}

.expense-option:hover:not(.disabled) {
    background: #f5f5f5;
}

.expense-option.selected {
    background: #e8f5e9;
}

.expense-option.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    position: relative;
}

.expense-option.disabled::after {
    content: "Can't afford";
    position: absolute;
    top: 5px;
    right: 10px;
    font-size: 0.7rem;
    color: #E53935;
    font-weight: 600;
    background: #ffebee;
    padding: 2px 8px;
    border-radius: 10px;
}

.expense-option input {
    margin-right: 12px;
    margin-top: 5px;
    transform: scale(1.2);
}

.option-content {
    flex: 1;
}

.option-name {
    display: block;
    font-weight: 600;
    color: #1a237e;
    margin-bottom: 3px;
}

.option-cost {
    display: block;
    font-size: 0.85rem;
    color: #616161;
}

.option-note {
    display: block;
    margin-top: 4px;
    font-size: 0.72rem;
    color: #607d8b;
    line-height: 1.3;
}

.cost-green {
    color: #43A047;
    font-weight: 600;
}

.cost-red {
    color: #E53935;
    font-weight: 600;
}

.category-total {
    padding: 15px 20px;
    background: #f5f5f5;
    font-weight: 600;
    color: #1a237e;
    border-top: 1px solid #e0e0e0;
}

.total-cost {
    color: #E53935;
}

.expenses-footer {
    background: linear-gradient(180deg, #1a237e 0%, #0d1442 100%);
    padding: 20px 30px;
}

.expenses-summary {
    text-align: center;
}

.summary-row {
    margin-bottom: 10px;
    font-size: 1.3rem;
    font-weight: 700;
}

.summary-row span:first-child {
    color: white;
    margin-right: 15px;
}

.summary-amount {
    color: #E53935;
}

.summary-amount.red {
    color: #E53935;
}

/* ============================================
   MODAL STYLES
   ============================================ */

.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.7);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 200;
}

.modal.active {
    display: flex;
}

.modal-content {
    animation: modalSlideIn 0.3s ease-out;
}

/* Game menu — above every other modal, since it is the way out of them */
#game-menu-modal {
    z-index: 400;
}

.game-menu-content {
    background: linear-gradient(180deg, #1E293B 0%, #0F172A 100%);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 20px;
    padding: 28px 32px 22px;
    width: min(420px, 92vw);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
    text-align: center;
}

.gm-brand h2 {
    margin: 6px 0 0;
    color: #FFD54F;
    font-size: 1.5rem;
    letter-spacing: 0.02em;
}

.gm-coin {
    font-size: 2.2rem;
}

.gm-sub {
    margin: 2px 0 18px;
    color: #94A3B8;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
}

.gm-buttons {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.gm-btn {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 13px 16px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.05);
    color: #F8FAFC;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    text-align: left;
    transition: background 0.15s, transform 0.15s;
}

.gm-btn span {
    width: 26px;
    text-align: center;
}

.gm-btn small {
    margin-left: auto;
    color: #94A3B8;
    font-weight: 400;
    font-size: 0.75rem;
}

.gm-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-1px);
}

.gm-btn.gm-primary {
    background: #4F46E5;
    border-color: #6366F1;
}

.gm-btn.gm-primary:hover {
    background: #4338CA;
}

.gm-btn.gm-danger:hover {
    background: rgba(239, 68, 68, 0.2);
    border-color: rgba(239, 68, 68, 0.5);
}

.gm-btn.gm-muted {
    color: #94A3B8;
}

.gm-note {
    margin: 16px 0 0;
    color: #64748B;
    font-size: 0.8rem;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ============================================
   LOCATION CHOICE MODAL
   ============================================ */

.location-choice-modal-content {
    background: linear-gradient(180deg, #1a237e 0%, #283593 100%);
    border-radius: 20px;
    padding: 40px;
    text-align: center;
    min-width: 400px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.5);
    border: 3px solid rgba(255,255,255,0.2);
}

.location-choice-title {
    color: white;
    font-size: 1.8rem;
    font-weight: 600;
    margin-bottom: 30px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.location-choice-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
    margin-bottom: 25px;
}

.location-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 25px 35px;
    border: none;
    border-radius: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 150px;
}

.location-btn-house {
    background: linear-gradient(135deg, #4CAF50 0%, #388E3C 100%);
    box-shadow: 0 6px 20px rgba(76, 175, 80, 0.4);
}

.location-btn-house:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(76, 175, 80, 0.5);
}

.location-btn-grocery {
    background: linear-gradient(135deg, #9E9E9E 0%, #757575 100%);
    box-shadow: 0 6px 20px rgba(0,0,0,0.3);
    position: relative;
}

.location-btn-grocery.disabled {
    cursor: not-allowed;
    opacity: 0.7;
}

.location-icon {
    font-size: 2.5rem;
    margin-bottom: 10px;
}

.location-label {
    color: white;
    font-size: 1.1rem;
    font-weight: 600;
}

.coming-soon-tag {
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    background: #FF9800;
    color: white;
    font-size: 0.7rem;
    padding: 3px 10px;
    border-radius: 10px;
    font-weight: 600;
    white-space: nowrap;
}

.location-cancel {
    background: transparent;
    border: 2px solid rgba(255,255,255,0.5);
    color: rgba(255,255,255,0.8);
    padding: 12px 30px;
    border-radius: 10px;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.3s;
}

.location-cancel:hover {
    background: rgba(255,255,255,0.1);
    border-color: white;
    color: white;
}

/* ============================================
   TUTORIAL MODAL
   ============================================ */

.tutorial-modal-content {
    background: linear-gradient(180deg, #1a237e 0%, #0d47a1 100%);
    border-radius: 20px;
    padding: 40px 50px;
    text-align: center;
    max-width: 900px;
    width: 95%;
    box-shadow: 0 20px 60px rgba(0,0,0,0.5);
    border: 3px solid rgba(255,255,255,0.2);
}

.tutorial-title {
    color: white;
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 30px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.tutorial-sections {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-bottom: 30px;
}

.tutorial-section {
    background: rgba(255,255,255,0.1);
    border-radius: 15px;
    padding: 20px;
    text-align: left;
    display: flex;
    align-items: flex-start;
    gap: 15px;
}

.tutorial-icon {
    font-size: 2rem;
    flex-shrink: 0;
}

.tutorial-section h3 {
    color: #64B5F6;
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 8px;
}

.tutorial-section p {
    color: rgba(255,255,255,0.9);
    font-size: 0.95rem;
    line-height: 1.5;
    margin: 0;
}

.tutorial-section strong {
    color: #FFD54F;
}

.tutorial-start-btn {
    padding: 15px 40px;
    font-size: 1.2rem;
}

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

@media (max-width: 1200px) {
    .trade-cards,
    .path-cards,
    .degree-cards {
        flex-wrap: wrap;
    }
}

@media (max-width: 768px) {
    .screen-title {
        font-size: 1.5rem;
    }

    .game-title-large {
        font-size: 2.5rem;
    }

    .simulation-card,
    .trade-card,
    .path-card,
    .degree-card,
    .priority-card {
        width: 100%;
        max-width: 350px;
    }

    .card-row,
    .trade-cards,
    .path-cards,
    .degree-cards,
    .priority-cards {
        flex-direction: column;
        align-items: center;
    }

    .intro-form {
        min-width: auto;
        width: 90%;
        padding: 30px;
    }

    .job-modal-content {
        flex-direction: column;
    }

    .job-detail-left {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
}
