:root {
  --bg-primary: #070c18;
  --bg-surface: #0e172a;
  --bg-card: #131f38;
  --bg-card-hover: #192847;
  --border-color: rgba(255, 255, 255, 0.08);
  --border-accent: rgba(56, 189, 248, 0.25);
  
  --brand-red: #ff2a44;
  --brand-red-dark: #c9182b;
  --brand-cyan: #00b4d8;
  --brand-blue: #2563eb;
  
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.5);
  --shadow-glow: 0 0 25px rgba(255, 42, 68, 0.25);
  --transition: all 0.25s ease;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

body {
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

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

/* =========================================
   TOP BREAKING TICKER
   ========================================= */
.ticker-bar {
  background: linear-gradient(90deg, #1e090f 0%, #0d172e 100%);
  border-bottom: 1px solid rgba(255, 42, 68, 0.3);
  padding: 8px 16px;
  display: flex;
  align-items: center;
  font-size: 0.85rem;
  overflow: hidden;
}

.ticker-badge {
  background: var(--brand-red);
  color: #fff;
  font-weight: 800;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  letter-spacing: 0.08em;
  font-size: 0.72rem;
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  animation: pulse 2s infinite;
}

.ticker-content {
  margin-left: 16px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: #e2e8f0;
}

.ticker-content a:hover {
  color: var(--brand-cyan);
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.85; transform: scale(0.98); }
}

/* =========================================
   HEADER & NAVBAR
   ========================================= */
.site-header {
  background: rgba(14, 23, 42, 0.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 12px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
}

.brand-logo {
  height: 52px;
  width: auto;
  border-radius: 8px;
  object-fit: contain;
}

.brand-text h1 {
  font-size: 1.45rem;
  font-weight: 900;
  letter-spacing: 0.05em;
  line-height: 1.1;
  background: linear-gradient(135deg, #ffffff 40%, var(--brand-cyan) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.brand-text span {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  color: var(--brand-red);
  text-transform: uppercase;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-link {
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-secondary);
  transition: var(--transition);
}

.nav-link:hover, .nav-link.active {
  color: #fff;
  background: rgba(255, 255, 255, 0.06);
}

.nav-link.active {
  color: var(--brand-cyan);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.btn-admin {
  background: linear-gradient(135deg, var(--brand-red) 0%, var(--brand-red-dark) 100%);
  color: #fff;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 4px 14px rgba(255, 42, 68, 0.35);
  transition: var(--transition);
}

.btn-admin:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(255, 42, 68, 0.5);
}

/* =========================================
   CATEGORY BAR
   ========================================= */
.category-strip {
  background: #091020;
  border-bottom: 1px solid var(--border-color);
  padding: 10px 0;
}

.category-scroll {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  gap: 10px;
  overflow-x: auto;
  scrollbar-width: none;
}

.category-scroll::-webkit-scrollbar {
  display: none;
}

.cat-btn {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: var(--transition);
}

.cat-btn:hover, .cat-btn.active {
  background: var(--brand-blue);
  color: #fff;
  border-color: var(--brand-blue);
}

/* =========================================
   LAYOUT & CONTAINER
   ========================================= */
.main-content {
  max-width: 1280px;
  margin: 0 auto;
  padding: 24px 20px 48px;
  width: 100%;
  flex: 1;
}

.section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border-color);
}

.section-title h2 {
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: 0.03em;
  display: flex;
  align-items: center;
  gap: 8px;
}

.section-title h2::before {
  content: "";
  display: inline-block;
  width: 4px;
  height: 18px;
  background: var(--brand-red);
  border-radius: 2px;
}

/* =========================================
   STICKY HERO SECTION
   ========================================= */
.hero-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 20px;
  margin-bottom: 36px;
}

.hero-main {
  position: relative;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  min-height: 420px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  box-shadow: var(--shadow);
}

.hero-main img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.hero-main:hover img {
  transform: scale(1.03);
}

.hero-overlay {
  position: relative;
  z-index: 2;
  background: linear-gradient(180deg, rgba(7, 12, 24, 0) 0%, rgba(7, 12, 24, 0.95) 80%);
  padding: 30px;
}

.badge-row {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
}

.badge {
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 4px;
}

.badge-sticky {
  background: #f59e0b;
  color: #000;
}

.badge-video {
  background: #ef4444;
  color: #fff;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.badge-cat {
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(8px);
  color: #fff;
}

.hero-title {
  font-size: 1.75rem;
  font-weight: 800;
  line-height: 1.3;
  margin-bottom: 10px;
  color: #fff;
}

.hero-title:hover {
  color: var(--brand-cyan);
}

.hero-desc {
  color: var(--text-secondary);
  font-size: 0.95rem;
  margin-bottom: 14px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.meta-row {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* Sidebar Top Stories */
.hero-sidebar {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.sidebar-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 14px;
  display: flex;
  gap: 14px;
  transition: var(--transition);
}

.sidebar-card:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-accent);
  transform: translateY(-2px);
}

.sidebar-thumb {
  width: 90px;
  height: 80px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  flex-shrink: 0;
}

.sidebar-info {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.sidebar-info h3 {
  font-size: 0.9rem;
  font-weight: 700;
  line-height: 1.35;
  color: #f1f5f9;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* =========================================
   NEWS FEED GRID
   ========================================= */
.news-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 24px;
  margin-bottom: 40px;
}

.news-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: var(--transition);
  position: relative;
}

.news-card:hover {
  transform: translateY(-4px);
  border-color: var(--border-accent);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.4);
}

.card-media {
  position: relative;
  width: 100%;
  height: 200px;
  overflow: hidden;
  background: #000;
}

.card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.news-card:hover .card-media img {
  transform: scale(1.05);
}

.play-overlay {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(239, 35, 60, 0.85);
  border-radius: 50%;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 15px rgba(239, 35, 60, 0.8);
}

.play-overlay svg {
  fill: #fff;
  width: 20px;
  height: 20px;
  margin-left: 2px;
}

.card-body {
  padding: 18px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.card-body h3 {
  font-size: 1.1rem;
  font-weight: 700;
  line-height: 1.4;
  margin: 10px 0 8px;
  color: #fff;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-body p {
  color: var(--text-secondary);
  font-size: 0.88rem;
  line-height: 1.5;
  margin-bottom: 14px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex: 1;
}

.card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  font-size: 0.78rem;
  color: var(--text-muted);
}

/* =========================================
   ARTICLE DETAIL PAGE
   ========================================= */
.article-container {
  max-width: 860px;
  margin: 0 auto;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 36px;
  box-shadow: var(--shadow);
}

.article-header {
  margin-bottom: 24px;
}

.article-title {
  font-size: 2.2rem;
  font-weight: 900;
  line-height: 1.25;
  margin: 14px 0;
  color: #ffffff;
}

.article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  font-size: 0.88rem;
  color: var(--text-secondary);
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border-color);
}

.article-featured-media {
  margin: 24px 0;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--border-color);
}

.article-featured-media img {
  width: 100%;
  max-height: 480px;
  object-fit: cover;
  display: block;
}

.video-player-box {
  position: relative;
  padding-bottom: 56.25%; /* 16:9 */
  height: 0;
  overflow: hidden;
  border-radius: var(--radius-md);
  margin: 24px 0;
  background: #000;
}

.video-player-box iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.article-body {
  font-size: 1.1rem;
  line-height: 1.8;
  color: #e2e8f0;
}

.article-body p {
  margin-bottom: 20px;
}

.article-body blockquote {
  border-left: 4px solid var(--brand-red);
  background: rgba(255, 42, 68, 0.05);
  padding: 16px 20px;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-style: italic;
  margin: 24px 0;
}

/* =========================================
   ADMIN PORTAL
   ========================================= */
.admin-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
  background: var(--bg-surface);
  padding: 18px 24px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
}

.admin-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 24px;
}

.admin-panel {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 24px;
}

.form-group {
  margin-bottom: 16px;
}

.form-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-secondary);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.form-control {
  width: 100%;
  padding: 10px 14px;
  background: #070c18;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-sm);
  color: #fff;
  font-size: 0.95rem;
  transition: var(--transition);
}

.form-control:focus {
  outline: none;
  border-color: var(--brand-cyan);
  box-shadow: 0 0 10px rgba(0, 180, 216, 0.3);
}

textarea.form-control {
  min-height: 120px;
  resize: vertical;
}

.checkbox-group {
  display: flex;
  gap: 20px;
  margin: 16px 0;
}

.custom-checkbox {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9rem;
  cursor: pointer;
}

/* Admin Post Reorder List */
.reorder-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-height: 600px;
  overflow-y: auto;
  padding-right: 6px;
}

.reorder-item {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  transition: var(--transition);
}

.reorder-item.is-sticky {
  border-left: 4px solid #f59e0b;
}

.reorder-controls {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.btn-icon {
  background: rgba(255, 255, 255, 0.08);
  border: none;
  color: #fff;
  width: 28px;
  height: 28px;
  border-radius: 4px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  transition: var(--transition);
}

.btn-icon:hover {
  background: var(--brand-cyan);
  color: #000;
}

.btn-icon.delete:hover {
  background: var(--brand-red);
  color: #fff;
}

.reorder-thumb {
  width: 50px;
  height: 45px;
  border-radius: 4px;
  object-fit: cover;
}

.reorder-info {
  flex: 1;
  min-width: 0;
}

.reorder-info h4 {
  font-size: 0.88rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: #fff;
}

.reorder-info span {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* =========================================
   FOOTER
   ========================================= */
.site-footer {
  background: #050811;
  border-top: 1px solid var(--border-color);
  padding: 40px 20px 20px;
  margin-top: auto;
}

.footer-container {
  max-width: 1280px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 30px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.footer-bottom {
  max-width: 1280px;
  margin: 20px auto 0;
  display: flex;
  justify-content: space-between;
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* =========================================
   RESPONSIVE DESIGN
   ========================================= */
@media (max-width: 992px) {
  .hero-grid {
    grid-template-columns: 1fr;
  }
  .admin-grid {
    grid-template-columns: 1fr;
  }
  .footer-container {
    grid-template-columns: 1fr;
    gap: 24px;
  }
}

@media (max-width: 768px) {
  .header-container {
    flex-direction: column;
    align-items: flex-start;
  }
  .main-nav {
    width: 100%;
    overflow-x: auto;
  }
  .article-title {
    font-size: 1.6rem;
  }
}
