:root {
    --bg-main: #f4f5f7; --bg-card: #ffffff;
    --primary: #1c1c1c; --primary-hover: #333;
    --accent-color: #2c3e50; --accent-orange: #e23744; --accent-green: #10b981;
    --text-dark: #1c1c1c; --text-muted: #696969; --border-color: #e8e8e8;
    --shadow-soft: 0px 4px 12px rgba(0,0,0,0.06); --shadow-hover: 0px 8px 24px rgba(0,0,0,0.12);
}

body.theme-dark {
    --bg-main: #121212; --bg-card: #1c1c1c; --primary: #ffffff; --primary-hover: #e0e0e0;
    --text-dark: #ffffff; --text-muted: #a0a0a0; --border-color: #2d2d2d;
    --shadow-soft: 0px 4px 12px rgba(0,0,0,0.5); --shadow-hover: 0px 8px 24px rgba(0,0,0,0.8);
}
body.theme-light { --bg-main: #ffffff; --bg-card: #ffffff; --primary: #000; --text-dark: #000; --border-color: #eee; }
body.theme-creamy { --bg-main: #fffbf2; --bg-card: #fff; --primary: #5c3a21; --text-dark: #4a2c00; --border-color: #ebdcb3; }

* { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Plus Jakarta Sans', sans-serif; }
body { background-color: var(--bg-main); color: var(--text-dark); display: flex; flex-direction: column; min-height: 100vh; transition: 0.3s; }

.top-ticker-tape { background: var(--primary); color: white; overflow: hidden; white-space: nowrap; padding: 8px 0; font-size: 0.85rem; font-weight: 700; letter-spacing: 1px; z-index: 1000;}
.ticker-content { display: inline-block; animation: ticker 25s linear infinite; }
@keyframes ticker { 0% { transform: translateX(100vw); } 100% { transform: translateX(-100%); } }

/* REAL MAP STYLING */
.live-map-tracker { background: var(--bg-card); border-bottom: 1px solid var(--border-color); padding: 20px; box-shadow: var(--shadow-soft); transition: all 0.3s ease; }
.live-map-tracker.hidden { display: none; }
.map-interface { max-width: 1000px; margin: 0 auto; background: var(--bg-main); border: 1px solid var(--border-color); border-radius: 16px; padding: 20px; }
.map-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 15px; }
.map-header h4 { font-size: 1.1rem; color: var(--text-dark); }
.eta-badge { background: #fef3c7; color: #d97706; padding: 5px 12px; border-radius: 8px; font-weight: 800; font-size: 0.9rem; }
#real-map { height: 300px; width: 100%; border-radius: 12px; border: 1px solid var(--border-color); margin-bottom: 15px; z-index: 1; /* Ensures map stays below modals */ }
.map-marker-icon { background: white; border-radius: 50%; display: grid; place-items: center; font-size: 1.2rem; border: 2px solid var(--primary); box-shadow: 0 2px 5px rgba(0,0,0,0.3); }
.map-footer { display: flex; justify-content: space-between; font-size: 0.9rem; color: var(--text-muted); border-top: 1px dashed var(--border-color); padding-top: 15px; }
.rider-info { color: #10b981; font-weight: bold; }

/* Standard Tracker */
.live-tracking-banner { background: var(--accent-green); color: white; padding: 12px 20px; box-shadow: var(--shadow-soft); }
.live-tracking-banner.hidden { display: none; }
.tracking-content { max-width: 1200px; margin: 0 auto; display: flex; align-items: center; gap: 15px; }
.pulse-icon-box { background: rgba(255,255,255,0.2); padding: 8px; border-radius: 50%; animation: pulse 1.5s infinite; }
.tracking-text-box { flex: 1; display: flex; flex-direction: column; gap: 5px; }
.progress-bar-bg { width: 100%; height: 4px; background: rgba(255,255,255,0.3); border-radius: 4px; overflow: hidden; }
.progress-bar-fill { width: 0%; height: 100%; background: #fff; transition: 0.5s linear; }

/* Header & Setup */
.navbar { position: sticky; top: 0; z-index: 100; display: flex; justify-content: space-between; align-items: center; padding: 15px 40px; background: var(--bg-card); border-bottom: 1px solid var(--border-color); box-shadow: var(--shadow-soft); }
.brand-container { cursor: pointer; }
.brand-logo-img { height: 45px; border-radius: 8px; object-fit: contain; }
.search-bar-wrapper { flex: 0 1 400px; position: relative; }
.search-bar-wrapper input { width: 100%; padding: 12px 40px; border-radius: 12px; border: 1px solid var(--border-color); background: var(--bg-main); color: var(--text-dark); outline: none; font-size: 0.95rem; }
.search-icon { position: absolute; left: 15px; top: 50%; transform: translateY(-50%); color: var(--text-muted); }

.nav-controls-right { display: flex; gap: 20px; align-items: center; }
.nav-btn { background: none; border: none; font-size: 1.1rem; color: var(--text-dark); cursor: pointer; display: flex; align-items: center; gap: 8px; font-weight: 600; position: relative; }
.cart-badge { position: absolute; top: -8px; left: -8px; background: var(--primary); color: white; border-radius: 50%; width: 20px; height: 20px; font-size: 0.75rem; display: grid; place-items: center; font-weight: bold; }
.profile-avatar { width: 40px; height: 40px; border-radius: 50%; background: var(--bg-main); border: 1px solid var(--border-color); display: grid; place-items: center; cursor: pointer; font-size: 1.2rem; transition: 0.3s; }

.user-greeting-section { max-width: 1400px; margin: 0 auto; padding: 30px 40px 0; width: 100%; }
.user-greeting-section h1 { font-size: 2rem; font-weight: 900; color: var(--primary); margin-bottom: 5px; }
.user-greeting-section p { font-size: 1.1rem; color: var(--accent-orange); font-style: italic; font-weight: 600; }

.category-filters { display: flex; gap: 15px; padding: 20px 40px; overflow-x: auto; max-width: 1400px; margin: 0 auto; width: 100%; }
.category-filters::-webkit-scrollbar { display: none; }
.cat-pill { display: flex; align-items: center; gap: 8px; padding: 10px 20px; background: var(--bg-card); border: 1px solid var(--border-color); border-radius: 30px; font-weight: 600; cursor: pointer; color: var(--text-dark); transition: 0.3s; }
.cat-pill img { width: 24px; height: 24px; border-radius: 50%; }
.cat-pill:hover, .cat-pill.active { background: var(--primary); color: var(--bg-card); border-color: var(--primary); }

.main-body { display: flex; flex: 1; max-width: 1400px; margin: 0 auto; width: 100%; }
.menu-section { flex: 1; padding: 20px 40px; }
.view-header-title { margin-bottom: 25px; }
.view-header-title h2 { font-size: 1.8rem; font-weight: 800; }

.food-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 25px; padding-bottom: 50px;}
.food-card { background: var(--bg-card); border: 1px solid var(--border-color); border-radius: 16px; overflow: hidden; transition: 0.3s; box-shadow: var(--shadow-soft); display: flex; flex-direction: column; position: relative; z-index: 1;}
.food-card:hover { transform: scale(1.02); box-shadow: var(--shadow-hover); }
.card-image-wrapper { height: 180px; position: relative; }
.card-image-wrapper img { width: 100%; height: 100%; object-fit: cover; }
.wish-heart { position: absolute; top: 10px; right: 10px; font-size: 1.5rem; color: #fff; text-shadow: 0 2px 4px rgba(0,0,0,0.5); cursor: pointer; z-index: 5; transition: 0.3s; }
.wish-heart.active { color: var(--accent-orange); text-shadow: none; }
.veg-badge { position: absolute; top: 10px; left: 10px; background: #fff; border-radius: 4px; padding: 2px 4px; font-size: 0.6rem; color: #10b981; border: 1px solid #10b981; font-weight: bold; }
.card-body-content { padding: 15px; display: flex; flex-direction: column; flex: 1; }
.food-name { font-size: 1.1rem; font-weight: 700; margin-bottom: 5px; line-height: 1.3; }
.card-footer { display: flex; justify-content: space-between; align-items: center; margin-top: auto; padding-top: 15px; border-top: 1px dashed var(--border-color); }
.food-price { font-size: 1.2rem; font-weight: 800; }
.add-cart-btn { background: #fdf2e9; color: var(--accent-orange); border: 1px solid var(--accent-orange); padding: 8px 24px; border-radius: 8px; font-weight: 800; cursor: pointer; transition: 0.3s; }
.add-cart-btn:hover { background: var(--accent-orange); color: #fff; }

/* Cart Drawer */
.cart-drawer { width: 420px; background: var(--bg-main); border-left: 1px solid var(--border-color); display: flex; flex-direction: column; box-shadow: -10px 0 20px rgba(0,0,0,0.05); z-index: 105; }
.drawer-header { padding: 20px; background: var(--bg-card); display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid var(--border-color); }
.close-drawer-btn { background: none; border: none; font-size: 1.2rem; cursor: pointer; color: var(--text-muted); }

.cart-top-checkout { padding: 20px; background: var(--bg-card); margin-bottom: 10px; }
.bill-summary-card { background: var(--bg-main); padding: 15px; border-radius: 12px; margin-bottom: 15px; border: 1px solid var(--border-color); }
.grand-total { font-size: 1.3rem; font-weight: 800; display: flex; justify-content: space-between; }

.pay-title { font-size: 0.85rem; font-weight: 700; color: var(--text-muted); margin-bottom: 8px; text-transform: uppercase; }
.pay-options { display: flex; gap: 10px; }
.pay-radio { flex: 1; cursor: pointer; position: relative; }
.pay-radio input { display: none; }
.pay-content { border: 1px solid var(--border-color); padding: 10px; border-radius: 8px; text-align: center; font-weight: 700; font-size: 0.9rem; background: var(--bg-card); transition: 0.2s; }
.pay-radio input:checked + .pay-content { border-color: var(--primary); background: var(--bg-main); box-shadow: inset 0 0 0 1px var(--primary); color: var(--primary); }

.coupon-section { display: flex; gap: 10px; margin-bottom: 15px; }
.coupon-input-wrapper { flex: 1; display: flex; align-items: center; gap: 10px; border: 1px dashed var(--accent-orange); padding: 10px; border-radius: 8px; background: #fffcf7; color: var(--accent-orange); }
.coupon-input-wrapper input { border: none; background: transparent; outline: none; width: 100%; color: var(--text-dark); font-weight: 600; }
.apply-btn { background: var(--primary); color: var(--bg-card); border: none; padding: 0 15px; border-radius: 8px; font-weight: 700; cursor: pointer; }

.zomato-checkout-btn { width: 100%; background: linear-gradient(to right, #e23744, #f53a4a); color: white; padding: 16px; border: none; border-radius: 12px; font-size: 1.1rem; font-weight: 800; cursor: pointer; display: flex; justify-content: center; align-items: center; gap: 10px; }

.cart-items-wrapper { padding: 20px; flex: 1; overflow-y: auto; background: var(--bg-card); }
.cart-item { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; padding-bottom: 20px; border-bottom: 1px solid var(--border-color); }
.qty-controls { display: flex; align-items: center; gap: 12px; border: 1px solid var(--border-color); padding: 4px 10px; border-radius: 8px; background: var(--bg-main); font-weight: 700; }
.qty-controls button { border: none; background: transparent; cursor: pointer; color: var(--primary); font-size: 1.1rem; }

/* Dashboard & Modals */
.dashboard-modal-card { background: var(--bg-card); width: 90%; max-width: 600px; padding: 30px; border-radius: 24px; position: relative; }
.dashboard-profile-header { display: flex; align-items: center; gap: 20px; margin-bottom: 30px; padding-bottom: 20px; border-bottom: 1px solid var(--border-color); }
.dp-avatar { width: 70px; height: 70px; background: var(--primary); color: var(--bg-card); border-radius: 50%; display: grid; place-items: center; font-size: 1.8rem; font-weight: 800; }
.dashboard-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; }
.dash-card { background: var(--bg-main); border: 1px solid var(--border-color); padding: 20px; border-radius: 16px; display: flex; flex-direction: column; gap: 15px; cursor: pointer; text-align: left; }
.dash-icon { width: 45px; height: 45px; border-radius: 12px; display: grid; place-items: center; font-size: 1.2rem; }

.modal-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.7); backdrop-filter: blur(5px); display: none; place-items: center; z-index: 2000; }
.modal-overlay.active { display: grid; }
.standard-modal { background: var(--bg-card); padding: 30px; border-radius: 20px; width: 90%; max-width: 450px; position: relative; border: 1px solid var(--border-color); }
.modal-close { position: absolute; top: 15px; right: 15px; background: var(--bg-main); border: none; width: 35px; height: 35px; border-radius: 50%; font-size: 1.2rem; cursor: pointer; color: var(--text-dark); transition: 0.3s; z-index: 5; }
.text-center { text-align: center; }
.primary-btn-full { width: 100%; background: var(--primary); color: var(--bg-card); padding: 15px; border: none; border-radius: 12px; font-size: 1rem; font-weight: 700; cursor: pointer; transition: 0.3s;}
.modern-input { width: 100%; padding: 14px; border: 1px solid var(--border-color); border-radius: 10px; background: var(--bg-main); color: var(--text-dark); outline: none; font-size: 1rem; }

/* Wheel */
.wheel-container { position: relative; width: 250px; height: 250px; margin: 20px auto; border-radius: 50%; border: 5px solid var(--primary); overflow: hidden; box-shadow: var(--shadow-hover); }
.spin-pointer { position: absolute; top: -10px; left: 50%; transform: translateX(-50%); font-size: 2rem; color: var(--primary); z-index: 10; text-shadow: 0 2px 4px rgba(0,0,0,0.3); }
.wheel { width: 100%; height: 100%; border-radius: 50%; position: relative; transition: transform 4s cubic-bezier(0.17, 0.67, 0.12, 0.99); }
.segment { position: absolute; width: 50%; height: 50%; transform-origin: bottom right; top: 0; left: 0; display: flex; align-items: center; justify-content: center; color: white; font-weight: bold; font-size: 0.8rem; border: 1px solid rgba(255,255,255,0.2); }
.seg-text { position: absolute; transform: rotate(15deg) translateY(-40px) translateX(20px); }

/* Bill */
.receipt-card { background: #fff; font-family: monospace; color: #000; }
.dashed-hr { border: none; border-top: 1px dashed #ccc; margin: 15px 0; }
.bill-items { display: flex; flex-direction: column; gap: 8px; }
.bill-total-row { display: flex; justify-content: space-between; font-weight: bold; }
.token-box { text-align: center; margin-top: 20px; padding: 10px; background: #f1f5f9; border-radius: 8px; font-weight: bold; color: #000; }

.premium-footer { background: #1a1a1a; color: #fff; padding: 60px 40px 20px; margin-top: auto; }
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr; gap: 40px; max-width: 1200px; margin: 0 auto; padding-bottom: 40px; border-bottom: 1px solid #333; }
.fssai-badge { background: rgba(255,255,255,0.1); padding: 8px 12px; border-radius: 8px; display: inline-block; color: #10b981; border: 1px dashed #10b981; }
.footer-bottom { text-align: center; padding-top: 20px; font-size: 0.85rem; color: #64748b; }
.author-highlight { color: var(--accent-orange); font-weight: 800; }
.id-display-box { background: var(--bg-main); padding: 20px; font-size: 2rem; font-weight: 900; letter-spacing: 2px; border-radius: 12px; margin: 20px 0; border: 2px dashed var(--border-color); }
.qr-wrapper { background: #fff; padding: 15px; border-radius: 12px; display: inline-block; margin: 20px 0; border: 1px solid #ddd; }
.qr-wrapper img { width: 180px; height: 180px; }

@keyframes pulse { 0% { transform: scale(1); } 50% { transform: scale(1.15); } 100% { transform: scale(1); } }