/* ==========================================================================
   TIKTOKLY - Modern High-Density News & Blog Portal Stylesheet
   Color Scheme: 
   - Navy: #0f172a
   - Gold/Yellow: #eab308
   - Pure White: #ffffff
   - Slate Neutral: #f8fafc / #f1f5f9
   ========================================================================== */

:root {
  --color-navy: #0f172a;
  --color-navy-dark: #090d16;
  --color-navy-card: #1e293b;
  --color-gold: #eab308;
  --color-gold-hover: #ca8a04;
  --color-gold-subtle: #fef08a;
  --color-canvas: #f8fafc;
  --color-white: #ffffff;
  --font-sans: 'Plus Jakarta Sans', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Global Smoothness & Base */
html {
  scroll-behavior: smooth;
  font-family: var(--font-sans);
  background-color: var(--color-canvas);
  color: #1e293b;
}

body {
  overflow-x: hidden;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: #0f172a;
}
::-webkit-scrollbar-thumb {
  background: #334155;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--color-gold);
}

/* High-Density Typography Rules */
h1, h2, h3, h4, h5, h6 {
  letter-spacing: -0.02em;
}

/* Floating Gold Badge */
.category-badge {
  background-color: var(--color-gold);
  color: #0f172a;
  font-weight: 700;
  text-transform: uppercase;
  font-size: 0.6875rem; /* 11px */
  letter-spacing: 0.05em;
  padding: 0.3rem 0.65rem;
  border-radius: 4px;
  box-shadow: 0 4px 10px rgba(234, 179, 8, 0.35);
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  z-index: 10;
}
.category-badge:hover {
  background-color: #fde047;
  transform: translateY(-1px);
  box-shadow: 0 6px 14px rgba(234, 179, 8, 0.45);
}

/* Article Card Visual System */
.article-card {
  background: var(--color-white);
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  overflow: hidden;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
  display: flex;
  flex-direction: column;
  position: relative;
}

.article-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 32px -8px rgba(15, 23, 42, 0.12), 0 4px 8px -2px rgba(15, 23, 42, 0.04);
  border-color: #cbd5e1;
}

.article-card .card-thumb-wrapper {
  position: relative;
  overflow: hidden;
  background-color: #0f172a;
  aspect-ratio: 16 / 9;
}

.article-card .card-thumb-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s cubic-bezier(0.2, 0, 0.2, 1);
}

.article-card:hover .card-thumb-wrapper img {
  transform: scale(1.05);
}

.card-title {
  color: var(--color-navy);
  font-weight: 700;
  font-size: 1.125rem;
  line-height: 1.35;
  transition: color 0.2s ease;
}

.article-card:hover .card-title {
  color: #b45309; /* Deep gold-amber on card hover */
}

/* Image Shimmer & Gradient Fallback */
.img-fallback-gradient {
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #334155 100%);
}

/* Ticker Marquee Animation */
@keyframes marquee {
  0% { transform: translateX(0%); }
  100% { transform: translateX(-50%); }
}

.ticker-track {
  display: flex;
  width: max-content;
  animation: marquee 35s linear infinite;
}

.ticker-track:hover {
  animation-play-state: paused;
}

/* Live Pulse Indicator */
.pulse-indicator {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: #ef4444;
  box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7);
  animation: pulse-ring 1.8s infinite cubic-bezier(0.66, 0, 0, 1);
}

@keyframes pulse-ring {
  to {
    box-shadow: 0 0 0 10px rgba(239, 68, 68, 0);
  }
}

/* Button & Action Accents */
.btn-gold {
  background-color: var(--color-gold);
  color: #0f172a;
  font-weight: 700;
  transition: all 0.2s ease;
}
.btn-gold:hover {
  background-color: var(--color-gold-hover);
  color: #ffffff;
}

/* Search Modal Overlay */
.search-modal-backdrop {
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

/* Line Clamp Utilities for Extreme Browser Compatibility */
.line-clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.line-clamp-3 {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Hero Section High-Density Polish */
.hero-card-main {
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.05) 0%, rgba(15, 23, 42, 0.95) 100%);
}

.trending-item-number {
  font-family: 'Plus Jakarta Sans', monospace;
  font-weight: 900;
  color: #cbd5e1;
  transition: color 0.2s ease;
}

.trending-item:hover .trending-item-number {
  color: var(--color-gold);
}

/* Back to Top Smooth Transition */
#backToTopBtn {
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease, transform 0.2s ease;
}
#backToTopBtn.visible {
  opacity: 1;
  visibility: visible;
}

/* ==========================================================================
   Bento Blog Section Enhancements
   ========================================================================== */
.bento-card {
  transition: transform 0.3s cubic-bezier(0.2, 0, 0.2, 1), box-shadow 0.3s ease, border-color 0.3s ease;
}
.bento-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 35px -10px rgba(15, 23, 42, 0.15);
}

.bento-radial-pattern {
  background-image: radial-gradient(circle at 85% 20%, rgba(15, 23, 42, 0.08) 0%, rgba(15, 23, 42, 0.04) 30%, transparent 60%);
}

.play-pulse {
  animation: play-bounce 2s infinite ease-in-out;
}
@keyframes play-bounce {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.08); }
}

