/* ==========================================================================
   PANCH VPN — PREMIUM DARK TECH DESIGN SYSTEM
   Mobile-First • High Performance • Neon Aesthetics
   ========================================================================== */

:root {
  --bg-dark: #0A0F1A;
  --bg-darker: #060911;
  --bg-card: rgba(16, 24, 40, 0.75);
  --bg-card-hover: rgba(22, 34, 58, 0.85);
  --bg-input: rgba(10, 15, 26, 0.9);
  
  --border-color: rgba(255, 255, 255, 0.08);
  --border-glow: rgba(0, 209, 255, 0.35);
  --border-purple: rgba(122, 45, 255, 0.35);

  --cyan: #00D1FF;
  --blue: #0B3DFF;
  --purple: #7A2DFF;
  --green: #10B981;
  --red: #EF4444;

  --text-white: #FFFFFF;
  --text-muted: #94A3B8;
  --text-dim: #64748B;

  --font-main: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-heading: 'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-full: 9999px;

  --transition-fast: 0.2s ease;
  --transition-normal: 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

/* RESET & BASE */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-main);
  background-color: var(--bg-dark);
  color: var(--text-white);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
  -webkit-font-smoothing: antialiased;
}

/* AMBIENT GLOWS */
.bg-glow-top {
  position: fixed;
  top: -200px;
  left: 50%;
  transform: translateX(-50%);
  width: 700px;
  height: 500px;
  background: radial-gradient(circle, rgba(11, 61, 255, 0.15) 0%, rgba(122, 45, 255, 0.08) 45%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

.bg-glow-right {
  position: fixed;
  top: 30%;
  right: -250px;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(0, 209, 255, 0.1) 0%, rgba(11, 61, 255, 0.05) 50%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.25rem;
  position: relative;
  z-index: 1;
}

/* TYPOGRAPHY */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.25;
  color: var(--text-white);
}

a {
  color: var(--cyan);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: #fff;
}

.gradient-text {
  background: linear-gradient(135deg, #FFFFFF 20%, var(--cyan) 60%, var(--purple) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline-block;
}

.text-center { text-align: center; }
.text-muted { color: var(--text-muted); }

/* BUTTONS */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 700;
  padding: 0.85rem 1.75rem;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition-normal);
  border: 1px solid transparent;
  min-height: 48px;
  text-align: center;
  user-select: none;
}

.btn-primary {
  background: linear-gradient(135deg, var(--blue) 0%, var(--purple) 100%);
  color: #fff;
  box-shadow: 0 4px 20px rgba(11, 61, 255, 0.35);
}

.btn-primary:hover {
  background: linear-gradient(135deg, #184bff 0%, #893dff 100%);
  box-shadow: 0 6px 28px rgba(0, 209, 255, 0.45);
  transform: translateY(-2px);
  color: #fff;
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-white);
  border-color: var(--border-color);
  backdrop-filter: blur(10px);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--cyan);
  color: #fff;
  transform: translateY(-2px);
}

.btn-outline {
  background: transparent;
  color: var(--text-white);
  border-color: rgba(255, 255, 255, 0.15);
}

.btn-outline:hover {
  border-color: var(--cyan);
  color: var(--cyan);
  background: rgba(0, 209, 255, 0.05);
}

.btn-sm {
  padding: 0.5rem 1.15rem;
  font-size: 0.875rem;
  min-height: 38px;
  border-radius: var(--radius-sm);
}

.btn-lg {
  padding: 1rem 2.25rem;
  font-size: 1.1rem;
  min-height: 54px;
}

.btn-block {
  width: 100%;
}

.pulse-glow {
  animation: pulse-glow-anim 2.5s infinite;
}

@keyframes pulse-glow-anim {
  0%, 100% { box-shadow: 0 4px 20px rgba(11, 61, 255, 0.35); }
  50% { box-shadow: 0 4px 30px rgba(0, 209, 255, 0.6); }
}

/* HEADER */
.site-header {
  position: sticky;
  top: 0;
  left: 0;
  width: 100%;
  background: rgba(10, 15, 26, 0.82);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-color);
  z-index: 100;
  transition: all var(--transition-fast);
}

.header-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.header-logo {
  display: flex;
  align-items: center;
}

.logo-img {
  height: 42px;
  width: auto;
  display: block;
}

.desktop-nav {
  display: none;
  align-items: center;
  gap: 1.75rem;
}

.nav-link {
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--text-muted);
  transition: color var(--transition-fast);
}

.nav-link:hover {
  color: var(--cyan);
}

.header-actions {
  display: none;
  align-items: center;
  gap: 1rem;
}

/* Mobile Hamburger Toggle */
.mobile-menu-toggle {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  background: transparent;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  cursor: pointer;
  padding: 10px;
  z-index: 105;
}

.mobile-menu-toggle .bar {
  width: 100%;
  height: 2px;
  background: var(--text-white);
  border-radius: 2px;
  transition: all var(--transition-fast);
}

.mobile-menu-toggle.active .bar:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.mobile-menu-toggle.active .bar:nth-child(2) {
  opacity: 0;
}

.mobile-menu-toggle.active .bar:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* Mobile Drawer */
.mobile-drawer {
  position: fixed;
  top: 72px;
  left: 0;
  width: 100%;
  height: calc(100vh - 72px);
  background: rgba(10, 15, 26, 0.98);
  backdrop-filter: blur(25px);
  z-index: 102;
  display: none;
  overflow-y: auto;
  padding: 2rem 1.5rem;
  flex-direction: column;
  justify-content: space-between;
}

.mobile-drawer.active {
  display: flex;
}

.mobile-nav {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.mobile-nav-link {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-white);
  padding: 0.5rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.mobile-drawer-footer {
  margin-top: 2rem;
}

/* HERO SECTION */
.hero-section {
  padding: 3rem 0 4rem;
  position: relative;
  overflow: hidden;
}

.hero-container {
  display: flex;
  flex-direction: column-reverse;
  align-items: center;
  gap: 2.5rem;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(0, 209, 255, 0.08);
  border: 1px solid rgba(0, 209, 255, 0.25);
  border-radius: var(--radius-full);
  padding: 0.4rem 1rem;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--cyan);
  margin-bottom: 1.25rem;
}

.hero-title {
  font-size: 2.25rem;
  font-weight: 900;
  margin-bottom: 1.25rem;
  letter-spacing: -0.02em;
}

.hero-subtitle {
  font-size: 1.0625rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 2rem;
  max-width: 540px;
}

.hero-cta-group {
  display: flex;
  flex-direction: column;
  gap: 0.875rem;
  margin-bottom: 2rem;
  width: 100%;
}

.hero-features-row {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  font-size: 0.875rem;
  color: var(--text-muted);
}

.hero-feature-item {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.feat-check {
  color: var(--cyan);
  font-weight: bold;
}

/* Hero Character Visual */
.hero-visual-col {
  width: 100%;
  display: flex;
  justify-content: center;
}

.hero-character-wrapper {
  position: relative;
  width: 280px;
  height: 280px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.glow-disc {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 320px;
  height: 320px;
  background: radial-gradient(circle, rgba(0, 180, 255, 0.12) 0%, rgba(11, 61, 255, 0.06) 50%, transparent 70%);
  filter: blur(35px);
  border-radius: 50%;
  pointer-events: none;
}

.hero-gorilla-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  position: relative;
  z-index: 2;
  filter: drop-shadow(0 15px 35px rgba(0, 0, 0, 0.7));
}

/* SECTION HEADERS */
.section {
  padding: 4.5rem 0;
  position: relative;
}

.section-header {
  margin-bottom: 3rem;
}

.section-label {
  display: inline-block;
  font-size: 0.8125rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--cyan);
  margin-bottom: 0.5rem;
}

.section-title {
  font-size: 1.875rem;
  margin-bottom: 0.75rem;
  letter-spacing: -0.01em;
}

.section-subtitle {
  font-size: 1rem;
  color: var(--text-muted);
  max-width: 600px;
  margin: 0 auto;
}

/* HOW IT WORKS */
.steps-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
}

.step-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.75rem 1.5rem;
  position: relative;
  transition: all var(--transition-normal);
  backdrop-filter: blur(12px);
}

.step-card:hover {
  border-color: var(--border-glow);
  transform: translateY(-4px);
  box-shadow: 0 10px 30px rgba(0, 209, 255, 0.08);
}

.step-number {
  position: absolute;
  top: 1.25rem;
  right: 1.5rem;
  font-family: var(--font-heading);
  font-size: 2rem;
  font-weight: 900;
  color: rgba(255, 255, 255, 0.05);
}

.step-icon-wrap {
  width: 52px;
  height: 52px;
  background: rgba(0, 209, 255, 0.08);
  border: 1px solid rgba(0, 209, 255, 0.2);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--cyan);
  margin-bottom: 1.25rem;
}

.step-title {
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
}

.step-desc {
  font-size: 0.9375rem;
  color: var(--text-muted);
  line-height: 1.5;
}

/* PRICING SECTION */
.pricing-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.75rem;
  max-width: 1140px;
  margin: 0 auto;
}

@media (min-width: 860px) {
  .pricing-grid {
    grid-template-columns: repeat(3, 1fr);
    align-items: stretch;
  }
}

.pricing-card {
  background: linear-gradient(180deg, rgba(16, 24, 40, 0.85) 0%, rgba(10, 15, 26, 0.95) 100%);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 2.25rem 1.5rem;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: all var(--transition-normal);
}

.pricing-card:hover {
  transform: translateY(-4px);
  border-color: rgba(0, 209, 255, 0.4);
  box-shadow: 0 10px 30px rgba(0, 209, 255, 0.15);
}

.pricing-card.featured-card {
  border-color: var(--border-glow);
  box-shadow: 0 0 35px rgba(11, 61, 255, 0.25);
  background: linear-gradient(180deg, rgba(20, 30, 52, 0.92) 0%, rgba(10, 15, 26, 0.98) 100%);
}

.pricing-badge.badge-accent {
  background: linear-gradient(135deg, #10B981 0%, #00D1FF 100%);
}

.renew-btn-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.5rem;
}

@media (max-width: 480px) {
  .renew-btn-grid {
    grid-template-columns: 1fr;
  }
}

.pricing-badge {
  position: absolute;
  top: -14px;
  left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(135deg, var(--cyan) 0%, var(--purple) 100%);
  color: #060911;
  font-family: var(--font-heading);
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 0.35rem 1.15rem;
  border-radius: var(--radius-full);
}

.pricing-header {
  text-align: center;
  margin-bottom: 1.5rem;
}

.pricing-plan-name {
  font-size: 1.75rem;
  margin-bottom: 0.25rem;
}

.pricing-plan-period {
  font-size: 0.9375rem;
  color: var(--text-muted);
}

.pricing-price-wrap {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 0.25rem;
  margin-bottom: 1.75rem;
  padding-bottom: 1.75rem;
  border-bottom: 1px solid var(--border-color);
}

.price-currency {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--cyan);
}

.price-amount {
  font-family: var(--font-heading);
  font-size: 3.5rem;
  font-weight: 900;
  line-height: 1;
}

.price-interval {
  font-size: 1rem;
  color: var(--text-muted);
}

.pricing-features-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  margin-bottom: 2rem;
}

.pricing-features-list li {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  font-size: 0.9375rem;
  line-height: 1.45;
}

.check-icon {
  color: var(--cyan);
  font-weight: bold;
  font-size: 1.1rem;
  line-height: 1.2;
}

.pricing-guarantee {
  text-align: center;
  font-size: 0.8125rem;
  color: var(--text-dim);
  margin-top: 1rem;
}

/* PROTOCOLS */
.protocols-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

.protocol-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  transition: all var(--transition-normal);
  backdrop-filter: blur(12px);
}

.protocol-card:hover {
  border-color: var(--border-purple);
  transform: translateY(-4px);
  box-shadow: 0 10px 30px rgba(122, 45, 255, 0.12);
}

.protocol-icon-box {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin-bottom: 1.25rem;
}

.proto-hy2 { background: rgba(11, 61, 255, 0.15); border: 1px solid rgba(11, 61, 255, 0.3); }
.proto-mieru { background: rgba(0, 209, 255, 0.15); border: 1px solid rgba(0, 209, 255, 0.3); }
.proto-naive { background: rgba(122, 45, 255, 0.15); border: 1px solid rgba(122, 45, 255, 0.3); }

.protocol-tag {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin-bottom: 0.35rem;
}

.protocol-name {
  font-size: 1.35rem;
  margin-bottom: 0.75rem;
}

.protocol-desc {
  font-size: 0.9375rem;
  color: var(--text-muted);
  margin-bottom: 1.25rem;
  line-height: 1.55;
}

.protocol-status {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--cyan);
}

/* DEVICES */
.devices-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}

.device-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.5rem 1.25rem;
  text-align: center;
  transition: all var(--transition-normal);
}

.device-card:hover {
  border-color: var(--border-glow);
  transform: translateY(-3px);
}

.device-icon {
  font-size: 2.25rem;
  margin-bottom: 0.75rem;
}

.device-name {
  font-size: 1.15rem;
  margin-bottom: 0.35rem;
}

.device-apps {
  font-size: 0.8125rem;
  color: var(--text-muted);
  margin-bottom: 0.85rem;
}

.device-link {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--cyan);
}

/* INSTRUCTIONS */
.os-tabs-nav {
  display: flex;
  overflow-x: auto;
  gap: 0.5rem;
  padding-bottom: 0.5rem;
  margin-bottom: 2rem;
  -webkit-overflow-scrolling: touch;
}

.os-tab-btn {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  padding: 0.65rem 1.25rem;
  border-radius: var(--radius-md);
  font-family: var(--font-heading);
  font-size: 0.9375rem;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.os-tab-btn.active {
  background: var(--blue);
  color: #fff;
  border-color: var(--cyan);
  box-shadow: 0 4px 15px rgba(11, 61, 255, 0.4);
}

.instructions-content-wrap {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 2rem 1.5rem;
}

.video-guide-placeholder {
  background: rgba(11, 61, 255, 0.08);
  border: 1px dashed rgba(0, 209, 255, 0.3);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 2rem;
}

.video-guide-icon {
  font-size: 2rem;
}

.video-guide-text h4 {
  font-size: 1.05rem;
  margin-bottom: 0.25rem;
}

.video-guide-text p {
  font-size: 0.875rem;
  color: var(--text-muted);
}

.tab-pane {
  display: none;
}

.tab-pane.active {
  display: block;
}

.steps-timeline {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.timeline-step {
  display: flex;
  align-items: flex-start;
  gap: 1.25rem;
}

.timeline-num {
  width: 36px;
  height: 36px;
  flex-shrink: 0;
  background: linear-gradient(135deg, var(--cyan) 0%, var(--purple) 100%);
  color: #060911;
  font-family: var(--font-heading);
  font-weight: 800;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.timeline-body h4 {
  font-size: 1.05rem;
  margin-bottom: 0.25rem;
}

.timeline-body p {
  font-size: 0.9375rem;
  color: var(--text-muted);
}

/* FAQ ACCORDION */
.faq-container {
  max-width: 800px;
}

.accordion-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.accordion-item {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: all var(--transition-fast);
}

.accordion-item.active {
  border-color: var(--border-glow);
}

.accordion-header {
  width: 100%;
  padding: 1.25rem 1.5rem;
  background: transparent;
  border: none;
  color: var(--text-white);
  font-family: var(--font-heading);
  font-size: 1.05rem;
  font-weight: 600;
  text-align: left;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  cursor: pointer;
}

.acc-arrow {
  color: var(--cyan);
  font-weight: bold;
  transition: transform var(--transition-fast);
}

.accordion-item.active .acc-arrow {
  transform: rotate(180deg);
}

.accordion-collapse {
  max-height: 0;
  overflow: hidden;
  transition: max-height var(--transition-normal);
}

.accordion-body {
  padding: 0 1.5rem 1.5rem;
  font-size: 0.9375rem;
  color: var(--text-muted);
  line-height: 1.6;
}

/* FOOTER */
.site-footer {
  background: var(--bg-darker);
  border-top: 1px solid var(--border-color);
  padding: 4rem 0 2rem;
  margin-top: 4rem;
}

.footer-container {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
  margin-bottom: 3rem;
}

.footer-logo img {
  height: 40px;
  width: auto;
  margin-bottom: 1rem;
}

.footer-brand-desc {
  font-size: 0.875rem;
  color: var(--text-muted);
  max-width: 320px;
}

.footer-heading {
  font-size: 1rem;
  margin-bottom: 1.25rem;
  color: var(--text-white);
}

.footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.footer-links a {
  font-size: 0.875rem;
  color: var(--text-muted);
}

.footer-links a:hover {
  color: var(--cyan);
}

.footer-contact-text {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

.support-email-link {
  font-family: var(--font-heading);
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--cyan);
}

.footer-bottom {
  padding-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.04);
}

.footer-bottom-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.8125rem;
  color: var(--text-dim);
  text-align: center;
}

/* MODALS */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(6, 9, 17, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  z-index: 200;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  overflow-y: auto;
}

.modal-overlay.active {
  display: flex;
}

.modal-dialog {
  background: #0D1527;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 440px;
  padding: 2.25rem 1.75rem;
  position: relative;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.7);
  animation: modal-scale 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-dialog.modal-lg {
  max-width: 720px;
}

.modal-dialog.modal-sm {
  max-width: 380px;
}

@keyframes modal-scale {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}

.modal-close {
  position: absolute;
  top: 1rem;
  right: 1.25rem;
  background: transparent;
  border: none;
  font-size: 1.75rem;
  color: var(--text-dim);
  cursor: pointer;
  line-height: 1;
}

.modal-close:hover {
  color: #fff;
}

.modal-header {
  margin-bottom: 1.75rem;
}

.modal-logo-icon {
  margin-bottom: 0.75rem;
}

.modal-title {
  font-size: 1.5rem;
  margin-bottom: 0.35rem;
}

.modal-subtitle {
  font-size: 0.875rem;
  color: var(--text-muted);
}

.form-group {
  margin-bottom: 1.25rem;
}

.form-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.form-input {
  width: 100%;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 0.85rem 1rem;
  color: var(--text-white);
  font-family: var(--font-main);
  font-size: 1rem;
  outline: none;
  transition: border-color var(--transition-fast);
}

.form-input:focus {
  border-color: var(--cyan);
  box-shadow: 0 0 12px rgba(0, 209, 255, 0.25);
}

.form-hint {
  display: block;
  font-size: 0.75rem;
  color: var(--text-dim);
  margin-top: 0.4rem;
}

.form-alert {
  padding: 0.75rem 1rem;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  margin-bottom: 1.25rem;
}

.form-alert.alert-error {
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid var(--red);
  color: #FCA5A5;
}

.form-alert.alert-info {
  background: rgba(0, 209, 255, 0.15);
  border: 1px solid var(--cyan);
  color: #A5F3FC;
}

/* CABINET UI */
.cabinet-dialog {
  max-height: 90vh;
  overflow-y: auto;
}

.cabinet-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 1.5rem;
}

.cabinet-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.cabinet-heading {
  font-size: 1.25rem;
}

.cabinet-user-email {
  font-size: 0.8125rem;
  color: var(--text-muted);
}

.cabinet-body {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.cabinet-card {
  background: rgba(16, 24, 40, 0.65);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.5rem;
}

.card-header-flex {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.card-meta-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-dim);
}

.sub-plan-title {
  font-size: 1.2rem;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.85rem;
  border-radius: var(--radius-full);
  font-size: 0.8125rem;
  font-weight: 700;
}

.status-badge.active {
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid var(--green);
  color: var(--green);
}

.status-badge.expired {
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid var(--red);
  color: var(--red);
}

.badge-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: currentColor;
}

.sub-details-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  background: rgba(0, 0, 0, 0.25);
  padding: 1rem;
  border-radius: var(--radius-sm);
}

.sub-detail-item {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.detail-label {
  font-size: 0.75rem;
  color: var(--text-dim);
}

.detail-val {
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 700;
}

.detail-val.highlight {
  color: var(--cyan);
}

.card-title {
  font-size: 1.1rem;
  margin-bottom: 0.35rem;
}

.card-desc {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.url-copy-box {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.url-input {
  flex: 1;
  min-width: 0;
  width: 100%;
  background: #060911;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 0.75rem 1rem;
  color: var(--cyan);
  font-family: monospace;
  font-size: 0.875rem;
  outline: none;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.btn-copy {
  flex-shrink: 0;
  white-space: nowrap;
}

@media (max-width: 420px) {
  .url-copy-box {
    flex-direction: column;
  }
  .btn-copy {
    width: 100%;
  }
}

.cab-button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

/* History table */
.table-responsive {
  overflow-x: auto;
}

.history-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
  text-align: left;
}

.history-table th, .history-table td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.history-table th {
  color: var(--text-dim);
  font-weight: 600;
}

/* QR Code Modal Box */
.qr-code-box {
  background: #FFFFFF;
  padding: 1.5rem;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.5rem;
}

#qrcodeContainer img, #qrcodeContainer canvas {
  display: block;
  max-width: 100%;
  height: auto;
}

/* TOAST */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 300;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  pointer-events: none;
}

.toast {
  background: rgba(16, 24, 40, 0.95);
  border: 1px solid var(--border-glow);
  backdrop-filter: blur(16px);
  color: #fff;
  padding: 0.85rem 1.25rem;
  border-radius: var(--radius-md);
  font-size: 0.9375rem;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  animation: toast-in 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes toast-in {
  from { opacity: 0; transform: translateY(15px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ==========================================================================
   RESPONSIVE MEDIA QUERIES
   ========================================================================== */

/* Tablets and up (768px+) */
@media (min-width: 768px) {
  .hero-section {
    padding: 5rem 0 6rem;
  }

  .hero-container {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }

  .hero-text-col {
    flex: 1.1;
  }

  .hero-visual-col {
    flex: 0.9;
    justify-content: flex-end;
  }

  .hero-character-wrapper {
    width: 380px;
    height: 380px;
  }

  .glow-disc {
    width: 440px;
    height: 440px;
  }

  .hero-title {
    font-size: 3rem;
  }

  .hero-cta-group {
    flex-direction: row;
  }

  .steps-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .protocols-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .devices-grid {
    grid-template-columns: repeat(5, 1fr);
  }

  .footer-container {
    grid-template-columns: 2fr 1fr 1fr 1.5fr;
  }

  .footer-bottom-inner {
    flex-direction: row;
    justify-content: space-between;
  }
}

/* Desktop and up (1024px+) */
@media (min-width: 1024px) {
  .desktop-nav {
    display: flex;
  }

  .header-actions {
    display: flex;
  }

  .mobile-menu-toggle {
    display: none;
  }

  .hero-title {
    font-size: 3.5rem;
  }

  .steps-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* Large Desktop (1280px+) */
@media (min-width: 1280px) {
  .hero-character-wrapper {
    width: 420px;
    height: 420px;
  }
}

/* Ultra-compact screens (under 360px) */
@media (max-width: 359px) {
  .hero-title {
    font-size: 1.85rem;
  }

  .hero-character-wrapper {
    width: 240px;
    height: 240px;
  }

  .btn-lg {
    padding: 0.85rem 1.25rem;
    font-size: 0.95rem;
  }

  .devices-grid {
    grid-template-columns: 1fr;
  }
}
