/* Enhanced Rescue Command Theme - Professional Emergency Dispatch Design */
:root {
    --primary-red: #dc2626;
    --primary-dark: #991b1b;
    --secondary-blue: #1e3a5f;
    --accent-cream: #f5f5dc;
    --success-green: #10b981;
    --warning-orange: #f59e0b;
    --error-red: #ef4444;
    --text-dark: #1f2937;
    --text-light: #6b7280;
    --background: linear-gradient(135deg, #f8fafc, #e2e8f0);
    --card-bg: #ffffff;
    --shadow-light: 0 4px 6px rgba(0,0,0,0.05);
    --shadow-medium: 0 8px 25px rgba(0,0,0,0.1);
    --shadow-heavy: 0 20px 40px rgba(0,0,0,0.15);
}

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

body {
    font-family: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
    background: var(--background);
    color: var(--text-dark);
    line-height: 1.6;
    min-height: 100vh;
}

/* Enhanced Header with Emergency Branding */
.header {
    background: linear-gradient(135deg, var(--secondary-blue) 0%, #2563eb 50%, #1d4ed8 100%);
    color: white;
    padding: 20px 30px;
    box-shadow: var(--shadow-heavy);
    position: sticky;
    top: 0;
    z-index: 1000;
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
}

.nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1400px;
    margin: 0 auto;
}

.logo {
    display: flex;
    align-items: center;
    font-size: 1.8rem;
    font-weight: 800;
    gap: 15px;
    letter-spacing: -0.5px;
}

.logo-icon {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--primary-red), #dc2626);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    box-shadow: 0 8px 25px rgba(220, 38, 38, 0.4);
    animation: logoGlow 3s ease-in-out infinite alternate;
}

@keyframes logoGlow {
    0% { box-shadow: 0 8px 25px rgba(220, 38, 38, 0.4); }
    100% { box-shadow: 0 12px 35px rgba(220, 38, 38, 0.6); }
}

.logo-icon::before {
    content: '+';
    color: var(--accent-cream);
    font-size: 28px;
    font-weight: 900;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.logo-icon::after {
    content: '';
    position: absolute;
    right: -12px;
    top: 50%;
    transform: translateY(-50%);
    width: 18px;
    height: 18px;
    border: 3px solid var(--primary-red);
    border-left: transparent;
    border-bottom: transparent;
    border-radius: 50%;
    opacity: 0.8;
    animation: spin 2s linear infinite;
}

@keyframes spin {
    0% { transform: translateY(-50%) rotate(0deg); }
    100% { transform: translateY(-50%) rotate(360deg); }
}

/* Enhanced Navigation */
.nav-links {
    display: flex;
    align-items: center;
    gap: 20px;
}

.nav a {
    color: white;
    text-decoration: none;
    padding: 12px 20px;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.nav a::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}

.nav a:hover::before {
    left: 100%;
}

.nav a:hover {
    background: rgba(255,255,255,0.15);
    transform: translateY(-2px);
}

/* Enhanced Credits Display */
.credits-display {
    background: linear-gradient(135deg, var(--warning-orange), #f59e0b);
    color: white;
    padding: 12px 24px;
    border-radius: 25px;
    font-weight: 700;
    font-size: 1.1rem;
    box-shadow: 0 6px 20px rgba(245, 158, 11, 0.4);
    position: relative;
    overflow: hidden;
}

.credits-display::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(255,255,255,0.1), transparent);
    animation: shimmer 3s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%) translateY(-100%) rotate(45deg); }
    100% { transform: translateX(100%) translateY(100%) rotate(45deg); }
}

/* Container and Layout */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 40px 30px;
}

/* Enhanced Grid System */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 30px;
    margin: 30px 0;
}

.stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 25px;
    margin: 40px 0;
}

/* Enhanced Cards */
.card {
    background: var(--card-bg);
    padding: 30px;
    border-radius: 16px;
    box-shadow: var(--shadow-light);
    border: 1px solid rgba(0,0,0,0.05);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-red), var(--warning-orange), var(--success-green));
    transform: scaleX(0);
    transition: transform 0.4s ease;
}

.card:hover::before {
    transform: scaleX(1);
}

.card:hover {
    box-shadow: var(--shadow-heavy);
    transform: translateY(-8px);
}

.card h3 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 15px;
    color: var(--text-dark);
}

.card p {
    color: var(--text-light);
    margin-bottom: 20px;
    line-height: 1.7;
}

/* Enhanced Stats */
.stat {
    background: linear-gradient(135deg, var(--card-bg), #f8fafc);
    padding: 25px;
    border-radius: 16px;
    text-align: center;
    border: 2px solid transparent;
    transition: all 0.4s ease;
    position: relative;
    overflow: hidden;
}

.stat::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, var(--primary-red), var(--warning-orange));
    opacity: 0;
    transition: opacity 0.4s ease;
    z-index: -1;
}

.stat:hover::before {
    opacity: 0.05;
}

.stat:hover {
    border-color: var(--primary-red);
    transform: scale(1.05);
    box-shadow: var(--shadow-medium);
}

.stat-value {
    font-size: 3rem;
    font-weight: 900;
    background: linear-gradient(135deg, var(--primary-red), #dc2626);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.1);
}

/* Enhanced Buttons */
.btn {
    background: linear-gradient(135deg, var(--primary-red), var(--primary-dark));
    color: white;
    padding: 16px 32px;
    border: none;
    border-radius: 12px;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
    display: inline-block;
    margin: 8px;
    box-shadow: 0 6px 20px rgba(220, 38, 38, 0.3);
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}

.btn:hover::before {
    left: 100%;
}

.btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 35px rgba(220, 38, 38, 0.4);
}

.btn:active {
    transform: translateY(-1px);
}

.btn-emergency {
    background: linear-gradient(135deg, var(--primary-red), #dc2626);
    animation: emergencyPulse 2s infinite;
    box-shadow: 0 8px 30px rgba(220, 38, 38, 0.5);
}

@keyframes emergencyPulse {
    0%, 100% { 
        opacity: 1; 
        box-shadow: 0 8px 30px rgba(220, 38, 38, 0.5);
    }
    50% { 
        opacity: 0.9; 
        box-shadow: 0 12px 40px rgba(220, 38, 38, 0.7);
    }
}

.btn-green {
    background: linear-gradient(135deg, var(--success-green), #059669);
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.3);
}

.btn-blue {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.3);
}

.btn-orange {
    background: linear-gradient(135deg, var(--warning-orange), #d97706);
    box-shadow: 0 6px 20px rgba(245, 158, 11, 0.3);
}

/* Enhanced Forms */
.form-group {
    margin-bottom: 25px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--text-dark);
    font-size: 1.1rem;
}

input, select, textarea {
    width: 100%;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    padding: 16px;
    font-size: 16px;
    transition: all 0.3s ease;
    background: var(--card-bg);
    box-sizing: border-box;
}

input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--primary-red);
    box-shadow: 0 0 0 4px rgba(220, 38, 38, 0.1);
    transform: translateY(-2px);
}

/* Status Indicators */
.status-available {
    color: var(--success-green);
    font-weight: 700;
    text-shadow: 1px 1px 2px rgba(16, 185, 129, 0.2);
}

.status-busy {
    color: var(--primary-red);
    font-weight: 700;
    text-shadow: 1px 1px 2px rgba(220, 38, 38, 0.2);
}

.status-maintenance {
    color: var(--warning-orange);
    font-weight: 700;
    text-shadow: 1px 1px 2px rgba(245, 158, 11, 0.2);
}

/* Vehicle Type Badges */
.vehicle-type {
    padding: 8px 16px;
    border-radius: 25px;
    font-size: 12px;
    font-weight: 800;
    color: white;
    text-transform: uppercase;
    letter-spacing: 1px;
    display: inline-block;
    margin: 4px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.fire {
    background: linear-gradient(135deg, var(--primary-red), #dc2626);
}

.ems {
    background: linear-gradient(135deg, var(--success-green), #059669);
}

.police {
    background: linear-gradient(135deg, #1d4ed8, #2563eb);
}

.thw {
    background: linear-gradient(135deg, var(--warning-orange), #d97706);
}

/* Alert Messages */
.error {
    background: linear-gradient(135deg, #fee2e2, #fecaca);
    border: 2px solid var(--error-red);
    color: var(--primary-dark);
    padding: 20px;
    border-radius: 12px;
    margin: 20px 0;
    font-weight: 600;
    box-shadow: 0 6px 20px rgba(239, 68, 68, 0.2);
}

.success {
    background: linear-gradient(135deg, #d1fae5, #a7f3d0);
    border: 2px solid var(--success-green);
    color: #065f46;
    padding: 20px;
    border-radius: 12px;
    margin: 20px 0;
    font-weight: 600;
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.2);
}

.info {
    background: linear-gradient(135deg, #dbeafe, #bfdbfe);
    border: 2px solid #3b82f6;
    color: #1e40af;
    padding: 20px;
    border-radius: 12px;
    margin: 20px 0;
    font-weight: 600;
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.2);
}

/* Enhanced Typography */
h1 {
    font-size: 3rem;
    font-weight: 900;
    margin-bottom: 30px;
    background: linear-gradient(135deg, var(--primary-red), var(--warning-orange));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-align: center;
}

h2 {
    font-size: 2.2rem;
    font-weight: 800;
    margin-bottom: 25px;
    color: var(--text-dark);
}

h3 {
    font-size: 1.6rem;
    font-weight: 700;
    margin-bottom: 15px;
    color: var(--text-dark);
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .header {
        padding: 15px 20px;
    }
    
    .logo {
        font-size: 1.4rem;
    }
    
    .nav {
        flex-direction: column;
        gap: 15px;
    }
    
    .container {
        padding: 20px 15px;
    }
    
    .grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .stats {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
    
    .card {
        padding: 20px;
    }
    
    .stat-value {
        font-size: 2.2rem;
    }
    
    h1 {
        font-size: 2.2rem;
    }
    
    .btn {
        padding: 14px 24px;
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .stats {
        grid-template-columns: 1fr;
    }
    
    .logo-icon {
        width: 40px;
        height: 40px;
    }
    
    .logo-icon::before {
        font-size: 22px;
    }
    
    .credits-display {
        padding: 10px 16px;
        font-size: 1rem;
    }
}

/* Loading Animation */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(220, 38, 38, 0.3);
    border-radius: 50%;
    border-top-color: var(--primary-red);
    animation: spin 1s ease-in-out infinite;
}

/* Footer Styles */
.site-footer {
    background: #f8fafc;
    border-top: 1px solid #e5e7eb;
    color: var(--text-dark);
    margin-top: 60px;
    padding: 40px 0 20px 0;
    clear: both;
    width: 100%;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
}

.footer-section h4 {
    color: var(--text-dark);
    margin-bottom: 15px;
    font-size: 16px;
    font-weight: 600;
}

.footer-section p {
    color: var(--text-light);
    line-height: 1.6;
    margin: 0;
    font-size: 14px;
}

.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links li {
    margin-bottom: 6px;
}

.footer-links a {
    color: var(--text-light);
    text-decoration: none;
    transition: color 0.2s;
    font-size: 14px;
}

.footer-links a:hover {
    color: var(--primary-red);
    text-decoration: underline;
}

.footer-bottom {
    border-top: 1px solid #e5e7eb;
    margin-top: 30px;
    padding-top: 20px;
    text-align: center;
}

.footer-bottom p {
    color: var(--text-light);
    margin: 0;
    font-size: 12px;
}

/* Footer responsive adjustments */
@media (max-width: 768px) {
    .footer-content {
        grid-template-columns: 1fr;
        gap: 30px;
        text-align: center;
    }
    
    .site-footer {
        padding: 30px 0 15px 0;
    }
}

/* Smooth Transitions */
* {
    transition: color 0.3s ease, background-color 0.3s ease, border-color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
}
