:root {
    --bg-dark: #0f172a;
    --glass-bg: rgba(30, 41, 59, 0.7);
    --glass-border: rgba(255, 255, 255, 0.1);
    --primary: #6366f1;
    --primary-hover: #4f46e5;
    --secondary: #64748b;
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --accent: #ec4899;
}

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

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    background-image: 
        radial-gradient(circle at 10% 20%, rgba(99, 102, 241, 0.15) 0%, transparent 20%),
        radial-gradient(circle at 90% 80%, rgba(236, 72, 153, 0.15) 0%, transparent 20%);
    min-height: 100vh;
}

.app-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

/* Navbar */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    margin-bottom: 3rem;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

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

.nav-links a.active, .nav-links a:hover {
    color: var(--text-main);
}

/* Buttons */
.btn {
    padding: 0.6rem 1.2rem;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s;
}

.btn-primary {
    background-color: var(--primary);
    color: white;
}

.btn-primary:hover {
    background-color: var(--primary-hover);
    transform: translateY(-1px);
}

.btn-secondary {
    background: transparent;
    color: var(--text-main);
    border: 1px solid var(--glass-border);
}

.btn-gradient {
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: white;
    width: 100%;
}

.btn-danger {
    background-color: #ef4444;
    color: white;
}
.btn-sm {
    padding: 0.4rem 0.8rem;
    font-size: 0.9rem;
}

/* Sections */
.hidden { display: none !important; }

.glass-panel {
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 2rem;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
}

/* Auth */
.auth-card, .profile-card {
    max-width: 400px;
    margin: 0 auto;
}

.input-group, .account-link-section {
    margin-bottom: 1.5rem;
}
.account-link-section {
    padding: 1rem;
    background: rgba(0,0,0,0.2);
    border-radius: 12px;
}
.account-link-section h3 {
    margin-bottom: 0.5rem;
}
.status-indicator {
    font-size: 0.8rem;
    margin-bottom: 0.5rem;
    color: var(--accent);
}

.input-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.input-group input, .input-group select, .account-link-section input {
    width: 100%;
    padding: 0.8rem;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    color: white;
    font-size: 1rem;
    margin-bottom: 0.5rem;
}

.input-group input:focus {
    outline: none;
    border-color: var(--primary);
}

/* Hero & Search */
.hero-section {
    text-align: center;
    margin-bottom: 3rem;
}

.hero-section h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
    background: linear-gradient(to right, #fff, #94a3b8);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.search-panel {
    max-width: 800px;
    margin: 0 auto;
}

.search-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

/* Results */
.results-grid {
    margin-top: 2rem;
    display: grid;
    gap: 1rem;
}

.train-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 16px;
    border: 1px solid var(--glass-border);
}

.train-info h3 {
    color: var(--primary);
    margin-bottom: 0.25rem;
}

.train-time {
    font-size: 1.25rem;
    font-weight: 700;
}

.train-route {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.text-muted { color: var(--text-muted); }

/* Toast */
.toast {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background: var(--primary);
    color: white;
    padding: 1rem 2rem;
    border-radius: 12px;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    animation: slideUp 0.3s ease;
    z-index: 1000;
}

@keyframes slideUp {
    from { transform: translateY(100%); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

/* Loading Indicator */
.loading-indicator {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem;
    color: var(--text-muted);
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid var(--glass-border);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 1rem;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* No Results */
.no-results {
    text-align: center;
    padding: 3rem;
}

/* Favorites */
.favorites-panel {
    max-width: 800px;
    margin: 0 auto 1.5rem;
    padding: 1.5rem;
}

.favorites-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.favorites-header h3 {
    margin: 0;
    font-size: 1.1rem;
    color: var(--text-muted);
}

.favorites-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.favorite-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1rem;
    background: rgba(99, 102, 241, 0.15);
    border: 1px solid rgba(99, 102, 241, 0.3);
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.2s;
}

.favorite-item:hover {
    background: rgba(99, 102, 241, 0.25);
    transform: translateY(-1px);
}

.favorite-item .route {
    font-weight: 500;
    color: var(--text-main);
}

.favorite-item .time {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.favorite-item .delete-btn {
    margin-left: 0.5rem;
    padding: 0.2rem 0.4rem;
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 0.9rem;
    opacity: 0.6;
    transition: opacity 0.2s;
}

.favorite-item .delete-btn:hover {
    opacity: 1;
    color: #ef4444;
}

/* Search Actions */
.search-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
}

.search-actions .btn-gradient {
    flex: 1;
}
