/* Reset & Base Styles */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: Arial, Helvetica, sans-serif;
    font-size: 14px;
    color: #111;
    background-color: #ffffff;
    line-height: 1.5;
    -webkit-text-size-adjust: 100%;
}

a {
    color: #0000cc;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* Header Section */
header {
    background-color: #ffffff;
    border-bottom: 2px solid #002244;
    padding: 10px 15px;
}

.top-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}

.logo-container {
    display: flex;
    align-items: baseline;
    gap: 10px;
    flex-wrap: wrap;
}

.logo-text {
    font-size: 28px;
    font-weight: bold;
    color: #b30000;
    text-shadow: 1px 1px 0px #ffcccc;
}

.logo-tagline {
    background-color: #002244;
    color: #fff;
    padding: 4px 10px;
    font-size: 11px;
    font-weight: bold;
    border-radius: 3px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.search-box {
    display: flex;
    align-items: center;
    gap: 5px;
}

.search-box select, .search-box input, .search-box button {
    font-size: 13px;
    padding: 6px 10px;
    border: 1px solid #cbd5e1;
    background: #f9f9f9;
    border-radius: 3px;
}

.search-box button {
    background: #002244;
    color: white;
    cursor: pointer;
    font-weight: bold;
    border: none;
}

.search-box button:hover {
    background: #001122;
}

.social-icons {
    display: flex;
    gap: 8px;
}

.social-icon {
    width: 26px;
    height: 26px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    color: white;
    font-size: 12px;
    font-weight: bold;
}

.fb { background: #3b5998; }
.tw { background: #1da1f2; }
.rss { background: #ff6600; }

/* Navigation Bars */
.nav-bar-1 {
    background-color: #002244;
    padding: 8px 12px;
    font-size: 13px;
    color: #fff;
    white-space: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.nav-bar-1::-webkit-scrollbar {
    height: 4px;
}

.nav-bar-1::-webkit-scrollbar-thumb {
    background: #418ab3;
}

.nav-bar-1 a {
    color: #ffeb3b;
    margin: 0 6px;
    padding: 2px 4px;
}

.nav-bar-1 a:hover {
    color: #ffffff;
}

.nav-bar-2 {
    background-color: #1a5276;
    padding: 8px 12px;
    font-size: 13px;
    color: #fff;
    white-space: nowrap;
    overflow-x: auto;
    border-top: 1px solid #418ab3;
    -webkit-overflow-scrolling: touch;
}

.nav-bar-2::-webkit-scrollbar {
    height: 4px;
}

.nav-bar-2 a {
    color: #ffffff;
    margin: 0 6px;
    padding: 2px 4px;
}

.nav-bar-2 a:hover {
    color: #ffeb3b;
}

/* Control Bar */
.control-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #f1f4f9;
    padding: 8px 15px;
    border-bottom: 1px solid #dcdcdc;
    font-size: 13px;
    flex-wrap: wrap;
    gap: 10px;
}

.view-mode span {
    font-weight: bold;
    color: #334155;
    margin-right: 6px;
}

.view-mode a {
    margin: 0 4px;
    padding: 4px 8px;
    background: #e2e8f0;
    border: 1px solid #cbd5e1;
    border-radius: 3px;
    color: #334155;
    display: inline-block;
}

.view-mode a.active, .view-mode a:hover {
    background: #cbd5e1;
    text-decoration: none;
}

.archive-control {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.archive-control select {
    font-size: 12px;
    padding: 4px 6px;
    border: 1px solid #cbd5e1;
    border-radius: 3px;
}

.archive-control button {
    font-size: 12px;
    padding: 4px 10px;
    background: #002244;
    color: white;
    border: none;
    border-radius: 3px;
    cursor: pointer;
}

.archive-control button:hover {
    background: #001122;
}

/* Main Layout Grid */
.main-layout {
    display: grid;
    grid-template-columns: 220px 1fr 280px;
    gap: 15px;
    padding: 15px;
    max-width: 1400px;
    margin: 0 auto;
}

@media (max-width: 1200px) {
    .main-layout {
        grid-template-columns: 200px 1fr;
    }
    .right-sidebar {
        grid-column: 1 / -1;
    }
}

@media (max-width: 768px) {
    .main-layout {
        grid-template-columns: 1fr;
        padding: 10px;
        gap: 10px;
    }
    .left-sidebar, .right-sidebar {
        border: none;
        padding: 0;
    }
    .control-bar {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* Left Sidebar */
.left-sidebar {
    background: #fdfdfd;
    border-right: 1px solid #e2e8f0;
    padding-right: 12px;
}

.sidebar-section {
    margin-bottom: 18px;
}

.sidebar-link-item {
    display: block;
    padding: 6px 8px;
    font-size: 13px;
    color: #0000cc;
    border-bottom: 1px dotted #e2e8f0;
    transition: background 0.15s;
}

.sidebar-link-item:hover {
    background-color: #f0f4f8;
    text-decoration: underline;
}

.sidebar-header {
    font-weight: bold;
    color: #002244;
    background: #e8eff6;
    padding: 8px 10px;
    margin-bottom: 6px;
    font-size: 13px;
    border-left: 4px solid #002244;
    border-radius: 2px;
}

/* Center Content */
.center-content {
    min-width: 0;
}

.headline-box {
    background: #fcfdff;
    border: 1px solid #cbd5e1;
    padding: 15px;
    margin-bottom: 18px;
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.02);
}

.headline-title {
    font-size: 16px;
    font-weight: bold;
    color: #990000;
    margin-bottom: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    border-bottom: 1px solid #f1f5f9;
    padding-bottom: 8px;
}

.headline-timestamp {
    font-size: 12px;
    font-weight: normal;
    color: #64748b;
}

.news-item {
    margin-bottom: 10px;
    font-size: 14px;
    line-height: 1.5;
}

.news-item a {
    color: #0000cc;
}

.source {
    color: #c0392b;
    font-size: 12px;
    font-style: italic;
    margin-left: 4px;
    white-space: nowrap;
}

/* Google AdSense Qualified Ad Slots */
.adsense-container {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 4px;
    text-align: center;
    padding: 15px;
    margin: 18px 0;
    overflow: hidden;
}

.adsense-label {
    font-size: 10px;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 6px;
}

.adsense-unit {
    display: block;
    width: 100%;
    min-height: 90px;
    background: #ffffff;
    border: 1px dashed #cbd5e1;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #64748b;
    font-size: 12px;
    margin: 0 auto;
}

/* Discover More Widgets */
.discover-box {
    background: #f8fafc;
    border: 1px solid #cbd5e1;
    border-radius: 4px;
    margin: 18px 0;
    overflow: hidden;
}

.discover-title {
    background: #e2e8f0;
    padding: 8px 12px;
    font-weight: bold;
    color: #1e293b;
    font-size: 13px;
    border-bottom: 1px solid #cbd5e1;
}

.discover-list {
    list-style: none;
}

.discover-item {
    border-bottom: 1px solid #edf2f7;
    font-size: 13px;
}

.discover-item:last-child {
    border-bottom: none;
}

.discover-item a {
    color: #002244;
    font-weight: 500;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    width: 100%;
}

.discover-item a:hover {
    background: #f1f5f9;
    color: #0000cc;
    text-decoration: none;
}

.discover-item a::after {
    content: "›";
    font-weight: bold;
    color: #64748b;
    font-size: 16px;
}

/* Pagination */
.pagination {
    display: flex;
    gap: 6px;
    margin: 20px 0;
    align-items: center;
    flex-wrap: wrap;
}

.page-btn {
    padding: 6px 12px;
    background: #f1f5f9;
    border: 1px solid #cbd5e1;
    border-radius: 3px;
    font-size: 13px;
    color: #334155;
    cursor: pointer;
    text-decoration: none;
    font-weight: 500;
}

.page-btn.active {
    background: #002244;
    color: white;
    border-color: #002244;
    font-weight: bold;
}

.page-btn:hover:not(.active) {
    background: #e2e8f0;
}

/* Right Sidebar */
.right-sidebar {
    background: #fdfdfd;
    border-left: 1px solid #e2e8f0;
    padding-left: 12px;
}

.promo-box {
    background: linear-gradient(135deg, #f0fff4 0%, #dcfce7 100%);
    border: 1px solid #86efac;
    padding: 15px;
    text-align: center;
    margin-top: 18px;
    border-radius: 6px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.02);
}

.promo-box h4 {
    color: #166534;
    font-size: 15px;
    margin-bottom: 6px;
}

.promo-box p {
    font-size: 12px;
    color: #15803d;
    margin-bottom: 12px;
    line-height: 1.4;
}

.promo-icon-btn {
    background: #16a34a;
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: bold;
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
    cursor: pointer;
    transition: background 0.2s, transform 0.2s;
}

.promo-icon-btn:hover {
    background: #15803d;
    transform: scale(1.05);
}

/* Footer Section */
footer {
    background-color: #f8fafc;
    border-top: 2px solid #002244;
    padding: 25px 15px;
    margin-top: 30px;
    font-size: 13px;
    color: #333;
}

.footer-channels {
    max-width: 1400px;
    margin: 0 auto 20px auto;
    line-height: 1.8;
}

.footer-channels p {
    margin-bottom: 8px;
}

.footer-channels strong {
    color: #002244;
}

.footer-links {
    text-align: center;
    padding-top: 15px;
    border-top: 1px solid #e2e8f0;
    color: #666;
}

.footer-links a {
    color: #0000cc;
    margin: 0 8px;
}

.copyright {
    text-align: center;
    margin-top: 10px;
    font-size: 12px;
    color: #64748b;
}

/* Ad Banner */
.ad-banner {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 4px;
    text-align: center;
    padding: 20px;
    margin: 20px 0;
    color: #64748b;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Admin Panel Styles */
.admin-body {
    background-color: #f8fafc;
    color: #1e293b;
}

.admin-wrapper {
    max-width: 1200px;
    margin: 30px auto;
    padding: 0 20px;
}

.admin-card {
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    padding: 25px;
    margin-bottom: 25px;
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.05);
}

.admin-card h2 {
    color: #002244;
    font-size: 20px;
    margin-bottom: 15px;
    border-bottom: 2px solid #e2e8f0;
    padding-bottom: 10px;
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    font-weight: bold;
    font-size: 13px;
    margin-bottom: 5px;
    color: #334155;
}

.form-group input, .form-group select {
    width: 100%;
    padding: 10px;
    font-size: 14px;
    border: 1px solid #cbd5e1;
    border-radius: 4px;
    background: #f9f9f9;
}

.btn-admin {
    background: #002244;
    color: white;
    padding: 10px 20px;
    font-size: 14px;
    font-weight: bold;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.btn-admin:hover {
    background: #001122;
}

.btn-danger {
    background: #b30000;
    color: white;
    padding: 6px 12px;
    font-size: 12px;
    border: none;
    border-radius: 3px;
    cursor: pointer;
}

.btn-danger:hover {
    background: #800000;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
    font-size: 13px;
}

.admin-table th, .admin-table td {
    border: 1px solid #e2e8f0;
    padding: 10px 12px;
    text-align: left;
}

.admin-table th {
    background: #f1f5f9;
    color: #002244;
}

.admin-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #002244;
    color: white;
    padding: 15px 25px;
}

.admin-nav a {
    color: #ffeb3b;
    font-weight: bold;
}

/* Dark Mode Styles */
body.dark-mode {
    background-color: #0f172a;
    color: #f8fafc;
}

body.dark-mode header,
body.dark-mode .admin-body header,
body.dark-mode .admin-card,
body.dark-mode .headline-box,
body.dark-mode .discover-box,
body.dark-mode .left-sidebar,
body.dark-mode .right-sidebar,
body.dark-mode footer,
body.dark-mode .control-bar {
    background-color: #1e293b !important;
    color: #f8fafc !important;
    border-color: #334155 !important;
}

body.dark-mode a {
    color: #60a5fa !important;
}

body.dark-mode .search-box input,
body.dark-mode .search-box select,
body.dark-mode .archive-control select,
body.dark-mode .form-group input,
body.dark-mode .form-group select,
body.dark-mode .form-group textarea {
    background: #0f172a !important;
    color: #f8fafc !important;
    border-color: #475569 !important;
}

body.dark-mode .admin-table th {
    background: #0f172a !important;
    color: #f8fafc !important;
}

/* Breaking News Ticker */
.breaking-ticker {
    background: #b30000;
    color: white;
    padding: 8px 15px;
    font-size: 13px;
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 15px;
    overflow: hidden;
    white-space: nowrap;
}

.breaking-label {
    background: #002244;
    padding: 3px 8px;
    border-radius: 3px;
    font-size: 11px;
    text-transform: uppercase;
    z-index: 2;
    flex-shrink: 0;
}

.ticker-wrap {
    width: 100%;
    overflow: hidden;
}

.ticker-move {
    display: inline-block;
    white-space: nowrap;
    padding-left: 100%;
    animation: ticker 28s linear infinite;
}

.ticker-move:hover {
    animation-play-state: paused;
}

@keyframes ticker {
    0% { transform: translate3d(0, 0, 0); }
    100% { transform: translate3d(-100%, 0, 0); }
}

/* Market & Weather Widget */
.market-widget {
    background: #f8fafc;
    border: 1px solid #cbd5e1;
    border-radius: 4px;
    padding: 12px;
    margin-bottom: 15px;
    font-size: 12px;
}

.market-widget h4 {
    color: #002244;
    font-size: 13px;
    margin-bottom: 8px;
    border-bottom: 1px solid #e2e8f0;
    padding-bottom: 4px;
}

body.dark-mode .market-widget {
    background: #1e293b !important;
    border-color: #334155 !important;
}

/* AI Summary Modal */
.ai-modal {
    display: none;
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

.ai-modal-content {
    background: #ffffff;
    padding: 25px;
    border-radius: 8px;
    max-width: 500px;
    width: 90%;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

body.dark-mode .ai-modal-content {
    background: #1e293b;
    color: #f8fafc;
}

/* Trending Topics Bar */
.trending-bar {
    background: #f1f5f9;
    padding: 8px 15px;
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 10px;
    border-bottom: 1px solid #cbd5e1;
    overflow-x: auto;
}

.trending-title {
    font-weight: bold;
    color: #b30000;
    white-space: nowrap;
}

.trending-tag {
    background: #e2e8f0;
    color: #002244;
    padding: 2px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: bold;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.2s, color 0.2s;
}

.trending-tag:hover {
    background: #002244;
    color: #ffeb3b;
}

body.dark-mode .trending-bar {
    background: #1e293b !important;
    border-color: #334155 !important;
}

body.dark-mode .trending-tag {
    background: #334155 !important;
    color: #ffeb3b !important;
}

/* Social Share & Notification Styles */
.share-btn {
    color: white !important;
    border: none;
    padding: 2px 6px;
    font-size: 11px;
    border-radius: 3px;
    cursor: pointer;
    text-decoration: none !important;
    display: inline-flex;
    align-items: center;
}
.share-btn.wa { background: #25d366; }
.share-btn.tw { background: #1da1f2; }
