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

html {
    height: 100%;
    font-family: 'Roboto', sans-serif;
}

body {
    min-height: 100%;
    margin: 0;
    font-family: 'Roboto', sans-serif;
    background: #f8f9fa;
    color: #1a1a1a;
    line-height: 1.6;
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* Dark mode styles */
body.dark-mode {
    background: #0d1117;
    color: #e6edf3;
}

body.dark-mode .header {
    background: #161b22;
}

body.dark-mode .header-top {
    background: #010409;
}

body.dark-mode .logo {
    color: #e6edf3;
}

body.dark-mode .nav a {
    color: #e6edf3;
}

body.dark-mode .nav a:hover {
    color: #9c88ff;
}

body.dark-mode .nav a::after {
    background: #9c88ff;
}

body.dark-mode .breaking-news {
    background: #6c5ce7;
}

body.dark-mode .featured-main,
body.dark-mode .sidebar-article,
body.dark-mode .news-card,
body.dark-mode .category-card {
    background: #161b22;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

body.dark-mode .featured-title,
body.dark-mode .sidebar-title,
body.dark-mode .news-title,
body.dark-mode .section-title,
body.dark-mode .category-name {
    color: #e6edf3;
}

body.dark-mode .featured-excerpt,
body.dark-mode .news-excerpt,
body.dark-mode .article-meta {
    color: #8b949e;
}

body.dark-mode .category-tag {
    background: #6c5ce7;
}

body.dark-mode .section-header {
    border-bottom-color: #30363d;
}

body.dark-mode .view-all {
    color: #9c88ff;
}

body.dark-mode .news-image {
    background: #0d1117;
}

body.dark-mode .category-card {
    background: #161b22;
    border-color: #30363d;
}

body.dark-mode .category-card:hover {
    border-color: #9c88ff;
    box-shadow: 0 5px 15px rgba(156, 136, 255, 0.3);
}

body.dark-mode .footer {
    background: #010409;
}

body.dark-mode .footer-section a {
    color: #8b949e;
}

body.dark-mode .footer-section a:hover {
    color: #e6edf3;
}

body.dark-mode .footer-bottom {
    border-top-color: #30363d;
    color: #8b949e;
}

/* Theme toggle button */
.theme-toggle {
    background: transparent;
    border: 2px solid #5e35b1;
    border-radius: 20px;
    padding: 0.5rem 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    color: #1a1a1a;
}

body.dark-mode .theme-toggle {
    border-color: #9c88ff;
    color: #e6edf3;
}

.theme-toggle:hover {
    background: #5e35b1;
    color: #fff;
}

body.dark-mode .theme-toggle:hover {
    background: #9c88ff;
    color: #000;
}

.theme-icon {
    font-size: 1.2rem;
}

/* Header */
.header {
    background: #fff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-top {
    background: #1a1a1a;
    color: #fff;
    padding: 0.5rem 0;
    font-size: 0.85rem;
}

.header-top-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.server-status {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.status-indicator {
    display: inline-block;
    width: 8px;
    height: 8px;
    background: #4caf50;
    border-radius: 50%;
    margin-right: 0.5rem;
}

.header-main {
    padding: 1.5rem 0;
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-family: 'Playfair Display', serif;
    font-size: 2.5rem;
    font-weight: 700;
    color: #1a1a1a;
    text-decoration: none;
}

.logo span {
    color: #5e35b1;
}

.nav {
    display: flex;
    gap: 2.5rem;
    list-style: none;
}

.nav a {
    color: #1a1a1a;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
    position: relative;
}

.nav a:hover {
    color: #5e35b1;
}

.nav a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: #5e35b1;
    transition: width 0.3s ease;
}

.nav a:hover::after {
    width: 100%;
}

/* Breaking News Bar */
.breaking-news {
    background: #5e35b1;
    color: #fff;
    padding: 0.75rem 0;
    overflow: hidden;
    position: relative;
}

.breaking-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    align-items: center;
    position: relative;
}

.breaking-label {
    background: rgba(255, 255, 255, 0.2);
    padding: 0.25rem 1rem;
    border-radius: 4px;
    font-weight: 700;
    white-space: nowrap;
    position: relative;
    z-index: 2;
    margin-right: 2rem;
}

.breaking-text-container {
    position: relative;
    flex: 1;
    overflow: hidden;
}

.breaking-text {
    display: inline-block;
    padding-left: 100%;
    white-space: nowrap;
    animation: scroll 30s linear infinite;
}

@keyframes scroll {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-100%);
    }
}

/* Main Container */
.main-container {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 2rem 2rem;
    background: #f8f9fa;
    transition: background-color 0.3s ease;
}

body.dark-mode .main-container {
    background: #0d1117;
}

/* Featured Section */
.featured-section {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 2rem;
    margin-bottom: 3rem;
}

.featured-main {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    cursor: pointer;
    transition: transform 0.3s ease;
}

.featured-main:hover {
    transform: translateY(-5px);
}

.featured-image {
    width: 100%;
    height: 400px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 5rem;
    color: rgba(255, 255, 255, 0.8);
}

.featured-content {
    padding: 2rem;
}

.article-meta {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
    font-size: 0.9rem;
    color: #666;
}

.category-tag {
    background: #5e35b1;
    color: #fff;
    padding: 0.25rem 0.75rem;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 500;
}

.featured-title {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: #1a1a1a;
}

.featured-excerpt {
    color: #666;
    line-height: 1.8;
}

.featured-sidebar {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.sidebar-article {
    background: #fff;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    cursor: pointer;
    transition: transform 0.3s ease;
}

.sidebar-article:hover {
    transform: translateX(-5px);
}

.sidebar-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #1a1a1a;
}

/* Latest News Section */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #e0e0e0;
}

.section-title {
    font-size: 2rem;
    font-weight: 700;
    color: #1a1a1a;
}

.view-all {
    color: #5e35b1;
    text-decoration: none;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: gap 0.3s ease;
}

.view-all:hover {
    gap: 1rem;
}

.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.news-card {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    cursor: pointer;
}

.news-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.12);
}

.news-image {
    width: 100%;
    height: 200px;
    background: #e0e0e0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    color: #999;
}

.news-content {
    padding: 1.5rem;
}

.news-title {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #1a1a1a;
}

.news-excerpt {
    color: #666;
    font-size: 0.95rem;
    margin-bottom: 1rem;
}

.news-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
    color: #999;
}

/* Categories Section */
.categories {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin: 3rem 0;
}

.category-card {
    background: #fff;
    border: 2px solid transparent;
    border-radius: 8px;
    padding: 1.5rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

body.dark-mode .category-card {
    background: #161b22;
    border-color: #30363d;
}

.category-card:hover {
    border-color: #5e35b1;
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(94, 53, 177, 0.2);
}

.category-icon {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.category-name {
    font-weight: 600;
    color: #1a1a1a;
}

/* Footer */
.footer {
    background: #1a1a1a;
    color: #fff;
    padding: 3rem 0 2rem;
    margin-top: 5rem;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 3rem;
}

.footer-section h3 {
    margin-bottom: 1rem;
    color: #fff;
}

.footer-section a {
    color: #ccc;
    text-decoration: none;
    display: block;
    padding: 0.25rem 0;
    transition: color 0.3s ease;
}

.footer-section a:hover {
    color: #fff;
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    margin-top: 2rem;
    border-top: 1px solid #333;
    color: #999;
}

/* Responsive */
@media (max-width: 768px) {
    .featured-section {
        grid-template-columns: 1fr;
    }

    .header-content {
        flex-direction: column;
        gap: 1rem;
    }

    .nav {
        flex-wrap: wrap;
        justify-content: center;
    }

    .theme-toggle {
        order: -1;
        align-self: center;
    }
}