/* political.wiki - Retro-Futuristic Dashboard Design */
/* Palette: deep navy #0a1628, steel navy #1e3a5f, metallic silver #c0c8d4, 
   electric blue #00a8ff, gold accent #d4af37, near-white #f4f6f9, 
   medium gray #6b7a8d, dark slate #0d1b2a */

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

html, body {
    height: 100%;
    overflow: hidden;
}

body {
    font-family: 'IBM Plex Sans', sans-serif;
    background-color: #0d1b2a;
    color: #c0c8d4;
    line-height: 1.6;
}

/* Grid Overlay */
.grid-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1000;
    background-image:
        repeating-linear-gradient(0deg, transparent, transparent 59px, rgba(192, 200, 212, 0.06) 59px, rgba(192, 200, 212, 0.06) 60px),
        repeating-linear-gradient(90deg, transparent, transparent 59px, rgba(192, 200, 212, 0.06) 59px, rgba(192, 200, 212, 0.06) 60px);
}

/* Dashboard Layout - 3-column CSS Grid */
.dashboard {
    display: grid;
    grid-template-columns: 240px 1fr 280px;
    height: 100vh;
    overflow: hidden;
}

/* Sidebar */
.sidebar {
    background: linear-gradient(180deg, #0a1628 0%, #0d1b2a 100%);
    border-right: 1px solid rgba(30, 58, 95, 0.6);
    display: flex;
    flex-direction: column;
    height: 100vh;
    overflow-y: auto;
    position: relative;
}

.sidebar::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 100%;
    background: linear-gradient(135deg, rgba(192, 200, 212, 0.03) 0%, transparent 50%, rgba(192, 200, 212, 0.02) 100%);
    pointer-events: none;
}

.sidebar-header {
    padding: 24px 20px;
    border-bottom: 1px solid rgba(30, 58, 95, 0.4);
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-icon {
    flex-shrink: 0;
}

.logo-text {
    font-family: 'Libre Baskerville', serif;
    font-size: 18px;
    font-weight: 700;
    color: #f4f6f9;
    letter-spacing: -0.5px;
}

.logo-accent {
    color: #d4af37;
}

/* Sidebar Navigation */
.sidebar-nav {
    flex: 1;
    padding: 16px 0;
    overflow-y: auto;
}

.nav-section {
    padding: 0 12px;
    margin-bottom: 24px;
}

.nav-label {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: #6b7a8d;
    padding: 0 8px;
    margin-bottom: 8px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 6px;
    color: #c0c8d4;
    text-decoration: none;
    font-size: 14px;
    font-weight: 400;
    transition: all 0.2s ease;
    position: relative;
}

.nav-item:hover {
    background: rgba(0, 168, 255, 0.08);
    color: #f4f6f9;
}

.nav-item.active {
    background: rgba(0, 168, 255, 0.12);
    color: #00a8ff;
}

.nav-item.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 20px;
    background: #00a8ff;
    border-radius: 0 2px 2px 0;
}

.nav-item svg {
    flex-shrink: 0;
    opacity: 0.7;
}

.nav-item.active svg {
    opacity: 1;
}

/* Sidebar Footer */
.sidebar-footer {
    padding: 16px 20px;
    border-top: 1px solid rgba(30, 58, 95, 0.4);
}

.data-timestamp {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.timestamp-label {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 9px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #6b7a8d;
}

.timestamp-value {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 11px;
    color: #00a8ff;
}

/* Main Content */
.main-content {
    display: flex;
    flex-direction: column;
    height: 100vh;
    overflow: hidden;
    background: #0d1b2a;
}

/* Top Bar */
.top-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 24px;
    border-bottom: 1px solid rgba(30, 58, 95, 0.4);
    background: rgba(10, 22, 40, 0.8);
    flex-shrink: 0;
}

.search-container {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
    max-width: 500px;
    background: rgba(30, 58, 95, 0.3);
    border: 1px solid rgba(30, 58, 95, 0.5);
    border-radius: 8px;
    padding: 8px 14px;
    transition: border-color 0.2s ease;
}

.search-container:focus-within {
    border-color: #00a8ff;
}

.search-icon {
    flex-shrink: 0;
}

.search-input {
    flex: 1;
    background: none;
    border: none;
    outline: none;
    color: #f4f6f9;
    font-family: 'IBM Plex Sans', sans-serif;
    font-size: 14px;
}

.search-input::placeholder {
    color: #6b7a8d;
}

.top-bar-actions {
    display: flex;
    gap: 8px;
}

.btn-icon {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(30, 58, 95, 0.3);
    border: 1px solid rgba(30, 58, 95, 0.5);
    border-radius: 8px;
    color: #c0c8d4;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-icon:hover {
    background: rgba(0, 168, 255, 0.1);
    border-color: #00a8ff;
    color: #00a8ff;
}

/* Content Grid */
.content-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto auto;
    gap: 16px;
    padding: 20px 24px;
    overflow-y: auto;
    flex: 1;
}

/* Panels */
.panel {
    background: rgba(10, 22, 40, 0.6);
    border: 1px solid rgba(30, 58, 95, 0.5);
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.panel.blurred {
    filter: blur(3px);
    opacity: 0.6;
}

.panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px;
    border-bottom: 1px solid rgba(30, 58, 95, 0.3);
    background: rgba(30, 58, 95, 0.15);
}

.panel-title {
    font-family: 'Libre Baskerville', serif;
    font-size: 15px;
    font-weight: 700;
    color: #f4f6f9;
}

.panel-badge {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 10px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #d4af37;
    background: rgba(212, 175, 55, 0.1);
    padding: 3px 8px;
    border-radius: 4px;
    border: 1px solid rgba(212, 175, 55, 0.2);
}

.panel-body {
    padding: 18px;
}

/* Featured Panel */
.panel-featured {
    grid-column: 1 / 2;
    grid-row: 1 / 2;
}

.featured-image {
    border-radius: 6px;
    overflow: hidden;
    margin-bottom: 16px;
    border: 1px solid rgba(30, 58, 95, 0.3);
}

.vintage-photo {
    filter: sepia(0.5) contrast(1.1) brightness(0.9);
}

.featured-title {
    font-family: 'Libre Baskerville', serif;
    font-size: 20px;
    font-weight: 700;
    color: #f4f6f9;
    margin-bottom: 10px;
    line-height: 1.4;
}

.featured-excerpt {
    font-size: 14px;
    color: #c0c8d4;
    line-height: 1.7;
    margin-bottom: 14px;
}

.featured-meta {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.meta-tag {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 11px;
    color: #00a8ff;
    background: rgba(0, 168, 255, 0.08);
    padding: 4px 10px;
    border-radius: 4px;
    border: 1px solid rgba(0, 168, 255, 0.15);
}

/* Stats Panel */
.panel-stats {
    grid-column: 2 / 3;
    grid-row: 1 / 2;
}

.stat-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 18px;
}

.stat-item {
    text-align: center;
    padding: 14px 8px;
    background: rgba(30, 58, 95, 0.2);
    border: 1px solid rgba(30, 58, 95, 0.3);
    border-radius: 6px;
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.stat-item:hover {
    transform: translateY(-2px);
    border-color: rgba(0, 168, 255, 0.3);
}

.stat-value {
    display: block;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 28px;
    font-weight: 600;
    color: #00a8ff;
    line-height: 1.2;
}

.stat-label {
    display: block;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #6b7a8d;
    margin-top: 4px;
}

/* Mini Chart */
.mini-chart {
    display: flex;
    align-items: flex-end;
    gap: 8px;
    height: 80px;
    padding: 8px 0;
    margin-bottom: 12px;
}

.chart-bar {
    flex: 1;
    background: var(--bar-color);
    border-radius: 3px 3px 0 0;
    height: 0;
    transition: height 1s ease;
    position: relative;
}

.chart-bar.animated {
    height: calc(var(--bar-height) * 1%);
}

.chart-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 10px;
    color: #6b7a8d;
}

.legend-dot {
    width: 8px;
    height: 8px;
    border-radius: 2px;
    flex-shrink: 0;
}

/* Timeline Panel */
.panel-timeline {
    grid-column: 1 / 2;
    grid-row: 2 / 3;
}

.timeline {
    position: relative;
    padding-left: 24px;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 6px;
    top: 0;
    bottom: 0;
    width: 1px;
    background: linear-gradient(180deg, #00a8ff, #1e3a5f);
}

.timeline-item {
    position: relative;
    padding-bottom: 20px;
}

.timeline-item:last-child {
    padding-bottom: 0;
}

.timeline-marker {
    position: absolute;
    left: -21px;
    top: 4px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #0d1b2a;
    border: 2px solid #00a8ff;
    transition: all 0.2s ease;
}

.timeline-item:hover .timeline-marker {
    background: #00a8ff;
    box-shadow: 0 0 8px rgba(0, 168, 255, 0.5);
}

.timeline-date {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 12px;
    font-weight: 600;
    color: #d4af37;
    display: block;
    margin-bottom: 4px;
}

.timeline-title {
    font-family: 'Libre Baskerville', serif;
    font-size: 14px;
    font-weight: 700;
    color: #f4f6f9;
    margin-bottom: 4px;
}

.timeline-text {
    font-size: 13px;
    color: #6b7a8d;
    line-height: 1.5;
}

/* Articles Panel */
.panel-articles {
    grid-column: 2 / 3;
    grid-row: 2 / 3;
}

.article-list {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.article-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px;
    border-radius: 6px;
    text-decoration: none;
    transition: background 0.2s ease;
}

.article-item:hover {
    background: rgba(30, 58, 95, 0.25);
}

.article-icon {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(30, 58, 95, 0.3);
    border-radius: 8px;
}

.article-info {
    flex: 1;
    min-width: 0;
}

.article-title {
    font-family: 'IBM Plex Sans', sans-serif;
    font-size: 14px;
    font-weight: 600;
    color: #f4f6f9;
    margin-bottom: 2px;
}

.article-desc {
    font-size: 12px;
    color: #6b7a8d;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.article-date {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 11px;
    color: #6b7a8d;
    white-space: nowrap;
    flex-shrink: 0;
}

/* Info Panel (Right Sidebar) */
.info-panel {
    background: linear-gradient(180deg, #0a1628 0%, #0d1b2a 100%);
    border-left: 1px solid rgba(30, 58, 95, 0.6);
    height: 100vh;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

.metallic-header {
    background: linear-gradient(135deg, 
        rgba(192, 200, 212, 0.08) 0%, 
        rgba(30, 58, 95, 0.2) 25%, 
        rgba(192, 200, 212, 0.06) 50%, 
        rgba(30, 58, 95, 0.2) 75%, 
        rgba(192, 200, 212, 0.08) 100%);
    border-bottom: 1px solid rgba(212, 175, 55, 0.2);
}

.info-widget {
    padding: 16px 18px;
    border-bottom: 1px solid rgba(30, 58, 95, 0.3);
}

.widget-title {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    color: #d4af37;
    margin-bottom: 12px;
}

/* World Map Widget */
.world-map-mini {
    border-radius: 6px;
    overflow: hidden;
    border: 1px solid rgba(30, 58, 95, 0.3);
}

.map-dot {
    animation: mapPulse 3s ease-in-out infinite;
}

.map-dot:nth-child(odd) {
    animation-delay: 0.5s;
}

@keyframes mapPulse {
    0%, 100% { opacity: 0.6; r: 2; }
    50% { opacity: 1; r: 3; }
}

/* Trending Widget */
.trending-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.trending-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border-radius: 4px;
    background: rgba(30, 58, 95, 0.15);
    transition: background 0.2s ease;
}

.trending-item:hover {
    background: rgba(30, 58, 95, 0.3);
}

.trending-rank {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 12px;
    font-weight: 600;
    color: #6b7a8d;
    width: 22px;
}

.trending-text {
    flex: 1;
    font-size: 13px;
    color: #c0c8d4;
}

.trending-indicator {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 11px;
    font-weight: 500;
}

.trending-indicator.up {
    color: #00a8ff;
}

.trending-indicator.down {
    color: #d4af37;
}

/* On This Day Widget */
.on-this-day {
    padding: 12px;
    background: rgba(30, 58, 95, 0.15);
    border-radius: 6px;
    border-left: 3px solid #d4af37;
}

.otd-year {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 24px;
    font-weight: 600;
    color: #00a8ff;
    margin-bottom: 6px;
}

.otd-text {
    font-size: 13px;
    color: #c0c8d4;
    line-height: 1.6;
}

/* Quote Widget */
.political-quote {
    padding: 14px;
    background: rgba(30, 58, 95, 0.15);
    border-radius: 6px;
    border-left: 3px solid #00a8ff;
}

.political-quote p {
    font-family: 'Libre Baskerville', serif;
    font-size: 14px;
    font-style: italic;
    color: #f4f6f9;
    line-height: 1.6;
    margin-bottom: 8px;
}

.political-quote cite {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 11px;
    font-style: normal;
    color: #6b7a8d;
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: rgba(13, 27, 42, 0.5);
}

::-webkit-scrollbar-thumb {
    background: rgba(30, 58, 95, 0.5);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 168, 255, 0.3);
}

/* Responsive */
@media (max-width: 1200px) {
    .dashboard {
        grid-template-columns: 200px 1fr 240px;
    }
}

@media (max-width: 900px) {
    .dashboard {
        grid-template-columns: 1fr;
    }
    
    .sidebar {
        display: none;
    }
    
    .info-panel {
        display: none;
    }
    
    .content-grid {
        grid-template-columns: 1fr;
    }
}

/* Panel hover animations */
.panel:hover {
    border-color: rgba(0, 168, 255, 0.3);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(192, 200, 212, 0.05);
}

/* Entrance animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(12px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.panel {
    animation: fadeInUp 0.5s ease forwards;
    opacity: 0;
}

.panel-featured { animation-delay: 0.1s; }
.panel-stats { animation-delay: 0.2s; }
.panel-timeline { animation-delay: 0.3s; }
.panel-articles { animation-delay: 0.4s; }

.info-widget {
    animation: fadeInUp 0.5s ease forwards;
    opacity: 0;
}

.info-widget:nth-child(2) { animation-delay: 0.15s; }
.info-widget:nth-child(3) { animation-delay: 0.25s; }
.info-widget:nth-child(4) { animation-delay: 0.35s; }
.info-widget:nth-child(5) { animation-delay: 0.45s; }
