:root {
    /* DEFAULT: LIGHT MODE - TRUST & CLASS (ROYAL BLUE & SILVER) */
    --primary: #2563EB; /* Bright Blue for CTAs/Buttons */
    --primary-glow: rgba(37, 99, 235, 0.3);
    --secondary: #1E3A8A; /* Royal Blue for strong headers/text */
    --bg-body: #F8FAFC; /* Very soft cool-tinted white */
    --bg-card: #FFFFFF; /* Pure White Cards */
    --bg-glass: rgba(255, 255, 255, 0.9);
    --text-main: #1E293B; /* Deep Slate for high readability */
    --text-light: #64748B; /* Muted Slate */
    --border: #E5E7EB; /* Light Silver for clean dividers */
    --shadow: 0 10px 30px -10px rgba(30, 58, 138, 0.1); 
    --radius: 16px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Ensure buttons have crisp white text */
.btn-login, .btn-book {
    color: #FFFFFF !important; 
    font-weight: 700;
}
/* --- Global Reset --- */
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background-color: var(--bg-body);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
    transition: background-color 0.3s, color 0.3s;
}

a { text-decoration: none; color: inherit; transition: var(--transition); }
ul { list-style: none; }

/* --- Navbar --- */
.navbar {
    position: fixed; top: 0; left: 0; right: 0;
    padding: 1rem 5%;
    display: flex; justify-content: space-between; align-items: center;
    background: var(--bg-glass);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    z-index: 1000;
}
.logo { 
    font-weight: 900; font-size: 1.8rem; color: var(--text-main); 
    display: flex; align-items: center; gap: 8px; letter-spacing: -1px;
}
.logo span { color: var(--primary); }
.nav-links { display: flex; gap: 30px; align-items: center; }
.nav-links a { font-weight: 500; font-size: 0.95rem; color: var(--text-light); }
.nav-links a:hover { color: var(--primary); }

/* --- Buttons (Fixed Consistency) --- */
.btn-login, .btn-book {
    background: var(--primary); 
    color: white !important;
    padding: 10px 24px; 
    border-radius: 50px; 
    font-weight: 600;
    box-shadow: 0 4px 15px var(--primary-glow);
    transition: var(--transition); 
    border: none; 
    cursor: pointer;
    display: inline-flex; 
    align-items: center; 
    justify-content: center; 
    gap: 8px;
    font-size: 0.95rem;
}
.btn-login:hover, .btn-book:hover { 
    transform: translateY(-2px); 
    box-shadow: 0 8px 25px var(--primary-glow);
    background-color: var(--primary); /* Ensure bg stays consistent */
    filter: brightness(1.1);
}

/* --- Hero Section --- */
.hero-section {
    min-height: 90vh; /* Changed from 100vh to fit better */
    display: flex; flex-direction: column; justify-content: center; align-items: center;
    text-align: center;
    background: radial-gradient(circle at top, var(--bg-card) 0%, var(--bg-body) 100%);
    padding: 120px 20px 60px;
    position: relative; overflow: hidden;
}
.hero-title {
    font-size: 4rem; font-weight: 800; line-height: 1.1;
    margin-bottom: 20px; letter-spacing: -2px;
    color: var(--text-main);
}
.hero-subtitle {
    font-size: 1.25rem; color: var(--text-light); max-width: 600px;
    margin-bottom: 40px;
}

/* --- Search Bar (Fixed Visibility) --- */
.search-container {
    background: var(--bg-card);
    padding: 20px;
    border-radius: 50px; /* Pill shape */
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
    display: flex;
    gap: 15px;
    align-items: center;
    max-width: 900px;
    width: 100%;
    margin-top: 20px;
    flex-wrap: wrap;
}
.search-group { flex: 1; min-width: 150px; text-align: left; }
.search-group label { display: block; font-size: 0.75rem; font-weight: 700; color: var(--text-light); margin-left: 10px; margin-bottom: 2px; text-transform: uppercase;}
.search-group select, .search-group input {
    width: 100%; padding: 10px 15px; border: none; background: transparent;
    font-size: 1rem; color: var(--text-main); outline: none; font-weight: 600;
}

/* --- Car Cards --- */
.car-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 30px; padding: 40px 5%;
}
.car-card {
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: var(--radius); overflow: hidden;
    transition: var(--transition); position: relative;
    display: flex; flex-direction: column;
}
.car-card:hover {
    transform: translateY(-8px);
    border-color: var(--primary);
    box-shadow: 0 20px 40px -10px rgba(59, 130, 246, 0.15);
}
.car-img { width: 100%; height: 220px; object-fit: cover; }
.car-body { padding: 24px; display: flex; flex-direction: column; flex: 1; }
.car-title { font-size: 1.4rem; font-weight: 700; margin-bottom: 5px; color: var(--text-main); }
.car-subtitle { color: var(--text-light); font-size: 0.9rem; }
.car-specs { 
    display: flex; gap: 15px; margin: 20px 0; 
    color: var(--text-light); font-size: 0.9rem; 
}
.car-footer {
    display: flex; justify-content: space-between; align-items: center;
    margin-top: auto; padding-top: 20px;
    border-top: 1px solid var(--border);
}
.price { font-size: 1.5rem; font-weight: 700; color: var(--text-main); }
.price span { font-size: 0.9rem; color: var(--text-light); font-weight: 400; }

/* --- Footer --- */
footer {
    background: #0f172a; padding: 80px 5% 40px;
    border-top: 1px solid var(--border); margin-top: auto;
}
.footer-grid {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 40px; margin-bottom: 60px;
}
.footer-col h4 { color: white; margin-bottom: 20px; font-size: 1.1rem; }
.footer-col p, .footer-col a { 
    color: #94a3b8; display: block; margin-bottom: 12px; 
    font-size: 0.95rem; transition: 0.2s;
}
.footer-col a:hover { color: var(--primary); padding-left: 5px; }

/* --- Admin Panel Fixes --- */
.admin-container {
    display: flex;
    min-height: 100vh;
    padding-top: 70px;
}
.sidebar {
    width: 260px;
    background: var(--bg-card);
    border-right: 1px solid var(--border);
    padding: 30px 20px;
    display: flex; flex-direction: column;
    position: fixed; height: 100%; overflow-y: auto;
}
.admin-content {
    flex: 1;
    margin-left: 260px;
    padding: 40px;
    background: var(--bg-body);
}
.sidebar h3 { color: var(--text-light); font-size: 0.85rem; text-transform: uppercase; margin-bottom: 20px; padding-left: 12px; }
.sidebar-link {
    display: block; padding: 12px 16px; color: var(--text-light);
    font-weight: 500; border-radius: 8px; margin-bottom: 5px; transition: var(--transition);
}
.sidebar-link:hover, .sidebar-link.active {
    background: rgba(59, 130, 246, 0.1); color: var(--primary);
}
/* Admin Tables */
table {
    width: 100%; border-collapse: separate; border-spacing: 0;
    background: var(--bg-card); border-radius: var(--radius);
    overflow: hidden; border: 1px solid var(--border); margin-top: 20px;
}
th, td { padding: 16px; text-align: left; border-bottom: 1px solid var(--border); color: var(--text-main); }
th { background: rgba(59,130,246,0.05); color: var(--text-light); font-weight: 600; text-transform: uppercase; font-size: 0.85rem; }

/* --- Glitch Fixes (Dropdowns & Inputs) --- */
select, option, input[type="datetime-local"], input[type="date"], input[type="text"], input[type="password"], input[type="email"] {
    background-color: var(--bg-card) !important;
    color: var(--text-main) !important;
    border: 1px solid var(--border);
}
/* Force browser calendar to match theme */
body.dark-mode ::-webkit-calendar-picker-indicator { filter: invert(1); }

/* --- Mobile --- */
@media (max-width: 768px) {
    .navbar { flex-direction: column; gap: 15px; }
    .hero-title { font-size: 2.8rem; }
    .admin-container { flex-direction: column; }
    .sidebar { width: 100%; height: auto; position: relative; flex-direction: row; overflow-x: auto; border-right: none; border-bottom: 1px solid var(--border); }
    .admin-content { margin-left: 0; padding: 20px; }
    .search-container { flex-direction: column; border-radius: 16px; }
    .search-group { width: 100%; border-bottom: 1px solid var(--border); padding-bottom: 10px; margin-bottom: 10px; }
}
/* --- Split Screen Auth Layout --- */
.auth-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr; /* Split 50/50 */
    min-height: 100vh;
    width: 100%;
}

.auth-left {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 60px 10%;
    background: var(--bg-body);
}

.auth-right {
    background: url('https://images.unsplash.com/photo-1492144534655-ae79c964c9d7?w=1600') center/cover no-repeat;
    position: relative;
}

/* Dark overlay for the image */
.auth-right::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to right, var(--bg-body), transparent);
}

/* Mobile: Hide the image side */
@media (max-width: 768px) {
    .auth-wrapper { grid-template-columns: 1fr; }
    .auth-right { display: none; }
    .auth-left { padding: 40px 20px; }
}
/* --- PAYMENT SIMULATION CSS --- */
.payment-wrapper {
    display: flex;
    flex-wrap: wrap;
    gap: 50px;
    justify-content: center;
    align-items: flex-start;
    padding: 40px 0;
}

.payment-left {
    flex: 1;
    min-width: 300px;
    max-width: 500px;
}

.payment-right {
    flex: 1;
    min-width: 300px;
    max-width: 450px;
    background: var(--bg-card);
    padding: 30px;
    border-radius: 20px;
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
}

/* 3D CREDIT CARD */
.card-container {
    perspective: 1000px;
    width: 100%;
    max-width: 400px;
    height: 250px;
    margin: 0 auto 30px;
    position: relative;
    z-index: 10;
}

.credit-card {
    width: 100%;
    height: 100%;
    position: relative;
    transform-style: preserve-3d;
    transition: transform 0.6s;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}

.card-container.flipped .credit-card {
    transform: rotateY(180deg);
}

.card-front, .card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    border-radius: 20px;
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    border: 1px solid rgba(255,255,255,0.1);
    overflow: hidden;
    padding: 25px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

/* Neon Glow Effect on Card */
.card-front::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(59,130,246,0.15) 0%, transparent 60%);
    pointer-events: none;
}

.card-back {
    transform: rotateY(180deg);
}

.card-chip {
    width: 50px;
    height: 35px;
    background: linear-gradient(135deg, #fbbf24 0%, #d97706 100%);
    border-radius: 6px;
    position: relative;
}

.card-logo {
    font-weight: 900;
    font-size: 1.5rem;
    color: white;
    font-style: italic;
    text-align: right;
}

.card-number-display {
    font-size: 1.6rem;
    color: white;
    letter-spacing: 2px;
    font-family: 'Courier New', monospace;
    text-shadow: 0 2px 4px rgba(0,0,0,0.5);
}

.card-details {
    display: flex;
    justify-content: space-between;
    color: #94a3b8;
    font-size: 0.8rem;
    text-transform: uppercase;
}

.card-detail-value {
    color: white;
    font-size: 1rem;
    font-weight: 600;
    margin-top: 5px;
}

/* Back of Card Elements */
.black-strip {
    width: 100%;
    height: 50px;
    background: #000;
    position: absolute;
    top: 30px;
    left: 0;
}

.cvv-box {
    background: white;
    color: black;
    padding: 10px;
    text-align: right;
    font-family: 'Courier New', monospace;
    font-weight: bold;
    width: 90%;
    margin-top: 80px;
    border-radius: 4px;
}


/* Make the navbar transparent to blend with the hero */
.navbar {
    background: transparent;
    border-bottom: none;
    position: absolute; /* Floating navbar */
    width: 100%;
}
