/* ===== CSS RESET & BASE ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Brand Colors */
    --primary: #4A9EFF;
    --accent: #4A9EFF;
    --background: #000000;
    --text-primary: #FFFFFF;
    --link: #99A1AF;

    /* Additional UI Colors */
    --card-bg: #111111;
    --card-hover: #1a1a1a;
    --border: #222222;
    --shadow: rgba(74, 158, 255, 0.1);
    --shadow-hover: rgba(74, 158, 255, 0.2);

    /* Typography */
    --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --h1-size: 96px;
    --h2-size: 48px;
    --body-size: 24px;
}

body {
    font-family: var(--font-primary);
    font-size: 16px;
    line-height: 1.6;
    background: var(--background);
    color: var(--text-primary);
    overflow-x: hidden;
}

/* ===== CONTAINER ===== */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 40px 20px;
}

/* ===== HEADER ===== */
.header {
    margin-bottom: 40px;
    padding-bottom: 30px;
    border-bottom: 1px solid var(--border);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

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

.logo {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    background: var(--card-bg);
    padding: 8px;
    transition: transform 0.3s ease;
}

.logo:hover {
    transform: scale(1.05);
}

.title {
    font-size: 48px;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary) 0%, #2E7FE8 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 20px;
}

.btn-refresh {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: var(--primary);
    color: var(--background);
    border: none;
    border-radius: 12px;
    font-family: var(--font-primary);
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-refresh:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px var(--shadow-hover);
}

.btn-refresh:active {
    transform: translateY(0);
}

.last-updated {
    font-size: 14px;
    color: var(--link);
}

/* ===== FILTER BAR ===== */
.filter-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    margin-bottom: 40px;
    padding: 20px;
    background: var(--card-bg);
    border-radius: 16px;
    border: 1px solid var(--border);
    flex-wrap: wrap;
}

.filter-buttons {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 10px 20px;
    background: transparent;
    color: var(--link);
    border: 1px solid var(--border);
    border-radius: 8px;
    font-family: var(--font-primary);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.filter-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.filter-btn.active {
    background: var(--primary);
    color: var(--background);
    border-color: var(--primary);
}

.search-box {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    background: var(--background);
    border: 1px solid var(--border);
    border-radius: 8px;
    transition: border-color 0.3s ease;
}

.search-box:focus-within {
    border-color: var(--primary);
}

.search-box svg {
    color: var(--link);
}

.search-box input {
    background: transparent;
    border: none;
    outline: none;
    color: var(--text-primary);
    font-family: var(--font-primary);
    font-size: 14px;
    width: 200px;
}

.search-box input::placeholder {
    color: var(--link);
}

/* ===== STATS GRID ===== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.stat-card {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 24px;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 16px;
    transition: all 0.3s ease;
}

.stat-card:hover {
    border-color: var(--primary);
    box-shadow: 0 8px 24px var(--shadow);
    transform: translateY(-4px);
}

.stat-icon {
    font-size: 40px;
    filter: grayscale(0.3);
}

.stat-content {
    flex: 1;
}

.stat-value {
    font-size: 36px;
    font-weight: 700;
    color: var(--primary);
    line-height: 1;
    margin-bottom: 4px;
}

.stat-label {
    font-size: 14px;
    color: var(--link);
    font-weight: 500;
}

/* ===== ARTICLES SECTION ===== */
.articles-section {
    margin-top: 40px;
}

.section-title {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 24px;
    color: var(--text-primary);
}

.articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 24px;
}

/* ===== ARTICLE CARD ===== */
.article-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    animation: fadeInUp 0.5s ease;
    display: flex;
    flex-direction: column;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.article-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--primary), #2E7FE8);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s ease;
    z-index: 1;
}

.article-card:hover::before {
    transform: scaleX(1);
}

.article-card:hover {
    border-color: var(--primary);
    box-shadow: 0 12px 32px var(--shadow-hover);
    transform: translateY(-6px);
}

.article-thumbnail {
    width: 100%;
    height: 200px;
    object-fit: cover;
    background: linear-gradient(135deg, #1a1a1a 0%, #0a0a0a 100%);
}

.article-thumbnail.placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 48px;
    opacity: 0.3;
}

.article-content {
    padding: 24px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.article-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 16px;
}

.article-source {
    display: inline-block;
    padding: 6px 12px;
    background: rgba(74, 158, 255, 0.1);
    color: var(--primary);
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.save-btn {
    background: transparent;
    border: none;
    cursor: pointer;
    font-size: 24px;
    transition: transform 0.2s ease;
    padding: 4px;
}

.save-btn:hover {
    transform: scale(1.2);
}

.save-btn.saved {
    filter: hue-rotate(45deg);
}

.article-title {
    font-size: 20px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 12px;
    line-height: 1.4;
}

.article-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 13px;
    color: var(--link);
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--border);
}

.article-date {
    display: flex;
    align-items: center;
    gap: 6px;
}

.article-tags {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.tag {
    padding: 4px 8px;
    background: rgba(153, 161, 175, 0.1);
    border-radius: 4px;
    font-size: 11px;
    color: var(--link);
}

/* ===== EMPTY STATE ===== */
.empty-state {
    text-align: center;
    padding: 80px 20px;
}

.empty-icon {
    font-size: 80px;
    margin-bottom: 20px;
    opacity: 0.5;
}

.empty-state h3 {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.empty-state p {
    font-size: 16px;
    color: var(--link);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .title {
        font-size: 32px;
    }

    .header-content {
        flex-direction: column;
        align-items: flex-start;
    }

    .filter-bar {
        flex-direction: column;
        align-items: stretch;
    }

    .search-box input {
        width: 100%;
    }

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

    .stat-value {
        font-size: 28px;
    }
}

/* ===== ANIMATIONS ===== */
@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }
}

.loading {
    animation: pulse 1.5s ease-in-out infinite;
}