:root {
    --primary-bg: #0f172a;
    --secondary-bg: #1e293b;
    --accent: #3b82f6;
    --accent-hover: #2563eb;
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --glass-bg: rgba(30, 41, 59, 0.7);
    --glass-border: rgba(255, 255, 255, 0.1);
    --font-main: 'Inter', sans-serif;
}

body {
    background-color: var(--primary-bg);
    color: var(--text-primary);
    font-family: var(--font-main);
    -webkit-font-smoothing: antialiased;
    padding-top: 76px; /* For fixed navbar */
}

/* Glassmorphism Utilities */
.glass-nav {
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--glass-border);
}

.glass-footer {
    background: rgba(30, 41, 59, 0.5);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-top: 1px solid var(--glass-border);
}

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

.glass-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    border-color: rgba(255, 255, 255, 0.2);
}

/* Hero Section */
.hero-section {
    position: relative;
    padding: 100px 0;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -10%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(59,130,246,0.15) 0%, rgba(15,23,42,0) 70%);
    border-radius: 50%;
    z-index: -1;
}

/* Map Container */
#hero-map {
    height: 400px;
    width: 100%;
    border-radius: 1rem;
    border: 1px solid var(--glass-border);
    z-index: 1;
}

.leaflet-container {
    background: var(--secondary-bg) !important;
}

/* Buttons */
.btn-primary {
    background-color: var(--accent);
    border-color: var(--accent);
    border-radius: 0.5rem;
    padding: 0.75rem 1.5rem;
    font-weight: 500;
}

.btn-primary:hover {
    background-color: var(--accent-hover);
    border-color: var(--accent-hover);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
}

/* Secondary & Outline Buttons */
.btn-outline-info, .btn-outline-warning, .btn-secondary {
    transition: all 0.3s ease;
}

.btn-outline-info:hover, .btn-outline-warning:hover, .btn-secondary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 255, 255, 0.1);
}

/* Search Dropdown Items */
.list-group-item {
    transition: background-color 0.2s ease, padding-left 0.2s ease;
}

.list-group-item:hover {
    padding-left: 1.5rem;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    letter-spacing: -0.025em;
}

p {
    color: var(--text-secondary);
    line-height: 1.7;
}

.text-white-50 {
    color: rgba(255,255,255,0.6) !important;
}

/* Footer Links */
.footer-links li {
    margin-bottom: 0.5rem;
}
.footer-links a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.2s ease;
}
.footer-links a:hover {
    color: var(--accent);
}

/* Compare Page Specific Styles */
.compare-add-btn {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background-color: var(--secondary-bg);
    border: 2px dashed var(--glass-border);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    color: var(--text-secondary);
    font-size: 1.5rem;
    transition: all 0.3s ease;
    cursor: pointer;
}

.compare-placeholder-card {
    border: 1px dashed var(--glass-border);
    background: rgba(30, 41, 59, 0.3);
    cursor: pointer;
    min-height: 400px;
}

.compare-placeholder-card:hover .compare-add-btn {
    background-color: rgba(255,255,255,0.1);
    color: white;
    border-color: rgba(255,255,255,0.3);
}

.compare-data-card {
    min-height: 400px;
    display: flex;
    flex-direction: column;
    position: relative;
}

.compare-metric {
    border-bottom: 1px solid var(--glass-border);
    padding: 0.75rem 0;
}
.compare-metric:last-child {
    border-bottom: none;
}
.compare-metric-label {
    font-size: 0.8rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 0.25rem;
}
.compare-metric-value {
    font-weight: 500;
    font-size: 1.1rem;
}
.remove-county-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(0,0,0,0.5);
    border: none;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    cursor: pointer;
    transition: background 0.2s;
    z-index: 10;
}
/* States Grid Card Redesign - Dark Mode Adapted */
.state-card-link {
    display: block;
    height: 100%;
}

.state-card {
    background: rgba(30, 41, 59, 0.5); /* match glass-card */
    backdrop-filter: blur(10px);
    border-radius: 12px;
    padding: 1.5rem;
    height: 100%;
    display: flex;
    flex-direction: column;
    border: 1px solid rgba(255,255,255,0.1);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
}

.state-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 2rem;
}

.state-card-badge {
    background-color: rgba(59, 130, 246, 0.1);
    color: #60a5fa;
    font-weight: 700;
    font-size: 1.1rem;
    padding: 0.5rem 0.6rem;
    border-radius: 6px;
    line-height: 1;
    transition: all 0.3s ease;
}

.state-card-icon {
    color: rgba(255,255,255,0.3);
    font-size: 1.25rem;
    transition: color 0.3s ease;
}

.state-card-body {
    flex-grow: 1;
    margin-bottom: 1.5rem;
}

.state-card-title {
    color: #ffffff;
    font-family: 'Inter', sans-serif;
    font-weight: 700;
    font-size: 1.5rem;
    margin: 0;
    transition: color 0.3s ease;
}

.state-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 1rem;
    color: rgba(255,255,255,0.5);
    font-size: 0.875rem;
    transition: color 0.3s ease;
}

.state-card-arrow {
    transition: transform 0.3s ease;
}

/* Hover States */
.state-card-link:hover .state-card {
    border-color: #3b82f6;
    background: rgba(30, 41, 59, 0.8);
    box-shadow: 0 10px 25px -5px rgba(59, 130, 246, 0.2);
    transform: translateY(-4px);
}

.state-card-link:hover .state-card-badge {
    background-color: #3b82f6;
    color: #ffffff;
}

.state-card-link:hover .state-card-title {
    color: #3b82f6;
}

.state-card-link:hover .state-card-count {
    color: #ffffff;
}

.state-card-link:hover .state-card-icon,
.state-card-link:hover .state-card-arrow {
    color: #3b82f6;
}

.state-card-link:hover .state-card-arrow {
    transform: translateX(4px);
}
