* {
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    margin: 0;
    padding: 0;
    background: #f5f7fa;
    color: #1a1a2e;
    line-height: 1.6;
}

/* Hero Header */
.hero-header {
    background: linear-gradient(135deg, #0f2027 0%, #203a43 50%, #2c5364 100%);
    color: white;
    padding: 3rem 1rem 4rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 20% 30%, rgba(255,107,107,0.15) 0%, transparent 50%),
                radial-gradient(circle at 80% 70%, rgba(72,219,251,0.15) 0%, transparent 50%);
    pointer-events: none;
}

.header-content {
    position: relative;
    z-index: 2;
    max-width: 900px;
    margin: 0 auto;
}

.logo-section {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.pulse-icon {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a6f 100%);
    position: relative;
    box-shadow: 0 0 30px rgba(238, 90, 111, 0.6);
    animation: pulse 2s ease-in-out infinite;
}

.pulse-icon::before {
    content: '';
    position: absolute;
    inset: 8px;
    border-radius: 50%;
    background: white;
}

.pulse-icon::after {
    content: '';
    position: absolute;
    inset: 18px;
    border-radius: 50%;
    background: #ee5a6f;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); box-shadow: 0 0 30px rgba(238, 90, 111, 0.6); }
    50% { transform: scale(1.05); box-shadow: 0 0 50px rgba(238, 90, 111, 0.9); }
}

.brand-name {
    font-size: 3.5rem;
    margin: 0;
    font-weight: 800;
    letter-spacing: -0.02em;
    background: linear-gradient(135deg, #ffffff 0%, #b8d4e3 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.tagline {
    font-size: 1.15rem;
    margin: 0.5rem 0 1.5rem;
    opacity: 0.9;
    font-weight: 300;
}

.header-stats {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    background: rgba(255,255,255,0.1);
    padding: 0.5rem 1.25rem;
    border-radius: 50px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.15);
}

.stat-badge {
    background: #ff4757;
    color: white;
    padding: 0.2rem 0.6rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    animation: blink 1.5s ease-in-out infinite;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

.stat-text {
    font-size: 0.85rem;
    opacity: 0.9;
}

.header-wave {
    position: absolute;
    bottom: -1px;
    left: 0;
    right: 0;
    height: 60px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 60'%3E%3Cpath fill='%23f5f7fa' d='M0,30 C200,60 400,0 600,30 C800,60 1000,0 1200,30 L1200,60 L0,60 Z'/%3E%3C/svg%3E") no-repeat;
    background-size: cover;
}

/* Controls */
.controls {
    background: white;
    padding: 1.25rem;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    position: sticky;
    top: 0;
    z-index: 100;
}

.control-form {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: center;
    justify-content: space-between;
}

.source-selector, .search-box, .sort-selector {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.source-selector label, .sort-selector label {
    font-weight: 600;
    color: #2c5364;
    font-size: 0.9rem;
}

.controls select {
    padding: 0.5rem 1rem;
    border: 2px solid #e0e6ed;
    border-radius: 8px;
    background: white;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s;
    color: #1a1a2e;
    font-weight: 500;
}

.controls select:hover {
    border-color: #2c5364;
}

.controls select:focus {
    outline: none;
    border-color: #ee5a6f;
    box-shadow: 0 0 0 3px rgba(238, 90, 111, 0.1);
}

.search-box {
    flex: 1;
    max-width: 400px;
    min-width: 250px;
}

.search-box input {
    flex: 1;
    padding: 0.6rem 1rem;
    border: 2px solid #e0e6ed;
    border-radius: 8px 0 0 8px;
    font-size: 0.9rem;
    transition: all 0.2s;
}

.search-box input:focus {
    outline: none;
    border-color: #ee5a6f;
}

.search-box button {
    padding: 0.6rem 1.25rem;
    background: linear-gradient(135deg, #ee5a6f 0%, #ff6b6b 100%);
    color: white;
    border: none;
    border-radius: 0 8px 8px 0;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.2s;
}

.search-box button:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(238, 90, 111, 0.3);
}

/* Main content */
main {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 1.5rem;
}

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

.article-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    transition: all 0.3s ease;
    border: 1px solid rgba(0,0,0,0.04);
}

.article-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 28px rgba(0,0,0,0.12);
}

.card-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.thumb-wrapper {
    position: relative;
    width: 100%;
    height: 200px;
    overflow: hidden;
    background: #e0e6ed;
}

.thumb {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.article-card:hover .thumb {
    transform: scale(1.05);
}

.thumb-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #2c5364 0%, #203a43 100%);
    font-size: 3rem;
}

.source-badge {
    position: absolute;
    top: 0.75rem;
    left: 0.75rem;
    background: rgba(0,0,0,0.75);
    color: white;
    padding: 0.35rem 0.75rem;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    backdrop-filter: blur(10px);
}

.content {
    padding: 1.25rem;
}

.title {
    font-size: 1.1rem;
    margin: 0 0 0.75rem;
    font-weight: 700;
    color: #1a1a2e;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.article-card:hover .title {
    color: #ee5a6f;
}

.description {
    font-size: 0.9rem;
    color: #555;
    margin: 0 0 1rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.meta {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8rem;
    color: #888;
    padding-top: 0.75rem;
    border-top: 1px solid #f0f0f0;
}

.time {
    font-size: 0.8rem;
}

.empty-state {
    text-align: center;
    padding: 4rem 1rem;
    color: #888;
}

.empty-state h2 {
    color: #1a1a2e;
}

footer {
    text-align: center;
    padding: 2rem 1rem;
    color: #888;
    font-size: 0.85rem;
    border-top: 1px solid #e0e6ed;
    margin-top: 3rem;
}

/* Responsive */
@media (max-width: 768px) {
    .brand-name {
        font-size: 2.25rem;
    }
    .tagline {
        font-size: 1rem;
    }
    .control-form {
        flex-direction: column;
        align-items: stretch;
    }
    .search-box {
        max-width: none;
    }
    .articles-grid {
        grid-template-columns: 1fr;
    }
}
