@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&family=Inter:wght@400;500;600;700&display=swap');

:root {
  --bg-primary: #000000;
  --bg-secondary: #0a0a0a;
  --bg-tertiary: #111111;
  --bg-hover: #1a1a1a;
  --bg-input: #080808;
  --bg-gradient-start: #000000;
  --bg-gradient-end: #0a0a0a;
  --text-primary: #ffffff;
  --text-secondary: #999999;
  --text-muted: #555555;
  --accent-primary: #ffffff;
  --accent-secondary: #cccccc;
  --accent-danger: #ff4757;
  --accent-warning: #ffa502;
  --accent-info: #ffffff;
  --accent-success: #34d399;
  --accent-gradient: linear-gradient(135deg, #111111 0%, #1a1a1a 50%, #222222 100%);
  --accent-gradient-2: linear-gradient(135deg, #111111 0%, #1a1a1a 100%);
  --border-color: #1a1a1a;
  --border-hover: #333333;
  --border-radius: 12px;
  --border-radius-sm: 8px;
  --border-radius-lg: 16px;
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.5);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.6);
  --shadow-lg: 0 16px 48px rgba(0, 0, 0, 0.7);
  --shadow-glow: 0 0 40px rgba(255, 255, 255, 0.04);
  --shadow-colored: 0 8px 32px rgba(255, 255, 255, 0.06);
  --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-normal: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html { width: 100%; }

body {
  font-family: 'Outfit', 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  font-size: 14px;
  width: 100%;
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background:
    radial-gradient(ellipse 80% 50% at 20% 40%, rgba(255, 255, 255, 0.015) 0%, transparent 60%),
    radial-gradient(ellipse 60% 40% at 80% 80%, rgba(255, 255, 255, 0.01) 0%, transparent 60%);
  pointer-events: none;
  z-index: 0;
}

h1, h2, h3, h4, h5, h6 {
  font-weight: 600;
  line-height: 1.2;
  margin-bottom: 1rem;
  color: var(--text-primary);
  letter-spacing: -0.5px;
}

h1 { font-size: 2.5rem; font-weight: 700; }
h2 { font-size: 2rem; font-weight: 700; }
h3 { font-size: 1.5rem; }

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

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

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
  position: relative;
  z-index: 1;
}

.mobile-menu-toggle {
  display: none;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  font-size: 1.25rem;
  cursor: pointer;
  padding: 0.625rem;
  border-radius: var(--border-radius-sm);
  transition: all var(--transition-fast);
  z-index: 1001;
}

.mobile-menu-toggle:hover {
  background: var(--bg-hover);
  border-color: var(--border-hover);
  transform: scale(1.05);
}

.navbar {
  background: rgba(6, 6, 10, 0.8);
  backdrop-filter: blur(24px) saturate(1.4);
  -webkit-backdrop-filter: blur(24px) saturate(1.4);
  border-bottom: 1px solid rgba(26, 26, 42, 0.7);
  padding: 0.875rem 0;
  position: sticky;
  top: 0;
  z-index: 1000;
  transition: all var(--transition-normal);
}

.navbar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 0.875rem;
  transition: transform var(--transition-fast);
}

.nav-brand:hover { transform: translateX(3px); }

.logo {
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -1px;
  color: var(--text-primary);
  text-transform: uppercase;
}

.logo-img {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  object-fit: cover;
  box-shadow: 0 0 20px rgba(255, 255, 255, 0.15);
  transition: all var(--transition-normal);
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.logo-img:hover {
  box-shadow: 0 0 30px rgba(255, 255, 255, 0.25);
  transform: rotate(3deg) scale(1.08);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.nav-link {
  color: var(--text-secondary);
  font-weight: 500;
  font-size: 0.875rem;
  transition: all var(--transition-fast);
  padding: 0.5rem 0.875rem;
  border-radius: var(--border-radius-sm);
  position: relative;
}

.nav-link:hover,
.nav-link.active {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.04);
}

.nav-link.active {
  background: rgba(255, 255, 255, 0.08);
  color: var(--accent-info);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.625rem 1.25rem;
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-sm);
  font-weight: 600;
  font-size: 0.875rem;
  cursor: pointer;
  transition: all var(--transition-fast);
  text-decoration: none;
  background: var(--bg-tertiary);
  color: var(--text-primary);
  position: relative;
  overflow: hidden;
}

.btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
  border-color: var(--border-hover);
}

.btn:active { transform: translateY(0); }

.btn-primary {
  background: #ffffff;
  color: #000000;
  border: none;
  font-weight: 700;
  box-shadow: 0 4px 20px rgba(255, 255, 255, 0.15);
}

.btn-primary:hover {
  box-shadow: 0 6px 30px rgba(255, 255, 255, 0.25);
  transform: translateY(-2px);
  opacity: 0.9;
}

.btn-outline {
  background: transparent;
  color: var(--text-primary);
  border: 1px solid var(--border-color);
}

.btn-outline:hover {
  background: rgba(255, 255, 255, 0.03);
  border-color: var(--border-hover);
}

.btn-secondary {
  background: var(--bg-tertiary);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
}

.btn-secondary:hover {
  background: var(--bg-hover);
  border-color: var(--border-hover);
}

.btn-danger {
  background: linear-gradient(135deg, #ff4757 0%, #ff3838 100%);
  color: white;
  border: none;
  box-shadow: 0 4px 15px rgba(255, 71, 87, 0.25);
}

.btn-danger:hover {
  box-shadow: 0 6px 25px rgba(255, 71, 87, 0.35);
}

.btn-sm { padding: 0.4375rem 0.875rem; font-size: 0.8125rem; }
.btn-lg { padding: 0.875rem 1.75rem; font-size: 1rem; font-weight: 700; }
.btn-block { width: 100%; }
.btn:disabled { opacity: 0.4; cursor: not-allowed; transform: none; }

.hero {
  padding: 5rem 0 3.5rem;
  position: relative;
  border-bottom: 1px solid var(--border-color);
}

.hero::before { display: none; }

.hero-content {
  position: relative;
  z-index: 1;
  animation: fadeInUp 0.8s ease;
}

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

.hero-inner {
  display: grid;
  grid-template-columns: 1fr 420px;
  gap: 3rem;
  align-items: center;
  text-align: left;
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 20px;
  padding: 0.25rem 0.75rem;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--accent-info);
  margin-bottom: 1.5rem;
}

.hero-eyebrow .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent-success);
  display: inline-block;
  animation: blink 2s ease-in-out infinite;
}

@keyframes blink {
  0%,100% { opacity: 1; }
  50% { opacity: 0.3; }
}

.hero-title {
  font-size: clamp(2.2rem, 4.5vw, 3.5rem);
  font-weight: 800;
  letter-spacing: -1.5px;
  line-height: 1.1;
  margin-bottom: 1.25rem;
  color: var(--text-primary);
  background: none;
  -webkit-text-fill-color: currentColor;
  animation: none;
}

.hero-title .dim {
  color: var(--text-muted);
  font-weight: 400;
}

.hero-desc {
  color: var(--text-secondary);
  font-size: 0.9375rem;
  line-height: 1.7;
  max-width: 520px;
  margin-bottom: 2rem;
}

.hero-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-start;
  margin-bottom: 2.5rem;
}

.btn-primary-hero,
.btn-primary-hero:link,
.btn-primary-hero:visited {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background: #ffffff;
  color: #000000;
  font-weight: 700;
  font-size: 0.875rem;
  padding: 0.7rem 1.4rem;
  border-radius: 10px;
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  width: auto;
  box-shadow: 0 4px 20px rgba(255, 255, 255, 0.12);
}

.btn-primary-hero:hover,
.btn-primary-hero:focus {
  box-shadow: 0 6px 30px rgba(255, 255, 255, 0.2);
  transform: translateY(-2px);
  color: #000000;
}

.btn-ghost-hero,
.btn-ghost-hero:link,
.btn-ghost-hero:visited {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background: transparent;
  color: var(--text-secondary);
  font-weight: 600;
  font-size: 0.875rem;
  padding: 0.7rem 1.4rem;
  border-radius: 10px;
  border: 1px solid var(--border-color);
  cursor: pointer;
  text-decoration: none;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  width: auto;
}

.btn-ghost-hero:hover,
.btn-ghost-hero:focus {
  border-color: var(--accent-info);
  color: var(--text-primary);
  transform: translateY(-1px);
  background: rgba(255, 255, 255, 0.04);
}

.hero-stats {
  display: flex;
  flex-direction: row;
  gap: 2rem;
  flex-wrap: wrap;
  padding-top: 0;
  border-top: none;
  margin: 0;
  animation: none;
}

.hstat {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.hstat-value {
  font-size: 1.375rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  color: var(--text-primary);
  background: none;
  -webkit-text-fill-color: currentColor;
}

.hstat-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--text-muted);
  font-weight: 600;
}

.hero-terminal {
  background: #08080e;
  border: 1px solid var(--border-color);
  border-radius: 14px;
  overflow: hidden;
  font-family: 'SFMono-Regular', 'Consolas', 'Menlo', monospace;
  font-size: 0.78rem;
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.5), 0 0 60px rgba(255, 255, 255, 0.04);
}

.terminal-bar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 1rem;
  background: #0e0e16;
  border-bottom: 1px solid var(--border-color);
}

.t-dot { width: 10px; height: 10px; border-radius: 50%; }
.t-dot.red { background: #ff5f57; }
.t-dot.yel { background: #febc2e; }
.t-dot.grn { background: #28c840; }

.terminal-label {
  margin-left: auto;
  font-size: 0.65rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  font-family: inherit;
}

.terminal-body {
  padding: 1.1rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  line-height: 1.5;
  color: var(--text-muted);
}

.t-line { display: flex; gap: 0.5rem; }
.t-prompt { color: #34d399; user-select: none; flex-shrink: 0; }
.t-cmd { color: #c4c8d8; }
.t-output { color: #4a5068; padding-left: 1rem; }
.t-key { color: #fff; }
.t-val { color: #d4a574; }
.t-val.num { color: #34d399; }
.t-val.ok { color: #34d399; }
.t-cursor {
  display: inline-block;
  width: 7px;
  height: 13px;
  background: var(--accent-info);
  vertical-align: middle;
  animation: cur 1.1s step-start infinite;
  margin-left: 2px;
}

@keyframes cur { 0%,100% { opacity: 1; } 50% { opacity: 0; } }

.section {
  padding: 4rem 0;
  border-bottom: 1px solid var(--border-color);
}

.section:last-of-type { border-bottom: none; }

.section-label {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: var(--accent-info);
  margin-bottom: 0.75rem;
}

.section-heading {
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 800;
  letter-spacing: -0.8px;
  margin-bottom: 0.75rem;
  color: var(--text-primary);
}

.section-sub {
  color: var(--text-secondary);
  font-size: 0.9rem;
  max-width: 540px;
  line-height: 1.7;
  margin-bottom: 2.5rem;
}

.feat-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--border-color);
  border: 1px solid var(--border-color);
  border-radius: 14px;
  overflow: hidden;
}

.feat-card {
  background: var(--bg-secondary);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  transition: background 0.3s ease;
}

.feat-card:hover {
  background: var(--bg-tertiary);
}

.feat-icon {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.06);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  color: var(--accent-info);
  flex-shrink: 0;
  transition: all var(--transition-normal);
}

.feat-card:hover .feat-icon {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.25);
  transform: scale(1.08);
}

.feat-title {
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.2px;
  margin: 0;
}

.feat-desc {
  font-size: 0.8125rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin: 0;
}

.country-grid {
  display: flex;
  flex-wrap: wrap;
  background: transparent;
  border: 1px solid var(--border-color);
  border-radius: 14px;
  overflow: hidden;
}

.country-grid .country-card {
  background: var(--bg-secondary);
  padding: 1.1rem 1.25rem;
  display: flex;
  align-items: flex-start;
  gap: 0.875rem;
  transition: background 0.2s ease;
  text-decoration: none;
  color: inherit;
  border: none;
  border-right: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
  border-radius: 0;
  flex: 0 0 25%;
  width: 25%;
  box-sizing: border-box;
}

.country-grid .country-card::before,
.country-grid .country-card::after { display: none; content: none; }

.country-grid .country-card:hover {
  background: var(--bg-tertiary);
  color: inherit;
}

.country-grid .country-card:nth-child(4n) { border-right: none; }
.country-grid .country-card:last-child { border-right: none; border-bottom: none; flex: 1 1 100%; justify-content: center; }

.c-flag { font-size: 1.5rem; flex-shrink: 0; line-height: 1; margin-top: 0.1rem; }
.c-name {
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.25rem;
}
.c-tags { display: flex; flex-wrap: wrap; gap: 0.25rem; }
.c-tag {
  font-size: 0.65rem;
  font-weight: 600;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 4px;
  padding: 0.1rem 0.45rem;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.cta-section {
  padding: 4rem 0;
  text-align: center;
  background: transparent;
}

.cta-section::before { display: none; }

.cta-box {
  max-width: 560px;
  margin: 0 auto;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 2.5rem 2rem;
  position: relative;
  overflow: hidden;
}

.cta-box::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--accent-gradient);
  opacity: 0.5;
}

.cta-title {
  font-size: 1.625rem;
  font-weight: 800;
  letter-spacing: -0.6px;
  margin-bottom: 0.75rem;
  color: var(--text-primary);
}

.cta-desc {
  color: var(--text-secondary);
  font-size: 0.875rem;
  line-height: 1.7;
  margin-bottom: 1.75rem;
}

.cta-actions {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
  flex-wrap: wrap;
}

.footer {
  border-top: 1px solid var(--border-color);
  padding: 1.25rem 0;
  background: var(--bg-secondary);
  text-align: left;
  font-size: 0.875rem;
  color: var(--text-muted);
}

.footer .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

.footer p { color: var(--text-muted); font-size: 0.8rem; margin: 0; }

.footer-links {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.footer-links a {
  color: var(--text-muted);
  font-size: 0.8rem;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.3rem;
  transition: color 0.2s;
}

.footer-links a:hover { color: var(--accent-info); }

.nav-links .btn { width: auto; justify-content: center; }
.nav-links .btn-sm { padding: 0.4375rem 0.875rem; font-size: 0.8125rem; }

.gradient-text {
  color: #ffffff;
  font-weight: 700;
}

@keyframes gradientAnimation {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

.hero-subtitle {
  font-size: 1.25rem;
  color: var(--text-secondary);
  max-width: 700px;
  margin: 0 auto 3rem;
  line-height: 1.8;
}

.hero-buttons {
  display: flex;
  gap: 1.5rem;
  justify-content: center;
  margin-bottom: 4rem;
}

.stat {
  text-align: center;
  transition: transform var(--transition-normal);
}

.stat:hover { transform: translateY(-5px); }

.stat-value {
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--text-primary);
  color: #ffffff;
  margin-bottom: 0.5rem;
}

.stat-label {
  color: var(--text-muted);
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.features,
.countries {
  padding: 6rem 0;
  position: relative;
}

.section-title {
  text-align: center;
  margin-bottom: 4rem;
  font-size: 2.5rem;
  font-weight: 800;
  letter-spacing: -1px;
}

.features-grid,
.countries-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}

.feature-card {
  background: var(--bg-secondary);
  padding: 2.5rem;
  border-radius: var(--border-radius);
  border: 1px solid var(--border-color);
  transition: all var(--transition-normal);
  position: relative;
  overflow: hidden;
}

.feature-card:hover {
  border-color: rgba(255, 255, 255, 0.2);
  background: var(--bg-tertiary);
  transform: translateY(-4px);
  box-shadow: 0 8px 32px rgba(255, 255, 255, 0.06);
}

.feature-icon {
  font-size: 2.5rem;
  margin-bottom: 1.5rem;
  display: block;
  transition: transform var(--transition-normal);
}

.feature-card:hover .feature-icon { transform: scale(1.1) rotate(3deg); }
.feature-card h3 { margin-bottom: 1rem; font-size: 1.25rem; font-weight: 700; }
.feature-card p { color: var(--text-secondary); font-size: 0.9375rem; line-height: 1.7; }

.cta {
  padding: 6rem 0;
  text-align: center;
  background: linear-gradient(135deg, var(--bg-secondary) 0%, rgba(255, 255, 255, 0.01) 100%);
  border-top: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
  position: relative;
  overflow: hidden;
}

.cta h2 { margin-bottom: 1rem; font-size: 2.5rem; position: relative; z-index: 1; }
.cta p { color: var(--text-secondary); font-size: 1.125rem; margin-bottom: 2.5rem; position: relative; z-index: 1; }

body.auth-page {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

.auth-container {
  flex: 1 0 auto;
  display: flex;
  padding: 0.75rem;
  position: relative;
  overflow-y: auto;
}

body.auth-page .footer {
  margin-top: auto;
}

.auth-box {
  background: rgba(12, 12, 18, 0.9);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  padding: 1.5rem;
  border-radius: var(--border-radius-lg);
  border: 1px solid var(--border-color);
  max-width: 450px;
  width: 100%;
  margin: auto;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  animation: fadeInUp 0.6s ease;
}

.auth-header { text-align: center; margin-bottom: 1.5rem; }
.auth-header h1 { margin-bottom: 0.25rem; font-size: 1.5rem; }
.auth-header h2 { font-size: 1.25rem; margin-bottom: 0.5rem; }
.auth-header p { color: var(--text-secondary); font-size: 0.875rem; }

.auth-logo {
  width: 60px;
  height: 60px;
  border-radius: 16px;
  margin-bottom: 0.75rem;
  box-shadow: 0 8px 24px rgba(255, 255, 255, 0.15);
  transition: all var(--transition-normal);
}

.auth-logo:hover {
  transform: scale(1.05) rotate(3deg);
  box-shadow: 0 12px 32px rgba(255, 255, 255, 0.25);
}

.auth-form { margin-bottom: 1rem; }

.form-group { margin-bottom: 0.875rem; }

.form-group label {
  display: block;
  margin-bottom: 0.375rem;
  color: var(--text-primary);
  font-weight: 500;
  font-size: 0.875rem;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 0.625rem 0.875rem;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-sm);
  color: var(--text-primary);
  font-size: 0.875rem;
  transition: all var(--transition-fast);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--accent-info);
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.1);
}

.form-group small {
  display: block;
  margin-top: 0.25rem;
  color: var(--text-muted);
  font-size: 0.75rem;
  line-height: 1.3;
}

.pw-checklist {
  display: grid;
  gap: 0.25rem;
  margin-top: 0.5rem;
  padding: 0.625rem 0.75rem;
  background: var(--bg-card, #161616);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-sm);
}

.pw-checklist .pw-req {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-muted);
  font-size: 0.75rem;
  line-height: 1.4;
  transition: color var(--transition-fast);
}

.pw-checklist .pw-req i {
  font-size: 0.625rem;
  width: 0.875rem;
  text-align: center;
  transition: color var(--transition-fast);
}

.pw-checklist .pw-req.ok {
  color: var(--accent-success);
}

.pw-checklist .pw-req.ok i {
  color: var(--accent-success);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

.auth-footer {
  text-align: center;
  padding-top: 1rem;
  border-top: 1px solid var(--border-color);
}

.auth-footer p {
  margin-bottom: 0.5rem;
  color: var(--text-secondary);
  font-size: 0.875rem;
}

.link-secondary {
  color: var(--text-muted);
  font-size: 0.8125rem;
  transition: all var(--transition-fast);
}

.link-secondary:hover { color: var(--accent-info); }

.auth-header { margin-bottom: 0.75rem; }
.auth-logo { width: 44px; height: 44px; border-radius: 12px; margin-bottom: 0.375rem; }
.auth-header h1 { font-size: 1.125rem; margin-bottom: 0.125rem; }
.auth-header h2 { font-size: 1rem; margin-bottom: 0.125rem; }
.auth-header p { font-size: 0.75rem; margin-bottom: 0; }

.auth-box .form-group { margin-bottom: 0.5rem; }
.auth-box .form-group label { margin-bottom: 0.1875rem; font-size: 0.78125rem; }
.auth-box .form-group input { padding: 0.4375rem 0.6875rem; font-size: 0.8125rem; }
.auth-box .form-group small { font-size: 0.65625rem; margin-top: 0.125rem; }
.auth-box .pw-checklist { margin-top: 0.3125rem; padding: 0.4375rem 0.5625rem; gap: 0.1875rem 0.5rem; grid-template-columns: 1fr 1fr; }
.auth-box .pw-checklist .pw-req { font-size: 0.65625rem; }
.auth-box .btn { padding: 0.5625rem 1.25rem; font-size: 0.8125rem; }
.auth-box .alert { padding: 0.4375rem 0.6875rem; font-size: 0.75rem; }
.auth-box .auth-footer { padding-top: 0.625rem; }
.auth-box .auth-footer p { font-size: 0.78125rem; margin-bottom: 0.25rem; }

.pw-mismatch { color: var(--accent-danger); }

@media (max-width: 420px) {
  body.auth-page .pw-checklist { grid-template-columns: 1fr; }
}

@media (max-height: 800px) {
  body.auth-page .auth-header { margin-bottom: 0.5rem; }
  body.auth-page .auth-logo { width: 38px; height: 38px; margin-bottom: 0.25rem; }
  body.auth-page .auth-box { padding: 0.875rem; }
  body.auth-page .auth-box .form-group { margin-bottom: 0.4375rem; }
  body.auth-page .pw-checklist { padding: 0.375rem 0.5rem; gap: 0.125rem 0.5rem; }
}

@media (max-height: 700px) {
  body.auth-page .auth-header p { display: none; }
  body.auth-page .auth-box .form-group small:not(.pw-mismatch) { display: none; }
  body.auth-page .footer { padding: 0.5rem 0; }
  body.auth-page .auth-box .auth-footer { padding-top: 0.5rem; }
}

.alert {
  padding: 0.625rem 0.875rem;
  border-radius: var(--border-radius-sm);
  margin-bottom: 0.875rem;
  border-left: 3px solid;
  font-size: 0.8125rem;
  line-height: 1.4;
  animation: slideIn 0.3s ease;
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
}

.alert i { margin-top: 0.125rem; flex-shrink: 0; }

@keyframes slideIn {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}

.alert-error {
  background: rgba(255, 71, 87, 0.08);
  border-color: var(--accent-danger);
  color: var(--accent-danger);
}

.alert-success {
  background: rgba(52, 211, 153, 0.08);
  border-color: var(--accent-success);
  color: var(--accent-success);
}

.alert-info {
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--accent-info);
  color: var(--accent-info);
}

.migration-banner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.625rem;
  padding: 0.625rem 1rem;
  background: rgba(74, 222, 128, 0.08);
  border-bottom: 1px solid rgba(74, 222, 128, 0.25);
  font-size: 0.8125rem;
  line-height: 1.4;
  color: var(--text-secondary);
  text-align: center;
}

.migration-banner i {
  color: #4ade80;
  font-size: 1rem;
  flex-shrink: 0;
}

.migration-banner .migration-banner-text strong {
  color: #4ade80;
}

.migration-banner a {
  color: #60a5fa;
  font-weight: 600;
  text-decoration: underline;
}

.migration-banner s {
  color: var(--text-muted);
}

@media (max-width: 768px) {
  .migration-banner {
    flex-direction: column;
    gap: 0.25rem;
    padding: 0.5rem 0.75rem;
  }
}

.dashboard-container {
  display: grid;
  grid-template-columns: 260px 1fr;
  min-height: calc(100vh - 58px);
}

.sidebar {
  background: var(--bg-secondary);
  border-right: 1px solid var(--border-color);
  padding: 2rem 0;
  transition: all var(--transition-normal);
}

.sidebar-section { margin-bottom: 2rem; }

.sidebar-section h3 {
  padding: 0 1.5rem;
  margin-bottom: 0.75rem;
  font-size: 0.6875rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--text-muted);
  font-weight: 700;
}

.sidebar-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.875rem 1.5rem;
  color: var(--text-secondary);
  transition: all var(--transition-fast);
  border-left: 3px solid transparent;
  font-size: 0.875rem;
  font-weight: 500;
}

.sidebar-link:hover {
  background: var(--bg-tertiary);
  color: var(--text-primary);
}

.sidebar-link.active {
  background: rgba(255, 255, 255, 0.06);
  color: var(--accent-info);
  border-left-color: var(--accent-info);
}

.sidebar-link-external {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.875rem 1.5rem;
  color: var(--text-secondary);
  transition: all var(--transition-fast);
  border-left: 3px solid transparent;
  font-size: 0.875rem;
  font-weight: 500;
}

.sidebar-link-external:hover {
  background: var(--bg-tertiary);
  color: var(--text-primary);
}

.dashboard-main {
  padding: 3rem;
  max-width: 1400px;
  animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.text-muted { color: var(--text-secondary); }

.tab-content { display: none; }
.tab-content.active {
  display: block;
  animation: fadeInUp 0.4s ease;
}

.search-form-container,
.enhanced-search {
  background: var(--bg-secondary);
  padding: 2.5rem;
  border-radius: var(--border-radius);
  border: 1px solid var(--border-color);
  margin: 2rem 0;
  transition: all var(--transition-normal);
}

.search-form-container:hover,
.enhanced-search:hover {
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.3);
}

.search-header { margin-bottom: 2rem; }

.search-type-selector {
  display: flex;
  gap: 1rem;
  background: var(--bg-tertiary);
  padding: 0.75rem;
  border-radius: var(--border-radius-sm);
}

.search-type-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  padding: 1rem 1.5rem;
  background: transparent;
  border: 2px solid transparent;
  border-radius: var(--border-radius-sm);
  color: var(--text-secondary);
  font-weight: 600;
  font-size: 0.875rem;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.search-type-btn:hover {
  background: rgba(255, 255, 255, 0.02);
  color: var(--text-primary);
}

.search-type-btn.active {
  background: var(--bg-primary);
  border-color: var(--accent-info);
  color: var(--text-primary);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.1);
}

.search-type-btn .icon { font-size: 1.25rem; }
.search-category { display: none; }
.search-category.active { display: block; animation: fadeInUp 0.4s ease; }

.search-input-wrapper {
  display: flex;
  gap: 1rem;
}

.search-input-wrapper input { flex: 1; }

.search-btn {
  min-width: 140px;
  white-space: nowrap;
}

.search-tips {
  margin-top: 2rem;
  padding: 1.5rem;
  background: var(--bg-tertiary);
  border-radius: var(--border-radius-sm);
  border-left: 4px solid var(--accent-info);
}

.search-tips h4 {
  font-size: 0.875rem;
  margin-bottom: 1rem;
  color: var(--text-primary);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.search-tips ul { list-style: none; padding: 0; margin: 0; }

.search-tips li {
  padding: 0.5rem 0;
  color: var(--text-secondary);
  font-size: 0.8125rem;
}

.search-tips li:before {
  content: "→ ";
  color: var(--accent-info);
  margin-right: 0.75rem;
  font-weight: 700;
}

#searchResults {
  margin-top: 2.5rem;
  animation: fadeInUp 0.5s ease;
}

.results-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 2px solid var(--border-color);
}

.results-header h3 {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 700;
}

.result-card {
  background: var(--bg-secondary);
  padding: 2rem;
  border-radius: var(--border-radius);
  border: 1px solid var(--border-color);
  margin-bottom: 1.5rem;
  transition: all var(--transition-normal);
}

.result-card:hover {
  border-color: rgba(255, 255, 255, 0.15);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.result-card h4 {
  color: var(--text-primary);
  margin-bottom: 1.5rem;
  font-size: 1.125rem;
  font-weight: 700;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border-color);
}

.result-item {
  display: flex;
  padding: 1rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  font-size: 0.875rem;
}

.result-item:last-child { border-bottom: none; }

.result-label {
  font-weight: 700;
  color: var(--text-muted);
  min-width: 160px;
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 1px;
}

.result-value {
  color: var(--text-primary);
  word-break: break-word;
  font-weight: 500;
}

.profile-card,
.api-token-card {
  background: var(--bg-secondary);
  padding: 2.5rem;
  border-radius: var(--border-radius);
  border: 1px solid var(--border-color);
  margin-top: 2rem;
  transition: all var(--transition-normal);
}

.profile-info { display: grid; gap: 1.5rem; }

.info-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.25rem;
  background: var(--bg-tertiary);
  border-radius: var(--border-radius-sm);
  font-size: 0.875rem;
  border: 1px solid transparent;
  transition: all var(--transition-fast);
}

.info-item:hover {
  border-color: rgba(255, 255, 255, 0.1);
}

.info-item label {
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 1px;
}

.info-item span {
  font-weight: 600;
  color: var(--text-primary);
}

.token-container {
  display: flex;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.token-input {
  flex: 1;
  font-family: "Courier New", monospace;
  font-size: 0.8125rem;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  padding: 1rem;
  border-radius: var(--border-radius-sm);
  transition: all var(--transition-fast);
}

.token-input:focus {
  border-color: var(--accent-info);
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.08);
}

.api-example {
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 2px solid var(--border-color);
}

.api-example h3 {
  font-size: 1.125rem;
  margin-bottom: 1.25rem;
  font-weight: 700;
}

.api-example pre {
  background: var(--bg-tertiary);
  padding: 1.5rem;
  border-radius: var(--border-radius-sm);
  overflow-x: auto;
  border: 1px solid var(--border-color);
}

.api-example code {
  color: var(--text-secondary);
  font-family: "Courier New", monospace;
  font-size: 0.8125rem;
  line-height: 1.6;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
  margin: 2rem 0;
}

.stat-card {
  background: var(--bg-secondary);
  padding: 2rem;
  border-radius: var(--border-radius);
  border: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  gap: 1.5rem;
  transition: all var(--transition-normal);
  position: relative;
  overflow: hidden;
}

.stat-card:hover {
  transform: translateY(-4px);
  border-color: rgba(255, 255, 255, 0.15);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.stat-icon {
  font-size: 2.5rem;
  transition: transform var(--transition-normal);
}

.stat-card:hover .stat-icon {
  transform: scale(1.1) rotate(5deg);
}

.stat-info .stat-value {
  font-size: 2rem;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1;
}

.stat-info .stat-label {
  color: var(--text-muted);
  font-size: 0.8125rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-top: 0.5rem;
}

.table-container {
  background: var(--bg-secondary);
  border-radius: var(--border-radius);
  border: 1px solid var(--border-color);
  overflow-x: auto;
  margin-top: 2rem;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
}

.data-table th,
.data-table td {
  padding: 1rem 1.25rem;
  text-align: left;
  border-bottom: 1px solid var(--border-color);
  font-size: 0.875rem;
}

.data-table th {
  background: var(--bg-tertiary);
  font-weight: 700;
  color: var(--text-muted);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  position: sticky;
  top: 0;
  z-index: 10;
}

.data-table tbody tr {
  transition: background 0.15s ease;
}

.data-table tbody tr:hover {
  background: var(--bg-hover);
}

.text-center { text-align: center !important; }

.badge {
  display: inline-block;
  padding: 0.375rem 0.875rem;
  border-radius: 20px;
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.badge-success {
  background: rgba(52, 211, 153, 0.1);
  color: var(--accent-success);
  border: 1px solid rgba(52, 211, 153, 0.2);
}

.badge-danger {
  background: rgba(255, 71, 87, 0.1);
  color: var(--accent-danger);
  border: 1px solid rgba(255, 71, 87, 0.2);
}

.badge-info {
  background: rgba(255, 255, 255, 0.1);
  color: var(--accent-info);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.badge-admin {
  background: rgba(255, 255, 255, 0.1);
  color: var(--accent-info);
  margin-left: 0.75rem;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.docs-container {
  display: grid;
  grid-template-columns: 280px 1fr;
  min-height: calc(100vh - 58px);
}

.docs-sidebar {
  background: var(--bg-secondary);
  border-right: 1px solid var(--border-color);
  padding: 2rem 1.5rem;
  position: sticky;
  top: 58px;
  height: calc(100vh - 58px);
  overflow-y: auto;
}

.docs-sidebar::-webkit-scrollbar { width: 4px; }
.docs-sidebar::-webkit-scrollbar-track { background: transparent; }
.docs-sidebar::-webkit-scrollbar-thumb { background: var(--border-color); border-radius: 2px; }
.docs-sidebar::-webkit-scrollbar-thumb:hover { background: var(--border-hover); }

.docs-sidebar h3 {
  margin-bottom: 1.5rem;
  font-size: 1.125rem;
  font-weight: 700;
}

.docs-link {
  display: block;
  padding: 0.625rem 0;
  color: var(--text-secondary);
  transition: all var(--transition-fast);
  font-size: 0.875rem;
  border-left: 2px solid transparent;
  padding-left: 1rem;
  margin-left: -1rem;
}

.docs-link:hover {
  color: var(--text-primary);
  border-left-color: var(--accent-info);
  transform: translateX(3px);
}

.docs-link.active {
  color: var(--accent-info);
  border-left-color: var(--accent-info);
  background: rgba(255, 255, 255, 0.04);
}

.docs-main {
  padding: 3rem;
  max-width: 1000px;
}

.docs-section {
  margin-bottom: 4rem;
  scroll-margin-top: 100px;
}

.docs-section h2 {
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 2px solid var(--border-color);
  font-size: 1.75rem;
  font-weight: 700;
}

.docs-section h3 {
  margin-top: 2rem;
  margin-bottom: 1rem;
  font-size: 1.25rem;
  font-weight: 700;
}

.docs-section h4 {
  margin-top: 1.5rem;
  margin-bottom: 0.75rem;
  font-size: 1rem;
  color: var(--text-muted);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.docs-section p {
  color: var(--text-secondary);
  margin-bottom: 1.25rem;
  font-size: 0.9375rem;
  line-height: 1.8;
}

.docs-section ul {
  color: var(--text-secondary);
  margin-left: 2rem;
  margin-bottom: 1.5rem;
}

.docs-section li {
  margin-bottom: 0.75rem;
  font-size: 0.9375rem;
  line-height: 1.7;
}

.endpoint-card {
  background: var(--bg-secondary);
  padding: 2rem;
  border-radius: var(--border-radius);
  border: 1px solid var(--border-color);
  margin: 2rem 0;
  transition: all var(--transition-normal);
}

.endpoint-card:hover {
  border-color: rgba(255, 255, 255, 0.12);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.endpoint-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
}

.method {
  padding: 0.375rem 0.875rem;
  border-radius: 20px;
  font-weight: 800;
  font-size: 0.6875rem;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.method.get {
  background: rgba(52, 211, 153, 0.1);
  color: var(--accent-success);
  border: 1px solid rgba(52, 211, 153, 0.2);
}

.method.post {
  background: rgba(255, 255, 255, 0.1);
  color: var(--accent-info);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.endpoint-card code {
  background: var(--bg-tertiary);
  padding: 0.25rem 0.625rem;
  border-radius: 6px;
  font-family: "Courier New", monospace;
  color: var(--text-secondary);
  font-size: 0.8125rem;
  border: 1px solid var(--border-color);
}

.endpoint-card pre {
  background: var(--bg-tertiary);
  padding: 1.5rem;
  border-radius: var(--border-radius-sm);
  overflow-x: auto;
  margin: 1.25rem 0;
  border: 1px solid var(--border-color);
}

.endpoint-card pre code {
  background: none;
  padding: 0;
  border: none;
  color: var(--text-secondary);
  font-size: 0.8125rem;
  line-height: 1.6;
}

.loader {
  border: 3px solid var(--bg-tertiary);
  border-top: 3px solid var(--accent-info);
  border-radius: 50%;
  width: 20px;
  height: 20px;
  animation: spin 0.6s linear infinite;
  display: inline-block;
  will-change: transform;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: var(--bg-secondary); }
::-webkit-scrollbar-thumb { background: var(--border-color); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--border-hover); }

::selection {
  background: rgba(255, 255, 255, 0.25);
  color: var(--text-primary);
}

.docs-sidebar-toggle {
  display: none;
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  width: 48px;
  height: 48px;
  background: #ffffff;
  color: #000000;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  box-shadow: 0 4px 20px rgba(255, 255, 255, 0.15);
  z-index: 999;
  font-size: 1.125rem;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
}

.docs-sidebar-toggle:hover {
  transform: scale(1.08);
  box-shadow: 0 6px 28px rgba(255, 255, 255, 0.2);
}

.docs-sidebar-overlay {
  display: none;
  position: fixed;
  top: 60px;
  left: 0;
  width: 100%;
  height: calc(100vh - 60px);
  background: rgba(0, 0, 0, 0.7);
  z-index: 998;
  backdrop-filter: blur(4px);
}

@media (max-width: 900px) {
  .hero-inner {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .hero-terminal { display: block; margin-top: 1.5rem; width: 100%; text-align: left; }
  .feat-grid { grid-template-columns: repeat(2, 1fr); }
  .hero-eyebrow { margin-left: auto; margin-right: auto; }
  .hero-desc { margin-left: auto; margin-right: auto; }
  .hero-actions { justify-content: center; }
  .hero-stats { justify-content: center; }
  .country-grid .country-card { flex: 0 0 33.333%; width: 33.333%; }
  .country-grid .country-card:nth-child(4n) { border-right: 1px solid var(--border-color); }
  .country-grid .country-card:nth-child(3n) { border-right: none; }
  .country-grid .country-card:nth-last-child(-n+3) { border-bottom: none; }
  .country-grid .country-card:last-child { border-right: none; border-bottom: none; }
}

.mobile-menu-toggle { display: none; }

@media (max-width: 768px) {
  .mobile-menu-toggle {
    display: flex !important;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 0.95rem;
    cursor: pointer;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
  }

  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    width: 100%;
    background: rgba(6, 6, 10, 0.96);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    flex-direction: column;
    align-items: stretch;
    padding: 0.5rem 0 1rem;
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.8);
    z-index: 2000;
    box-sizing: border-box;
  }

  .nav-links.is-open { display: flex !important; }

  .nav-links .nav-link {
    width: 100%;
    font-size: 0.9375rem;
    padding: 0.875rem 1.5rem;
    border-radius: 0;
    border-left: 3px solid transparent;
    transform: none;
    text-align: left;
    justify-content: flex-start;
  }

  .nav-links .nav-link:hover,
  .nav-links .nav-link.active {
    border-left-color: var(--accent-info);
    background: rgba(255, 255, 255, 0.04);
    transform: none;
  }

  .nav-links .btn {
    margin: 0.25rem 1rem;
    width: calc(100% - 2rem);
    font-size: 0.9375rem;
    padding: 0.75rem 1rem;
    border-radius: 10px;
    text-align: center;
    justify-content: center;
  }

  .navbar { overflow: visible; }
  .hero { padding: 3.5rem 0 2.5rem; }
  .hero-inner {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .hero-terminal { display: block; margin-top: 1.5rem; width: 100%; text-align: left; }
  .hero-eyebrow { margin-left: auto; margin-right: auto; }
  .hero-desc { margin-left: auto; margin-right: auto; }
  .hero-actions { justify-content: center; }
  .hero-stats { justify-content: center; }
  .country-grid .country-card { flex: 0 0 50%; width: 50%; }
  .country-grid .country-card:nth-child(3n) { border-right: 1px solid var(--border-color); }
  .country-grid .country-card:nth-child(4n) { border-right: 1px solid var(--border-color); }
  .country-grid .country-card:nth-child(2n) { border-right: none; }
  .country-grid .country-card:nth-last-child(-n+2) { border-bottom: none; }
  .country-grid .country-card:last-child { border-right: none; border-bottom: none; }
  .feat-grid { grid-template-columns: repeat(2, 1fr); }
  .btn-primary-hero,
  .btn-ghost-hero { width: 100%; justify-content: center; }
  .cta-actions { flex-direction: column; align-items: center; }
  .footer .container { flex-direction: column; text-align: center; }

  html, body {
    max-width: 100vw !important;
    overflow-x: hidden !important;
  }

  .dashboard-container,
  .main-chat,
  .chat-area,
  .chat-header,
  .search-container,
  .chat-messages,
  .input-area,
  .search-form {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    overflow-x: hidden !important;
  }

  .json-response,
  .response-box,
  .chat-messages table,
  .chat-messages pre,
  .chat-messages code {
    max-width: 100% !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
  }

  .mobile-modules-bar {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    overflow-x: hidden !important;
  }

  .search-input-group {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }

  .mobile-docs-bar {
    display: block;
    margin-bottom: 1.25rem;
  }

  .btn-mobile-endpoints {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    width: 100%;
    padding: 0.75rem 1rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    color: var(--text-primary);
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    justify-content: center;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
  }

  .docs-sidebar-toggle {
    display: flex !important;
    position: fixed !important;
    bottom: 1.5rem !important;
    right: 1.5rem !important;
    padding: 0.75rem 1.25rem !important;
    border-radius: 30px !important;
    font-weight: 700 !important;
    font-size: 0.875rem !important;
    cursor: pointer !important;
    box-shadow: 0 10px 30px rgba(255, 255, 255, 0.3) !important;
    z-index: 10000 !important;
    align-items: center !important;
    gap: 0.5rem !important;
    touch-action: manipulation !important;
  }

  .docs-sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    z-index: 998;
  }

  .docs-sidebar-overlay.active { display: block !important; }

  .docs-sidebar {
    position: fixed !important;
    top: 60px !important;
    left: -290px !important;
    width: 270px !important;
    height: calc(100vh - 60px) !important;
    max-height: none !important;
    z-index: 999 !important;
    transition: left 0.28s ease !important;
    border-radius: 0 !important;
    box-shadow: 4px 0 20px rgba(0, 0, 0, 0.7) !important;
    overflow-y: auto !important;
  }

  .docs-sidebar.active { left: 0 !important; }
}

.mobile-docs-bar { display: none; }

@media (min-width: 769px) {
  .docs-container {
    display: flex !important;
    gap: 2rem !important;
    max-width: 1400px !important;
    margin: 0 auto !important;
    padding: 2rem 1rem !important;
  }

  .docs-sidebar {
    display: block !important;
    position: sticky !important;
    top: 80px !important;
    left: auto !important;
    width: 260px !important;
    flex-shrink: 0 !important;
    align-self: flex-start !important;
    max-height: calc(100vh - 100px) !important;
    overflow-y: auto !important;
    background: var(--bg-secondary) !important;
    padding: 1.25rem !important;
    border-radius: var(--border-radius) !important;
    border: 1px solid var(--border-color) !important;
    box-shadow: none !important;
    z-index: 10 !important;
  }

  .docs-main {
    flex: 1 !important;
    min-width: 0 !important;
    max-width: 880px !important;
  }
}

@media (max-width: 768px) {
  .docs-container {
    display: flex !important;
    flex-direction: column !important;
    padding: 1rem 0.75rem !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }

  .docs-main {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }

  .docs-main > h1 {
    font-size: 1.45rem !important;
    flex-wrap: wrap !important;
  }

  .docs-main > p.lead {
    font-size: 0.92rem !important;
    margin-bottom: 1.5rem !important;
    padding-bottom: 1.25rem !important;
  }

  .info-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 0.5rem !important;
  }

  .endpoint-card {
    padding: 1rem !important;
    width: 100% !important;
    box-sizing: border-box !important;
    margin-bottom: 0.875rem !important;
  }

  .endpoint-header {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 0.4rem !important;
  }

  .endpoint-cost { margin-left: 0 !important; }

  .endpoint-path {
    font-size: 0.8125rem !important;
    word-break: break-all !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  pre {
    padding: 0.75rem 0.875rem !important;
    font-size: 0.75rem !important;
    max-width: 100% !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
  }

  .token-table, .param-table {
    min-width: 100% !important;
  }

  .footer .container {
    flex-direction: column;
    gap: 1.25rem;
    text-align: center;
  }
}

.form-row {
  grid-template-columns: 1fr;
}
.stats-grid {
  grid-template-columns: 1fr;
}
.features-grid,
.countries-grid {
  grid-template-columns: 1fr;
  gap: 1.5rem;
}
.search-type-selector {
  flex-direction: column;
}
.search-input-wrapper {
  flex-direction: column;
}
.token-container {
  flex-direction: column;
}
.result-item {
  flex-direction: column;
  gap: 0.5rem;
}
.result-label {
  min-width: auto;
}

@media (max-width: 768px) {
  .result-card-responsive {
    padding: 1rem !important;
  }
  .result-card-responsive .result-header h4 {
    font-size: 1rem !important;
  }
  .result-card-responsive .result-field-item {
    padding: 0.625rem !important;
  }
  .result-card-responsive .result-field-label {
    font-size: 0.8125rem !important;
  }
  .result-card-responsive .result-field-value {
    font-size: 0.875rem !important;
    padding-left: 0 !important;
  }
  .auth-container {
    padding: 0.75rem;
  }
  .auth-box {
    padding: 1.25rem;
  }
  .auth-logo {
    width: 50px;
    height: 50px;
  }
  .auth-header h1 {
    font-size: 1.25rem;
  }
  .auth-header h2 {
    font-size: 1.125rem;
  }
  .form-group {
    margin-bottom: 0.75rem;
  }
  .custom-toast {
    bottom: 1rem;
    right: 1rem;
    left: 1rem;
    max-width: none;
    min-width: auto;
  }
}

@media (max-width: 480px) {
  .container { padding: 0 1rem; }
  .hero-title { font-size: 2rem; }
  .hero { padding: 3rem 0 2rem; }
  .features, .countries, .cta { padding: 4rem 0; }
  .auth-box { padding: 1rem; }
  .dashboard-main, .docs-main { padding: 1.5rem; }
  .section-title { font-size: 2rem; }
  h1 { font-size: 2rem; }
  h2 { font-size: 1.5rem; }
  h3 { font-size: 1.25rem; }
  .logo-img { width: 32px; height: 32px; }
  .auth-logo { width: 45px; height: 45px; margin-bottom: 0.5rem; }
  .auth-header { margin-bottom: 1.25rem; }
  .auth-header h1 { font-size: 1.125rem; margin-bottom: 0.25rem; }
  .auth-header h2 { font-size: 1rem; }
  .auth-header p { font-size: 0.8125rem; }
  .form-group { margin-bottom: 0.625rem; }
  .form-group label { font-size: 0.8125rem; }
  .form-group input, .form-group select { padding: 0.5rem 0.75rem; font-size: 0.8125rem; }
  .btn { padding: 0.625rem 1.25rem; font-size: 0.8125rem; }
  .alert { padding: 0.5rem 0.75rem; font-size: 0.75rem; }
  .feature-card, .country-card { padding: 1.5rem; }
  .search-form-container, .enhanced-search { padding: 1.5rem; }
  .result-card { padding: 1.25rem; }
  .stat-card { padding: 1.5rem; }
  .endpoint-card { padding: 1.5rem; }
  .endpoint-card pre { padding: 1rem; font-size: 0.75rem; }
  .custom-toast { padding: 0.75rem 1rem; font-size: 0.8125rem; }
  .custom-toast i { font-size: 1rem; }
}

.custom-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.95);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  animation: fadeIn 0.2s ease-out;
}

.custom-modal {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  max-width: 450px;
  width: 100%;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
  animation: slideUp 0.3s ease-out;
}

.custom-modal-header {
  padding: 1.5rem;
  border-bottom: 1px solid var(--border-color);
}

.custom-modal-header h3 {
  margin: 0;
  font-size: 1.25rem;
  color: var(--text-primary);
}

.custom-modal-body {
  padding: 1.5rem;
  overflow-y: auto;
}

.custom-modal-body p {
  margin: 0 0 1rem 0;
  color: var(--text-secondary);
}

.modal-input {
  width: 100%;
  padding: 0.75rem;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  color: var(--text-primary);
  font-size: 0.9375rem;
}

.modal-input:focus {
  outline: none;
  border-color: #ffffff;
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.08);
}

.custom-modal-footer {
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--border-color);
  display: flex;
  gap: 0.75rem;
  justify-content: flex-end;
}

.custom-toast {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  padding: 0.875rem 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
  z-index: 10001;
  transform: translateX(400px);
  opacity: 0;
  transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
  max-width: 380px;
  min-width: 300px;
}

.custom-toast.show {
  transform: translateX(0);
  opacity: 1;
}

.custom-toast i { font-size: 1.125rem; flex-shrink: 0; }

.custom-toast-success {
  border-left: 4px solid var(--accent-success);
}
.custom-toast-success i { color: var(--accent-success); }

.custom-toast-error {
  border-left: 4px solid var(--accent-danger);
}
.custom-toast-error i { color: var(--accent-danger); }

.custom-toast-info {
  border-left: 4px solid var(--accent-info);
}
.custom-toast-info i { color: var(--accent-info); }

.custom-toast-warning {
  border-left: 4px solid var(--accent-warning);
}
.custom-toast-warning i { color: var(--accent-warning); }

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

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

.custom-modal .form-group { margin-bottom: 1rem; }
.custom-modal .form-group label {
  display: block;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
  font-weight: 500;
}

.custom-modal .form-group small {
  display: block;
  margin-top: 0.25rem;
  color: var(--text-secondary);
  font-size: 0.8rem;
}

.custom-modal .alert {
  padding: 0.75rem 1rem;
  border-radius: 8px;
  margin-bottom: 1rem;
}

.custom-modal .alert-error {
  background: rgba(255, 71, 87, 0.08);
  border-left: 4px solid var(--accent-danger);
  color: var(--accent-danger);
}

.custom-modal .alert-success {
  background: rgba(52, 211, 153, 0.08);
  border-left: 4px solid var(--accent-success);
  color: var(--accent-success);
}

@media (max-width: 768px) {
  .custom-modal { max-width: 95%; }
  .custom-toast {
    right: 1rem;
    left: 1rem;
    bottom: 1rem;
    min-width: auto;
    max-width: none;
  }
}

@media (max-width: 600px) {
  .country-grid .country-card:nth-child(3n) { border-right: 1px solid var(--border-color); }
  .country-grid .country-card:nth-child(4n) { border-right: 1px solid var(--border-color); }
  .country-grid .country-card:nth-child(2n) { border-right: none; }
  .country-grid .country-card:nth-last-child(-n+2) { border-bottom: none; }
  .country-grid .country-card:last-child { border-right: none; border-bottom: none; }
  .hero-stats { gap: 1.5rem; }
  .feat-grid { grid-template-columns: 1fr; }
}

@media (max-width: 400px) {
  .country-grid .country-card { flex: 0 0 100%; width: 100%; border-right: none; }
  .feat-grid { grid-template-columns: 1fr; }
  .hero-stats { flex-direction: column; gap: 1rem; }
}
