/**
 * KDramaDB global stylesheet — Light Theme (#e8e8e8)
 * Core design system: tokens, reset, layout, typography, utilities.
 */

:root {
  --bg-color: #e8e8e8;
  --bg-secondary: #dcdcdc;
  --surface: rgba(255, 255, 255, 0.72);
  --surface-strong: rgba(255, 255, 255, 0.92);
  --surface-solid: #f5f5f5;
  --border-color: rgba(0, 0, 0, 0.10);

  --text-main: #1a1a2e;
  --text-muted: #5a5a7a;
  --text-faint: #9a9ab0;

  --accent-color: #0070f3;
  --accent-secondary: #7928ca;
  --accent-warm: #f0526f;
  --accent-glow: rgba(0, 112, 243, 0.22);

  --success-color: #0e9a6e;
  --error-color: #e53935;
  --warning-color: #f59e0b;

  --border-radius: 12px;
  --border-radius-sm: 8px;
  --border-radius-xs: 5px;
  --box-shadow: 0 12px 40px rgba(0, 0, 0, 0.10);
  --card-shadow: 0 4px 18px rgba(0, 0, 0, 0.08);
  --transition: 0.18s ease;
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  min-height: 100vh;
  font-family: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
  color: var(--text-main);
  background-color: var(--bg-color);
  background-image:
    linear-gradient(135deg, rgba(0, 112, 243, 0.05), transparent 40%),
    linear-gradient(225deg, rgba(121, 40, 202, 0.05), transparent 40%);
  line-height: 1.65;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: var(--accent-color);
  text-decoration: none;
  transition: color var(--transition), border-color var(--transition), background-color var(--transition), transform var(--transition);
}

a:hover { color: var(--accent-secondary); }

img, video { display: block; max-width: 100%; }

button { font-family: inherit; }

ul, ol { list-style: none; }

h1, h2, h3, h4, h5, h6 {
  color: var(--text-main);
  font-weight: 700;
  line-height: 1.18;
}

input, textarea, select {
  color: var(--text-main);
  font-family: inherit;
}

.container {
  width: 100%;
  max-width: 1260px;
  margin-inline: auto;
  padding-inline: 20px;
}

main.container, .site-main {
  min-height: calc(100vh - 220px);
  padding-top: 24px;
  padding-bottom: 76px;
}

.grid-auto-fit {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(178px, 1fr));
  gap: 18px;
}

.content-grid { margin-bottom: 40px; }

@media (min-width: 1200px) {
  .grid-auto-fit { grid-template-columns: repeat(6, 1fr); }
}

@media (max-width: 560px) {
  .container { padding-inline: 14px; }
  .grid-auto-fit { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
}

.section-title {
  position: relative;
  display: inline-block;
  margin-bottom: 24px;
  font-size: 2rem;
  font-weight: 800;
}

.section-title::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -9px;
  width: 48px;
  height: 3px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--accent-color), var(--accent-secondary));
}

.section-subtitle { max-width: 720px; color: var(--text-muted); font-size: 1.04rem; }

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 26px;
}

.section-link {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 8px 13px;
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-sm);
  color: var(--text-muted);
  font-weight: 700;
  background: var(--surface);
}

.section-link:hover {
  border-color: rgba(0, 112, 243, 0.4);
  color: var(--accent-color);
}

.eyebrow {
  margin-bottom: 9px;
  color: var(--accent-color);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.btn-primary, .btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  padding: 11px 22px;
  border-radius: var(--border-radius);
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  text-decoration: none;
  transition: all var(--transition);
}

.btn-primary {
  border: 1px solid transparent;
  color: #fff;
  background: linear-gradient(135deg, var(--accent-color), var(--accent-secondary));
  box-shadow: 0 8px 24px var(--accent-glow);
}

.btn-primary:hover {
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 12px 32px var(--accent-glow);
  filter: brightness(1.06);
}

.btn-secondary {
  border: 1px solid var(--border-color);
  color: var(--text-main);
  background: var(--surface);
  box-shadow: var(--card-shadow);
}

.btn-secondary:hover {
  border-color: rgba(0, 112, 243, 0.4);
  background: rgba(0, 112, 243, 0.06);
  color: var(--accent-color);
  transform: translateY(-1px);
}

.compact-btn { min-height: 38px; padding: 9px 13px; font-size: 0.9rem; }

.card, .content-card {
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  background: var(--surface);
  box-shadow: var(--card-shadow);
}

.content-card { padding: 34px; }

.form-group { display: flex; flex-direction: column; gap: 8px; margin-bottom: 18px; }
.form-group label { color: var(--text-muted); font-size: 0.86rem; font-weight: 700; }

.form-input,
input[type="text"],
input[type="email"],
input[type="password"],
textarea,
select {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-sm);
  outline: none;
  background: rgba(255, 255, 255, 0.8);
  color: var(--text-main);
  font-size: 0.97rem;
  transition: border-color var(--transition), background-color var(--transition), box-shadow var(--transition);
}

.form-input:focus,
input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus,
textarea:focus,
select:focus {
  border-color: var(--accent-color);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(0, 112, 243, 0.12);
}

input::placeholder, textarea::placeholder { color: var(--text-faint); }
textarea { min-height: 120px; resize: vertical; line-height: 1.6; }

.site-footer {
  margin-top: 54px;
  padding: 54px 0 28px;
  border-top: 1px solid var(--border-color);
  background: rgba(255, 255, 255, 0.55);
}

.footer-content {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 36px;
}

.footer-brand p { max-width: 360px; margin-top: 16px; color: var(--text-muted); font-size: 0.95rem; line-height: 1.6; }
.footer-links h4 { margin-bottom: 14px; color: var(--text-muted); font-size: 0.85rem; font-weight: 800; letter-spacing: 0.05em; text-transform: uppercase; }
.footer-links ul { display: flex; flex-direction: column; gap: 10px; }
.footer-links a { color: var(--text-muted); font-size: 0.95rem; }
.footer-links a:hover { color: var(--accent-color); }
.footer-bottom { border-top: 1px solid var(--border-color); padding-top: 22px; color: var(--text-faint); font-size: 0.85rem; text-align: center; }
.footer-disclaimer { margin-top: 10px; font-size: 0.75rem; opacity: 0.72; }

.page-shell { padding: 34px 0 10px; }
.narrow-page { max-width: 820px; margin-inline: auto; }
.page-header { margin-bottom: 34px; }
.page-header.compact { margin-bottom: 28px; }
.page-header h1 { margin-bottom: 12px; font-size: 2.7rem; font-weight: 800; }

.breadcrumb { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 24px; color: var(--text-muted); font-size: 0.86rem; }
.breadcrumb a { color: var(--text-muted); }
.breadcrumb a:hover, .breadcrumb span:last-child { color: var(--accent-color); }
.breadcrumb-sep { color: var(--text-faint); }

.text-accent { color: var(--accent-color); }
.text-muted { color: var(--text-muted); }
.text-center { text-align: center; }
.text-right { text-align: right; }
.hidden { display: none !important; }

.animate-fade-in { animation: fadeIn 0.4s ease both; }

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }
.mb-5 { margin-bottom: 3rem; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }
.mt-5 { margin-top: 3rem; }
.ms-2 { margin-left: 0.5rem; }
.flex { display: flex; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.gap-1 { gap: 0.5rem; }
.gap-2 { gap: 1rem; }
.gap-3 { gap: 1.5rem; }
.w-full { width: 100%; }

.badge { display: inline-flex; align-items: center; padding: 3px 10px; border-radius: var(--border-radius-xs); font-size: 0.78rem; font-weight: 700; }
.badge-accent { border: 1px solid rgba(0, 112, 243, 0.28); background: rgba(0, 112, 243, 0.10); color: var(--accent-color); }
.badge-success { border: 1px solid rgba(14, 154, 110, 0.28); background: rgba(14, 154, 110, 0.10); color: var(--success-color); }
.badge-warning { border: 1px solid rgba(245, 158, 11, 0.28); background: rgba(245, 158, 11, 0.10); color: var(--warning-color); }

.no-results, .empty-state {
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  background: var(--surface);
  padding: 48px 22px;
  color: var(--text-muted);
  text-align: center;
}

.no-results a { color: var(--accent-color); font-weight: 700; }
.empty-state h2 { margin-bottom: 8px; font-size: 1.45rem; }

::-webkit-scrollbar { width: 7px; height: 7px; }
::-webkit-scrollbar-track { background: var(--bg-secondary); }
::-webkit-scrollbar-thumb { border-radius: 999px; background: rgba(0, 112, 243, 0.35); }
::selection { background-color: rgba(0, 112, 243, 0.20); color: var(--text-main); }

@media (max-width: 780px) {
  main.container, .site-main { padding-top: 16px; padding-bottom: 54px; }
  .section-heading { align-items: flex-start; flex-direction: column; }
  .section-title { font-size: 1.55rem; }
  .page-header h1 { font-size: 2.1rem; }
  .content-card { padding: 22px; }
  .footer-content { grid-template-columns: 1fr; gap: 28px; }
  .footer-brand p { max-width: none; }
}

/* ======================== Banner Ad Styles ======================== */
.banner { width: 100%; max-width: 720px; height: 90px; overflow: hidden; position: relative; display: flex; align-items: center; justify-content: space-between; padding: 0 20px; background: linear-gradient(-45deg, #0f172a, #1e293b, #e11d48, #7c3aed); background-size: 400% 400%; animation: bgMove 8s ease infinite; border-radius: 10px; }
@keyframes bgMove { 0% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } 100% { background-position: 0% 50%; } }
.logo { color: #fff; font-size: 32px; font-weight: 900; text-transform: uppercase; animation: glow 2s infinite alternate; }
@keyframes glow { from { text-shadow: 0 0 5px #fff, 0 0 10px #ff0055, 0 0 20px #ff0055; } to { text-shadow: 0 0 10px #fff, 0 0 20px #ff0055, 0 0 35px #ff0055; } }
.content { text-align: center; color: white; flex: 1; }
.content h2 { font-size: 22px; font-weight: bold; animation: slideIn 1.5s ease; }
.content p { font-size: 13px; opacity: 0.9; }
@keyframes slideIn { from { transform: translateY(20px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
.btn { background: #ffcc00; color: #111; text-decoration: none; font-weight: bold; padding: 10px 18px; border-radius: 30px; transition: .3s; animation: pulse 1.8s infinite; }
.btn:hover { transform: scale(1.08); }
@keyframes pulse { 0% { transform: scale(1); } 50% { transform: scale(1.08); } 100% { transform: scale(1); } }
@media (max-width: 600px) { .banner { padding: 10px; } .logo { font-size: 20px; } .content h2 { font-size: 15px; } .content p { display: none; } .btn { padding: 8px 12px; font-size: 12px; } }

/* ======================== Telegram Button ======================== */
.telegram-btn { display: inline-flex; align-items: center; gap: 12px; padding: 14px 28px; border-radius: 50px; text-decoration: none; color: white; font-size: 18px; font-weight: 600; background: linear-gradient(135deg, #0088cc, #00bfff); box-shadow: 0 10px 25px rgba(0,136,204,.4), inset 0 1px 1px rgba(255,255,255,.2); transition: all .35s ease; position: relative; overflow: hidden; }
.telegram-btn::before { content: ''; position: absolute; width: 100%; height: 100%; top: 0; left: -100%; background: linear-gradient(120deg, transparent, rgba(255,255,255,.35), transparent); transition: .6s; }
.telegram-btn:hover::before { left: 100%; }
.telegram-btn:hover { transform: translateY(-4px) scale(1.03); box-shadow: 0 15px 35px rgba(0,136,204,.55); }
.telegram-btn svg { width: 24px; height: 24px; fill: white; }

/* ======================== Decoy Download Button ======================== */
.download-btn-decoy { display: inline-block; padding: 12px 24px; background: #168aad; color: white; text-decoration: none; font-size: 16px; font-weight: 600; border-radius: 8px; cursor: pointer; transition: background 0.2s ease, transform 0.2s ease; }
.download-btn-decoy:hover { background: #117a99; transform: translateY(-1px); }
.download-btn-decoy:active { transform: translateY(0); }

.country-tag{display:none;}