@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;600;700&display=swap');

:root {
    --bg-dark: #0f172a;
    --bg-gradient-1: #1e293b;
    --bg-gradient-2: #0f172a;
    --accent: #38bdf8;
    --accent-glow: rgba(56, 189, 248, 0.5);
    --glass-bg: rgba(255, 255, 255, 0.03);
    --glass-border: rgba(255, 255, 255, 0.08);
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
}

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

body {
    font-family: 'Outfit', sans-serif;
    background: linear-gradient(135deg, var(--bg-gradient-1), var(--bg-gradient-2));
    color: var(--text-main);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
}

.bg-animation {
    position: fixed;
    top: 0; left: 0; width: 100vw; height: 100vh;
    background: radial-gradient(circle at 15% 50%, rgba(56,189,248,0.15), transparent 25%),
                radial-gradient(circle at 85% 30%, rgba(99,102,241,0.15), transparent 25%);
    z-index: -1;
    animation: pulse 10s infinite alternate;
}

@keyframes pulse {
    0% { transform: scale(1); }
    100% { transform: scale(1.1); }
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Glassmorphism Classes */
.glass-nav {
    background: rgba(15, 23, 42, 0.7);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--glass-border);
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
}

.logo {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-main);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 10px;
}
.logo i { color: var(--accent); }

.nav-links a {
    color: var(--text-main);
    text-decoration: none;
    margin-left: 20px;
    font-weight: 400;
    transition: color 0.3s;
}
.nav-links a:hover { color: var(--accent); }

.btn-admin {
    background: rgba(255, 255, 255, 0.1);
    padding: 8px 16px;
    border-radius: 8px;
    border: 1px solid var(--glass-border);
}

.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

/* Home Page */
.hero-section {
    text-align: center;
    padding: 100px 0 60px;
}

.hero-section h1 {
    font-size: 48px;
    font-weight: 700;
    margin-bottom: 20px;
    background: linear-gradient(90deg, #fff, #94a3b8);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-section p { font-size: 18px; color: var(--text-muted); margin-bottom: 40px; }

.search-box {
    max-width: 600px;
    margin: 0 auto;
    padding: 10px;
    border-radius: 50px;
    display: flex;
    align-items: center;
}

.input-wrapper {
    display: flex;
    width: 100%;
    align-items: center;
}

.input-wrapper .icon {
    padding: 0 20px;
    color: var(--text-muted);
}

.input-wrapper input {
    flex: 1;
    background: transparent;
    border: none;
    color: #fff;
    font-size: 18px;
    outline: none;
}

.btn-primary {
    background: linear-gradient(90deg, var(--accent), #2563eb);
    border: none;
    padding: 15px 30px;
    border-radius: 40px;
    color: #fff;
    font-weight: 600;
    font-size: 16px;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    text-decoration: none;
}
.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px var(--accent-glow);
}

.error-msg {
    color: #ef4444;
    margin-top: 15px;
    font-size: 14px;
}

.features-section {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    padding: 40px 0;
}
.feature { padding: 30px; text-align: center; transition: transform 0.3s; }
.feature:hover { transform: translateY(-5px); }
.feature-icon { font-size: 40px; color: var(--accent); margin-bottom: 20px; }
.feature h3 { margin-bottom: 15px; }
.feature p { color: var(--text-muted); font-size: 15px; line-height: 1.6; }

/* PNR Result Page */
.pnr-result-container { padding: 40px 0; max-width: 900px; margin: 0 auto; }
.back-link a { color: var(--text-muted); text-decoration: none; display: inline-flex; align-items: center; gap: 8px; margin-bottom: 30px;}
.back-link a:hover { color: var(--accent); }

.loading-state, .error-state { text-align: center; padding: 60px 0; }
.train-loader { font-size: 50px; color: var(--accent); margin-bottom: 20px; }
.danger-card { padding: 40px; text-align: center; border-color: rgba(239, 68, 68, 0.3); }
.error-icon { font-size: 40px; color: #ef4444; margin-bottom: 15px; }

.top-cards { display: grid; grid-template-columns: 2fr 1fr; gap: 20px; margin-bottom: 20px; }
@media(max-width: 768px) { .top-cards { grid-template-columns: 1fr; } }

.gradient-card { padding: 30px; background: linear-gradient(135deg, rgba(56,189,248,0.1), rgba(37,99,235,0.05)); }
.pnr-number { font-size: 14px; color: var(--text-muted); letter-spacing: 2px; }
.train-info h2 { font-size: 28px; margin: 10px 0; }
.journey-info { display: flex; justify-content: space-between; align-items: center; margin-top: 20px; padding-top: 20px; border-top: 1px solid var(--glass-border); }
.station { font-weight: 600; font-size: 18px; }

.prediction-card { padding: 30px; text-align: center; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.progress-circle { width: 120px; height: 120px; border-radius: 50%; display: flex; align-items: center; justify-content: center; margin: 20px 0; position: relative; }
.progress-circle::before { content: ''; position: absolute; inset: 10px; background: var(--bg-dark); border-radius: 50%; }
.progress-circle .percentage { position: relative; font-size: 28px; font-weight: 700; z-index: 1; }
.pred-message { font-size: 13px; color: var(--text-muted); }

.status-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 20px; }
.status-box { padding: 25px; text-align: center; }
.status-box h4 { color: var(--text-muted); font-weight: 400; margin-bottom: 10px; font-size: 14px; }
.status-val { font-size: 24px; font-weight: 700; }
.status-box.highlight { border-color: var(--accent); box-shadow: 0 0 20px var(--accent-glow); }
.coach-seat { margin-top: 10px; font-size: 16px; color: var(--accent); font-weight: 600; }

.hidden { display: none !important; }

/* Animations */
.fade-in { animation: fadeIn 0.5s ease forwards; }
.fade-in-up { animation: fadeInUp 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards; opacity: 0; transform: translateY(20px); }
.delay-1 { animation-delay: 0.2s; }

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes fadeInUp { to { opacity: 1; transform: translateY(0); } }

.glass-footer { margin-top: auto; padding: 30px 0; text-align: center; border-top: 1px solid var(--glass-border); color: var(--text-muted); font-size: 14px;}
.p-4 { padding: 30px; }
