/* ===== RESET & BASE ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: #1e293b;
  background: #f8f6f2;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }

/* ===== CONTAINER ===== */
.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }

/* ===== HEADER / NAV ===== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: #1a2a3a;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}
.site-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: 'Playfair Display', serif;
  font-weight: 700;
  font-size: 1.25rem;
  color: #fff;
  letter-spacing: -0.02em;
}
.main-nav { display: flex; gap: 4px; }
.nav-link {
  padding: 8px 16px;
  font-size: 0.875rem;
  font-weight: 500;
  color: rgba(255,255,255,0.7);
  border-radius: 6px;
  transition: all 0.2s;
}
.nav-link:hover, .nav-link.active { color: #fff; background: rgba(255,255,255,0.08); }
.nav-link.active { color: #ff6b35; }
.nav-toggle {
  display: none;
  background: none;
  border: none;
  color: #fff;
  cursor: pointer;
  padding: 8px;
}

/* ===== AD CONTAINERS ===== */
.ad-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 24px 0;
  background: #f8f6f2;
  border-top: 1px solid #e8e4de;
  border-bottom: 1px solid #e8e4de;
}
.ad-label {
  font-size: 0.625rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #9ca3af;
  margin-bottom: 8px;
}
.ad-inner { display: flex; justify-content: center; align-items: center; min-height: 1px; }
.ad-inner iframe { border: none; }
.ad-leaderboard { margin: 0 0 32px; }
.ad-after-grid { margin: 0 0 32px; }
.ad-popular { margin-top: 32px; }
.ad-popular-sm { margin-top: 16px; border-top: none; }
.ad-footer { margin-top: 32px; border-top: 1px solid rgba(255,255,255,0.08); border-bottom: none; background: #1a2a3a; }
.ad-footer .ad-label { color: rgba(255,255,255,0.4); }

/* ===== SECTIONS ===== */
.section { padding: 48px 0; }
.section-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 32px;
}
.section-title {
  font-family: 'Playfair Display', serif;
  font-weight: 700;
  font-size: 1.75rem;
  color: #1a2a3a;
  letter-spacing: -0.02em;
}
.section-subtitle { font-size: 0.875rem; color: #6b7b8b; }
.section-link {
  font-size: 0.875rem;
  font-weight: 600;
  color: #ff6b35;
  transition: opacity 0.2s;
}
.section-link:hover { opacity: 0.8; }

/* ===== HERO ===== */
.hero {
  padding: 48px 0 40px;
  background: #fff;
  border-bottom: 1px solid #e8e4de;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
}
.hero-badge {
  display: inline-block;
  padding: 4px 12px;
  background: #ff6b35;
  color: #fff;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  border-radius: 4px;
  margin-bottom: 16px;
}
.hero-title {
  font-family: 'Playfair Display', serif;
  font-weight: 700;
  font-size: 2.5rem;
  line-height: 1.2;
  color: #1a2a3a;
  margin-bottom: 16px;
  letter-spacing: -0.02em;
}
.hero-excerpt {
  font-size: 1.125rem;
  line-height: 1.7;
  color: #6b7b8b;
  margin-bottom: 24px;
}
.hero-meta { display: flex; gap: 16px; font-size: 0.875rem; color: #6b7b8b; }
.hero-author { font-weight: 600; color: #1a2a3a; }
.hero-image-wrap {
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}
.hero-image { width: 100%; height: 400px; object-fit: cover; }

/* ===== POSTS GRID ===== */
.posts-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.post-card {
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
  transition: transform 0.2s, box-shadow 0.2s;
  cursor: pointer;
}
.post-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}
.post-card-image {
  position: relative;
  height: 200px;
  overflow: hidden;
}
.post-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s;
}
.post-card:hover .post-card-image img { transform: scale(1.05); }
.post-category {
  position: absolute;
  top: 12px;
  left: 12px;
  padding: 4px 10px;
  background: #ff6b35;
  color: #fff;
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  border-radius: 4px;
}
.post-card-body { padding: 20px; }
.post-card-title {
  font-family: 'Playfair Display', serif;
  font-weight: 600;
  font-size: 1.125rem;
  line-height: 1.35;
  color: #1a2a3a;
  margin-bottom: 8px;
}
.post-card-excerpt {
  font-size: 0.875rem;
  line-height: 1.6;
  color: #6b7b8b;
  margin-bottom: 16px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.post-card-meta { display: flex; gap: 12px; font-size: 0.75rem; color: #9ca3af; }

/* ===== AD CARD SLOT ===== */
.ad-card-slot {
  background: #fff;
  border: 2px dashed #e8e4de;
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px;
  min-height: 300px;
}
.ad-card-slot .ad-label { margin-bottom: 12px; }

/* ===== TWO-COLUMN LAYOUT ===== */
.two-col-layout {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 48px;
  align-items: start;
}

/* ===== SIDEBAR ===== */
.sidebar { min-width: 0; }
.sidebar-widget {
  background: #fff;
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 24px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}
.sidebar-widget h4 {
  font-family: 'Playfair Display', serif;
  font-weight: 700;
  font-size: 1rem;
  color: #1a2a3a;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 2px solid #ff6b35;
}
.sidebar-about p { font-size: 0.875rem; line-height: 1.7; color: #6b7b8b; }
.sidebar-ad {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 16px 0;
  margin-bottom: 24px;
  border: 1px solid #e8e4de;
  border-radius: 8px;
  background: #fff;
}
.sidebar-ad-lg { padding: 20px 0; }

/* ===== DASHBOARD ===== */
.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-bottom: 32px;
}
.dashboard-card {
  background: #fff;
  border-radius: 12px;
  padding: 24px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
  text-align: center;
}
.dashboard-card-value {
  font-family: 'Playfair Display', serif;
  font-weight: 700;
  font-size: 2.5rem;
  color: #1a2a3a;
  line-height: 1;
  margin-bottom: 4px;
}
.dashboard-card-label {
  font-size: 0.8125rem;
  color: #6b7b8b;
  font-weight: 500;
}
.dashboard-card-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 12px;
}
.dashboard-card-icon.orange { background: rgba(255,107,53,0.12); }
.dashboard-card-icon.blue { background: rgba(59,130,246,0.12); }
.dashboard-card-icon.green { background: rgba(34,197,94,0.12); }
.dashboard-card-icon.purple { background: rgba(168,85,247,0.12); }
.dashboard-card-icon svg { width: 24px; height: 24px; }

/* ===== BLOG LIST ===== */
.blog-list { display: flex; flex-direction: column; gap: 16px; }
.blog-list-item {
  background: #fff;
  border-radius: 12px;
  padding: 20px 24px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  transition: box-shadow 0.2s;
}
.blog-list-item:hover { box-shadow: 0 4px 12px rgba(0,0,0,0.08); }
.blog-list-item-content { flex: 1; min-width: 0; }
.blog-list-item-content h3 {
  font-family: 'Playfair Display', serif;
  font-weight: 600;
  font-size: 1.0625rem;
  color: #1a2a3a;
  margin-bottom: 4px;
}
.blog-list-item-content p {
  font-size: 0.8125rem;
  color: #6b7b8b;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.blog-list-item-meta {
  font-size: 0.75rem;
  color: #9ca3af;
  margin-top: 4px;
}
.blog-list-actions { display: flex; gap: 8px; flex-shrink: 0; }

/* ===== FORM ===== */
.form-group { margin-bottom: 20px; }
.form-group label {
  display: block;
  font-size: 0.8125rem;
  font-weight: 600;
  color: #1a2a3a;
  margin-bottom: 6px;
}
.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid #e8e4de;
  border-radius: 8px;
  font-family: 'Inter', sans-serif;
  font-size: 0.9375rem;
  background: #fff;
  color: #1e293b;
  outline: none;
  transition: border-color 0.2s;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus { border-color: #ff6b35; }
.form-group textarea { min-height: 160px; resize: vertical; }

/* ===== BUTTONS ===== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 20px;
  border: none;
  border-radius: 8px;
  font-family: 'Inter', sans-serif;
  font-size: 0.8125rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}
.btn-primary { background: #ff6b35; color: #fff; }
.btn-primary:hover { background: #e55a2b; }
.btn-secondary { background: #1a2a3a; color: #fff; }
.btn-secondary:hover { background: #243b4f; }
.btn-danger { background: #ef4444; color: #fff; }
.btn-danger:hover { background: #dc2626; }
.btn-outline {
  background: transparent;
  border: 1px solid #e8e4de;
  color: #6b7b8b;
}
.btn-outline:hover { border-color: #ff6b35; color: #ff6b35; }
.btn-sm { padding: 6px 14px; font-size: 0.75rem; }

/* ===== RECHARGE ===== */
.recharge-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-bottom: 32px;
}
.recharge-card {
  background: #fff;
  border-radius: 12px;
  padding: 24px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
  text-align: center;
  border: 2px solid transparent;
  transition: all 0.2s;
  cursor: pointer;
}
.recharge-card:hover, .recharge-card.selected {
  border-color: #ff6b35;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}
.recharge-card.selected { background: rgba(255,107,53,0.04); }
.recharge-card-amount {
  font-family: 'Playfair Display', serif;
  font-weight: 700;
  font-size: 1.75rem;
  color: #1a2a3a;
  margin-bottom: 4px;
}
.recharge-card-label { font-size: 0.8125rem; color: #6b7b8b; }
.recharge-card-bonus {
  display: inline-block;
  margin-top: 8px;
  padding: 2px 10px;
  background: rgba(34,197,94,0.12);
  color: #16a34a;
  font-size: 0.6875rem;
  font-weight: 600;
  border-radius: 4px;
}
.recharge-form-wrap {
  background: #fff;
  border-radius: 12px;
  padding: 32px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
  max-width: 500px;
  margin: 0 auto;
}
.recharge-form-wrap h3 {
  font-family: 'Playfair Display', serif;
  font-weight: 700;
  font-size: 1.25rem;
  color: #1a2a3a;
  margin-bottom: 20px;
  text-align: center;
}

/* ===== TOAST ===== */
.toast {
  position: fixed;
  top: 80px;
  right: 24px;
  z-index: 300;
  padding: 14px 20px;
  border-radius: 10px;
  font-size: 0.875rem;
  font-weight: 500;
  color: #fff;
  box-shadow: 0 4px 16px rgba(0,0,0,0.12);
  transform: translateX(120%);
  transition: transform 0.3s ease;
  max-width: 360px;
}
.toast.show { transform: translateX(0); }
.toast.success { background: #22c55e; }
.toast.error { background: #ef4444; }
.toast.info { background: #1a2a3a; }

/* ===== EMPTY STATE ===== */
.empty-state {
  text-align: center;
  padding: 64px 24px;
  color: #6b7b8b;
}
.empty-state svg { margin-bottom: 16px; opacity: 0.4; }
.empty-state h3 {
  font-family: 'Playfair Display', serif;
  font-weight: 600;
  font-size: 1.25rem;
  color: #1a2a3a;
  margin-bottom: 8px;
}
.empty-state p { font-size: 0.875rem; }

/* ===== POPULAR ===== */
.popular-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}
.popular-card {
  padding: 24px;
  background: #f8f6f2;
  border-radius: 12px;
  border: 1px solid #e8e4de;
  transition: transform 0.2s, box-shadow 0.2s;
  cursor: pointer;
}
.popular-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.06);
}
.popular-rank {
  font-family: 'Playfair Display', serif;
  font-weight: 700;
  font-size: 2rem;
  color: #ff6b35;
  line-height: 1;
  margin-bottom: 12px;
  display: block;
}
.popular-card h3 {
  font-family: 'Playfair Display', serif;
  font-weight: 600;
  font-size: 0.9375rem;
  line-height: 1.35;
  color: #1a2a3a;
  margin-bottom: 8px;
}
.popular-meta { font-size: 0.75rem; color: #9ca3af; }

/* ===== FOOTER ===== */
.site-footer {
  background: #1a2a3a;
  color: rgba(255,255,255,0.7);
  padding-top: 48px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 40px;
}
.footer-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: 'Playfair Display', serif;
  font-weight: 700;
  font-size: 1.125rem;
  color: #fff;
  margin-bottom: 12px;
}
.footer-tagline { font-size: 0.875rem; line-height: 1.6; color: rgba(255,255,255,0.5); }
.footer-links h5 {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(255,255,255,0.4);
  margin-bottom: 16px;
}
.footer-links a {
  display: block;
  font-size: 0.875rem;
  color: rgba(255,255,255,0.6);
  padding: 4px 0;
  transition: color 0.2s;
}
.footer-links a:hover { color: #ff6b35; }
.footer-bottom {
  padding: 24px 0;
  border-top: 1px solid rgba(255,255,255,0.08);
  font-size: 0.8125rem;
  color: rgba(255,255,255,0.4);
}

/* ===== STICKY SOCIAL BAR ===== */
.socialbar-sticky {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 200;
  background: #fff;
  border-top: 1px solid #e8e4de;
  padding: 8px 16px;
  display: flex;
  justify-content: center;
  box-shadow: 0 -2px 8px rgba(0,0,0,0.06);
}
body { padding-bottom: 60px; }

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
  .hero-grid { gap: 32px; }
  .hero-title { font-size: 2rem; }
  .posts-grid { grid-template-columns: repeat(2, 1fr); }
  .popular-grid { grid-template-columns: repeat(2, 1fr); }
  .two-col-layout { grid-template-columns: 1fr 280px; gap: 32px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .dashboard-grid { grid-template-columns: repeat(2, 1fr); }
  .recharge-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .main-nav { display: none; }
  .main-nav.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    background: #1a2a3a;
    padding: 16px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    gap: 0;
  }
  .main-nav.open .nav-link { padding: 12px 16px; }
  .nav-toggle { display: block; }
  .hero-grid { grid-template-columns: 1fr; gap: 24px; }
  .hero-title { font-size: 1.75rem; }
  .hero-image-wrap { order: -1; }
  .hero-image { height: 250px; }
  .posts-grid { grid-template-columns: 1fr; }
  .popular-grid { grid-template-columns: 1fr; }
  .two-col-layout { grid-template-columns: 1fr; gap: 24px; }
  .footer-grid { grid-template-columns: 1fr; gap: 32px; }
  .dashboard-grid { grid-template-columns: 1fr; }
  .recharge-grid { grid-template-columns: 1fr; }
  .blog-list-item { flex-direction: column; align-items: flex-start; }
  .blog-list-actions { align-self: flex-end; }
  .ad-container { padding: 16px 0; }
  .ad-leaderboard { margin: 0 0 24px; }
}

@media (max-width: 480px) {
  .container { padding: 0 16px; }
  .hero { padding: 32px 0 24px; }
  .hero-title { font-size: 1.5rem; }
  .section { padding: 32px 0; }
  .section-title { font-size: 1.375rem; }
  .post-card-image { height: 180px; }
  .sidebar { width: 100%; }
}

/* ===== FOCUS VISIBLE ===== */
:focus-visible { outline: 2px solid #ff6b35; outline-offset: 2px; }

/* ===== REDUCED MOTION ===== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  html { scroll-behavior: auto; }
}
