:root {
  --primary: #1a3a52;
  --primary-light: #234d6e;
  --primary-dark: #0f2233;
  --accent: #3b82f6;
  --accent-hover: #2563eb;
  --accent-muted: #eff6ff;
  --success: #059669;
  --success-bg: #ecfdf5;
  --success-border: #6ee7b7;
  --danger: #dc2626;
  --danger-bg: #fef2f2;
  --danger-border: #fca5a5;
  --warning: #d97706;
  --warning-bg: #fffbeb;
  --surface: #ffffff;
  --surface-2: #f8fafc;
  --surface-3: #f1f5f9;
  --border: #e2e8f0;
  --border-strong: #cbd5e1;
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #94a3b8;
  --text-inverse: #ffffff;
  --shadow-sm: 0 1px 3px rgba(15,23,42,0.08), 0 1px 2px rgba(15,23,42,0.04);
  --shadow-md: 0 4px 12px rgba(15,23,42,0.10), 0 2px 4px rgba(15,23,42,0.06);
  --shadow-lg: 0 12px 32px rgba(15,23,42,0.12), 0 4px 8px rgba(15,23,42,0.06);
  --radius-sm: 5px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --font-sans: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', 'Courier New', monospace;
  --transition: 0.18s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  box-sizing: border-box;
}

body {
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.65;
  color: var(--text-primary);
  background: var(--surface-2);
  font-feature-settings: "kern" 1, "liga" 1, "calt" 1;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-sans);
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.25;
  color: var(--text-primary);
}

h1 { font-size: 2rem; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.25rem; }
h4 { font-size: 1.1rem; }
h5 { font-size: 0.975rem; }
h6 { font-size: 0.875rem; }

p {
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 1rem;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color var(--transition);
}

a:hover {
  color: var(--accent-hover);
  text-decoration: underline;
}

small {
  font-size: 0.8rem;
  color: var(--text-muted);
  letter-spacing: 0.01em;
}

strong, b {
  font-weight: 700;
  color: var(--text-primary);
}

em, i {
  font-style: italic;
  color: var(--text-secondary);
}

code {
  font-family: var(--font-mono);
  font-size: 0.85em;
  background: var(--surface-3);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 2px 6px;
  color: #7c3aed;
}

blockquote {
  border-left: 3px solid var(--accent);
  margin: 1.25rem 0;
  padding: 0.75rem 1.25rem;
  background: var(--accent-muted);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  color: var(--text-secondary);
  font-style: italic;
  font-size: 0.95rem;
}

.text-gradient {
  background: linear-gradient(135deg, var(--accent) 0%, #7c3aed 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.text-primary-color { color: var(--text-primary); }
.text-secondary-color { color: var(--text-secondary); }
.text-muted-color { color: var(--text-muted); }
.text-accent { color: var(--accent); }
.text-success { color: var(--success); }
.text-danger { color: var(--danger); }
.text-warning { color: var(--warning); }
.text-inverse { color: var(--text-inverse); }

.text-xs { font-size: 0.75rem; line-height: 1.5; }
.text-sm { font-size: 0.875rem; line-height: 1.55; }
.text-base { font-size: 1rem; line-height: 1.65; }
.text-lg { font-size: 1.125rem; line-height: 1.6; }
.text-xl { font-size: 1.25rem; line-height: 1.5; }
.text-2xl { font-size: 1.5rem; line-height: 1.4; }

.text-light { font-weight: 300; }
.text-regular { font-weight: 400; }
.text-medium { font-weight: 500; }
.text-semibold { font-weight: 600; }
.text-bold { font-weight: 700; }
.text-extrabold { font-weight: 800; }

.text-tracking-tight { letter-spacing: -0.025em; }
.text-tracking-normal { letter-spacing: 0; }
.text-tracking-wide { letter-spacing: 0.05em; }
.text-tracking-widest { letter-spacing: 0.15em; }

.label-overline {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.badge {
  display: inline-flex;
  align-items: center;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 3px 9px;
  border-radius: 999px;
  line-height: 1;
}

.badge-accent { background: var(--accent-muted); color: var(--accent-hover); }
.badge-success { background: var(--success-bg); color: var(--success); }
.badge-danger { background: var(--danger-bg); color: var(--danger); }
.badge-warning { background: var(--warning-bg); color: var(--warning); }
.badge-neutral { background: var(--surface-3); color: var(--text-secondary); }

.logo {
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  margin: 0 10px;
  color: var(--text-inverse);
}

.logo a {
  color: var(--text-inverse);
  text-decoration: none;
  transition: opacity var(--transition);
}

.logo a:hover { opacity: 0.85; text-decoration: none; }

.navbar-filmy {
  background: var(--primary);
  padding: 0.6rem 1.25rem;
  box-shadow: var(--shadow-md);
}

.navbar-footer {
  background: #1e2330;
  padding: 1.5rem 2rem;
  color: rgba(255,255,255,0.75);
  font-size: 0.875rem;
  border-top: 1px solid rgba(255,255,255,0.06);
}

.navbar-footer a {
  color: rgba(255,255,255,0.6);
  transition: color var(--transition);
}

.navbar-footer a:hover {
  color: #fff;
  text-decoration: none;
}

.pt-box {
  text-align: center;
  background: var(--surface);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  overflow: hidden;
  transition: box-shadow var(--transition), transform var(--transition);
}

.pt-box:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-3px);
}

.pt-fname {
  padding: 12px 14px 4px;
  width: 100%;
  text-align: center;
  font-weight: 700;
  font-size: 0.875rem;
  color: var(--text-primary);
  letter-spacing: -0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pt-fsize {
  padding: 4px 14px 10px;
  width: 100%;
  text-align: center;
  font-size: 0.775rem;
  color: var(--text-muted);
  letter-spacing: 0.02em;
  font-weight: 500;
}

.dll { width: 100%; max-width: 360px; }

.dl {
  display: block;
  font-weight: 700;
  font-size: 0.825rem;
  padding: 9px 14px;
  margin: 3px 0;
  border-radius: var(--radius-md);
  letter-spacing: 0.02em;
  transition: opacity var(--transition), transform var(--transition);
  text-transform: uppercase;
}

.dl:hover {
  opacity: 0.82;
  transform: translateX(3px);
  text-decoration: none;
}

.dl a { color: #fff; text-decoration: none; }

.dlink:nth-child(4n+1) { background: #0d7a48; }
.dlink:nth-child(4n+2) { background: #c26d00; }
.dlink:nth-child(4n+3) { background: #b91c1c; }
.dlink:nth-child(4n+0) { background: #1d4ed8; }

.mg-4 { margin: 4px; }
.mg-7-10 { margin: 7px 10px; }
.bold { font-weight: 700; }

.wd-contact {
  width: 100%;
  max-width: 440px;
  text-align: left;
  display: inline-block;
}

.wd-success {
  background: var(--success-bg);
  border: 1px solid var(--success-border);
  border-left: 4px solid var(--success);
  padding: 12px 16px;
  border-radius: var(--radius-md);
  color: #065f46;
  font-size: 0.875rem;
  font-weight: 500;
}

.wd-error {
  background: var(--danger-bg);
  border: 1px solid var(--danger-border);
  border-left: 4px solid var(--danger);
  padding: 10px 16px;
  border-radius: var(--radius-md);
  color: #7f1d1d;
  font-size: 0.875rem;
  font-weight: 500;
  margin: 4px 0;
}

.userplus {
  line-height: 1.7;
  margin-bottom: 8px;
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.btnplus {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: var(--danger);
  border: 1px solid var(--danger);
  color: #fff;
  font-size: 0.825rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 7px 16px;
  margin: 2px 0 2px 4px;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: background var(--transition), box-shadow var(--transition), transform var(--transition);
  text-decoration: none;
}

.btnplus:hover {
  background: #b91c1c;
  border-color: #991b1b;
  color: #fff;
  box-shadow: 0 4px 12px rgba(220,38,38,0.35);
  transform: translateY(-1px);
  text-decoration: none;
}

.btnplus:active {
  transform: scale(0.97);
  box-shadow: none;
}

.headbb {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 10px 16px;
  margin-bottom: 8px;
  box-shadow: var(--shadow-sm);
  position: sticky;
  top: 0;
  z-index: 100;
}

.head-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  font-size: 0.825rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  padding: 6px 14px;
  margin: 2px 0 2px 4px;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition);
  text-decoration: none;
}

.head-btn:hover {
  background: var(--surface-3);
  border-color: var(--border-strong);
  color: var(--text-primary);
  text-decoration: none;
}

.head-btn:active {
  background: var(--border);
  transform: scale(0.97);
}

.card-premium {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--transition), transform var(--transition);
}

.card-premium:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}

.divider {
  height: 1px;
  background: var(--border);
  margin: 1.25rem 0;
  border: none;
}

.divider-strong {
  height: 1px;
  background: var(--border-strong);
  margin: 1.25rem 0;
  border: none;
}

.avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--accent-muted);
  color: var(--accent-hover);
  font-weight: 800;
  font-size: 0.875rem;
  letter-spacing: -0.02em;
  flex-shrink: 0;
}

.pill {
  display: inline-flex;
  align-items: center;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: 999px;
  background: var(--surface-3);
  color: var(--text-secondary);
  border: 1px solid var(--border);
  letter-spacing: 0.01em;
}

.tag {
  display: inline-flex;
  align-items: center;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: var(--radius-sm);
  background: var(--accent-muted);
  color: var(--accent-hover);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.input-field {
  width: 100%;
  padding: 9px 14px;
  font-family: var(--font-sans);
  font-size: 0.9rem;
  color: var(--text-primary);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition);
  appearance: none;
}

.input-field:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(59,130,246,0.15);
}

.input-field::placeholder {
  color: var(--text-muted);
}

.skeleton {
  background: linear-gradient(90deg, var(--surface-3) 25%, var(--border) 50%, var(--surface-3) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: var(--radius-md);
}

@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

@media (prefers-color-scheme: dark) {
  :root {
    --primary: #0f2233;
    --accent-muted: #1e3a5f;
    --surface: #0f1117;
    --surface-2: #161b25;
    --surface-3: #1e2535;
    --border: #2a3347;
    --border-strong: #3d4d65;
    --text-primary: #f1f5f9;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    --success-bg: #052e16;
    --success-border: #166534;
    --danger-bg: #1a0505;
    --danger-border: #7f1d1d;
    --warning-bg: #1c0f00;
    --accent-hover: #60a5fa;
  }
}