:root {
  --bg: #0b0f19;
  --paper: #161e2e;
  --paper-hover: #1f293d;
  --primary: #38bdf8;
  --accent: #e11d48;
  --game-accent: #00f0ff;
  --text: #f8fafc;
  --text-muted: #94a3b8;
  --border: #243047;
  --shadow: 0 10px 30px rgba(0,0,0,0.5);
}

html, body {
  max-width: 100vw;
  overflow-x: hidden;
}

* { box-sizing: border-box; margin: 0; padding: 0; font-family: 'Outfit', sans-serif; }
body { background-color: var(--bg); color: var(--text); line-height: 1.6; }

a { color: inherit; text-decoration: none; }

/* --- Top Bar --- */
.top-bar { background: #070a12; border-bottom: 1px solid var(--border); color: var(--text-muted); font-size: 0.8rem; padding: 6px 0; }
.top-bar-inner { max-width: 1200px; margin: 0 auto; padding: 0 20px; display: flex; justify-content: space-between; align-items: center; }
.ticker-box { display: flex; align-items: center; gap: 10px; overflow: hidden; }
.ticker-label { background: var(--accent); color: #fff; font-family: 'Oswald', sans-serif; font-size: 0.75rem; padding: 2px 8px; font-weight: 700; text-transform: uppercase; border-radius: 3px; }
.ticker-text { font-size: 0.82rem; color: #cbd5e1; white-space: nowrap; }

.desktop-top-links { display: flex; gap: 15px; }
@media (max-width: 600px) {
  .desktop-top-links { display: none; }
}

/* --- Header Layout & Branding --- */
.main-header { background: #0f172a; border-bottom: 3px solid var(--accent); padding: 16px 0; }
.header-container { max-width: 1200px; margin: 0 auto; padding: 0 20px; display: flex; justify-content: space-between; align-items: center; }

.logo { display: flex; align-items: center; gap: 12px; }
.logo-icon { width: 45px; height: 45px; background: linear-gradient(135deg, var(--primary), var(--accent)); border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 1.4rem; font-weight: 800; color: #fff; box-shadow: 0 0 15px rgba(56, 189, 248, 0.4); flex-shrink: 0; }
.logo-text h1 { font-family: 'Oswald', sans-serif; font-size: 2.2rem; font-weight: 700; color: #fff; letter-spacing: -0.5px; text-transform: uppercase; line-height: 1; }
.logo-text h1 span { color: var(--accent); }
.logo-subtext { font-size: 0.72rem; color: var(--text-muted); letter-spacing: 1px; text-transform: uppercase; }

.leaderboard-slot { background: linear-gradient(135deg, #1e293b, #0f172a); border: 1px dashed var(--border); width: 728px; height: 75px; border-radius: 8px; display: flex; justify-content: center; align-items: center; color: var(--text-muted); font-size: 0.8rem; font-weight: 600; text-transform: uppercase; letter-spacing: 1px; }

/* Mobile Action Buttons (Touch Target >= 44px) */
.mobile-action-btn {
  display: none;
  background: transparent;
  border: 1px solid var(--border);
  color: #fff;
  width: 44px;
  height: 44px;
  border-radius: 8px;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
}

.hamburger-btn {
  flex-direction: column;
  gap: 5px;
  padding: 10px;
}

.hamburger-bar {
  width: 22px;
  height: 2px;
  background-color: #fff;
  border-radius: 2px;
  transition: 0.3s;
}

@media (max-width: 1050px) {
  .leaderboard-slot { display: none; }
}

@media (max-width: 850px) {
  .mobile-action-btn { display: flex; }
  .logo-subtext { display: none; }
  .logo-text h1 { font-size: 1.6rem; }
  .logo-icon { width: 38px; height: 38px; font-size: 1.2rem; }
  .nav-bar { display: none; } /* Replaced by Mobile Drawer */
}

/* --- Desktop Navigation Bar --- */
.nav-bar { background: #161e2e; border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 100; backdrop-filter: blur(10px); }
.nav-container { max-width: 1200px; margin: 0 auto; padding: 0 20px; display: flex; justify-content: space-between; align-items: center; }
.main-nav { display: flex; list-style: none; overflow-x: auto; scrollbar-width: none; }
.main-nav::-webkit-scrollbar { display: none; }
.main-nav a { display: block; padding: 14px 18px; color: #e2e8f0; font-weight: 700; text-decoration: none; font-size: 0.9rem; text-transform: uppercase; font-family: 'Oswald', sans-serif; letter-spacing: 0.5px; transition: 0.2s; white-space: nowrap; }
.main-nav a:hover, .main-nav a.active { background: var(--accent); color: #fff; }

.desktop-search-btn {
  background: #0f172a;
  border: 1px solid var(--border);
  color: var(--text-muted);
  padding: 6px 14px;
  border-radius: 20px;
  cursor: pointer;
  font-size: 0.82rem;
  transition: 0.2s;
  display: flex;
  align-items: center;
  gap: 6px;
}
.desktop-search-btn:hover { border-color: var(--primary); color: #fff; }

/* --- Mobile Navigation Drawer & Backdrop --- */
.drawer-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0, 0, 0, 0.75);
  z-index: 998;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
  backdrop-filter: blur(4px);
}
.drawer-overlay.active { opacity: 1; visibility: visible; }

.mobile-drawer {
  position: fixed;
  top: 0; left: 0; bottom: 0;
  width: 300px;
  max-width: 85vw;
  background: #0f1424;
  border-right: 1px solid var(--border);
  z-index: 999;
  transform: translateX(-100%);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  box-shadow: 10px 0 30px rgba(0,0,0,0.8);
}
.mobile-drawer.active { transform: translateX(0); }

.drawer-header {
  padding: 20px;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #0b0f19;
}
.drawer-close-btn {
  background: transparent;
  border: none;
  color: #fff;
  font-size: 2rem;
  cursor: pointer;
  line-height: 1;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.drawer-body { padding: 20px; overflow-y: auto; flex: 1; }

.drawer-search-form { display: flex; margin-bottom: 20px; }
.drawer-search-form input { flex: 1; background: #0b0f19; border: 1px solid var(--border); border-radius: 6px 0 0 6px; padding: 10px 14px; color: #fff; font-size: 0.9rem; outline: none; }
.drawer-search-form button { background: var(--primary); border: none; padding: 0 16px; border-radius: 0 6px 6px 0; cursor: pointer; color: #000; font-weight: 700; }

.drawer-menu-list { list-style: none; }
.drawer-menu-list a { display: block; padding: 12px 14px; color: #e2e8f0; font-weight: 700; font-family: 'Oswald', sans-serif; font-size: 1rem; border-bottom: 1px solid rgba(255,255,255,0.05); transition: 0.2s; }
.drawer-menu-list a:hover, .drawer-menu-list a.active { color: var(--primary); background: rgba(56, 189, 248, 0.05); border-radius: 6px; }
.drawer-divider { font-size: 0.72rem; color: var(--accent); font-weight: 800; font-family: 'Oswald', sans-serif; text-transform: uppercase; letter-spacing: 1px; padding: 15px 14px 6px; }

/* --- Search Modal Overlay --- */
.search-modal {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(7, 10, 18, 0.9);
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 100px;
  backdrop-filter: blur(8px);
}
.search-modal.active { opacity: 1; visibility: visible; }

.search-modal-content {
  background: #0f1424;
  border: 1px solid var(--primary);
  border-radius: 12px;
  width: 90%;
  max-width: 600px;
  padding: 25px;
  box-shadow: 0 0 40px rgba(56, 189, 248, 0.2);
}

.search-modal-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 15px; }
.search-close-btn { background: transparent; border: none; color: #fff; font-size: 2rem; cursor: pointer; line-height: 1; }

.search-modal-form { display: flex; gap: 10px; }
.search-modal-form input { flex: 1; background: #070a12; border: 1px solid var(--border); border-radius: 8px; padding: 14px 18px; color: #fff; font-size: 1.1rem; outline: none; }
.search-modal-form input:focus { border-color: var(--primary); }

/* --- Main Content Grid --- */
.wrapper { max-width: 1200px; margin: 25px auto; padding: 0 20px; }

/* Hero Magazine Grid */
.hero-magazine-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 20px; margin-bottom: 30px; }
@media (max-width: 850px) { .hero-magazine-grid { grid-template-columns: 1fr; } }

.feature-big { position: relative; height: 400px; border-radius: 10px; overflow: hidden; border: 1px solid var(--border); }
.feature-big img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s; }
.feature-big:hover img { transform: scale(1.04); }
.feature-overlay { position: absolute; bottom: 0; left: 0; right: 0; background: linear-gradient(to top, rgba(11, 15, 25, 0.98), transparent); padding: 30px 20px 20px; }

.badge-tag { background: var(--accent); color: #fff; font-family: 'Oswald', sans-serif; font-size: 0.75rem; padding: 3px 10px; font-weight: 700; text-transform: uppercase; display: inline-block; margin-bottom: 8px; border-radius: 3px; }
.feature-title { font-size: 1.7rem; font-family: 'Oswald', sans-serif; font-weight: 700; line-height: 1.25; margin-bottom: 8px; }
.feature-title a:hover { color: var(--primary); }

.feature-stack { display: flex; flex-direction: column; gap: 20px; }
.feature-small { position: relative; height: 190px; border-radius: 10px; overflow: hidden; border: 1px solid var(--border); }
.feature-small img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s; }

/* Article Card Grid */
.articles-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(270px, 1fr)); gap: 22px; margin-bottom: 35px; }
.art-card { background: var(--paper); border: 1px solid var(--border); border-radius: 10px; overflow: hidden; display: flex; flex-direction: column; transition: transform 0.3s, border-color 0.3s; }
.art-card:hover { transform: translateY(-4px); border-color: var(--primary); }
.art-card-img { width: 100%; height: 170px; overflow: hidden; position: relative; }
.art-card-img img { width: 100%; height: 100%; object-fit: cover; }
.art-card-body { padding: 18px; flex: 1; display: flex; flex-direction: column; justify-content: space-between; }
.art-card-title { font-size: 1.1rem; font-weight: 700; line-height: 1.35; margin: 8px 0; }
.art-card-title a:hover { color: var(--primary); }
.art-meta { font-size: 0.8rem; color: var(--text-muted); display: flex; gap: 12px; margin-top: 10px; }

/* Section Headers */
.section-header { border-bottom: 2px solid var(--accent); margin-bottom: 22px; display: flex; justify-content: space-between; align-items: center; }
.section-header h3 { font-family: 'Oswald', sans-serif; font-size: 1.3rem; font-weight: 700; color: #fff; text-transform: uppercase; background: var(--accent); padding: 5px 16px; display: inline-block; border-radius: 4px 4px 0 0; }

/* Layout Grid Body & Sidebar */
.body-layout-grid { display: grid; grid-template-columns: 2.3fr 1fr; gap: 30px; }
@media (max-width: 850px) { .body-layout-grid { grid-template-columns: 1fr; } }

aside.sidebar { display: flex; flex-direction: column; gap: 25px; }
.sidebar-widget { background: var(--paper); border: 1px solid var(--border); border-radius: 10px; padding: 22px; }
.widget-title { font-family: 'Oswald', sans-serif; font-size: 1.15rem; text-transform: uppercase; border-bottom: 2px solid var(--primary); padding-bottom: 8px; margin-bottom: 15px; color: #fff; }

/* Article Detail Styles */
.breadcrumb { font-size: 0.85rem; color: var(--text-muted); margin-bottom: 12px; }
.breadcrumb a { color: var(--primary); }
.article-main-title { font-family: 'Oswald', sans-serif; font-size: 2.3rem; font-weight: 700; line-height: 1.2; margin-bottom: 12px; color: #fff; }
.article-author-box { display: flex; align-items: center; gap: 12px; margin-top: 15px; font-size: 0.85rem; color: var(--text-muted); border-y: 1px solid var(--border); padding: 12px 0; }
.article-author-box img { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; }
.article-featured-img { width: 100%; max-height: 480px; object-fit: cover; border-radius: 10px; margin-bottom: 20px; border: 1px solid var(--border); }
.article-body-content { font-size: 1.1rem; line-height: 1.8; color: #cbd5e1; }
.article-body-content h2, .article-body-content h3 { font-family: 'Oswald', sans-serif; color: #fff; margin: 25px 0 12px; }
.article-body-content p { margin-bottom: 18px; }
.article-body-content ul, .article-body-content ol { margin: 0 0 20px 25px; }

/* Legal Disclaimer Box */
.disclaimer-box { background: #0f172a; border: 1px solid var(--border); border-left: 4px solid #f59e0b; padding: 16px 20px; border-radius: 6px; margin-top: 30px; font-size: 0.82rem; color: #94a3b8; }
.disclaimer-box strong { color: #f59e0b; }

/* Footer */
footer { background: #070a12; border-top: 4px solid var(--accent); margin-top: 60px; padding: 45px 0 25px; color: var(--text-muted); }
.footer-grid { max-width: 1200px; margin: 0 auto; padding: 0 20px; display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 30px; margin-bottom: 30px; }
.footer-col h4 { font-family: 'Oswald', sans-serif; font-size: 1.1rem; color: #fff; text-transform: uppercase; border-bottom: 2px solid var(--accent); padding-bottom: 8px; margin-bottom: 15px; }

/* Admin Dashboard Table */
.admin-card { background: var(--paper); border: 1px solid var(--border); border-radius: 10px; padding: 20px; margin-bottom: 20px; }
.admin-table { width: 100%; border-collapse: collapse; margin-top: 15px; font-size: 0.9rem; }
.admin-table th, .admin-table td { padding: 12px 15px; text-align: left; border-bottom: 1px solid var(--border); }
.admin-table th { background: #0f172a; color: #fff; font-family: 'Oswald', sans-serif; text-transform: uppercase; }
.admin-btn { padding: 6px 14px; border-radius: 4px; font-weight: 700; font-family: 'Oswald', sans-serif; font-size: 0.85rem; border: none; cursor: pointer; display: inline-block; }
.admin-btn-primary { background: var(--primary); color: #000; }
.admin-btn-danger { background: var(--accent); color: #fff; }
