:root {
    --bg-color: #121212;
    --panel-color: #242424;
    --panel-border: #3a3a3a;
    --led-red: #ff2a2a;
    --led-dim: #3a0000;
    --urban-red: #cf2a2a;
    --nt-green: #2a8f46;
    --lantau-blue: #1d72b8;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--bg-color);
    color: #ffffff;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    margin: 0;
    padding: 20px;
    box-sizing: border-box;
}

.app-header {
    text-align: center;
    margin-bottom: 15px;
}

h1 {
    margin: 0 0 5px 0;
    font-size: 1.6rem;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: #e0e0e0;
}

.header-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    margin-top: 5px;
}

.lang-selector {
    background-color: #222;
    padding: 2px;
    border-radius: 4px;
    display: flex;
}

.lang-btn {
    background: none;
    border: none;
    color: #666;
    padding: 3px 8px;
    font-size: 0.75rem;
    cursor: pointer;
    font-weight: bold;
    border-radius: 3px;
}

.lang-btn.active {
    background-color: #444;
    color: #fff;
}

.status-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: bold;
    letter-spacing: 1px;
    background-color: #444;
    color: #aaa;
}

.status-badge.hired {
    background-color: #ff9800;
    color: #000;
}

/* Expanded container frame for wider map viewports */
.meter-container {
    background-color: var(--panel-color);
    border: 5px solid var(--panel-border);
    border-radius: 14px;
    padding: 20px;
    width: 100%;
    max-width: 480px; 
    box-shadow: 0 15px 35px rgba(0,0,0,0.6);
    box-sizing: border-box;
}

/* Interactive Map Section (ENHANCED SIZE) */
.map-panel {
    background: #1e1e1e;
    border: 1px solid #333;
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 15px;
}

.map-panel h3 {
    margin: 0 0 10px 0;
    font-size: 0.85rem;
    color: #bbb;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

#map {
    width: 100%;
    height: 400px; /* Map height significantly increased from 180px */
    border-radius: 6px;
    background-color: #000;
    border: 1px solid #444;
    z-index: 1; /* Keeps zoom elements layered properly */
}

.map-status {
    margin-top: 10px;
    font-size: 0.8rem;
    color: #00e676; 
    font-weight: bold;
    text-align: center;
    background: #111;
    padding: 6px;
    border-radius: 4px;
}

/* Taxi Mode Selector Grid */
.taxi-selector {
    display: flex;
    justify-content: space-between;
    margin-bottom: 20px;
    gap: 8px;
}

.type-btn {
    flex: 1;
    padding: 10px 5px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 700;
    font-size: 0.85rem;
    color: #ffffff;
    opacity: 0.35;
    transition: opacity 0.2s ease, transform 0.1s ease;
}

.type-btn.active {
    opacity: 1;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

.btn-urban { background-color: var(--urban-red); }
.btn-nt { background-color: var(--nt-green); }
.btn-lantau { background-color: var(--lantau-blue); }

/* Classic Black Digital LED Faceplate */
.led-display {
    background-color: #000000;
    border: 3px solid #151515;
    padding: 18px;
    border-radius: 8px;
    margin-bottom: 20px;
    box-shadow: inset 0 0 12px rgba(0,0,0,0.9);
}

.display-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #111;
    padding-bottom: 10px;
    margin-bottom: 10px;
}

.display-row:last-child {
    border-bottom: none;
    padding-bottom: 0;
    margin-bottom: 0;
}

.label {
    font-size: 0.7rem;
    color: #777777;
    font-weight: bold;
    letter-spacing: 1px;
}

.value {
    font-family: 'Courier New', Courier, monospace;
    font-size: 2.6rem;
    font-weight: bold;
    color: var(--led-red);
    text-shadow: 0 0 8px rgba(255, 42, 42, 0.6);
    letter-spacing: 1px;
}

.value.small {
    font-size: 1.2rem;
}

.secondary-info div, .telemetry div {
    display: flex;
    flex-direction: column;
    width: 48%;
}

.secondary-info div:last-child, .telemetry div:last-child {
    align-items: flex-end;
}

/* Hardware Control Panel buttons */
.controls {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 20px;
}

.action-btn {
    padding: 12px;
    font-size: 0.9rem;
    font-weight: bold;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    color: white;
    text-transform: uppercase;
}

.action-btn:disabled {
    opacity: 0.2;
    cursor: not-allowed;
}

.btn-hire { background-color: #2e7d32; }
.btn-empty { background-color: #c62828; }
.btn-baggage { background-color: #ef6c00; }
.btn-tunnel { background-color: #00838f; }

/* Diagnostic Sandbox/Simulation Styles */
.simulator-helpers {
    background: #1a1a1a;
    border: 1px dashed #444;
    padding: 12px;
    border-radius: 6px;
}

.simulator-helpers h3 {
    margin: 0 0 10px 0;
    font-size: 0.8rem;
    color: #888;
    text-align: center;
    text-transform: uppercase;
}

.sim-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.sim-btn {
    background-color: #333;
    border: 1px solid #444;
    color: #ccc;
    padding: 8px;
    font-size: 0.75rem;
    border-radius: 4px;
    cursor: pointer;
}

.sim-btn:hover {
    background-color: #444;
    color: #fff;
}
/* Fare Table Panel Styles */
.fare-table-panel {
    background: #1a1a1a;
    border: 1px solid #2e2e2e;
    border-radius: 6px;
    margin-bottom: 15px;
    overflow: hidden;
}

.table-toggle-btn {
    width: 100%;
    background: #252525;
    color: #ccc;
    border: none;
    padding: 10px;
    font-size: 0.8rem;
    font-weight: bold;
    cursor: pointer;
    text-align: center;
    transition: background 0.2s;
}

.table-toggle-btn:hover {
    background: #303030;
    color: #fff;
}

.table-content {
    padding: 10px;
    transition: max-height 0.3s ease-out;
}

.table-content.hidden {
    display: none;
}

.reference-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.75rem;
    text-align: left;
    color: #ddd;
}

.reference-table th, .reference-table td {
    padding: 6px 4px;
    border-bottom: 1px solid #2e2e2e;
}

.reference-table th {
    color: #888;
    font-weight: bold;
    text-transform: uppercase;
}

.reference-table small {
    color: #666;
    display: block;
}

.table-notes {
    margin-top: 8px;
    font-size: 0.7rem;
    color: #666;
    text-align: center;
}
/* Route Select Dropdown Styling */
.route-select-panel {
    background: #1e1e1e;
    border: 1px solid #333;
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 15px;
}

.route-select-panel h3 {
    margin: 0 0 10px 0;
    font-size: 0.85rem;
    color: #bbb;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.select-row {
    display: flex;
    gap: 10px;
}

.select-row select {
    flex: 1;
    padding: 10px;
    background: #111;
    color: #fff;
    border: 1px solid #444;
    border-radius: 4px;
    font-size: 0.85rem;
    cursor: pointer;
}

.select-row select:focus {
    border-color: var(--led-red);
    outline: none;
}
/* Route Select Panel Grid styling */
.route-select-panel {
    background: #1e1e1e;
    border: 1px solid #333;
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 15px;
}

.route-select-panel h3 {
    margin: 0 0 10px 0;
    font-size: 0.85rem;
    color: #bbb;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.search-row {
    display: flex;
    gap: 10px;
}

.search-box-container {
    flex: 1;
    position: relative;
}

.search-box-container input {
    width: 100%;
    padding: 10px;
    background: #111;
    color: #fff;
    border: 1px solid #444;
    border-radius: 4px;
    font-size: 0.85rem;
    box-sizing: border-box;
}

.search-box-container input:focus {
    border-color: var(--led-red);
    outline: none;
}

/* Semantically structured Autocomplete Dropdown List Overlay */
.autocomplete-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #242424;
    border: 1px solid #444;
    border-top: none;
    border-radius: 0 0 4px 4px;
    max-height: 200px;
    overflow-y: auto;
    z-index: 1000;
    box-shadow: 0 4px 10px rgba(0,0,0,0.5);
    
    /* Clear default HTML ul styles */
    list-style: none;
    margin: 0;
    padding: 0;
}

.autocomplete-dropdown.hidden {
    display: none;
}

/* Individual list item layout matching a native menu select option */
.autocomplete-dropdown li {
    padding: 10px 12px;
    cursor: pointer;
    font-size: 0.8rem;
    color: #ddd;
    border-bottom: 1px solid #333;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: background 0.15s, color 0.15s;
}

.autocomplete-dropdown li:last-child {
    border-bottom: none;
}

.autocomplete-dropdown li:hover {
    background: #333;
    color: #fff;
}
.suggestion-item {
    padding: 8px 12px;
    cursor: pointer;
    font-size: 0.8rem;
    color: #ddd;
    border-bottom: 1px solid #333;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.suggestion-item:hover {
    background: #333;
    color: #fff;
}
/* Custom Pet Surcharge Button Theme Styles */
.action-btn.btn-pet {
    background: linear-gradient(135deg, #ff9800 0%, #e65100 100%);
    border-color: #f57c00;
    color: #fff;
}

.action-btn.btn-pet:hover:not([disabled]) {
    background: linear-gradient(135deg, #ffa726 0%, #f57c00 100%);
    box-shadow: 0 0 10px rgba(255, 152, 0, 0.4);
}