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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: #0a0a0a;
    min-height: 100vh;
    padding: 20px;
    padding-top: 80px; /* Space for sticky header */
    padding-bottom: 100px; /* Space for sticky footer */
    color: #e0e0e0;
}

.main-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(10, 10, 10, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding: 15px 20px;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

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

.header-logo {
    display: flex;
    align-items: center;
}

.logo-img {
    height: 40px;
    width: auto;
    object-fit: contain;
}

.header-nav {
    display: flex;
    justify-content: center;
    flex: 1;
}

.header-right {
    display: flex;
    align-items: center;
}

.twitter-link {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #e0e0e0;
    text-decoration: none;
    padding: 8px 12px;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.twitter-link:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.twitter-link .twitter-icon {
    width: 20px;
    height: 20px;
}

.twitter-link span {
    font-size: 0.9em;
}

.container {
    width: calc(100vw - 200px);
    max-width: none;
    margin: 0 auto;
}

.page-title {
    color: #e0e0e0;
    font-size: 2.5em;
    font-weight: 600;
    margin-bottom: 15px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.page-description {
    color: #b0b0b0;
    font-size: 1.1em;
    line-height: 1.6;
    max-width: 800px;
}

.chart-navigation {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
}

.nav-link {
    color: #b0b0b0;
    text-decoration: none;
    font-size: 0.95em;
    transition: all 0.3s ease;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
    font-weight: 400;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    display: inline-block;
    padding: 8px 0;
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: #e0e0e0;
}

.nav-link:hover {
    color: #fff;
}

.nav-link:hover::after {
    width: 100%;
}

.nav-link.active {
    color: #fff;
    font-weight: 600;
}

.nav-link.active::after {
    width: 100%;
    background-color: #fff;
}

#charts-container {
    display: grid;
    grid-template-columns: 1fr;
    gap: 30px;
}

#hero-charts {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 30px;
    margin-bottom: 40px;
}

.chart-wrapper {
    background: rgba(255, 255, 255, 0.02);
    border-radius: 12px;
    padding: 25px 25px 10px 25px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
    overflow: hidden;
}

.chart-wrapper:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.7);
    border-color: rgba(255, 255, 255, 0.2);
}

.chart-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.5);
    padding-bottom: 20px;
}

.chart-header-controls {
    display: flex;
    align-items: center;
    gap: 15px;
}

.chart-wrapper h2 {
    color: #e0e0e0;
    margin: 0;
    font-size: 1.5em;
    flex: 1;
}

.chart-timeframe-selector {
    display: flex;
    gap: 4px;
    align-items: center;
}

.timeframe-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #b0b0b0;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 0.85em;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
    font-weight: 500;
}

.timeframe-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
    color: #e0e0e0;
}

.timeframe-btn.active {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.3);
    color: #fff;
}

.normalized-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    user-select: none;
    color: #b0b0b0;
    font-size: 0.9em;
    transition: color 0.2s ease;
}

.normalized-toggle:hover {
    color: #e0e0e0;
}

.normalized-checkbox {
    cursor: pointer;
    width: 16px;
    height: 16px;
    accent-color: rgba(255, 255, 255, 0.3);
}

.normalized-label {
    font-weight: 500;
}

.chart-context-icon {
    position: relative;
    cursor: pointer;
    color: #b0b0b0;
    flex-shrink: 0;
    transition: color 0.2s ease;
    display: flex;
    align-items: center;
    height: 100%;
}

.chart-context-icon:hover {
    color: #e0e0e0;
}

.chart-context-icon svg {
    display: block;
    width: auto;
    height: 1.2em;
    max-height: 24px;
}

.chart-context-tooltip {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 8px;
    width: 300px;
    padding: 12px;
    background: rgba(20, 20, 20, 0.98);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    color: #e0e0e0;
    font-size: 0.9em;
    line-height: 1.5;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
    z-index: 100;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
}

.chart-context-icon:hover .chart-context-tooltip {
    opacity: 1;
    pointer-events: auto;
}

.chart-context-tooltip::before {
    content: '';
    position: absolute;
    bottom: 100%;
    right: 12px;
    border: 6px solid transparent;
    border-bottom-color: rgba(255, 255, 255, 0.2);
    margin-bottom: -1px;
}

.chart-description {
    color: #b0b0b0;
    font-size: 0.95em;
    line-height: 1.5;
    margin-bottom: 20px;
    margin-top: 0;
}

.chart-wrapper canvas {
    max-height: 440px;
    margin-bottom: 20px;
}

.chart-footer {
    margin-top: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    font-size: 0.9em;
    opacity: 0.7;
}

.chart-twitter-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #e0e0e0;
    text-decoration: none;
    font-size: 1em;
    transition: color 0.2s ease;
}

.chart-twitter-link:hover {
    color: #fff;
}

.chart-screenshot-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #e0e0e0;
    cursor: pointer;
    transition: color 0.2s ease;
    padding: 4px;
    border-radius: 6px;
}

.chart-screenshot-icon:hover,
.chart-screenshot-icon:focus-visible {
    color: #fff;
    background: rgba(255, 255, 255, 0.08);
    outline: none;
}

.chart-screenshot-icon svg {
    width: 18px;
    height: 18px;
    display: block;
}

.twitter-icon {
    width: 1em;
    height: 1em;
    outline: none;
    border: none;
    background: transparent;
    object-fit: contain;
    flex-shrink: 0;
    align-self: center;
    justify-content: center;
}

.hero-chart {
    width: 100%;
    max-width: 100%;
}

#hero-charts .chart-wrapper canvas {
    max-height: 572px;
}

.status-content {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.status-table {
    width: 100%;
    border-collapse: collapse;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.status-table th,
.status-table td {
    padding: 16px 20px;
    text-align: left;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    color: #e0e0e0;
}

.status-table th {
    background: rgba(255, 255, 255, 0.05);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-size: 0.85em;
}

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

.status-row-synced {
    background: rgba(27, 158, 119, 0.15) !important;
}

.status-row-synced td {
    border-color: rgba(27, 158, 119, 0.3);
}

.status-row-warning {
    background: rgba(217, 95, 2, 0.15) !important;
}

.status-row-warning td {
    border-color: rgba(217, 95, 2, 0.3);
}

.status-row-error {
    background: rgba(231, 41, 138, 0.15) !important;
}

.status-row-error td {
    border-color: rgba(231, 41, 138, 0.3);
}

.loading,
.empty-state {
    font-size: 1.1em;
    color: #b0b0b0;
    text-align: center;
}

.error {
    color: white;
    background: rgba(255, 0, 0, 0.2);
    padding: 20px;
    border-radius: 8px;
    text-align: center;
    font-size: 1.2em;
}

.shared-legend {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(10, 10, 10, 0.95);
    backdrop-filter: blur(10px);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: 15px 20px;
    z-index: 1000;
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 -5px 20px rgba(0, 0, 0, 0.5);
}

.shared-legend-items {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    align-items: center;
}

.shared-legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #e0e0e0;
    font-size: 0.9em;
}

.shared-legend-color {
    width: 16px;
    height: 16px;
    border-radius: 3px;
    flex-shrink: 0;
}

.shared-legend-label {
    white-space: nowrap;
}

.global-timeframe-controls {
    display: flex;
    gap: 6px;
    margin-left: auto;
}

.global-timeframe-controls .timeframe-btn {
    padding: 6px 12px;
}

@media (max-width: 768px) {
    body {
        padding-top: 70px;
    }
    
    .container {
        width: calc(100vw - 40px);
    }
    
    .main-header {
        padding: 12px 15px;
        flex-wrap: wrap;
    }
    
    .header-logo .logo-img {
        height: 40px;
    }
    
    .header-nav {
        order: 3;
        width: 100%;
        margin-top: 10px;
        padding-top: 10px;
        border-top: 1px solid rgba(255, 255, 255, 0.1);
    }
    
    .twitter-link span {
        display: none;
    }
    
    #charts-container {
        grid-template-columns: 1fr;
    }
    
    .hero-chart {
        max-width: 100%;
    }
    
    .shared-legend {
        padding: 12px 15px;
        gap: 15px;
        flex-direction: column;
        align-items: stretch;
    }
    
    .global-timeframe-controls {
        margin-left: 0;
        justify-content: center;
    }
    
    .shared-legend-item {
        font-size: 0.85em;
        gap: 6px;
    }
    
    .shared-legend-color {
        width: 14px;
        height: 14px;
    }
}

