* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f5f5f5;
    color: #333;
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
.header {
    background-color: #1a365d;
    color: white;
    padding: 20px 0;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.logo {
    font-size: 32px;
    font-weight: bold;
    color: white;
}

.btn-admin {
    background-color: #e53e3e;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: background-color 0.3s;
}

.btn-admin:hover {
    background-color: #c53030;
}

.nav {
    display: flex;
    gap: 20px;
    border-top: 1px solid rgba(255,255,255,0.2);
    padding-top: 15px;
    flex-wrap: wrap;
}

.nav-link {
    color: white;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
}

.nav-link:hover,
.nav-link.active {
    color: #e53e3e;
}

/* Breaking News */
.breaking-news {
    background-color: #e53e3e;
    color: white;
    padding: 12px 0;
}

.breaking-news .container {
    display: flex;
    align-items: center;
    gap: 15px;
}

.breaking-label {
    background-color: #1a365d;
    padding: 5px 15px;
    border-radius: 4px;
    font-weight: bold;
    font-size: 14px;
}

.breaking-text {
    font-size: 15px;
}

/* Main Content */
.main-content {
    margin: 30px auto;
}

.content-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 30px;
}

/* Section Title */
.section-title {
    font-size: 24px;
    font-weight: bold;
    color: #1a365d;
    border-bottom: 3px solid #e53e3e;
    padding-bottom: 10px;
    margin-bottom: 20px;
}

/* Featured News */
.featured-news {
    margin-bottom: 40px;
}

.featured-article {
    background-color: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.featured-img {
    width: 100%;
    height: 350px;
    object-fit: cover;
}

.article-content {
    padding: 25px;
}

.category {
    background-color: #e53e3e;
    color: white;
    padding: 5px 12px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    display: inline-block;
}

.article-title {
    font-size: 26px;
    margin: 15px 0;
    color: #1a365d;
}

.article-excerpt {
    color: #666;
    margin-bottom: 15px;
    line-height: 1.8;
}

.article-meta {
    display: flex;
    justify-content: space-between;
    color: #999;
    font-size: 14px;
    border-top: 1px solid #eee;
    padding-top: 15px;
}

/* News Grid */
.news-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.news-card {
    background-color: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s, box-shadow 0.3s;
}

.news-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.15);
}

.news-img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.news-content {
    padding: 20px;
}

.news-title {
    font-size: 18px;
    margin: 10px 0;
    color: #1a365d;
}

.news-excerpt {
    color: #666;
    font-size: 14px;
    margin-bottom: 10px;
}

.news-meta {
    display: flex;
    justify-content: space-between;
    color: #999;
    font-size: 12px;
    border-top: 1px solid #eee;
    padding-top: 10px;
}

/* Sidebar */
.sidebar-widget {
    background-color: white;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.widget-title {
    font-size: 20px;
    font-weight: bold;
    color: #1a365d;
    border-bottom: 3px solid #e53e3e;
    padding-bottom: 10px;
    margin-bottom: 15px;
}

.trending-list,
.category-list {
    list-style: none;
}

.trending-list li,
.category-list li {
    margin-bottom: 10px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}

.trending-list li:last-child,
.category-list li:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.trending-list a,
.category-list a {
    color: #333;
    text-decoration: none;
    font-size: 14px;
    transition: color 0.3s;
}

.trending-list a:hover,
.category-list a:hover {
    color: #e53e3e;
}

/* Footer */
.footer {
    background-color: #1a365d;
    color: white;
    padding: 40px 0 20px;
    margin-top: 50px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin-bottom: 30px;
}

.footer-section h3,
.footer-section h4 {
    margin-bottom: 15px;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 8px;
}

.footer-section a {
    color: #ccc;
    text-decoration: none;
    transition: color 0.3s;
}

.footer-section a:hover {
    color: white;
}

.copyright {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255,255,255,0.2);
    color: #ccc;
    font-size: 14px;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.6);
}

.modal-content {
    background-color: white;
    margin: 100px auto;
    padding: 30px;
    border-radius: 10px;
    width: 90%;
    max-width: 400px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    position: relative;
}

.close {
    position: absolute;
    right: 20px;
    top: 15px;
    font-size: 28px;
    font-weight: bold;
    color: #999;
    cursor: pointer;
}

.close:hover {
    color: #333;
}

.login-form {
    margin-top: 20px;
}

.input {
    width: 100%;
    padding: 12px;
    margin-bottom: 15px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 14px;
}

.input:focus {
    outline: none;
    border-color: #1a365d;
}

.btn-login {
    width: 100%;
    padding: 12px;
    background-color: #1a365d;
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 16px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.btn-login:hover {
    background-color: #2d3748;
}

.error {
    color: #e53e3e;
    font-size: 14px;
    margin-bottom: 10px;
}

.demo-info {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #eee;
    text-align: center;
    color: #666;
    font-size: 13px;
}

/* Admin Panel Styles */
.admin-header {
    background-color: #1a365d;
    color: white;
    padding: 15px 0;
}

.admin-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.admin-title {
    font-size: 24px;
}

.btn-logout {
    background-color: #e53e3e;
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 5px;
    cursor: pointer;
}

.dashboard {
    padding: 30px 0;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 25px;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.stat-card h3 {
    font-size: 14px;
    opacity: 0.9;
    margin-bottom: 10px;
}

.stat-card .stat-number {
    font-size: 36px;
    font-weight: bold;
}

.admin-section {
    background-color: white;
    padding: 25px;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.btn-add {
    background-color: #1a365d;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    margin-bottom: 20px;
}

.articles-table {
    width: 100%;
    border-collapse: collapse;
}

.articles-table th,
.articles-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.articles-table th {
    background-color: #f8f9fa;
    font-weight: 600;
    color: #1a365d;
}

.btn-edit,
.btn-delete {
    padding: 5px 10px;
    border: none;
    border-radius: 3px;
    cursor: pointer;
    margin-right: 5px;
    font-size: 12px;
}

.btn-edit {
    background-color: #3182ce;
    color: white;
}

.btn-delete {
    background-color: #e53e3e;
    color: white;
}

/* Responsive */
@media (max-width: 992px) {
    .content-grid {
        grid-template-columns: 1fr;
    }

    .news-grid {
        grid-template-columns: 1fr;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .footer-content {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .header-top {
        flex-direction: column;
        gap: 15px;
    }

    .nav {
        justify-content: center;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }
}