@import url('https://fonts.googleapis.com/css2?family=Press+Start+2P&family=VT323&family=Roboto+Mono:wght@400;700&display=swap');

/* ============================================================
   FareChaser — retro-arcade theme
   Palette:
     bg deep      #1a1d29   surface     #252938
     surface alt  #2f3346   border      #4a5070
     text         #f5e6c8   text dim    #aab0c8
     accent amber #ffb454   accent neon #6ee7b7
     warn         #ef6464   danger      #c94c4c
   ============================================================ */

:root {
    --bg:         #1a1d29;
    --surface:    #252938;
    --surface-2:  #2f3346;
    --border:     #4a5070;
    --border-2:   #6a7090;
    --text:       #f5e6c8;
    --text-dim:   #aab0c8;
    --accent:     #ffb454;
    --neon:       #6ee7b7;
    --warn:       #ef6464;
    --danger:     #c94c4c;

    --btn-accept:   #4f9d4f;   /* forest green */
    --btn-decline:  #b34a3d;   /* rust red */
    --btn-smoke:    #c98a3a;   /* tobacco amber */
    --btn-break:    #5a8c8c;   /* dusty teal */
    --btn-clean:    #7a6cb0;   /* muted purple */
    --btn-online:   #4a6fa5;   /* steel blue */
    --btn-offline:  #b87333;   /* burnt bronze */

    --pixel: 'Press Start 2P', 'VT323', monospace;
    --mono:  'Roboto Mono', 'Courier New', monospace;
}

html, body {
    margin: 0;
    padding: 0;
    height: 100vh;
    background-color: var(--bg);
    color: var(--text);
    font-family: var(--mono);
    font-size: 13px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

body {
    display: flex;
    flex-direction: row;
}

/* On index.php the start-shift <form> wraps both #map and #theSettings, so
   body's only direct child is the form. Make the form transparent to the
   flex layout so its children become the flex items. */
body > form { display: contents; }

a:link, a:visited { color: var(--accent); text-decoration: none; border-bottom: 1px dotted var(--accent); }
a:hover, a:active { color: var(--neon); border-bottom-color: var(--neon); }

hr {
    border: 0;
    border-top: 1px dashed var(--border);
    margin: 10px 0;
}

/* ---------- Layout ---------- */

#map {
    flex: 1 1 auto;
    min-width: 0;
    height: 100vh;
    background: #11131c;
    border-right: 3px solid var(--border-2);
}

#theSettings {
    flex: 0 0 380px;
    width: 380px;
    height: 100vh;
    overflow-x: hidden;
    overflow-y: auto;
    background: var(--surface);
    box-shadow: inset 4px 0 0 var(--border);
    padding: 0;
    display: flex;
    flex-direction: column;
}

#topFrame {
    position: sticky;
    top: 0;
    z-index: 10;
    background: linear-gradient(180deg, var(--surface-2) 0%, var(--surface) 100%);
    border-bottom: 3px solid var(--border-2);
    padding: 12px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

#bottomFrame {
    padding: 12px 16px 24px 16px;
    flex: 1 1 auto;
}

h1 {
    font-family: var(--pixel);
    font-size: 14px;
    margin: 0;
    color: var(--accent);
    letter-spacing: 1px;
    text-shadow: 2px 2px 0 #000;
}

h2 {
    font-family: var(--pixel);
    font-size: 8px;
    margin: 0;
    color: var(--text-dim);
    letter-spacing: 1px;
}

/* ---------- Buttons (arcade cabinet style) ---------- */

.optionblock {
    display: block;
    width: 100%;
    box-sizing: border-box;
    padding: 14px 16px;
    margin: 0 auto;
    font-family: var(--pixel);
    font-size: 11px;
    font-weight: 400;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--text);
    background: var(--surface-2);
    border: 3px solid var(--border-2);
    border-radius: 6px;
    box-shadow: 4px 4px 0 #00000088;
    cursor: pointer;
    transition: transform 0.05s ease, box-shadow 0.05s ease;
    -webkit-appearance: none;
    appearance: none;
}

.optionblock:hover {
    filter: brightness(1.12);
}

.optionblock:active {
    transform: translate(4px, 4px);
    box-shadow: 0 0 0 #00000088;
}

.accept   { background: var(--btn-accept);  border-color: #2e6e2e; color: #fff; }
.decline  { background: var(--btn-decline); border-color: #7a2e26; color: #fff; }
.smoke    { background: var(--btn-smoke);   border-color: #7a5520; color: #1a1d29; }
.break    { background: var(--btn-break);   border-color: #355555; color: #fff; }
.clean    { background: var(--btn-clean);   border-color: #4a3e75; color: #fff; }
.goonline { background: var(--btn-online);  border-color: #2b4570; color: var(--accent); }
.gooffline{ background: var(--btn-offline); border-color: #6e4520; color: #1a1d29; }

input[type=text] {
    font-family: var(--mono);
    background: var(--bg);
    color: var(--text);
    border: 2px solid var(--border);
    border-radius: 4px;
    padding: 8px 10px;
    width: 100%;
    box-sizing: border-box;
}
input[type=text]:focus { outline: none; border-color: var(--accent); }

select {
    font-family: var(--mono);
    background: var(--bg);
    color: var(--text);
    border: 2px solid var(--border);
    border-radius: 4px;
    padding: 6px 8px;
}
select:focus { outline: none; border-color: var(--accent); }

label, small, i { color: var(--text-dim); }

/* ---------- Tables (info panels) ---------- */

.datatables {
    width: 100%;
    border: 2px solid var(--border);
    border-radius: 6px;
    background: var(--surface-2);
    margin: 8px 0 14px 0;
    border-collapse: separate;
    border-spacing: 0;
    overflow: hidden;
}

.datatables td, .datatables th {
    padding: 6px 8px;
}

.shifty {
    text-align: center;
    font-size: 11px;
    color: var(--text-dim);
    width: 50%;
}
.shifty b { color: var(--accent); font-family: var(--mono); }

.cleanstress {
    font-family: var(--pixel);
    font-size: 9px;
    font-weight: 400;
    text-align: center;
    color: var(--text);
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    letter-spacing: 1px;
    padding: 8px !important;
}

/* dotted "today's passengers" / demand info boxes */
.paxtable, [style*="dotted #000"] {
    background: var(--surface-2) !important;
    border: 2px dashed var(--border) !important;
    color: var(--text) !important;
    border-radius: 4px;
}

/* ---------- Meters (dirtiness/stress/hostility) ---------- */

#clean1, #clean2, #clean3, #clean4, #clean5, #clean6, #clean7, #clean8, #clean9, #clean10,
#stress1, #stress2, #stress3, #stress4, #stress5, #stress6, #stress7, #stress8, #stress9, #stress10,
#hostile1, #hostile2, #hostile3, #hostile4, #hostile5, #hostile6, #hostile7, #hostile8, #hostile9, #hostile10 {
    width: 10%;
    height: 14px;
    padding: 0 !important;
    border: 1px solid var(--bg);
    box-shadow: inset 0 -2px 0 #00000033;
}

/* ---------- Messages (event log) ---------- */

.message {
    border-radius: 8px;
    border: 2px solid var(--border);
    background: var(--surface-2);
    padding: 10px 14px;
    margin: 10px 0;
    color: var(--text);
}

.message:first-child {
    border-color: var(--accent);
    background: linear-gradient(180deg, #3a3522 0%, var(--surface-2) 100%);
    box-shadow: 0 0 12px #ffb45433;
}

.message p { margin: 6px 0; }

.statschange {
    font-family: var(--mono);
    font-weight: 700;
    text-align: center;
    color: var(--neon);
    background: var(--bg);
    border: 1px dashed var(--border);
    border-radius: 4px;
    padding: 8px;
    font-size: 12px;
    letter-spacing: 0.5px;
}

.smol {
    font-size: 11px;
    color: var(--text-dim);
}

.leadrow {
    border-top: 1px solid var(--border);
    padding: 6px 8px;
    font-family: var(--mono);
    font-size: 12px;
    color: var(--text);
}
.leadrow b { color: var(--accent); }

/* ---------- Sliders (preserved from original; unused in current UI) ---------- */

.slidecontainer { width: 100%; }
.slider {
    -webkit-appearance: none;
    appearance: none;
    width: 75%;
    height: 25px;
    background: var(--border);
    outline: none;
    opacity: 0.7;
    transition: opacity .2s;
    margin: 5px 10% 20px 10%;
    border-radius: 4px;
}
.slider:hover { opacity: 1; }
.slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 25px;
    height: 25px;
    background: var(--accent);
    cursor: pointer;
    border-radius: 4px;
}
.slider::-moz-range-thumb {
    width: 25px;
    height: 25px;
    background: var(--accent);
    cursor: pointer;
    border-radius: 4px;
}

#ninja { display: none; }

/* ---------- Passenger card (name + star rating) ---------- */
.paxname-card {
    font-family: var(--pixel);
    font-size: 18px;
    text-align: center;
    color: var(--accent);
    text-shadow: 2px 2px 0 #000;
    letter-spacing: 1px;
    margin: 8px 0;
}
.paxname-sub {
    font-family: var(--mono);
    font-size: 14px;
    color: var(--text);
    letter-spacing: 0;
}

/* ---------- Mobile (stack vertically) ---------- */

@media (max-width: 900px) {
    body { flex-direction: column; }
    #map {
        flex: 0 0 auto;
        height: 38vh;
        width: 100%;
        border-right: none;
        border-bottom: 3px solid var(--border-2);
    }
    #theSettings {
        flex: 1 1 auto;
        width: 100%;
        height: auto;
        max-height: 62vh;
        box-shadow: none;
    }
    .optionblock { font-size: 10px; padding: 12px; }
    h1 { font-size: 12px; }
    h2 { font-size: 7px; }
}

@media (max-width: 480px) {
    .optionblock { font-size: 9px; padding: 10px; box-shadow: 3px 3px 0 #00000088; }
    .optionblock:active { transform: translate(3px, 3px); box-shadow: 0 0 0 #00000088; }
    #bottomFrame { padding: 10px 10px 20px 10px; }
}

@media (min-width: 768px) { .textmobile { display: block; } }
@media (min-width: 992px) { .textmobile { display: none; } }
