/* ============================================================
   COMPONENTS - cards, buttons, inputs, tabs, toasts, overlays.
   Shared by every screen.
   ============================================================ */
/* Mission card - the big colored contract block. */
.mission-card {
background: rgba(0, 255, 136, 0.04);
border: 2px solid #00aa66;
border-radius: 8px;
padding: 14px 16px;
margin-bottom: 14px;
transition: all 0.2s;
display: flex;
flex-direction: column;
justify-content: space-between;
min-height: 160px;
width: 100%;
position: relative;
border-left-width: 6px;
border-left-style: solid;
border-left-color: #00ff88;
}
.mission-card:hover { box-shadow: 0 0 14px rgba(0, 255, 136, 0.25); border-color: #00ff88; }
.mission-card.task { border-left-color: #ff4466; border-color: #ff4466; background: rgba(255, 68, 102, 0.06); }
.mission-card.cargo { border-left-color: #ff8800; border-color: #ff8800; background: rgba(255, 136, 0, 0.06); }
.mission-card.passenger { border-left-color: #4488ff; border-color: #4488ff; background: rgba(68, 136, 255, 0.06); }
.mission-card.completable { border-color: #00ff88 !important; box-shadow: 0 0 18px rgba(0, 255, 136, 0.7); background: rgba(0, 255, 136, 0.12); }
.mission-card .card-title { font-weight: bold; font-size: 1.05em; color: #00ff88; margin-bottom: 4px; }
.mission-card .card-desc { color: #88ccaa; font-size: 0.9em; margin-bottom: 4px; flex: 1; }
.mission-card .card-meta { color: #66aaff; font-size: 0.82em; margin-bottom: 2px; }
.mission-card .card-reward { color: #ffdd00; font-weight: bold; font-size: 1em; margin-top: 4px; }
.mission-card .card-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.mission-card .card-actions .btn { margin: 0; padding: 6px 14px; font-size: 0.85em; }

/* Generic small cards. */
.card { background: rgba(0, 40, 25, 0.5); border: 1px solid #00aa66; border-radius: 6px; padding: 14px; margin-bottom: 12px; transition: all 0.2s; }
.card:hover { border-color: #00ff88; box-shadow: 0 0 10px rgba(0, 255, 136, 0.3); }
.card-title { color: #00ff88; font-weight: 700; margin-bottom: 6px; font-size: 1em; letter-spacing: 1px; }
.card-desc { color: #88ccaa; font-size: 0.9em; margin-bottom: 8px; }
.card-meta { color: #66aaff; font-size: 0.85em; margin-bottom: 4px; }
.card-reward { color: #ffdd00; font-weight: 700; text-shadow: 0 0 6px rgba(255, 221, 0, 0.4); }
.cr { color: #ffdd00; font-weight: 700; }
.cr-large { color: #ffdd00; font-weight: 700; font-size: 1.3em; text-shadow: 0 0 8px rgba(255, 221, 0, 0.5); }
.price-tag { color: #ffdd00; font-weight: 700; }
.card.cargo { border-color: #ff8800; }
.card.passenger { border-color: #4488ff; }
.card.task { border-color: #ff2244; }
.card.completable { border-color: #00ff88; box-shadow: 0 0 16px rgba(0, 255, 136, 0.6); background: rgba(0, 60, 35, 0.6); }

/* Generic buttons (success / danger / warning variants). */
.btn {
background: linear-gradient(180deg, #008855 0%, #005533 100%);
color: #fff;
border: 1px solid #00ff88;
padding: 8px 14px;
cursor: pointer;
border-radius: 4px;
font-family: 'IBM Plex Mono', 'Courier New', monospace;
font-size: 0.9em;
transition: all 0.2s;
margin: 2px;
}
.btn:hover:not(:disabled) { background: linear-gradient(180deg, #00aa66 0%, #007744 100%); box-shadow: 0 0 10px rgba(0, 255, 136, 0.5); }
.btn:disabled { opacity: 0.4; cursor: not-allowed; }
.btn-primary { background: linear-gradient(180deg, #0066cc 0%, #004499 100%); border-color: #66aaff; }
.btn-warning { background: linear-gradient(180deg, #cc8800 0%, #995500 100%); border-color: #ffcc00; }
.btn-danger { background: linear-gradient(180deg, #cc2222 0%, #991111 100%); border-color: #ff6666; }
.btn-success { background: linear-gradient(180deg, #00aa44 0%, #007722 100%); border-color: #00ff88; }
.btn-group { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }

/* Inputs and select boxes. */
input[type="number"], input[type="text"], select {
background: rgba(0, 30, 20, 0.6);
border: 1px solid #00aa66;
color: #00ff88;
padding: 6px 10px;
border-radius: 4px;
font-family: 'IBM Plex Mono', 'Courier New', monospace;
font-size: 0.9em;
width: 100px;
}
input[type="number"]:focus, input[type="text"]:focus, select:focus { outline: none; border-color: #00ff88; box-shadow: 0 0 8px rgba(0, 255, 136, 0.4); }
.input-row { display: flex; align-items: center; gap: 10px; margin: 8px 0; flex-wrap: wrap; }
.input-row label { color: #66aaff; min-width: 100px; }

/* Auto-fill grid for system / location cards. */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }

/* Full-screen overlays for 'jumping' and 'refueling' animations. */
.overlay { position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: rgba(0, 0, 0, 0.95); display: none; align-items: center; justify-content: center; z-index: 1000; flex-direction: column; }
.overlay.active { display: flex; }
.travel-stars { font-size: 3em; margin-bottom: 20px; animation: warpSpeed 0.5s infinite; }
@keyframes warpSpeed { 0% { opacity: 0.3; transform: scale(0.95); } 50% { opacity: 1; transform: scale(1.1); } 100% { opacity: 0.3; transform: scale(0.95); } }
.overlay-title { color: #00ff88; font-size: 2em; text-shadow: 0 0 20px #00ff88; margin-bottom: 20px; text-align: center; font-weight: 700; letter-spacing: 4px; }
.overlay-subtitle { color: #66aaff; font-size: 1.1em; margin-bottom: 24px; text-align: center; }
.progress-bar { width: 60%; max-width: 500px; height: 20px; background: rgba(0, 50, 30, 0.5); border: 1px solid #00aa66; border-radius: 10px; overflow: hidden; margin-bottom: 16px; }
.progress-fill { height: 100%; background: linear-gradient(90deg, #00ff88 0%, #66ffcc 100%); width: 0%; transition: width 0.1s linear; box-shadow: 0 0 10px #00ff88; }
.progress-fill.refuel { background: linear-gradient(90deg, #ff8800 0%, #ffcc00 100%); box-shadow: 0 0 10px #ff8800; }
.overlay-status { color: #88ccaa; font-size: 0.95em; text-align: center; min-height: 24px; }
.refuel-pump { font-size: 4em; margin-bottom: 20px; animation: pumpAnimation 1s infinite; }
@keyframes pumpAnimation { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }

/* Top-right toast notifications. */
.toast-container { position: fixed; top: 20px; right: 20px; z-index: 2000; display: flex; flex-direction: column; gap: 10px; }
.toast { background: rgba(0, 30, 20, 0.95); border: 2px solid #00ff88; color: #00ff88; padding: 12px 20px; border-radius: 6px; min-width: 250px; box-shadow: 0 0 20px rgba(0, 255, 136, 0.4); animation: slideIn 0.3s ease-out; font-size: 0.9em; }
.toast.success { border-color: #00ff88; }
.toast.error { border-color: #ff4444; color: #ff8888; box-shadow: 0 0 20px rgba(255, 68, 68, 0.4); }
.toast.warning { border-color: #ffaa00; color: #ffcc66; box-shadow: 0 0 20px rgba(255, 170, 0, 0.4); }
.toast.info { border-color: #66aaff; color: #99ccff; box-shadow: 0 0 20px rgba(102, 170, 255, 0.4); }
@keyframes slideIn { from { transform: translateX(120%); opacity: 0; } to { transform: translateX(0); opacity: 1; } }
.toast.fadeOut { animation: fadeOut 0.3s ease-in forwards; }
@keyframes fadeOut { to { opacity: 0; transform: translateX(120%); } }

/* Tabs (used when a screen has sub-tabs). */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid #00aa66; margin-bottom: 16px; flex-wrap: wrap; }
.tab { background: transparent; border: 1px solid #00aa66; border-bottom: none; color: #66aaff; padding: 8px 16px; cursor: pointer; border-radius: 4px 4px 0 0; font-family: 'IBM Plex Mono', 'Courier New', monospace; font-size: 0.9em; transition: all 0.2s; }
.tab:hover { color: #00ff88; }
.tab.active { background: rgba(0, 50, 30, 0.7); color: #00ff88; border-color: #00ff88; }

/* Shared tab bar used by Stock Market, Bank, and Shop screens.
   Green glowing style — same look across all three screens. */
.screen-tabs {
display: flex;
gap: 6px;
margin-bottom: 14px;
flex-wrap: wrap;
}
.screen-tab-btn {
background: rgba(0, 30, 20, 0.5);
border: 1px solid #00aa66;
color: #88ccaa;
padding: 8px 18px;
border-radius: 5px;
cursor: pointer;
font-family: 'Orbitron', sans-serif;
font-size: 0.82em;
letter-spacing: 1px;
transition: all 0.2s;
}
.screen-tab-btn:hover {
background: rgba(0, 60, 40, 0.6);
border-color: #00ff88;
color: #00ff88;
}
.screen-tab-btn.active {
background: rgba(0, 100, 60, 0.7);
border-color: #00ff88;
color: #00ff88;
box-shadow: 0 0 10px rgba(0, 255, 136, 0.3);
}

/* Shop rows: one tradeable item per row. */
.trade-row { display: flex; justify-content: space-between; align-items: center; padding: 8px 12px; background: rgba(0, 30, 20, 0.4); border: 1px solid #00aa66; border-radius: 4px; margin-bottom: 6px; flex-wrap: wrap; gap: 10px; }
.good-name { color: #00ff88; font-weight: bold; }
.good-price { color: #ffdd00; }
.good-owned { color: #66aaff; font-size: 0.85em; }

.section { background: rgba(0, 25, 18, 0.4); border: 1px solid #006644; border-radius: 6px; padding: 14px; margin-bottom: 14px; }
.section-title { color: #66aaff; font-weight: 700; margin-bottom: 10px; font-size: 0.95em; text-transform: uppercase; letter-spacing: 2px; }
.info-line { color: #88ccaa; font-size: 0.9em; margin: 4px 0; }
.empty-msg { color: #ff8800; text-align: center; padding: 30px 10px; font-size: 1em; font-style: italic; }
.small-text { color: #88ccaa; font-size: 0.82em; margin-top: 4px; }
.bank-detail { background: rgba(0, 30, 20, 0.4); border: 1px solid #00aa66; border-radius: 4px; padding: 8px 10px; margin-bottom: 8px; }
.main-display.map-mode { padding: 0; overflow: hidden; }

/* Quick-nav button row for Bank / Shop / Trade screens. */
.quick-nav { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.quick-nav-btn {
background: linear-gradient(180deg, #0066cc 0%, #004499 100%);
border: 1px solid #66aaff; color: #fff;
padding: 7px 16px; border-radius: 4px; cursor: pointer;
font-family: 'IBM Plex Mono', 'Courier New', monospace;
font-size: 0.85em; letter-spacing: 1px; transition: all 0.2s;
}
.quick-nav-btn:hover { background: linear-gradient(180deg, #0077ee 0%, #0055bb 100%); box-shadow: 0 0 10px rgba(102, 170, 255, 0.5); }

/* Smooth scrolling for the main display container. */
.main-display { scroll-behavior: smooth; }
