/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: #333;
    background: #f5f7fa;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Navigation */
.navbar {
    background: #2c3e50;
    color: white;
    padding: 1rem 0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.nav-brand a {
    color: white;
    text-decoration: none;
    font-size: 1.5rem;
    font-weight: bold;
}

.nav-menu {
    list-style: none;
    display: flex;
    gap: 2rem;
    align-items: center;
    margin-top: 1rem;
}

.nav-menu a {
    color: white;
    text-decoration: none;
    transition: opacity 0.3s;
}

.nav-menu a:hover {
    opacity: 0.8;
}

/* Search Form in Nav */
.search-form {
    margin: 0;
}

.search-input {
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 20px;
    width: 200px;
    font-size: 0.9rem;
}

/* Main Content */
main {
    padding: 2rem 0;
    min-height: calc(100vh - 200px);
}

h1 {
    color: #2c3e50;
    margin-bottom: 1rem;
    font-size: 2.5rem;
}

h2 {
    color: #34495e;
    margin: 2rem 0 1rem;
    font-size: 1.8rem;
}

h3 {
    color: #34495e;
    margin: 1.5rem 0 1rem;
    font-size: 1.4rem;
}

.subtitle {
    color: #7f8c8d;
    margin-bottom: 2rem;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.stat-card {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    text-align: center;
}

.stat-value {
    font-size: 2.5rem;
    font-weight: bold;
    color: #3498db;
    margin-bottom: 0.5rem;
}

.stat-label {
    color: #7f8c8d;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Sections */
.section {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    margin: 2rem 0;
}

/* Charts */
.chart-container {
    margin: 1rem 0;
}

.bar-item {
    margin-bottom: 1rem;
}

.bar-label {
    font-weight: 500;
    margin-bottom: 0.5rem;
    color: #2c3e50;
}

.bar-wrapper {
    background: #ecf0f1;
    border-radius: 4px;
    overflow: hidden;
}

.bar {
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
    padding: 0.5rem 1rem;
    font-weight: bold;
    min-width: 60px;
    text-align: right;
    transition: width 0.3s;
}

.bar-secondary {
    background: linear-gradient(135deg, #2ecc71, #27ae60);
}

/* Tables */
.table-responsive {
    overflow-x: auto;
    margin: 1rem 0;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
}

.data-table th {
    background: #34495e;
    color: white;
    padding: 1rem;
    text-align: left;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 0.5px;
}

.data-table td {
    padding: 1rem;
    border-bottom: 1px solid #ecf0f1;
}

.data-table tr:hover {
    background: #f8f9fa;
}

.data-table a {
    color: #3498db;
    text-decoration: none;
}

.data-table a:hover {
    text-decoration: underline;
}

/* Badges */
.badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 500;
    margin-right: 0.5rem;
}

.badge-democrat {
    background: #3498db;
    color: white;
}

.badge-republican {
    background: #e74c3c;
    color: white;
}

.badge-buy {
    background: #2ecc71;
    color: white;
}

.badge-sell {
    background: #e74c3c;
    color: white;
}

.badge-exchange {
    background: #f39c12;
    color: white;
}

.ticker {
    font-family: 'Courier New', monospace;
    font-weight: bold;
    color: #2c3e50;
    background: #ecf0f1;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
}

/* Price Display */
.price {
    font-weight: 600;
    color: #2563eb;
}

.text-success {
    color: #059669;
    font-weight: 500;
}

.text-danger {
    color: #dc2626;
    font-weight: 500;
}

.text-muted {
    color: #9ca3af;
    font-style: italic;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    background: #3498db;
    color: white;
    text-decoration: none;
    border-radius: 4px;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    transition: background 0.3s;
}

.btn:hover {
    background: #2980b9;
}

.btn-primary {
    background: #3498db;
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
}

.text-center {
    text-align: center;
    margin: 2rem 0;
}

/* Profile Header */
.profile-header {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    margin-bottom: 2rem;
}

.profile-meta {
    margin-top: 1rem;
}

/* Search Page */
.search-form-large {
    display: flex;
    gap: 1rem;
    margin: 2rem 0;
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.search-input-large {
    flex: 1;
    padding: 1rem;
    border: 2px solid #ecf0f1;
    border-radius: 4px;
    font-size: 1rem;
}

.search-input-large:focus {
    outline: none;
    border-color: #3498db;
}

.results-list {
    display: grid;
    gap: 1rem;
}

.result-item {
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    border-left: 4px solid #3498db;
}

.result-item h4 {
    margin-bottom: 0.5rem;
}

.result-item a {
    color: #2c3e50;
    text-decoration: none;
    font-size: 1.2rem;
}

.result-item a:hover {
    color: #3498db;
}

.result-meta {
    margin-top: 0.5rem;
}

.no-results {
    text-align: center;
    padding: 3rem;
    color: #7f8c8d;
    font-size: 1.2rem;
}

/* Footer */
footer {
    background: #2c3e50;
    color: white;
    padding: 2rem 0;
    margin-top: 4rem;
    text-align: center;
}

/* Responsive */
@media (max-width: 768px) {
    .nav-menu {
        flex-direction: column;
        gap: 1rem;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    h1 {
        font-size: 2rem;
    }

    .search-form-large {
        flex-direction: column;
    }
}