:root {
  --bg-dark: #0f1a24;
  --mobile-clamp-padding-inline: 0.5rem;
  --bg-light: #162737;
  --bg-panel: rgba(19, 35, 49, 0.85);
  --accent: #33d1c4;
  --accent-strong: #12b0a0;
  --accent-soft: #7df5ff;
  --text-primary: #f8fafc;
  --text-secondary: #9fb6c6;
  --success: #73c37e;
  --warning: #f5c36b;
  --danger: #ef767a;
  --radius-large: 28px;
  --radius-medium: 16px;
  --radius-small: 10px;
  --shadow-soft: 0 24px 48px rgba(6, 14, 22, 0.36);
  --shadow-border: inset 0 0 0 1px rgba(125, 245, 255, 0.08);
  font-size: 16px;
}

* {
  box-sizing: border-box;
}

html {
  overflow-x: hidden;
  width: 100%;
}

[hidden],
.form-shell[hidden],
div[hidden],
form[hidden] {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
  height: 0 !important;
  overflow: hidden !important;
  position: absolute !important;
  left: -9999px !important;
}

body {
  margin: 0;
  font-family: "Poppins", "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  background: radial-gradient(140% 120% at 50% 0%, rgba(29, 247, 228, 0.14) 0%, rgba(7, 30, 48, 0.9) 52%, rgba(6, 13, 24, 1) 100%);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  background-attachment: fixed;
  overflow-x: hidden;
  width: 100%;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background: radial-gradient(60% 70% at 80% 10%, rgba(51, 209, 196, 0.16), transparent),
    radial-gradient(45% 40% at 15% 15%, rgba(115, 195, 126, 0.18), transparent);
  z-index: -2;
}

a {
  color: inherit;
  text-decoration: none;
}

a:hover,
a:focus {
  color: var(--accent-soft);
}

nav {
  position: sticky;
  top: 0;
  z-index: 12;
  backdrop-filter: blur(18px);
  background: rgba(6, 16, 26, 0.82);
  border-bottom: 1px solid rgba(51, 209, 196, 0.12);
}

.nav-shell {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1080px;
  margin: 0 auto;
  padding: 0.75rem 1.75rem;
  flex-wrap: wrap;
  gap: 0.75rem 1.5rem;
  position: relative;
}

.nav-actions {
  display: inline-flex;
  align-items: center;
  gap: 1rem;
  margin-left: auto;
  flex-shrink: 0;
}

.language-switcher {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.lang-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid rgba(125, 245, 255, 0.25);
  background: rgba(10, 26, 36, 0.65);
  color: #fff;
  font-size: 1.1rem;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border 0.2s ease;
}

.lang-btn:hover,
.lang-btn:focus {
  transform: translateY(-2px);
  box-shadow: 0 12px 18px rgba(18, 176, 160, 0.28);
}

.lang-btn.active {
  border-color: rgba(125, 245, 255, 0.8);
  box-shadow: 0 16px 24px rgba(18, 176, 160, 0.32);
  background: rgba(51, 209, 196, 0.25);
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-weight: 600;
  font-size: 1.1rem;
  letter-spacing: 0.02em;
}

.brand img {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  box-shadow: 0 12px 20px rgba(18, 176, 160, 0.28);
}

nav ul {
  display: flex;
  list-style: none;
  gap: 1.25rem;
  margin: 0;
  padding: 0;
  flex: 1 1 auto;
  justify-content: center;
  flex-wrap: nowrap;
  align-items: center;
}

nav a {
  font-weight: 600;
  opacity: 0.85;
  transition: opacity 0.2s ease, transform 0.2s ease;
  white-space: nowrap;
  font-feature-settings: normal;
  text-rendering: optimizeLegibility;
  font-size: 0.95rem;
}

nav a:hover,
nav a:focus {
  opacity: 1;
  transform: translateY(-1px);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius-small);
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-strong) 100%);
  color: #031012;
  box-shadow: 0 16px 24px rgba(18, 176, 160, 0.26);
}

.btn-secondary {
  background: rgba(51, 209, 196, 0.1);
  color: var(--accent-soft);
  border: 1px solid rgba(51, 209, 196, 0.2);
}

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid rgba(125, 245, 255, 0.15);
}

.btn-back {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-secondary);
  border: 1px solid rgba(255, 255, 255, 0.18);
  font-size: 0.9rem;
  font-weight: 500;
  padding: 0.6rem 1.25rem;
}

.btn-back:hover,
.btn-back:focus-visible {
  background: rgba(255, 255, 255, 0.16);
  color: #ffffff;
  outline: none;
}

.btn:hover {
  transform: translateY(-2px);
}

.hero {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  align-items: center;
  gap: 2.5rem;
  max-width: 1100px;
  margin: 5rem auto 3rem;
  padding: 0 1.75rem;
}

.hero-card {
  background: rgba(13, 22, 34, 0.82);
  padding: 2.75rem;
  border-radius: var(--radius-large);
  box-shadow: var(--shadow-soft);
  border: 1px solid rgba(125, 245, 255, 0.08);
  position: relative;
}

.hero-card::after {
  content: "🛡";
  position: absolute;
  right: 2.5rem;
  top: 2.4rem;
  font-size: 2rem;
  opacity: 0.35;
}

.hero h1 {
  font-size: clamp(2.4rem, 5vw, 3.2rem);
  margin-bottom: 1rem;
  line-height: 1.15;
}

.hero p {
  color: var(--text-secondary);
  margin-bottom: 2rem;
}

.cta-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1.75rem;
}

.hero .notice {
  margin-top: 0.75rem;
}

.hero-visual {
  position: relative;
  display: grid;
  place-items: center;
  min-height: clamp(260px, 32vw, 420px);
}

.hero-visual .hero-glow {
  position: absolute;
  inset: -18%;
  background: radial-gradient(circle at 50% 40%, rgba(51, 209, 196, 0.4), rgba(3, 16, 18, 0.05) 55%, rgba(3, 16, 18, 0));
  border-radius: 48px;
  opacity: 0.85;
  filter: blur(0);
  pointer-events: none;
}

.hero-visual img {
  position: relative;
  width: clamp(240px, 36vw, 420px);
  border-radius: 28px;
  box-shadow: 0 32px 48px rgba(12, 66, 70, 0.5);
  transform: translateY(0);
  transition: transform 0.3s ease;
}

.hero-visual:hover img {
  transform: translateY(-6px);
}

.stats,
.features,
.testimonials,
.faq,
.cta,
.pricing,
.form-grid,
.access-panels {
  max-width: 1080px;
  padding: 0 1.75rem;
  margin: 3rem auto;
}

.payment-method-selector {
  margin-bottom: 1.75rem;
}

.payment-method-selector h4 {
  margin-bottom: 0.75rem;
}

.method-options {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.payment-method-option {
  position: relative;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  width: 100%;
  box-sizing: border-box;
}

.payment-method-option input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.payment-method-option > span {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 1rem 1.25rem;
  border-radius: var(--radius-small);
  border: 1px solid rgba(148, 163, 184, 0.35);
  background: rgba(15, 23, 42, 0.35);
  font-weight: 600;
  font-size: 1.05rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
  width: 100%;
  box-sizing: border-box;
  min-height: 48px; /* Ensure consistent height */
}

.payment-method-option small {
  display: block;
  margin-top: 0.5rem;
  padding: 0 1.25rem;
  opacity: 0.7;
  font-size: 0.85rem;
  line-height: 1.4;
  width: 100%;
  box-sizing: border-box;
}

.payment-method-option:hover > span {
  border-color: rgba(51, 209, 196, 0.4);
  box-shadow: 0 4px 12px rgba(18, 176, 160, 0.08);
}

  .payment-method-option input:checked + span {
    border-color: rgba(51, 209, 196, 0.8);
    background: rgba(51, 209, 196, 0.15);
    box-shadow: 0 0 0 2px rgba(51, 209, 196, 0.15);
    /* Prevent any size changes on selection */
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    transform: none;
  }.payment-method-option input:checked + span + small {
  opacity: 1;
  color: var(--accent-soft);
}

/* Currency Switcher Styles */
.currency-switcher {
  padding: 1.5rem;
  border: 2px solid rgba(51, 209, 196, 0.2);
  border-radius: var(--radius-medium);
  background: rgba(3, 12, 18, 0.6);
  backdrop-filter: blur(8px);
}

.currency-switcher h4 {
  margin: 0 0 1rem 0;
  color: var(--accent-soft);
  font-weight: 600;
  font-size: 1.1rem;
}

.currency-options {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.currency-option {
  position: relative;
  cursor: pointer;
}

.currency-option input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.currency-option > span {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 1rem;
  border-radius: 999px;
  border: 1px solid rgba(125, 245, 255, 0.25);
  background: rgba(15, 23, 42, 0.5);
  font-weight: 600;
  font-size: 0.9rem;
  transition: all 0.2s ease;
}

.currency-option:hover > span {
  border-color: rgba(51, 209, 196, 0.4);
  transform: translateY(-1px);
}

  .currency-option input:checked + span {
    border-color: rgba(51, 209, 196, 0.8);
    background: rgba(51, 209, 196, 0.2);
    color: var(--accent-soft);
    box-shadow: 0 0 0 2px rgba(51, 209, 196, 0.15);
    /* Prevent any size changes on selection */
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    transform: none;
  }/* Enhanced Plan Selector */
.plan-description {
  display: block;
  margin-top: 0.25rem;
  opacity: 0.8;
  font-size: 0.85rem;
  font-weight: 400;
}

.plan-price {
  transition: all 0.3s ease;
  font-weight: 700;
}

.payment-flow-wrapper {
  display: grid;
  gap: 1.5rem;
}

.payment-flow-section {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

#payment-flow-crypto .notice {
  backdrop-filter: blur(6px);
}

#payment-flow-crypto .invoice-details {
  display: grid;
  gap: 1rem;
  margin-bottom: 1rem;
}

#payment-flow-crypto .invoice-row {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: 1rem;
  border-radius: 8px;
  background: rgba(8, 145, 178, 0.1);
}

#payment-flow-crypto .invoice-row span {
  font-weight: 600;
  color: #0891b2;
  font-size: 0.9rem;
}

#payment-flow-crypto .invoice-value {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

#payment-flow-crypto .invoice-value code {
  font-family: "Courier New", monospace;
  font-size: 0.95rem;
  padding: 0.5rem 1rem;
  border-radius: 6px;
  background: rgba(15, 23, 42, 0.8);
  color: #06b6d4;
  word-break: break-all;
  display: block;
  margin-bottom: 0.5rem;
}

#payment-flow-crypto .invoice-value .btn {
  padding: 0.45rem 0.8rem;
  font-size: 0.85rem;
  align-self: flex-start;
}

#crypto-option-error,
#crypto-status-message,
#crypto-login-warning {
  font-size: 0.95rem;
}

.section-title {
  font-size: clamp(2rem, 4vw, 2.6rem);
  margin-bottom: 0.5rem;
}

.section-subtitle {
  color: var(--text-secondary);
  margin-bottom: 2rem;
  max-width: 640px;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.6rem;
}

.feature-grid {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.feature-grid .card {
  height: 100%;
}

@media (min-width: 960px) {
  .feature-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.card {
  background: var(--bg-panel);
  border-radius: var(--radius-medium);
  padding: 1.8rem;
  border: 1px solid rgba(125, 245, 255, 0.08);
  box-shadow: var(--shadow-border);
}

.card h3 {
  margin-top: 0;
  margin-bottom: 0.75rem;
}

.stats-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
}

.stats-bar .stat {
  flex: 1 1 200px;
  background: rgba(33, 167, 150, 0.12);
  padding: 1.5rem;
  border-radius: var(--radius-medium);
  border: 1px solid rgba(51, 209, 196, 0.2);
}

.stats-bar strong {
  font-size: 2.1rem;
  display: block;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.8rem;
  background: rgba(51, 209, 196, 0.16);
  color: var(--accent-soft);
  border-radius: 999px;
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.pricing-wrapper {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.75rem;
}

.pricing-card {
  position: relative;
  background: rgba(16, 27, 40, 0.92);
  padding: 2.4rem 2rem;
  border-radius: var(--radius-medium);
  border: 1px solid rgba(125, 245, 255, 0.12);
  box-shadow: var(--shadow-soft);
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  overflow: hidden;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.pricing-card::before {
  content: "";
  position: absolute;
  inset: -45% 10% 65% -20%;
  background: radial-gradient(circle at top, rgba(125, 245, 255, 0.18), transparent 60%);
  opacity: 0.4;
  pointer-events: none;
}

.pricing-card > * {
  position: relative;
  z-index: 1;
}

.pricing-card:hover {
  transform: translateY(-6px);
  border-color: rgba(125, 245, 255, 0.28);
  box-shadow: 0 24px 48px rgba(5, 20, 30, 0.45);
}

.pricing-card.highlight {
  border-color: rgba(125, 245, 255, 0.45);
  background: linear-gradient(165deg, rgba(18, 40, 54, 0.95), rgba(12, 26, 38, 0.92));
  box-shadow: 0 28px 54px rgba(14, 86, 96, 0.5);
}

.pricing-card.highlight::before {
  inset: -35% -10% 55% -30%;
  background: radial-gradient(circle at 25% 10%, rgba(51, 209, 196, 0.35), transparent 55%);
  opacity: 0.55;
}

.price {
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
  font-weight: 700;
  flex-wrap: wrap;
  row-gap: 0.4rem;
  margin: 0;
}

.price-amount {
  font-size: clamp(2.6rem, 5vw, 3.4rem);
  line-height: 1;
  letter-spacing: -0.02em;
  color: #ffffff;
  max-width: 100%;
  overflow-wrap: break-word;
  word-break: break-word;
}

/* Make crypto prices smaller to prevent overflow */
.price-amount[data-crypto]:not([data-crypto=""]):not([data-crypto="Loading..."]) {
  font-size: clamp(1.6rem, 3.5vw, 2.2rem);
}

.price-interval {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-secondary);
  background: rgba(125, 245, 255, 0.12);
  padding: 0.25rem 0.75rem;
  border-radius: 999px;
  line-height: 1.2;
}

.pricing-card.highlight .price-amount {
  color: var(--accent-soft);
}

.pricing-card.highlight .price-interval {
  background: rgba(51, 209, 196, 0.2);
  color: #dcfdf9;
}

.savings {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin: 0;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  background: rgba(51, 209, 196, 0.16);
  color: var(--accent-soft);
  font-weight: 600;
  font-size: 0.85rem;
  letter-spacing: 0.01em;
}

.pricing-card.highlight .savings {
  background: rgba(51, 209, 196, 0.28);
  color: #f0fffb;
}

.feature-list {
  display: grid;
  gap: 0.65rem;
  padding: 0;
  margin: 0;
  list-style: none;
}

.feature-list li::before {
  content: "✔";
  color: var(--accent);
  margin-right: 0.5rem;
}

.testimonial-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}

.testimonial {
  background: rgba(11, 20, 30, 0.9);
  padding: 1.8rem;
  border-radius: var(--radius-medium);
  border: 1px solid rgba(51, 209, 196, 0.14);
  font-style: italic;
  position: relative;
}

.testimonial::before {
  content: "\201C";
  position: absolute;
  top: -24px;
  left: 18px;
  font-size: 6rem;
  color: rgba(125, 245, 255, 0.18);
}

.faq details {
  background: rgba(13, 24, 35, 0.86);
  padding: 1.4rem 1.6rem;
  border-radius: var(--radius-medium);
  border: 1px solid rgba(125, 245, 255, 0.1);
}

.faq details + details {
  margin-top: 1rem;
}

.faq summary {
  font-weight: 600;
  cursor: pointer;
}

footer {
  padding: 2rem 0;
  margin-top: 4rem;
  text-align: center;
  color: var(--text-secondary);
  background: rgba(6, 16, 26, 0.82);
  border-top: 1px solid rgba(51, 209, 196, 0.08);
}

.form-shell {
  background: rgba(13, 24, 35, 0.88);
  padding: 2rem;
  border-radius: var(--radius-medium);
  border: 1px solid rgba(125, 245, 255, 0.1);
  display: grid;
  gap: 1rem;
  box-shadow: var(--shadow-soft);
}

.form-shell label {
  font-weight: 600;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.form-shell input,
.form-shell select,
.form-shell textarea {
  padding: 0.9rem 1rem;
  border-radius: var(--radius-small);
  border: 1px solid rgba(125, 245, 255, 0.2);
  background: rgba(5, 14, 24, 0.65);
  color: var(--text-primary);
  font: inherit;
  transition: border 0.2s ease, box-shadow 0.2s ease;
}

.form-shell input:focus,
.form-shell select:focus,
.form-shell textarea:focus {
  border-color: rgba(125, 245, 255, 0.5);
  box-shadow: 0 0 0 3px rgba(125, 245, 255, 0.18);
  outline: none;
}

.plan-selector {
  display: grid;
  gap: 1rem;
  padding: 1.5rem;
  border: 2px solid rgba(51, 209, 196, 0.2);
  border-radius: var(--radius-medium);
  background: rgba(3, 12, 18, 0.6);
  backdrop-filter: blur(8px);
}

.plan-selector legend {
  padding: 0 1rem;
  color: var(--accent-soft);
  font-weight: 600;
  font-size: 1.1rem;
  background: rgba(3, 12, 18, 0.9);
  border-radius: var(--radius-small);
}

.plan-selector label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.1rem 1.4rem;
  border-radius: var(--radius-small);
  border: 1px solid rgba(125, 245, 255, 0.18);
  background: rgba(5, 16, 26, 0.78);
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.plan-selector label::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(51, 209, 196, 0.1), transparent);
  transition: left 0.5s ease;
}

.plan-selector label:hover::before {
  left: 100%;
}

.plan-selector label:hover {
  border-color: rgba(51, 209, 196, 0.4);
  transform: translateY(-2px);
  box-shadow: 0 8px 16px rgba(18, 176, 160, 0.12);
}

.plan-selector input {
  margin-right: 1rem;
}

.plan-selector label.active,
.plan-selector input[type="radio"]:checked + span + .tag {
  border-color: rgba(51, 209, 196, 0.8);
  transform: translateY(-2px);
  box-shadow: 0 16px 24px rgba(18, 176, 160, 0.25);
  background: rgba(51, 209, 196, 0.05);
}

.plan-selector input[type="radio"]:checked ~ .tag {
  background: rgba(51, 209, 196, 0.3);
  color: #ffffff;
  box-shadow: 0 0 12px rgba(51, 209, 196, 0.4);
}

.tag {
  background: rgba(51, 209, 196, 0.16);
  color: var(--accent-soft);
  border-radius: 999px;
  padding: 0.25rem 0.7rem;
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.notice {
  border: 1px dashed rgba(115, 195, 126, 0.6);
  border-radius: var(--radius-small);
  padding: 1rem 1.25rem;
  background: rgba(12, 76, 68, 0.2);
  color: var(--text-secondary);
}

.card > .notice,
.form-shell > .notice {
  margin-top: 1.25rem;
}

.config-display {
  margin-top: 1.5rem;
  padding: 1.5rem;
  border-radius: var(--radius-medium);
  border: 1px solid rgba(125, 245, 255, 0.14);
  background: rgba(5, 14, 24, 0.65);
  box-shadow: var(--shadow-border);
  display: grid;
  gap: 1rem;
}

.config-pre {
  background: rgba(2, 8, 14, 0.9);
  border: 1px solid rgba(125, 245, 255, 0.1);
  border-radius: var(--radius-small);
  padding: 1rem;
  max-height: 220px;
  overflow-y: auto;
  white-space: pre-wrap;
  font-family: "Fira Code", "Courier New", monospace;
  font-size: 0.85rem;
  line-height: 1.4;
}

.toast {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  padding: 1rem 1.5rem;
  background: rgba(16, 164, 148, 0.95);
  color: #011012;
  border-radius: var(--radius-small);
  box-shadow: 0 18px 32px rgba(0, 0, 0, 0.24);
  transform: translateY(20px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease, transform 0.3s ease;
  font-weight: 600;
  z-index: 20;
}

.toast.visible {
  transform: translateY(0);
  opacity: 1;
}

.table-mini {
  width: 100%;
  border-collapse: collapse;
  background: rgba(6, 18, 28, 0.9);
  border-radius: var(--radius-small);
  overflow: hidden;
}

.table-mini th,
.table-mini td {
  padding: 0.9rem 1.1rem;
  border-bottom: 1px solid rgba(125, 245, 255, 0.08);
  text-align: left;
}

.table-mini th {
  background: rgba(51, 209, 196, 0.12);
  font-weight: 600;
  color: var(--accent-soft);
}

.table-mini tr:last-child td {
  border-bottom: none;
}

.config-section {
  margin: 1.5rem 0;
  padding: 1.5rem;
  background: rgba(6, 18, 28, 0.7);
  border-radius: var(--radius-medium);
  border: 1px solid rgba(125, 245, 255, 0.1);
}

.config-section h4 {
  margin: 0 0 1rem 0;
  color: var(--accent-soft);
  font-size: 1.1rem;
}

.vless-container {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem;
  background: rgba(3, 16, 18, 0.8);
  border-radius: var(--radius-small);
  border: 1px solid rgba(51, 209, 196, 0.2);
}

.vless-url {
  flex: 1;
  font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
  font-size: 0.85rem;
  color: var(--accent);
  word-break: break-all;
  cursor: pointer;
  padding: 0.5rem;
  border-radius: 4px;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.vless-url.is-ready {
  color: var(--accent);
}

.vless-url:not(.is-ready) {
  color: rgba(255, 255, 255, 0.6);
  cursor: default;
}

/* Ensure VLESS link sits on its own line and the download button is below it */
.vless-url {
  display: block; /* force its own line */
  margin: 0.5rem 0 0.25rem 0;
}

.download-btn {
  display: inline-block;
  margin-top: 0.5rem;
}

.copy-btn[disabled],
.btn[disabled] {
  opacity: 0.6;
  cursor: not-allowed;
  box-shadow: none;
}

.copy-btn[disabled]:hover,
.btn[disabled]:hover {
  transform: none;
}

.copy-btn {
  background: var(--accent);
  color: #031012;
  border: none;
  padding: 0.6rem;
  border-radius: var(--radius-small);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  min-width: 40px;
  height: 40px;
}

.copy-btn:hover {
  background: var(--accent-strong);
  transform: translateY(-1px);
}

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

.config-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 2rem;
  margin-bottom: 1rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(51, 209, 196, 0.2);
}

.config-actions .btn {
  flex: 1;
  min-width: 160px;
}

@media (max-width: 720px) {
  nav ul {
    gap: 1rem;
    font-size: 0.95rem;
  }

  /* Prevent horizontal overflow from shadows/padding on mobile */
  .form-grid,
  .card-grid,
  .form-shell,
  .method-options {
    overflow-x: hidden;
  }

  /* Also ensure gift page containers don't overflow */
  #gift-form-section,
  #gift-form-section .method-options,
  .gift-payment-flow,
  .gift-step,
  .gift-cta {
    overflow-x: hidden;
  }

  /* Reduce horizontal padding to keep content inside viewport */
  .form-shell {
    padding-inline: 0.75rem;
  }

  .method-options {
    padding-inline: 0.25rem;
  }

  /* Slightly reduce inner option padding so long labels wrap inside the viewport */
  .payment-method-option > span {
    padding-inline: 0.75rem;
  }

  /* Clip any overflowing shadows or rounded edge bleed for option cards */
  .payment-method-option,
  .payment-method-option > span,
  .currency-option > span {
    overflow: clip; /* modern, doesn't create scrollbars */
    mask-image: radial-gradient(white, black);
    -webkit-mask-image: -webkit-radial-gradient(white, black); /* ensure smooth clipping on webkit */
  }

  /* Helper class applied when JS detects overflow: reduce horizontal padding and shadow to clamp visuals */
  .overflow-clamped .payment-method-option > span,
  .overflow-clamped .payment-method-option small,
  .overflow-clamped .currency-option > span,
  .overflow-clamped .gift-form-section .payment-method-option > span,
  .overflow-clamped #gift-form-section .payment-method-option > span {
    padding-inline: var(--mobile-clamp-padding-inline) !important;
    box-shadow: none !important;
    border-radius: 8px !important;
  }

  /* Same clipping for gift page option elements */
  #gift-form-section .payment-method-option,
  #gift-form-section .payment-method-option > span,
  #gift-form-section .currency-option > span {
    overflow: clip;
    mask-image: radial-gradient(white, black);
    -webkit-mask-image: -webkit-radial-gradient(white, black);
  }

  /* Tone down shadow spread on mobile to avoid visual overflow */
  .payment-method-option:hover > span,
  .payment-method-option input:checked + span {
    box-shadow: 0 4px 10px rgba(18, 176, 160, 0.06);
  }

  /* Tone down gift page shadows as well */
  #gift-form-section .payment-method-option:hover > span,
  #gift-form-section .payment-method-option input:checked + span {
    box-shadow: 0 4px 10px rgba(18, 176, 160, 0.06);
  }

  .hero-card {
    padding: 2rem;
  }

  .stats-bar {
    flex-direction: column;
  }

  .pricing-card.highlight {
    transform: none;
  }

  .method-options {
    grid-template-columns: 1fr; /* Single column on mobile */
    gap: 1rem;
  }

  .payment-method-option > span {
    justify-content: flex-start;
    min-height: 44px; /* Better touch target */
    align-items: flex-start;
    padding: 1rem 1.25rem;
  }

  /* Prevent payment method options from growing past their container on mobile */
  .payment-method-option {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
  }

  .payment-method-option > span {
    /* Use flex to allow width:100% to be respected and wrap long content */
    display: flex;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: break-word;
  }

  .payment-method-option small {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: break-word;
    padding: 0 1.25rem;
  }

  .payment-method-option small {
    margin-top: 0.25rem;
  }

  /* Disable transform on selected payment methods for mobile */
  .payment-method-option input:checked + span {
    transform: none;
    box-shadow: none;
  }

  /* Explicit rules for gift page to match payment page exactly */
  #gift-form-section .method-options {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  #gift-form-section .payment-method-option {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
  }

  #gift-form-section .payment-method-option > span {
    display: flex;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: break-word;
    justify-content: flex-start;
    min-height: 44px;
    align-items: flex-start;
    padding: 1rem 1.25rem;
  }

  #gift-form-section .payment-method-option small {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: break-word;
    padding: 0 1.25rem;
    margin-top: 0.25rem;
  }

  #gift-form-section .payment-method-option input:checked + span {
    transform: none;
    box-shadow: none;
  }

  .currency-options {
    flex-direction: column;
    gap: 0.75rem;
  }

  .currency-option > span {
    justify-content: flex-start;
    min-height: 40px;
    padding: 0.75rem 1rem;
  }

  /* Disable transform on selected currency options for mobile */
  .currency-option input:checked + span {
    transform: none;
  }
}

@media (max-width: 900px) {
  nav ul {
    gap: 0.6rem;
  }
  
  nav a {
    font-size: 0.9rem;
  }

  /* Improve method options for tablets */
  .method-options {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 0.875rem;
  }

  .payment-method-option > span {
    padding: 0.875rem 1rem;
    font-size: 0.95rem;
  }
}

@media (max-width: 480px) {
  /* Extra small screens */
  .hero-card {
    padding: 1.5rem;
  }

  .hero-card h1 {
    font-size: 1.5rem;
  }

  .section-title {
    font-size: 1.75rem;
  }

  .section-subtitle {
    font-size: 0.9rem;
  }

  .card {
    padding: 1.5rem;
  }

  .form-shell {
    padding: 1.25rem;
  }

  /* Ensure radio buttons are properly sized */
  .payment-method-option input[type="radio"],
  .currency-option input[type="radio"],
  .plan-selector input[type="radio"] {
    width: 18px;
    height: 18px;
    margin-right: 0.75rem;
  }

  /* Better spacing for small screens */
  .method-options {
    gap: 0.75rem;
  }

  .payment-method-option > span {
    padding: 0.75rem 0.875rem;
    font-size: 0.9rem;
  }

  .payment-method-option small {
    font-size: 0.75rem;
    padding: 0 0.875rem;
  }

  /* Improve button touch targets */
  .btn {
    min-height: 48px;
    padding: 0.75rem 1rem;
  }

  /* Better form inputs */
  .form-shell input,
  .form-shell select,
  .form-shell textarea {
    padding: 0.875rem 1rem;
    font-size: 16px;
    width: 100%; /* Ensure full width but contained */
    box-sizing: border-box;
  }

  /* Specifically constrain textarea width on mobile */
  .form-shell textarea {
    max-width: 100%;
    resize: vertical; /* Allow vertical resize only */
  }

  /* Ensure gift form elements don't overflow */
  .gift-wizard-container textarea {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
  }

  /* Improve plan selector */
  .plan-selector label {
    padding: 0.875rem 1rem;
  }

  .plan-selector .tag {
    font-size: 0.8rem;
    padding: 0.25rem 0.6rem;
  }
}

@media (max-width: 768px) {
  .nav-shell {
    padding: 0.75rem 1rem;
    gap: 0.5rem;
  }
  
  .nav-actions {
    gap: 0.5rem;
  }
  
  .language-switcher {
    gap: 0.25rem;
  }
  
  .lang-btn {
    width: 32px;
    height: 32px;
    font-size: 0.9rem;
  }
  
  .btn {
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
  }
  
  nav ul {
    gap: 0.4rem;
    font-size: 0.85rem;
  }
  
  nav ul li a {
    font-size: 0.75rem;
    padding: 0.25rem 0.35rem;
  }
}

@media (max-width: 540px) {
  .nav-shell {
    flex-direction: column;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
  }
  
  .brand {
    font-size: 1.1rem;
    gap: 0.6rem;
  }
  
  .brand img {
    width: 38px;
    height: 38px;
  }

  nav ul {
    flex-wrap: nowrap;
    justify-content: center;
    gap: 0.15rem;
    width: 100%;
    order: 2;
    overflow: visible; /* keep items visible and allow shrinking */
  }
  
  nav ul li a {
    font-size: 0.68rem;
    padding: 0.22rem 0.28rem;
    white-space: nowrap; /* don't wrap individual labels */
    display: inline-block;
  }
  
  /* Allow nav items to shrink instead of wrapping on tiny screens */
  nav ul li {
    flex: 0 1 auto;
    min-width: 0; /* allow shrinking beyond intrinsic content width */
  }

  /* Safety fallback for very narrow viewports */
  @media (max-width: 420px) {
    nav ul li a {
      font-size: 0.62rem;
      padding: 0.18rem 0.22rem;
    }
  }
  
  .nav-actions {
    display: flex !important;
    flex-wrap: wrap !important;
    align-items: center !important;
    justify-content: center !important;
    width: 100% !important;
    order: 1;
    gap: 0.4rem !important;
  }
  
  .language-switcher {
    display: flex !important;
    gap: 0.35rem !important;
    flex-shrink: 0;
    width: 100% !important;
    justify-content: center !important;
    order: 1 !important;
  }
  
  .lang-btn {
    width: 32px !important;
    height: 32px !important;
    font-size: 0.9rem !important;
  }
  
  /* Account buttons - keep them on same line, below language switcher */
  .nav-actions > .btn-secondary,
  .nav-actions > .btn-primary,
  .nav-actions > .nav-account,
  .nav-actions > #logout-btn {
    order: 2 !important;
    flex-grow: 0 !important;
    flex-shrink: 0 !important;
  }
  
  .btn-secondary,
  .btn-primary {
    padding: 0.35rem 0.5rem !important;
    font-size: 0.7rem !important;
    white-space: nowrap;
    min-width: auto;
  }
  
  /* Specifically target nav buttons to make them slightly bigger */
  nav .btn-secondary,
  nav .btn-primary,
  .nav-account,
  #logout-btn {
    padding: 0.35rem 0.5rem !important;
    font-size: 0.7rem !important;
    flex-shrink: 0 !important;
    max-width: fit-content;
    line-height: 1.3 !important;
  }

  .hero {
    margin-top: 3.5rem;
  }
  
  /* Make hero content responsive */
  .hero-card h1 {
    font-size: 1.75rem;
  }
  
  .hero-card p {
    font-size: 0.95rem;
  }

  /* Improve form elements on mobile */
  .form-shell {
    padding: 1.5rem;
  }

  .form-shell input,
  .form-shell select,
  .form-shell textarea {
    font-size: 16px; /* Prevent zoom on iOS */
  }

  /* Better spacing for payment methods */
  .payment-method-selector h4 {
    font-size: 1rem;
    margin-bottom: 0.75rem;
  }

  .payment-method-option > span {
    font-size: 0.95rem;
    padding: 0.875rem 1rem;
  }

  .payment-method-option small {
    font-size: 0.8rem;
    padding: 0 1rem;
  }

  /* Improve plan selector on mobile */
  .plan-selector label {
    padding: 1rem 1.2rem;
    font-size: 0.9rem;
  }

  .plan-selector input[type="radio"] {
    transform: scale(1.1);
  }

  /* Disable transform on selected plan options for mobile */
  .plan-selector label.active,
  .plan-selector input[type="radio"]:checked + span + .tag {
    transform: none;
  }

  /* Better button spacing */
  .btn {
    min-height: 44px; /* iOS touch target */
    font-size: 0.9rem;
  }

  /* Improve notice boxes on mobile */
  .notice {
    padding: 0.875rem 1rem;
    font-size: 0.9rem;
  }

  /* Better spacing for gift functionality */
  .gift-code-item {
    padding: 0.875rem;
  }

  .gift-code-item code {
    font-size: 0.85rem;
  }

  /* Improve sharing options */
  .sharing-options {
    gap: 0.75rem;
  }

  .sharing-options .btn {
    min-width: unset;
    flex: 1;
  }

  /* Ensure gift form payment methods fit properly on mobile */
  .gift-form-section .method-options,
  #gift-form-section .method-options {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }

  .gift-form-section .payment-method-option,
  #gift-form-section .payment-method-option {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
  }

  .gift-form-section .payment-method-option > span,
  #gift-form-section .payment-method-option > span {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    white-space: normal;
    overflow-wrap: break-word;
    word-break: break-word;
    font-size: 0.9rem;
    padding: 0.75rem 0.875rem;
    min-height: 44px;
  }

  .gift-form-section .payment-method-option small,
  #gift-form-section .payment-method-option small {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    white-space: normal;
    overflow-wrap: break-word;
    word-break: break-word;
    font-size: 0.75rem;
    padding: 0 0.875rem;
    margin-top: 0.25rem;
  }

  /* Ensure gift form currency switchers fit properly */
  .gift-form-section .currency-switcher,
  #gift-form-section .currency-switcher {
    padding: 1rem;
  }

  .gift-form-section .currency-options,
  #gift-form-section .currency-options {
    flex-direction: column;
    gap: 0.5rem;
  }

  .gift-form-section .currency-option > span,
  #gift-form-section .currency-option > span {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    white-space: normal;
    overflow-wrap: break-word;
    word-break: break-word;
    padding: 0.6rem 0.8rem;
    font-size: 0.85rem;
  }
}

/* Custom Scrollbar Styles */
/* Webkit browsers (Chrome, Safari, Edge) */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: rgba(3, 12, 18, 0.8);
  border-radius: 10px;
  border: 1px solid rgba(125, 245, 255, 0.1);
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, rgba(51, 209, 196, 0.6), rgba(18, 176, 160, 0.8));
  border-radius: 10px;
  border: 1px solid rgba(51, 209, 196, 0.2);
  transition: all 0.3s ease;
}

::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, rgba(51, 209, 196, 0.8), rgba(18, 176, 160, 1));
  box-shadow: 0 0 8px rgba(51, 209, 196, 0.4);
}

::-webkit-scrollbar-thumb:active {
  background: linear-gradient(180deg, rgba(51, 209, 196, 1), rgba(18, 176, 160, 1));
}

::-webkit-scrollbar-corner {
  background: rgba(3, 12, 18, 0.8);
}

/* Firefox scrollbar styles */
* {
  scrollbar-width: thin;
  scrollbar-color: rgba(51, 209, 196, 0.6) rgba(3, 12, 18, 0.8);
}

/* Enhanced config section scrolling */
.config-section {
  max-height: 300px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(51, 209, 196, 0.6) rgba(3, 12, 18, 0.8);
}

.vless-container {
  max-height: 120px;
  overflow-y: auto;
}

/* Custom styles for any scrollable config areas */
.config-content {
  max-height: 200px;
  overflow-y: auto;
  padding: 1rem;
  background: rgba(3, 16, 18, 0.8);
  border-radius: var(--radius-small);
  border: 1px solid rgba(51, 209, 196, 0.2);
}

/* Gift functionality styles */
.gift-code-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
  background: rgba(3, 16, 18, 0.6);
  border-radius: var(--radius-small);
  border: 1px solid rgba(51, 209, 196, 0.2);
  margin-bottom: 0.8rem;
}

.gift-code-item code {
  flex: 1;
  font-family: 'Monaco', 'Consolas', monospace;
  font-size: 0.9rem;
  padding: 0.5rem;
  background: rgba(0, 0, 0, 0.3);
  border-radius: 4px;
  color: var(--accent-soft);
  word-break: break-all;
}

.gift-result {
  padding: 1.5rem;
  background: rgba(115, 195, 126, 0.1);
  border: 1px solid var(--success);
  border-radius: var(--radius-medium);
  margin-top: 1.5rem;
}

.gift-result h3 {
  margin-top: 0;
  color: var(--success);
}

.sharing-options {
  display: flex;
  gap: 1rem;
  margin-top: 1rem;
  flex-wrap: wrap;
}

.sharing-options .btn {
  min-width: 140px;
}

.telegram-notice {
  background: rgba(51, 209, 196, 0.1);
  border: 1px solid var(--accent);
  border-radius: var(--radius-small);
  padding: 1rem;
  margin: 1.5rem 0;
  text-align: center;
}

.telegram-notice a {
  color: var(--accent-soft);
  text-decoration: underline;
  font-weight: 500;
}

.telegram-notice a:hover {
  color: var(--accent);
}

/* Gift button styles */
.gift-cta-buttons {
  display: flex;
  gap: 1rem;
  margin-top: 1.5rem;
  flex-wrap: wrap;
  justify-content: center;
}

.gift-cta-buttons .btn {
  min-width: 180px;
}

/* Gift card enhancements */
.gift-summary {
  background: rgba(51, 209, 196, 0.05);
  border: 1px solid rgba(51, 209, 196, 0.2);
}

@media (max-width: 768px) {
  .sharing-options {
    flex-direction: column;
  }
  
  .sharing-options .btn {
    min-width: unset;
    width: 100%;
  }
  
  .gift-cta-buttons {
    flex-direction: column;
    align-items: stretch;
  }
  
  .gift-cta-buttons .btn {
    min-width: unset;
    width: 100%;
  }
  
  .gift-code-item {
    flex-direction: column;
    align-items: stretch;
    gap: 0.8rem;
  }
  
  .gift-code-item .btn {
    align-self: center;
    min-width: 120px;
  }
}

/* RTL Support for Farsi/Persian */
[dir="rtl"] {
  text-align: right;
}

[dir="rtl"] .nav-shell {
  flex-direction: row-reverse;
}

[dir="rtl"] .nav-actions {
  flex-direction: row-reverse;
}

[dir="rtl"] .feature-list,
[dir="rtl"] .next-steps {
  text-align: right;
}

[dir="rtl"] .btn-group {
  flex-direction: row-reverse;
}

/* Ensure English words in RTL context maintain proper spacing */
[dir="rtl"] a,
[dir="rtl"] code,
[dir="rtl"] .badge {
  unicode-bidi: embed;
}

/* Keep certain elements LTR even in RTL mode */
[dir="rtl"] input[type="email"],
[dir="rtl"] input[type="url"],
[dir="rtl"] input[name="gift-code"],
[dir="rtl"] input[name="payment-code"],
[dir="rtl"] [data-vless-url],
[dir="rtl"] .language-switcher {
  direction: ltr;
  text-align: left;
}

/* Card grids should respect RTL */
[dir="rtl"] .card-grid {
  direction: rtl;
}

/* Ensure form elements flow correctly in RTL */
[dir="rtl"] label {
  text-align: right;
}

[dir="rtl"] .form-shell {
  text-align: right;
}

/* Hide login/signup forms immediately when user is logged in (prevents flash) */
body.user-logged-in .signup-wizard-container,
body.user-logged-in .login-container,
body.user-logged-in #signin-prompt,
body.user-logged-in #access-panels-heading,
body.user-logged-in .section-subtitle[data-i18n="access-section-subtitle"] {
  display: none !important;
}

/* Show config display immediately when user is logged in (override hidden attribute) */
body.user-logged-in .config-display[hidden] {
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
  height: auto !important;
  overflow: visible !important;
  position: static !important;
  left: auto !important;
}
