/* News Calendar CSS */
:root {
    --bg-dark: #050505;
    --glass-bg: rgba(255, 255, 255, 0.03);
    --glass-border: rgba(255, 255, 255, 0.08);
    --primary-gradient: linear-gradient(135deg, #6366f1 0%, #a855f7 100%);
    --text-main: #ffffff;
    --text-muted: #9ca3af;
    --impact-high: #ff4444;
    --impact-medium: #ffbb33;
    --impact-low: #00C851;
    --impact-holiday: #33b5e5;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    font-family: 'Outfit', sans-serif;
    overflow-x: hidden;
}

/* Background */
.spline-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    z-index: -1;
    pointer-events: none;
}

.spline-overlay {
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 50% 50%, rgba(99, 102, 241, 0.1) 0%, rgba(5, 5, 5, 1) 70%);
}

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

/* Hero Section */
.hero {
    padding-top: 120px;
    padding-bottom: 40px;
    text-align: center;
}

.hero h1 {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 1rem;
    background: linear-gradient(to right, #fff, #9ca3af);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero p {
    color: var(--text-muted);
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 auto;
}

/* Calendar Controls */
.calendar-controls {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 30px;
    align-items: center;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    padding: 20px 30px;
    border-radius: 20px;
    backdrop-filter: blur(10px);
    margin-bottom: 30px;
}

.filter-group {
    display: flex;
    align-items: center;
    gap: 15px;
}

.filter-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    white-space: nowrap;
    min-width: 85px;
}

.date-filters {
    display: flex;
    gap: 8px;
    flex-wrap: nowrap;
}

.filter-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    color: var(--text-muted);
    padding: 8px 20px;
    border-radius: 30px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
    font-weight: 500;
    white-space: nowrap;
}

.filter-btn:hover,
.filter-btn.active {
    background: linear-gradient(90deg, #7000ff 0%, #00c6ff 100%);
    color: white;
    border-color: transparent;
    box-shadow: 0 0 15px rgba(112, 0, 255, 0.4);
}

/* Impact Filters */
.impact-filters {
    display: flex;
    gap: 10px;
    flex-wrap: nowrap;
}

.impact-filter-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    color: var(--text-muted);
    padding: 8px 18px;
    border-radius: 30px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
}

.impact-filter-btn i {
    font-size: 0.5rem;
}

.impact-filter-btn.active.high {
    background: rgba(255, 68, 68, 0.2);
    color: var(--impact-high);
    border-color: var(--impact-high);
    box-shadow: 0 0 10px rgba(255, 68, 68, 0.3);
}

.impact-filter-btn.active.medium {
    background: rgba(255, 187, 51, 0.2);
    color: var(--impact-medium);
    border-color: var(--impact-medium);
    box-shadow: 0 0 10px rgba(255, 187, 51, 0.3);
}

.impact-filter-btn.active.low {
    background: rgba(0, 200, 81, 0.2);
    color: var(--impact-low);
    border-color: var(--impact-low);
    box-shadow: 0 0 10px rgba(0, 200, 81, 0.3);
}

.impact-filter-btn:not(.active) {
    opacity: 0.5;
}

.impact-filter-btn:not(.active):hover {
    opacity: 0.8;
    background: rgba(255, 255, 255, 0.08);
}

/* Currency Filters */
.currency-group {
    grid-column: 1 / -1;
    padding-top: 15px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.currency-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 12px;
}

.currency-actions {
    display: flex;
    gap: 12px;
    margin-left: auto;
}

.action-link {
    background: none;
    border: none;
    color: #7000ff;
    font-size: 0.8rem;
    cursor: pointer;
    padding: 4px 8px;
    font-weight: 600;
    opacity: 0.8;
    transition: all 0.2s;
}

.action-link:hover {
    opacity: 1;
    text-decoration: underline;
}

.currency-filters {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.currency-chip {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    color: var(--text-muted);
    padding: 6px 14px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 600;
    transition: all 0.2s ease;
}

.currency-chip:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-1px);
}

.currency-chip.active {
    background: linear-gradient(135deg, rgba(112, 0, 255, 0.2) 0%, rgba(0, 198, 255, 0.2) 100%);
    color: #fff;
    border-color: #7000ff;
    box-shadow: 0 0 12px rgba(112, 0, 255, 0.3);
}

.loading-mini {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-style: italic;
    padding: 6px 0;
}

.timezone-info {
    font-size: 0.9rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Table Wrapper */
.calendar-wrapper {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 20px;
    backdrop-filter: blur(20px);
    margin-bottom: 60px;
    overflow-x: auto;
}

.news-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0 10px;
    min-width: 800px;
}

.news-table th {
    text-align: left;
    color: var(--text-muted);
    font-weight: 500;
    padding: 10px 20px;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.news-table tr.event-row {
    background: rgba(255, 255, 255, 0.02);
    transition: transform 0.2s ease, background 0.2s ease;
}

.news-table tr.event-row:hover {
    background: rgba(255, 255, 255, 0.05);
    transform: translateY(-2px);
}

.news-table td {
    padding: 16px 20px;
    color: white;
    vertical-align: middle;
}

.news-table td:first-child {
    border-top-left-radius: 12px;
    border-bottom-left-radius: 12px;
}

.news-table td:last-child {
    border-top-right-radius: 12px;
    border-bottom-right-radius: 12px;
}

/* Columns */
.col-time {
    font-variant-numeric: tabular-nums;
    font-weight: 500;
    width: 100px;
}

.col-currency {
    font-weight: 700;
    color: #fff;
    width: 80px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.currency-flag {
    width: 24px;
    height: 16px;
    border-radius: 2px;
    object-fit: cover;
}

.col-impact {
    width: 100px;
}

.impact-badge {
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    display: inline-block;
    min-width: 60px;
    text-align: center;
}

.impact-high {
    background: rgba(255, 68, 68, 0.2);
    color: var(--impact-high);
    border: 1px solid rgba(255, 68, 68, 0.2);
}

.impact-medium {
    background: rgba(255, 187, 51, 0.2);
    color: var(--impact-medium);
    border: 1px solid rgba(255, 187, 51, 0.2);
}

.impact-low {
    background: rgba(0, 200, 81, 0.2);
    color: var(--impact-low);
    border: 1px solid rgba(0, 200, 81, 0.2);
}

.impact-holiday {
    background: rgba(51, 181, 229, 0.2);
    color: var(--impact-holiday);
    border: 1px solid rgba(51, 181, 229, 0.2);
}

.col-event {
    font-weight: 500;
}

.col-data {
    font-variant-numeric: tabular-nums;
    text-align: center;
    width: 100px;
}

.date-separator {
    text-align: center;
    padding: 30px 0 10px;
    color: var(--text-main);
    font-size: 1.2rem;
    font-weight: 600;
    border-bottom: 1px solid var(--glass-border);
}

/* Loading State */
.loading {
    text-align: center;
    padding: 50px;
    color: var(--text-muted);
}

.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    border-top-color: #6366f1;
    animation: spin 1s ease-in-out infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

@media (max-width: 768px) {
    .calendar-controls {
        flex-direction: column;
        align-items: stretch;
    }

    .date-filters {
        justify-content: center;
    }

    .news-table {
        font-size: 0.9rem;
    }

    .news-table th,
    .news-table td {
        padding: 12px 10px;
    }
}