:root {
    --bg-color: #0f172a;
    --glass-bg: rgba(30, 41, 59, 0.6);
    --glass-border: rgba(255, 255, 255, 0.1);
    --accent: #3b82f6;
    --accent-hover: #2563eb;
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --danger: #ef4444;
    --success: #10b981;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Inter', sans-serif;
}

body {
    background: var(--bg-color);
    color: var(--text-main);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
}

.glass {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    margin: 1rem 2rem;
    position: sticky;
    top: 1rem;
    z-index: 100;
}

.logo a {
    color: #fff;
    font-size: 1.5rem;
    font-weight: 700;
    text-decoration: none;
    letter-spacing: -0.5px;
}

.nav-links a {
    color: var(--text-muted);
    text-decoration: none;
    margin-left: 2rem;
    font-weight: 500;
    transition: color 0.3s;
}

.nav-links a:hover {
    color: var(--accent);
}

.container {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 2rem;
    flex: 1;
    width: 100%;
}

h1, h2, h3 {
    margin-bottom: 1.5rem;
    font-weight: 700;
}

.hero {
    text-align: center;
    padding: 6rem 2rem;
}

.hero h1 {
    font-size: 4rem;
    background: linear-gradient(to right, #3b82f6, #8b5cf6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 1rem;
}

.hero p {
    font-size: 1.2rem;
    color: var(--text-muted);
    max-width: 600px;
    margin: 0 auto 2rem auto;
}

.btn {
    display: inline-block;
    background: var(--accent);
    color: #fff;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: all 0.3s;
}

.btn:hover {
    background: var(--accent-hover);
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(59, 130, 246, 0.4);
}

.card {
    padding: 2rem;
    margin-bottom: 2rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-muted);
}

input, select {
    width: 100%;
    padding: 0.75rem 1rem;
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    color: #fff;
    font-size: 1rem;
    transition: border-color 0.3s, box-shadow 0.3s;
}

input:focus, select:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.3);
}

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.train-card {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: transform 0.3s;
}

.train-card:hover {
    transform: translateY(-5px);
}

.train-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    border-bottom: 1px solid var(--glass-border);
    padding-bottom: 1rem;
}

.train-name {
    font-size: 1.25rem;
    font-weight: 600;
}

.train-number {
    background: rgba(255, 255, 255, 0.1);
    padding: 0.25rem 0.75rem;
    border-radius: 999px;
    font-size: 0.875rem;
}

.train-details p {
    margin-bottom: 0.5rem;
    color: var(--text-muted);
    display: flex;
    justify-content: space-between;
}

.train-details strong {
    color: var(--text-main);
}

.train-footer {
    margin-top: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.fare {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--accent);
}

/* Flash Messages */
.flashes {
    margin-bottom: 2rem;
}

.flash {
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    font-weight: 500;
}

.flash.success {
    background: rgba(16, 185, 129, 0.2);
    border: 1px solid var(--success);
    color: #34d399;
}

.flash.danger {
    background: rgba(239, 68, 68, 0.2);
    border: 1px solid var(--danger);
    color: #f87171;
}

.flash.warning {
    background: rgba(245, 158, 11, 0.2);
    border: 1px solid #f59e0b;
    color: #fbbf24;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 2rem;
}

th, td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid var(--glass-border);
}

th {
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    font-size: 0.875rem;
    letter-spacing: 0.05em;
}

tr:hover {
    background: rgba(255, 255, 255, 0.02);
}

.seat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(60px, 1fr));
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.seat {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    padding: 1rem 0;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
    user-select: none;
}

.seat:hover {
    background: rgba(255, 255, 255, 0.2);
}

.seat.selected {
    background: var(--accent);
    border-color: var(--accent);
}

.seat.booked {
    background: rgba(239, 68, 68, 0.2);
    border-color: rgba(239, 68, 68, 0.3);
    color: var(--danger);
    cursor: not-allowed;
    text-decoration: line-through;
}

.hidden-radio {
    display: none;
}

/* IRCTC Widget Overrides */
.irctc-widget {
    background: #ffffff;
    max-width: 700px;
    margin: 0 auto;
    border-radius: 4px;
    overflow: hidden;
    box-shadow: 0 10px 25px rgba(0,0,0,0.5);
    color: #333; /* dark text for white card */
}

.irctc-tabs {
    display: flex;
    background: #213d77;
}

.irctc-tabs .tab {
    flex: 1;
    text-align: center;
    padding: 1rem;
    color: #fff;
    font-weight: 600;
    cursor: pointer;
    font-size: 0.9rem;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
}

.irctc-tabs .tab:not(.active) {
    background: #172b53;
    border-left: 1px solid rgba(255,255,255,0.1);
}

.irctc-body {
    padding: 2rem;
}

.irctc-logo-header {
    text-align: center;
    color: #213d77;
    margin-bottom: 2rem;
}

.irctc-logo-header h2 {
    font-size: 2rem;
    font-weight: 700;
    margin: 0;
}

.location-inputs {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.input-wrap {
    flex: 1;
}

.input-wrap label {
    font-size: 0.8rem;
    color: #666;
    margin-bottom: 0.2rem;
}

.input-icon {
    display: flex;
    align-items: center;
    border: 1px solid #ccc;
    border-radius: 4px;
    padding: 0 0.5rem;
    background: #fff;
}

.input-icon input, .input-icon select {
    border: none;
    background: transparent;
    color: #333;
    padding: 0.75rem;
    width: 100%;
}

.input-icon input:focus, .input-icon select:focus {
    box-shadow: none;
}

.swap-wrap {
    cursor: pointer;
    padding: 0.5rem;
    background: #f1f5f9;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 1.25rem;
    color: #213d77;
    border: 1px solid #ccc;
}
.swap-wrap:hover {
    background: #e2e8f0;
}
.swap-wrap span { display: inline-block; font-weight: bold; font-size: 1.2rem; }

.date-class-inputs {
    display: flex;
    gap: 2rem;
    margin-bottom: 2rem;
}

.concessions-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 2rem;
}

.checkbox-container {
    color: #213d77;
    font-size: 0.85rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

input[type="checkbox"] {
    width: auto;
    accent-color: #213d77;
}

.btn-orange {
    background: #fb923c;
    color: #fff;
    width: 100%;
    font-size: 1.1rem;
    padding: 1rem;
    border-radius: 6px;
    font-weight: bold;
    border: none;
    cursor: pointer;
}
.btn-orange:hover {
    background: #f97316;
}
