:root {
    --bg-dark: #0f172a;
    --glass-bg: rgba(30, 41, 59, 0.7);
    --glass-border: rgba(255, 255, 255, 0.1);
    --primary-accent: #38bdf8;
    --primary-hover: #0284c7;
    --eco-green: #22c55e;
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --card-hover: rgba(56, 189, 248, 0.1);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-main);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow-x: hidden;
    position: relative;
}

/* --- Dynamic Background --- */
.bg-shape {
    position: absolute;
    filter: blur(80px);
    z-index: -1;
    border-radius: 50%;
    opacity: 0.5;
    animation: float 20s infinite alternate ease-in-out;
}

.shape-1 {
    background: radial-gradient(circle, #3b0764, transparent);
    width: 600px; height: 600px;
    top: -10%; left: -10%;
}

.shape-2 {
    background: radial-gradient(circle, #0c4a6e, transparent);
    width: 500px; height: 500px;
    bottom: -10%; right: -5%;
    animation-delay: -5s;
}

.shape-3 {
    background: radial-gradient(circle, #064e3b, transparent);
    width: 400px; height: 400px;
    top: 40%; left: 30%;
    animation-delay: -10s;
}

@keyframes float {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(30px, -50px) scale(1.1); }
}

/* --- Layout --- */
.app-container {
    width: 100%;
    max-width: 480px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 24px;
    z-index: 10;
}

.logo-container {
    text-align: center;
}

.logo-container h1 {
    font-size: 2.5rem;
    font-weight: 700;
    letter-spacing: -1px;
    background: linear-gradient(to right, #38bdf8, #818cf8);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.logo-container p {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-top: 4px;
}

/* --- Glassmorphism Panels --- */
.glass-panel {
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 28px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.active-state {
    opacity: 1;
    transform: translateY(0);
    display: block;
}

.hidden-state {
    opacity: 0;
    transform: translateY(20px);
    display: none;
    pointer-events: none;
}

.panel-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 24px;
}

/* --- Form Elements --- */
.input-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.input-group label {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

input {
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 16px;
    color: white;
    font-size: 1rem;
    font-family: 'Inter', sans-serif;
    outline: none;
    transition: border-color 0.2s;
}

input:focus {
    border-color: var(--primary-accent);
}

input::placeholder {
    color: #475569;
}

.swap-icon-container {
    position: relative;
    height: 32px;
    display: flex;
    align-items: center;
    margin: 4px 0;
}

.route-line {
    position: absolute;
    left: 24px;
    top: -20px;
    bottom: -20px;
    width: 2px;
    background-color: var(--glass-border);
    z-index: -1;
}

.swap-btn {
    background: var(--bg-dark);
    border: 1px solid var(--glass-border);
    color: var(--text-muted);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: 6px;
    transition: all 0.2s;
}

.swap-btn:hover {
    color: white;
    border-color: var(--text-muted);
    transform: rotate(180deg);
}

.primary-btn {
    width: 100%;
    background: linear-gradient(135deg, var(--primary-accent), #4f46e5);
    color: white;
    border: none;
    border-radius: 12px;
    padding: 16px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    margin-top: 24px;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 4px 14px rgba(56, 189, 248, 0.3);
}

.primary-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(56, 189, 248, 0.5);
}

/* --- Results / Vehicle Display --- */
.results-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 20px;
}

.back-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 0.9rem;
    cursor: pointer;
    padding: 8px 0;
    transition: color 0.2s;
}

.back-btn:hover {
    color: white;
}

.results-header .panel-title {
    margin-bottom: 4px;
    font-size: 1.2rem;
}

.route-summary {
    font-size: 0.85rem;
    color: var(--primary-accent);
}

.warning-banner {
    background: rgba(234, 179, 8, 0.1);
    border-left: 4px solid #eab308;
    color: #fce7f3;
    padding: 12px 16px;
    font-size: 0.8rem;
    border-radius: 0 8px 8px 0;
    margin-bottom: 24px;
    line-height: 1.4;
}

.vehicle-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
    max-height: 500px;
    overflow-y: auto;
    padding-right: 4px;
}

/* Scrollbar styling for vehicle list */
.vehicle-list::-webkit-scrollbar {
    width: 6px;
}
.vehicle-list::-webkit-scrollbar-track {
    background: transparent;
}
.vehicle-list::-webkit-scrollbar-thumb {
    background: var(--glass-border);
    border-radius: 10px;
}

.vehicle-card {
    background: rgba(15, 23, 42, 0.4);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
}

.vehicle-card:hover {
    border-color: var(--primary-accent);
    background: var(--card-hover);
    transform: scale(1.02);
}

.eco-badge {
    position: absolute;
    top: 0;
    right: 0;
    background: var(--eco-green);
    color: #064e3b;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 4px 12px;
    border-bottom-left-radius: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.card-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.vehicle-type {
    font-size: 1.1rem;
    font-weight: 600;
    color: white;
}

.capacity {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 4px;
    display: flex;
    gap: 8px;
}

.price-container {
    text-align: right;
    display: flex;
    align-items: center;
    gap: 6px;
}

.price {
    font-size: 1.4rem;
    font-weight: 700;
    color: white;
}

.info-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-muted);
    font-size: 0.7rem;
    cursor: help;
    transition: background 0.2s, color 0.2s;
}

.info-icon:hover {
    background: var(--primary-accent);
    color: white;
}

.card-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid var(--glass-border);
    padding-top: 12px;
    font-size: 0.85rem;
}

.eta {
    color: var(--text-muted);
}

.action-text {
    color: var(--primary-accent);
    font-weight: 600;
}

/* --- Tooltip override logic for later --- */
.tooltip {
    position: relative;
    display: inline-block;
}
