/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: #0f0f0f;
    color: #e0e0e0;
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Header and navigation */
header {
    background-color: #1a1a1a;
    border-bottom: 1px solid #333;
    padding: 1rem 2rem;
}

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

.logo {
    font-size: 1.25rem;
    font-weight: 600;
    text-decoration: none;
    color: #fff;
}

.nav-links {
    display: flex;
    gap: 2rem;
}

.nav-links a {
    color: #ccc;
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    transition: background-color 0.2s, color 0.2s;
}

.nav-links a:hover {
    background-color: #333;
    color: #fff;
}

/* Main content */
main {
    flex: 1;
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
    width: 100%;
}

/* Cards */
.card {
    background-color: #1a1a1a;
    border-radius: 8px;
    border: 1px solid #333;
    margin-bottom: 1.5rem;
    overflow: hidden;
}

.card-header {
    background-color: #252525;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid #333;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.card-header h3 {
    color: #fff;
    font-size: 1.1rem;
    font-weight: 500;
}

.subtitle {
    color: #888;
    font-size: 0.875rem;
}

.card-content {
    padding: 1.5rem;
}

.card-footer {
    background-color: #252525;
    padding: 0.75rem 1.5rem;
    border-top: 1px solid #333;
    font-size: 0.875rem;
    color: #888;
}

/* List styles */
.list-container {
    width: 100%;
}

.list-header {
    margin-bottom: 2rem;
}

.list-header h1 {
    color: #fff;
    margin-bottom: 1rem;
}

.search-box {
    max-width: 400px;
}

.search-box input {
    width: 100%;
    padding: 0.75rem 1rem;
    background-color: #1a1a1a;
    border: 1px solid #333;
    border-radius: 4px;
    color: #fff;
    font-size: 1rem;
}

.search-box input:focus {
    outline: none;
    border-color: #555;
}

.search-box input::placeholder {
    color: #888;
}

/* Tables */
table {
    width: 100%;
    border-collapse: collapse;
    background-color: #1a1a1a;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #333;
}

th, td {
    padding: 0.875rem 1rem;
    text-align: left;
    border-bottom: 1px solid #333;
}

th {
    background-color: #252525;
    color: #fff;
    font-weight: 500;
}

td {
    color: #e0e0e0;
}

tr:hover {
    background-color: #252525;
}

tr:last-child td {
    border-bottom: none;
}

/* Badges */
.badge {
    padding: 0.25rem 0.5rem;
    border-radius: 3px;
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

.badge.pos {
    background-color: #065f46;
    color: #6ee7b7;
}

.badge.neg {
    background-color: #7f1d1d;
    color: #fca5a5;
}

.badge.neu {
    background-color: #374151;
    color: #d1d5db;
}

/* Grid layout for cards */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

/* Weather specific styles */
.weather-summary {
    margin-bottom: 1.5rem;
    padding: 1rem;
    background-color: #252525;
    border-radius: 4px;
    text-align: center;
}

.weather-summary p {
    margin: 0;
    color: #e0e0e0;
    font-size: 1rem;
}

.weather .card-content {
    display: block;
}

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

.weather-stat {
    text-align: center;
}

.weather-stat .value {
    display: block;
    font-size: 1.5rem;
    font-weight: 600;
    color: #fff;
    margin-bottom: 0.25rem;
}

.weather-stat .label {
    font-size: 0.875rem;
    color: #888;
}

/* Transit styles */
.transit .card-content {
    min-height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.transit-loading {
    color: #888;
    font-style: italic;
}

.transit-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.transit-route {
    font-weight: 600;
    color: #fff;
}

.transit-eta {
    font-size: 1.25rem;
    font-weight: 600;
    color: #6ee7b7;
}

.transit-status {
    font-size: 0.875rem;
    color: #888;
}

/* Footer */
footer {
    background-color: #1a1a1a;
    border-top: 1px solid #333;
    padding: 1rem 2rem;
    text-align: center;
    color: #888;
    font-size: 0.875rem;
}

footer p {
    margin: 0.25rem 0;
}

.local-time {
    color: #666;
    font-size: 0.8rem;
}

#local-time {
    color: #888;
    font-weight: 500;
}

footer a {
    color: #ccc;
    text-decoration: none;
}

footer a:hover {
    color: #fff;
}

/* Top movers and market status */
.market-status {
    margin-bottom: 2rem;
    text-align: center;
}

.top-movers {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.movers-section h3 {
    margin: 0 0 1rem 0;
    color: #fff;
    font-size: 1rem;
    font-weight: 500;
}

.movers-section table.compact {
    font-size: 0.875rem;
}

.movers-section table.compact th,
.movers-section table.compact td {
    padding: 0.5rem 0.75rem;
}

/* Sticky search */
.list-header {
    position: sticky;
    top: 0;
    background-color: #0f0f0f;
    z-index: 10;
    padding: 1rem 0;
    border-bottom: 1px solid #333;
}

/* Breadcrumbs */
.breadcrumb {
    margin-bottom: 1rem;
    font-size: 0.875rem;
    color: #888;
}

.breadcrumb a {
    color: #ccc;
    text-decoration: none;
}

.breadcrumb a:hover {
    color: #fff;
}

.breadcrumb .separator {
    margin: 0 0.5rem;
    color: #666;
}

/* Live tiles for homepage */
.live-tiles {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.weather-tile .card-content,
.movers-tile .card-content {
    padding: 1.5rem;
}

.tile-content {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.tile-main {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.tile-value {
    font-size: 2.5rem;
    font-weight: 600;
    color: #fff;
    line-height: 1;
}

.tile-location {
    font-size: 1rem;
    color: #888;
    margin-top: 0.5rem;
}

.tile-summary {
    text-align: center;
    color: #ccc;
    font-size: 0.875rem;
    padding: 0.75rem 1rem;
    background-color: #252525;
    border-radius: 4px;
}

.movers-preview {
    font-size: 1.1rem;
    line-height: 1.6;
    color: #e0e0e0;
    text-align: center;
}

.tile-footer {
    text-align: center;
    font-size: 0.875rem;
    padding-top: 1rem;
    border-top: 1px solid #333;
}

.tile-footer a {
    color: #60a5fa;
    text-decoration: none;
}

.tile-footer a:hover {
    text-decoration: underline;
}

/* Links */
a {
    color: #60a5fa;
    text-decoration: none;
}

a:hover {
    color: #93c5fd;
    text-decoration: underline;
}

/* Responsive design */
@media (max-width: 768px) {
    .nav-links {
        gap: 1rem;
    }
    
    .nav-links a {
        padding: 0.375rem 0.75rem;
        font-size: 0.875rem;
    }
    
    main {
        padding: 1rem;
    }
    
    .cards-grid {
        grid-template-columns: 1fr;
    }
    
    .weather .card-content {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    header {
        padding: 1rem;
    }
    
    nav {
        flex-direction: column;
        gap: 1rem;
    }
    
    .search-box {
        max-width: 100%;
    }
    
    table {
        font-size: 0.875rem;
    }
    
    th, td {
        padding: 0.625rem 0.75rem;
    }
}