harshit-temkar7-ds
Initial commit - Mumbai Train Project
75c2779
Raw History Blame Contribute Delete
17.2 kB
/* ──────────────────────────────────────────────
Mumbai Local Train β€” Crowd Predictor Styles
────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
:root {
--bg: #0a0e1a;
--bg2: #111827;
--surface: rgba(255,255,255,0.05);
--border: rgba(255,255,255,0.08);
--text: #f1f5f9;
--text2: #94a3b8;
--accent: #6366f1;
--accent2: #8b5cf6;
--green: #10b981;
--amber: #f59e0b;
--red: #ef4444;
--radius: 16px;
--shadow: 0 8px 32px rgba(0,0,0,0.4);
}
html { scroll-behavior: smooth; }
body {
font-family: 'Inter', sans-serif;
background: var(--bg);
color: var(--text);
min-height: 100vh;
overflow-x: hidden;
}
/* ── SCROLLBAR ── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--accent); border-radius: 3px; }
/* ── NAVBAR ── */
.navbar {
position: sticky; top: 0; z-index: 100;
display: flex; align-items: center; justify-content: space-between;
padding: 0 32px;
height: 64px;
background: rgba(10,14,26,0.9);
backdrop-filter: blur(20px);
border-bottom: 1px solid var(--border);
}
.nav-brand { display: flex; align-items: center; gap: 12px; cursor: pointer; }
.nav-icon { font-size: 28px; }
.nav-title { display: block; font-size: 16px; font-weight: 700; color: var(--text); }
.nav-sub { display: block; font-size: 11px; color: var(--text2); font-weight: 400; }
.nav-links { display: flex; gap: 4px; }
.nav-link {
padding: 8px 16px; border-radius: 8px; text-decoration: none;
font-size: 14px; font-weight: 500; color: var(--text2);
transition: all .2s; cursor: pointer;
}
.nav-link:hover, .nav-link.active { color: var(--text); background: var(--surface); }
.nav-link.active { color: var(--accent); background: rgba(99,102,241,.12); }
.nav-badge {
font-size: 12px; font-weight: 600;
padding: 6px 14px; border-radius: 999px;
background: linear-gradient(135deg, rgba(99,102,241,.2), rgba(139,92,246,.2));
border: 1px solid rgba(99,102,241,.3);
color: var(--accent);
animation: pulse 2s infinite;
}
@keyframes pulse {
0%,100% { box-shadow: 0 0 0 0 rgba(99,102,241,.3); }
50% { box-shadow: 0 0 0 8px rgba(99,102,241,0); }
}
/* ── HERO ── */
.hero {
position: relative; overflow: hidden;
padding: 80px 32px 60px;
text-align: center;
background: linear-gradient(180deg, #0f172a 0%, #0a0e1a 100%);
}
.hero-bg { position: absolute; inset: 0; pointer-events: none; }
.hero-circle {
position: absolute; border-radius: 50%; filter: blur(80px); opacity: 0.15;
animation: float 6s ease-in-out infinite;
}
.c1 { width: 400px; height: 400px; background: #6366f1; top: -100px; left: -100px; }
.c2 { width: 300px; height: 300px; background: #8b5cf6; top: -50px; right: 10%; animation-delay: 2s; }
.c3 { width: 250px; height: 250px; background: #06b6d4; bottom: -50px; left: 40%; animation-delay: 4s; }
@keyframes float {
0%,100% { transform: translateY(0) scale(1); }
50% { transform: translateY(-20px) scale(1.05); }
}
.hero-content { position: relative; z-index: 1; max-width: 700px; margin: 0 auto; }
.hero-tag {
display: inline-block; margin-bottom: 20px;
font-size: 12px; font-weight: 600; letter-spacing: 2px; text-transform: uppercase;
color: var(--accent); border: 1px solid rgba(99,102,241,.3);
padding: 6px 16px; border-radius: 999px;
background: rgba(99,102,241,.08);
}
.hero-title {
font-size: clamp(36px, 6vw, 64px);
font-weight: 900; line-height: 1.1; margin-bottom: 16px;
background: linear-gradient(135deg, #fff 0%, #a5b4fc 100%);
-webkit-background-clip: text; -webkit-text-fill-color: transparent;
}
.hero-desc { font-size: 18px; color: var(--text2); margin-bottom: 40px; line-height: 1.6; }
.hero-stats { display: flex; justify-content: center; gap: 40px; flex-wrap: wrap; }
.hstat { text-align: center; }
.hstat-num { display: block; font-size: 28px; font-weight: 800; color: var(--text); }
.hstat-label { font-size: 12px; color: var(--text2); font-weight: 500; }
/* ── LAYOUT ── */
.main-container { max-width: 1200px; margin: 0 auto; padding: 40px 24px 80px; }
.tab-section { display: none; animation: fadeUp .4s ease; }
.tab-section.active { display: block; }
@keyframes fadeUp {
from { opacity: 0; transform: translateY(20px); }
to { opacity: 1; transform: translateY(0); }
}
/* ── SECTION HEADER ── */
.section-header { margin-bottom: 32px; }
.section-title { font-size: 24px; font-weight: 700; margin-bottom: 8px; }
.section-sub { color: var(--text2); font-size: 15px; }
/* ── GLASS CARD ── */
.glass-card {
background: rgba(255,255,255,0.04);
border: 1px solid var(--border);
border-radius: var(--radius);
backdrop-filter: blur(12px);
padding: 28px;
transition: border-color .3s;
}
.glass-card:hover { border-color: rgba(255,255,255,0.12); }
/* ── PREDICT LAYOUT ── */
.predict-layout {
display: grid;
grid-template-columns: 1fr 1fr;
gap: 24px;
}
@media (max-width: 900px) {
.predict-layout { grid-template-columns: 1fr; }
}
/* ── FORM ── */
.form-grid {
display: grid;
grid-template-columns: 1fr 1fr;
gap: 20px;
margin-bottom: 24px;
}
.form-group { display: flex; flex-direction: column; gap: 8px; }
.form-group.full { grid-column: 1 / -1; }
.form-label {
font-size: 13px; font-weight: 600;
color: var(--text2); letter-spacing: .5px;
}
.accent { color: var(--accent); }
.select-wrapper { position: relative; }
.select-wrapper::after {
content: 'β–Ύ'; position: absolute; right: 12px; top: 50%;
transform: translateY(-50%); color: var(--text2); pointer-events: none;
}
.form-select {
width: 100%; padding: 10px 36px 10px 14px;
background: rgba(255,255,255,0.06); border: 1px solid var(--border);
border-radius: 10px; color: var(--text); font-size: 14px;
appearance: none; cursor: pointer; font-family: inherit;
transition: border-color .2s;
}
.form-select:focus { outline: none; border-color: var(--accent); }
.form-select option { background: #1e293b; color: var(--text); }
.form-select.small { padding: 8px 32px 8px 12px; font-size: 13px; }
/* ── RADIO PILLS ── */
.radio-pills { display: flex; gap: 8px; flex-wrap: wrap; }
.pill {
padding: 8px 16px; border-radius: 999px; border: 1px solid var(--border);
background: transparent; color: var(--text2); font-size: 13px; font-weight: 500;
cursor: pointer; transition: all .2s; font-family: inherit;
}
.pill:hover { border-color: var(--accent); color: var(--text); }
.pill.active {
background: linear-gradient(135deg, var(--accent), var(--accent2));
border-color: transparent; color: #fff;
box-shadow: 0 4px 12px rgba(99,102,241,.3);
}
.radio-pills.small .pill { padding: 6px 12px; font-size: 12px; }
/* ── SLIDER ── */
.slider-wrap { display: flex; flex-direction: column; gap: 8px; }
.hour-slider {
-webkit-appearance: none; width: 100%; height: 4px;
background: linear-gradient(to right, var(--green), var(--amber), var(--red));
border-radius: 2px; outline: none; cursor: pointer;
}
.hour-slider::-webkit-slider-thumb {
-webkit-appearance: none; width: 20px; height: 20px;
background: var(--accent); border-radius: 50%;
box-shadow: 0 0 0 4px rgba(99,102,241,.3);
cursor: pointer; transition: box-shadow .2s;
}
.hour-slider::-webkit-slider-thumb:hover { box-shadow: 0 0 0 8px rgba(99,102,241,.3); }
.slider-ticks {
display: flex; justify-content: space-between;
font-size: 11px; color: var(--text2);
}
/* ── PREDICT BUTTON ── */
.predict-btn {
width: 100%; padding: 16px 24px;
background: linear-gradient(135deg, var(--accent), var(--accent2));
border: none; border-radius: 12px;
color: #fff; font-size: 16px; font-weight: 700;
cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 10px;
font-family: inherit; transition: all .3s;
box-shadow: 0 4px 20px rgba(99,102,241,.4);
}
.predict-btn:hover {
transform: translateY(-2px);
box-shadow: 0 8px 28px rgba(99,102,241,.5);
}
.predict-btn:active { transform: translateY(0); }
.predict-btn.loading { opacity: .7; pointer-events: none; }
.btn-loader.hidden, .hidden { display: none !important; }
/* ── RESULT CARD ── */
.result-placeholder {
height: 100%; min-height: 300px;
display: flex; flex-direction: column; align-items: center; justify-content: center;
color: var(--text2); text-align: center; gap: 12px;
}
.placeholder-icon { font-size: 48px; opacity: .5; }
.result-top {
display: flex; align-items: flex-start; justify-content: space-between;
margin-bottom: 24px; flex-wrap: wrap; gap: 12px;
}
.route-display { font-size: 15px; font-weight: 600; color: var(--text2); }
.route-display span { color: var(--text); }
.risk-badge {
padding: 6px 14px; border-radius: 999px;
font-size: 13px; font-weight: 700; letter-spacing: 1px;
}
/* ── CROWD METER ── */
.crowd-meter { margin-bottom: 24px; }
.meter-label { font-size: 12px; font-weight: 600; color: var(--text2); margin-bottom: 10px; }
.meter-bar-wrap { position: relative; }
.meter-bar {
height: 12px; border-radius: 999px;
background: linear-gradient(to right, #10b981, #f59e0b, #ef4444);
position: relative; overflow: visible;
}
.meter-fill {
height: 100%; border-radius: 999px;
background: rgba(0,0,0,0.3);
position: absolute; right: 0; top: 0;
transition: width .8s cubic-bezier(.34,1.56,.64,1);
}
.meter-pointer {
position: absolute; top: 50%; transform: translate(-50%, -50%);
width: 20px; height: 20px; background: white;
border-radius: 50%; box-shadow: 0 0 0 3px rgba(0,0,0,.3), 0 4px 8px rgba(0,0,0,.4);
transition: left .8s cubic-bezier(.34,1.56,.64,1);
}
.meter-labels {
display: flex; justify-content: space-between;
font-size: 11px; color: var(--text2); margin-top: 6px;
}
.meter-score {
font-size: 36px; font-weight: 900; text-align: center;
margin-top: 8px; letter-spacing: -1px;
}
/* ── PROB BARS ── */
.prob-bars { display: flex; flex-direction: column; gap: 8px; margin-bottom: 20px; }
.prob-row { display: flex; align-items: center; gap: 10px; }
.prob-label { font-size: 13px; font-weight: 600; width: 70px; }
.prob-track {
flex: 1; height: 8px; background: var(--surface);
border-radius: 999px; overflow: hidden;
}
.prob-fill {
height: 100%; border-radius: 999px;
transition: width .8s ease;
}
.prob-val { font-size: 12px; color: var(--text2); width: 40px; text-align: right; }
/* ── REASONS ── */
.reasons-box {
background: rgba(99,102,241,.06); border: 1px solid rgba(99,102,241,.15);
border-radius: 12px; padding: 16px; margin-bottom: 16px;
}
.reasons-title { font-size: 12px; font-weight: 700; color: var(--accent); margin-bottom: 10px; }
.reason-item { font-size: 13px; color: var(--text2); padding: 4px 0; line-height: 1.5; }
/* ── TIP BOX ── */
.tip-box {
background: rgba(16,185,129,.06); border: 1px solid rgba(16,185,129,.15);
border-radius: 12px; padding: 14px 16px;
font-size: 13px; color: var(--green); font-weight: 500;
display: flex; gap: 8px; align-items: flex-start;
}
/* ── FORECAST ── */
.forecast-controls { margin-bottom: 24px; }
.fc-row { display: flex; gap: 20px; align-items: flex-end; flex-wrap: wrap; }
.fc-group { display: flex; flex-direction: column; gap: 6px; }
.mini-btn {
padding: 9px 20px; background: var(--accent); border: none;
border-radius: 10px; color: #fff; font-size: 13px; font-weight: 600;
cursor: pointer; white-space: nowrap; font-family: inherit;
transition: all .2s;
}
.mini-btn:hover { background: var(--accent2); transform: translateY(-1px); }
.forecast-results { display: flex; flex-direction: column; gap: 24px; }
.best-times { }
.best-title { font-size: 14px; font-weight: 700; margin-bottom: 16px; }
.best-grid { display: flex; gap: 12px; flex-wrap: wrap; }
.best-item {
flex: 1; min-width: 140px;
padding: 16px; border-radius: 12px; text-align: center;
border: 1px solid var(--border);
}
.best-hour { font-size: 24px; font-weight: 900; }
.best-level { font-size: 12px; font-weight: 600; margin-top: 4px; }
.best-label { font-size: 11px; color: var(--text2); margin-top: 2px; }
/* ── BAR CHART ── */
.chart-title { font-size: 16px; font-weight: 700; margin-bottom: 20px; }
.chart-wrap {
display: flex; align-items: flex-end; gap: 4px;
height: 180px; padding-bottom: 30px; position: relative;
}
.chart-bar-wrap {
flex: 1; display: flex; flex-direction: column;
align-items: center; gap: 6px; height: 100%; justify-content: flex-end;
}
.chart-bar {
width: 100%; border-radius: 4px 4px 0 0;
transition: height .6s cubic-bezier(.34,1.56,.64,1);
cursor: pointer; position: relative;
}
.chart-bar:hover::after {
content: attr(data-tip);
position: absolute; bottom: 105%; left: 50%; transform: translateX(-50%);
background: #1e293b; border: 1px solid var(--border);
padding: 4px 8px; border-radius: 6px; font-size: 11px; white-space: nowrap;
z-index: 10; pointer-events: none;
}
.chart-tick { font-size: 10px; color: var(--text2); }
/* ── HOURLY GRID ── */
.hourly-grid {
display: grid;
grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
gap: 10px;
}
.hour-chip {
padding: 12px; border-radius: 12px;
text-align: center; border: 1px solid var(--border);
transition: transform .2s;
}
.hour-chip:hover { transform: translateY(-2px); }
.hc-time { font-size: 16px; font-weight: 800; }
.hc-level { font-size: 11px; font-weight: 600; margin-top: 2px; }
.hc-score { font-size: 11px; color: var(--text2); margin-top: 2px; }
/* ── HEATMAP ── */
.heatmap-controls { margin-bottom: 24px; }
.heatmap-wrap { overflow: hidden; }
.heatmap-scroll { overflow-x: auto; padding-bottom: 8px; }
.hm-table { border-collapse: collapse; width: 100%; min-width: 700px; }
.hm-table th {
padding: 8px 6px; font-size: 11px; font-weight: 600;
color: var(--text2); text-align: center; white-space: nowrap;
}
.hm-table td {
padding: 6px; text-align: center; font-size: 11px; font-weight: 600;
border-radius: 6px; cursor: default; transition: transform .15s;
}
.hm-table td:hover { transform: scale(1.2); z-index: 1; position: relative; }
.hm-station { text-align: left !important; white-space: nowrap; color: var(--text2); font-weight: 600 !important; padding-right: 12px !important; }
.heatmap-legend {
display: flex; gap: 20px; justify-content: flex-end;
margin-top: 16px; font-size: 12px; color: var(--text2);
}
.leg-item { display: flex; align-items: center; gap: 6px; }
.leg-dot { width: 12px; height: 12px; border-radius: 3px; }
/* ── ABOUT ── */
.about-grid {
display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
gap: 20px; margin-bottom: 24px;
}
.about-card { text-align: center; }
.about-icon { font-size: 36px; margin-bottom: 12px; }
.about-card h3 { font-size: 16px; font-weight: 700; margin-bottom: 8px; }
.about-card p { font-size: 14px; color: var(--text2); line-height: 1.6; }
.how-card { }
.how-card h3 { font-size: 18px; font-weight: 700; margin-bottom: 20px; }
.steps { display: flex; flex-direction: column; gap: 16px; }
.step { display: flex; align-items: center; gap: 16px; }
.step-num {
width: 36px; height: 36px; border-radius: 50%; flex-shrink: 0;
background: linear-gradient(135deg, var(--accent), var(--accent2));
display: flex; align-items: center; justify-content: center;
font-weight: 800; font-size: 14px;
}
.step-text { font-size: 14px; color: var(--text2); }
.step-text strong { color: var(--text); }
/* ── FOOTER ── */
.footer {
text-align: center; padding: 24px;
color: var(--text2); font-size: 13px;
border-top: 1px solid var(--border);
}
/* ── LOADING OVERLAY ── */
.loading-overlay {
position: fixed; inset: 0; z-index: 9999;
background: rgba(10,14,26,.9); backdrop-filter: blur(10px);
display: flex; flex-direction: column; align-items: center; justify-content: center;
gap: 16px;
}
.loading-spinner {
width: 48px; height: 48px; border: 3px solid var(--border);
border-top-color: var(--accent); border-radius: 50%;
animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.loading-text { font-size: 16px; color: var(--text2); font-weight: 500; }
/* ── TOAST ── */
.toast {
position: fixed; bottom: 32px; right: 32px; z-index: 9998;
padding: 14px 20px; border-radius: 12px;
background: rgba(30,41,59,.95); border: 1px solid var(--border);
color: var(--text); font-size: 14px; font-weight: 500;
box-shadow: var(--shadow);
transform: translateY(100px); opacity: 0;
transition: all .3s;
}
.toast.show { transform: translateY(0); opacity: 1; }
/* ── RESPONSIVE ── */
@media (max-width: 768px) {
.navbar { padding: 0 16px; }
.nav-links { display: none; }
.hero { padding: 60px 16px 40px; }
.main-container { padding: 24px 16px 60px; }
.form-grid { grid-template-columns: 1fr; }
.fc-row { flex-direction: column; align-items: stretch; }
.hourly-grid { grid-template-columns: repeat(3, 1fr); }
}