* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-blue: #4F46E5;
    --primary-purple: #7C3AED;
    --gradient-start: #4F46E5;
    --gradient-end: #7C3AED;
    --bg-dark: #0F172A;
    --bg-card: #1E293B;
    --bg-hover: #334155;
    --text-primary: #F1F5F9;
    --text-secondary: #94A3B8;
    --text-muted: #64748B;
    --border-color: #334155;
    --accent-cyan: #06B6D4;
    --accent-emerald: #10B981;
    --shadow-lg: 0 20px 40px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 10px 20px rgba(0, 0, 0, 0.2);
    --shadow-sm: 0 4px 8px rgba(0, 0, 0, 0.15);
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: var(--text-primary);
    background: linear-gradient(135deg, var(--bg-dark) 0%, #1a1a2e 100%);
    min-height: 100vh;
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
}

.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
}

header {
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: var(--shadow-md);
}

.header-main {
    padding: 20px 0;
}

.header-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 28px;
    font-weight: 800;
    background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-decoration: none;
    letter-spacing: -0.5px;
}

.logo:hover {
    opacity: 0.9;
}

nav {
    display: flex;
    align-items: center;
    gap: 32px;
}

nav a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 15px;
    font-weight: 500;
    padding: 8px 0;
    position: relative;
    transition: color 0.3s;
}

nav a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
    transition: width 0.3s;
}

nav a:hover {
    color: var(--text-primary);
}

nav a:hover::after {
    width: 100%;
}

.search-box {
    display: flex;
    align-items: center;
    gap: 8px;
}

.search-box input {
    padding: 10px 20px;
    border: 1px solid var(--border-color);
    border-radius: 50px;
    font-size: 14px;
    width: 240px;
    transition: all 0.3s;
    background: var(--bg-card);
    color: var(--text-primary);
}

.search-box input:focus {
    outline: none;
    border-color: var(--primary-purple);
    box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.2);
}

.search-box button {
    background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
    color: white;
    border: none;
    padding: 10px 24px;
    border-radius: 50px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s;
}

.search-box button:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

main {
    padding: 40px 0;
}

.hero-section {
    background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
    padding: 80px 0;
    margin-bottom: 48px;
    border-radius: 24px;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 50%;
    height: 100%;
    background: rgba(255, 255, 255, 0.05);
}

.hero-section::after {
    content: '';
    position: absolute;
    bottom: -50%;
    left: -10%;
    width: 300px;
    height: 300px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 50%;
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 700px;
    padding: 0 40px;
}

.hero-badge {
    display: inline-block;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    padding: 8px 16px;
    border-radius: 50px;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 20px;
    backdrop-filter: blur(10px);
}

.hero-title {
    font-size: 52px;
    font-weight: 800;
    line-height: 1.15;
    margin-bottom: 20px;
    color: white;
}

.hero-summary {
    font-size: 20px;
    color: rgba(255, 255, 255, 0.85);
    margin-bottom: 32px;
    line-height: 1.6;
}

.hero-link {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: white;
    color: var(--primary-purple);
    text-decoration: none;
    padding: 14px 32px;
    border-radius: 12px;
    font-weight: 700;
    font-size: 16px;
    transition: all 0.3s;
}

.hero-link:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 32px;
}

.section-title {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-primary);
}

.section-line {
    width: 60px;
    height: 4px;
    background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
    border-radius: 2px;
    margin-top: 12px;
}

.articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 32px;
    margin-bottom: 48px;
}

.article-card {
    background: var(--bg-card);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: all 0.4s ease;
    border: 1px solid var(--border-color);
}

.article-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-purple);
}

.article-image {
    position: relative;
    width: 100%;
    height: 220px;
    overflow: hidden;
    background: var(--bg-hover);
}

.article-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.article-card:hover .article-image img {
    transform: scale(1.08);
}

.article-badge {
    position: absolute;
    top: 16px;
    left: 16px;
    background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
    color: white;
    padding: 6px 14px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.article-content {
    padding: 28px;
}

.article-title {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 12px;
    line-height: 1.4;
    color: var(--text-primary);
}

.article-title a {
    color: inherit;
    text-decoration: none;
    transition: color 0.3s;
}

.article-title a:hover {
    background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.article-summary {
    font-size: 15px;
    color: var(--text-secondary);
    margin-bottom: 20px;
    line-height: 1.6;
}

.article-meta {
    display: flex;
    align-items: center;
    gap: 16px;
    font-size: 13px;
    color: var(--text-muted);
}

.article-meta-item {
    display: flex;
    align-items: center;
    gap: 6px;
}

.article-meta svg {
    width: 16px;
    height: 16px;
    stroke: var(--accent-cyan);
}

.featured-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 32px;
    margin-bottom: 48px;
}

.featured-main {
    background: var(--bg-card);
    border-radius: 24px;
    overflow: hidden;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
    transition: all 0.4s;
}

.featured-main:hover {
    border-color: var(--primary-purple);
    box-shadow: var(--shadow-lg);
}

.featured-main-image {
    height: 360px;
    position: relative;
}

.featured-main-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.featured-main-badge {
    position: absolute;
    top: 24px;
    left: 24px;
    background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
    color: white;
    padding: 10px 20px;
    border-radius: 12px;
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
}

.featured-main-content {
    padding: 32px;
}

.featured-main-title {
    font-size: 28px;
    font-weight: 800;
    margin-bottom: 16px;
    line-height: 1.3;
}

.featured-main-title a {
    color: var(--text-primary);
    text-decoration: none;
    transition: color 0.3s;
}

.featured-main-title a:hover {
    background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.featured-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.featured-item {
    display: flex;
    gap: 20px;
    background: var(--bg-card);
    border-radius: 16px;
    padding: 20px;
    border: 1px solid var(--border-color);
    transition: all 0.3s;
}

.featured-item:hover {
    border-color: var(--primary-purple);
    box-shadow: var(--shadow-sm);
}

.featured-item-image {
    width: 140px;
    height: 100px;
    border-radius: 12px;
    overflow: hidden;
    flex-shrink: 0;
}

.featured-item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.featured-item-content {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.featured-item-title {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 8px;
    line-height: 1.4;
}

.featured-item-title a {
    color: var(--text-primary);
    text-decoration: none;
    transition: color 0.3s;
}

.featured-item-title a:hover {
    background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.featured-item-meta {
    font-size: 13px;
    color: var(--text-muted);
}

.trending-section {
    background: var(--bg-card);
    border-radius: 24px;
    padding: 40px;
    margin-bottom: 48px;
    border: 1px solid var(--border-color);
}

.trending-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}

.trending-card {
    text-align: center;
}

.trending-number {
    font-size: 48px;
    font-weight: 800;
    background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 16px;
    opacity: 0.3;
}

.trending-title {
    font-size: 16px;
    font-weight: 700;
    line-height: 1.5;
    margin-bottom: 12px;
}

.trending-title a {
    color: var(--text-primary);
    text-decoration: none;
    transition: color 0.3s;
}

.trending-title a:hover {
    background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.trending-time {
    font-size: 13px;
    color: var(--text-muted);
}

.article-detail {
    max-width: 900px;
    margin: 0 auto;
    padding: 48px 24px;
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--bg-card);
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    padding: 10px 20px;
    border-radius: 10px;
    margin-bottom: 32px;
    transition: all 0.3s;
    border: 1px solid var(--border-color);
}

.back-link:hover {
    border-color: var(--primary-purple);
    color: var(--text-primary);
}

.article-detail-header {
    margin-bottom: 40px;
}

.article-detail-badge {
    display: inline-block;
    background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
    color: white;
    padding: 8px 16px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    margin-bottom: 20px;
}

.article-detail-title {
    font-size: 48px;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 24px;
    color: var(--text-primary);
}

.article-detail-meta {
    display: flex;
    align-items: center;
    gap: 20px;
    font-size: 15px;
    color: var(--text-secondary);
}

.article-detail-image {
    width: 100%;
    max-height: 520px;
    border-radius: 24px;
    overflow: hidden;
    margin-bottom: 48px;
    background: var(--bg-card);
}

.article-detail-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.article-detail-content {
    font-size: 18px;
    line-height: 1.9;
    color: var(--text-secondary);
}

.article-detail-content p {
    margin-bottom: 28px;
}

.related-section {
    margin-top: 64px;
    padding-top: 48px;
    border-top: 2px solid var(--border-color);
}

.search-results {
    max-width: 1200px;
    margin: 0 auto;
    padding: 48px 24px;
}

.search-header {
    margin-bottom: 48px;
}

.search-header h1 {
    font-size: 36px;
    font-weight: 800;
    margin-bottom: 12px;
}

.search-header p {
    font-size: 16px;
    color: var(--text-secondary);
}

.search-highlight {
    background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: 700;
}

.no-results {
    text-align: center;
    padding: 80px 24px;
    background: var(--bg-card);
    border-radius: 24px;
}

.no-results h2 {
    font-size: 32px;
    font-weight: 800;
    margin-bottom: 16px;
    color: var(--text-primary);
}

.no-results p {
    font-size: 16px;
    color: var(--text-secondary);
    margin-bottom: 32px;
}

.no-results a {
    color: var(--accent-cyan);
    text-decoration: none;
    font-weight: 600;
}

.page-content {
    max-width: 900px;
    margin: 0 auto;
    padding: 48px 24px;
}

.page-content h1 {
    font-size: 40px;
    font-weight: 800;
    margin-bottom: 32px;
    color: var(--text-primary);
}

.page-content h2 {
    font-size: 24px;
    font-weight: 700;
    margin-top: 40px;
    margin-bottom: 20px;
    background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.page-content h3 {
    font-size: 18px;
    font-weight: 600;
    margin-top: 28px;
    margin-bottom: 16px;
    color: var(--text-primary);
}

.page-content p {
    font-size: 16px;
    line-height: 1.8;
    color: var(--text-secondary);
    margin-bottom: 20px;
}

.page-content ul,
.page-content ol {
    margin-left: 28px;
    margin-bottom: 24px;
}

.page-content li {
    font-size: 16px;
    line-height: 1.8;
    color: var(--text-secondary);
    margin-bottom: 10px;
}

footer {
    background: var(--bg-card);
    border-top: 1px solid var(--border-color);
    padding: 64px 0;
    margin-top: 80px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 48px;
    margin-bottom: 48px;
}

.footer-brand h3 {
    font-size: 24px;
    font-weight: 800;
    margin-bottom: 16px;
    background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.footer-brand p {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.7;
}

.footer-section h4 {
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 20px;
    color: var(--text-primary);
}

.footer-section ul {
    list-style: none;
}

.footer-section li {
    margin-bottom: 12px;
}

.footer-section a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 14px;
    transition: color 0.3s;
}

.footer-section a:hover {
    color: var(--accent-cyan);
}

.footer-bottom {
    border-top: 1px solid var(--border-color);
    padding-top: 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-bottom p {
    font-size: 14px;
    color: var(--text-muted);
}

@media (max-width: 1024px) {
    .featured-grid {
        grid-template-columns: 1fr;
    }

    .trending-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {
    .header-container {
        flex-direction: column;
        gap: 20px;
        padding: 16px 20px;
    }

    nav {
        flex-wrap: wrap;
        justify-content: center;
        gap: 20px;
    }

    .search-box {
        width: 100%;
        justify-content: center;
    }

    .search-box input {
        width: 100%;
        max-width: 280px;
    }

    .hero-section {
        padding: 48px 20px;
        border-radius: 16px;
    }

    .hero-title {
        font-size: 32px;
    }

    .hero-summary {
        font-size: 16px;
    }

    .container {
        padding: 0 16px;
    }

    .articles-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .featured-main-image {
        height: 240px;
    }

    .featured-main-title {
        font-size: 22px;
    }

    .featured-item {
        flex-direction: column;
    }

    .featured-item-image {
        width: 100%;
        height: 160px;
    }

    .trending-grid {
        grid-template-columns: 1fr;
    }

    .article-detail {
        padding: 32px 16px;
    }

    .article-detail-title {
        font-size: 32px;
    }

    .article-detail-content {
        font-size: 16px;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .footer-bottom {
        flex-direction: column;
        text-align: center;
        gap: 16px;
    }
}

@media (max-width: 480px) {
    .logo {
        font-size: 22px;
    }

    nav a {
        font-size: 13px;
    }

    .hero-title {
        font-size: 26px;
    }

    .section-title {
        font-size: 22px;
    }

    .article-detail-title {
        font-size: 26px;
    }

    .trending-number {
        font-size: 36px;
    }
}