/**
 * Mullvad VPN Design System & Component Library
 * Inspired by https://mullvad.net/zh-hans
 * Swedish Privacy Aesthetics: Dark Navy #111C24, Signal Yellow #FDD321, Pure Utilitarian Clean
 */

:root {
  /* Mullvad Core Palette */
  --mullvad-navy-deep: #0B1319;
  --mullvad-navy: #111C24;
  --mullvad-navy-light: #182734;
  --mullvad-navy-card: #1E3040;
  --mullvad-navy-hover: #263C50;
  --mullvad-border: #2A435A;
  --mullvad-border-light: rgba(255, 255, 255, 0.12);

  /* Signature Yellow */
  --mullvad-yellow: #FDD321;
  --mullvad-yellow-hover: #FFE153;
  --mullvad-yellow-active: #E5BD14;
  --mullvad-yellow-glow: rgba(253, 211, 33, 0.35);

  /* Status Colors */
  --mullvad-green: #4ADE80;
  --mullvad-green-dark: #22C55E;
  --mullvad-green-bg: rgba(74, 222, 128, 0.12);
  --mullvad-red: #EF4444;
  --mullvad-red-bg: rgba(239, 68, 68, 0.12);
  --mullvad-blue-accent: #38BDF8;

  /* Typography Colors */
  --text-white: #FFFFFF;
  --text-primary: #F1F5F9;
  --text-secondary: #94A3B8;
  --text-muted: #64748B;
  --text-dark: #111C24;

  /* Shadows & Radii */
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --radius-full: 9999px;

  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.25);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.35);
  --shadow-lg: 0 16px 40px rgba(0, 0, 0, 0.5);
  --shadow-yellow: 0 6px 20px rgba(253, 211, 33, 0.3);

  --transition-fast: 0.18s cubic-bezier(0.16, 1, 0.3, 1);
  --transition-normal: 0.26s cubic-bezier(0.16, 1, 0.3, 1);
}

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background-color: var(--mullvad-navy);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a {
  color: var(--mullvad-yellow);
  text-decoration: none;
  transition: color var(--transition-fast);
}
a:hover {
  color: var(--mullvad-yellow-hover);
}

img, svg {
  vertical-align: middle;
}

/* Layout Containers */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

.container-nav {
  width: 100%;
  max-width: 1320px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Top Announcement Notice Bar */
.top-notice {
  background: var(--mullvad-navy-deep);
  border-bottom: 1px solid var(--mullvad-border);
  color: var(--text-secondary);
  font-size: 0.85rem;
  padding: 8px 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
  text-align: center;
}
.top-notice strong {
  color: var(--mullvad-yellow);
}
.top-notice a {
  color: var(--text-white);
  text-decoration: underline;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.top-notice a:hover {
  color: var(--mullvad-yellow);
}

/* Sticky Header Navigation */
.mullvad-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(17, 28, 36, 0.94);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--mullvad-border);
}

.mullvad-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
  gap: 20px;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.brand-badge {
  background: var(--mullvad-navy-light);
  color: var(--mullvad-yellow);
  font-size: 0.72rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 6px;
  border: 1px solid var(--mullvad-border);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.nav-links {
  display: flex;
  align-items: center;
  list-style: none;
  gap: 6px;
}

.nav-link {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 600;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
}

.nav-link:hover, .nav-link.active {
  color: var(--text-white);
  background: var(--mullvad-navy-light);
}

.nav-link.active {
  color: var(--mullvad-yellow);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.lang-switch {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  color: var(--text-secondary);
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  background: var(--mullvad-navy-light);
  border: 1px solid var(--mullvad-border);
  cursor: pointer;
}

.mobile-nav-toggle {
  display: none;
  background: transparent;
  border: none;
  color: var(--text-white);
  cursor: pointer;
  padding: 8px;
}

/* Mobile Drawer */
.mobile-drawer {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(11, 19, 25, 0.8);
  backdrop-filter: blur(10px);
  z-index: 1050;
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-normal);
}
.mobile-drawer.open {
  opacity: 1;
  visibility: visible;
}
.mobile-drawer-content {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 82%;
  max-width: 320px;
  background: var(--mullvad-navy-deep);
  border-left: 1px solid var(--mullvad-border);
  padding: 32px 24px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  overflow-y: auto;
}
.mobile-drawer-link {
  color: var(--text-primary);
  font-size: 1.05rem;
  font-weight: 600;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  display: block;
}
.mobile-drawer-link.active {
  background: var(--mullvad-navy-light);
  color: var(--mullvad-yellow);
}

/* Standard Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 0.95rem;
  font-weight: 700;
  padding: 12px 24px;
  border-radius: var(--radius-md);
  border: none;
  cursor: pointer;
  transition: all var(--transition-fast);
  text-decoration: none;
  white-space: nowrap;
}

.btn-sm {
  padding: 8px 16px;
  font-size: 0.85rem;
  border-radius: var(--radius-sm);
}

.btn-lg {
  padding: 15px 32px;
  font-size: 1.05rem;
  border-radius: var(--radius-md);
}

.btn-primary {
  background: var(--mullvad-yellow);
  color: var(--text-dark);
  box-shadow: var(--shadow-yellow);
}
.btn-primary:hover {
  background: var(--mullvad-yellow-hover);
  color: var(--text-dark);
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(253, 211, 33, 0.4);
}

.btn-secondary {
  background: var(--mullvad-navy-light);
  color: var(--text-white);
  border: 1px solid var(--mullvad-border);
}
.btn-secondary:hover {
  background: var(--mullvad-navy-hover);
  color: var(--text-white);
  border-color: rgba(255, 255, 255, 0.3);
}

.btn-outline {
  background: transparent;
  color: var(--mullvad-yellow);
  border: 1.5px solid var(--mullvad-yellow);
}
.btn-outline:hover {
  background: rgba(253, 211, 33, 0.12);
  color: var(--mullvad-yellow-hover);
}

/* Hero Section */
.hero-section {
  position: relative;
  padding: 72px 0 60px;
  background: linear-gradient(180deg, var(--mullvad-navy-deep) 0%, var(--mullvad-navy) 100%);
  border-bottom: 1px solid var(--mullvad-border);
  overflow: hidden;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 48px;
  align-items: center;
}

.hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(253, 211, 33, 0.1);
  color: var(--mullvad-yellow);
  border: 1px solid rgba(253, 211, 33, 0.25);
  font-size: 0.85rem;
  font-weight: 700;
  padding: 6px 14px;
  border-radius: var(--radius-full);
  margin-bottom: 20px;
}

.hero-title {
  font-size: 3rem;
  font-weight: 900;
  line-height: 1.15;
  color: var(--text-white);
  margin-bottom: 20px;
  letter-spacing: -0.02em;
}

.hero-title span.highlight {
  color: var(--mullvad-yellow);
}

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

.hero-actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  align-items: center;
  margin-bottom: 24px;
}

/* Notice Banner Box for Bypass Channel */
.bypass-notice-box {
  background: linear-gradient(135deg, rgba(253, 211, 33, 0.12), rgba(253, 211, 33, 0.04));
  border: 1.5px solid rgba(253, 211, 33, 0.4);
  border-radius: var(--radius-lg);
  padding: 24px 28px;
  margin: 32px 0 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}
.bypass-notice-content {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  flex: 1;
  min-width: 280px;
}
.bypass-notice-icon {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(253, 211, 33, 0.15);
  color: var(--mullvad-yellow);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.bypass-notice-title {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--text-white);
  margin-bottom: 4px;
}
.bypass-notice-desc {
  font-size: 0.92rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* Anonymous Account Generator Box */
.account-generator-card {
  background: var(--mullvad-navy-card);
  border: 1px solid var(--mullvad-border);
  border-radius: var(--radius-xl);
  padding: 32px;
  box-shadow: var(--shadow-lg);
  position: relative;
}

.account-generator-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--mullvad-yellow), var(--mullvad-green));
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
}

.account-badge-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.account-rate-tag {
  font-size: 1.5rem;
  font-weight: 900;
  color: var(--mullvad-yellow);
}
.account-rate-sub {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.account-display-box {
  background: var(--mullvad-navy-deep);
  border: 1.5px dashed var(--mullvad-border);
  border-radius: var(--radius-md);
  padding: 20px;
  text-align: center;
  margin-bottom: 20px;
}

.account-number-text {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 1.45rem;
  font-weight: 800;
  color: var(--mullvad-yellow);
  letter-spacing: 2px;
  word-break: break-all;
}

.account-notes {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 24px;
  font-size: 0.88rem;
  color: var(--text-secondary);
}
.account-notes li {
  display: flex;
  align-items: center;
  gap: 8px;
}
.account-notes li svg {
  color: var(--mullvad-green);
  flex-shrink: 0;
}

/* Feature Cards Grid */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 28px;
  margin: 54px 0;
}

.feature-card {
  background: var(--mullvad-navy-card);
  border: 1px solid var(--mullvad-border);
  border-radius: var(--radius-lg);
  padding: 32px 28px;
  transition: transform var(--transition-normal), border-color var(--transition-normal);
}
.feature-card:hover {
  transform: translateY(-4px);
  border-color: rgba(253, 211, 33, 0.5);
}

.feature-icon-wrapper {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-md);
  background: rgba(253, 211, 33, 0.12);
  color: var(--mullvad-yellow);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
}

.feature-title {
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--text-white);
  margin-bottom: 12px;
}

.feature-desc {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.65;
}

/* Platform Download Matrix */
.platform-tabs {
  display: flex;
  gap: 10px;
  margin-bottom: 32px;
  overflow-x: auto;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--mullvad-border);
}

.platform-tab-btn {
  background: transparent;
  color: var(--text-secondary);
  border: none;
  font-size: 0.95rem;
  font-weight: 700;
  padding: 10px 18px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all var(--transition-fast);
  white-space: nowrap;
}
.platform-tab-btn:hover {
  color: var(--text-white);
  background: var(--mullvad-navy-light);
}
.platform-tab-btn.active {
  color: var(--mullvad-yellow);
  background: var(--mullvad-navy-card);
  box-shadow: inset 0 -2px 0 var(--mullvad-yellow);
}

.download-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 28px;
}

.platform-card {
  background: var(--mullvad-navy-card);
  border: 1px solid var(--mullvad-border);
  border-radius: var(--radius-xl);
  padding: 32px;
  display: flex;
  flex-direction: column;
}

.platform-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.platform-card-title {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--text-white);
  display: flex;
  align-items: center;
  gap: 12px;
}

.version-badge {
  background: var(--mullvad-navy-light);
  color: var(--mullvad-green);
  font-size: 0.8rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 6px;
  border: 1px solid rgba(74, 222, 128, 0.3);
}

.platform-specs-box {
  background: var(--mullvad-navy-deep);
  border: 1px solid var(--mullvad-border);
  border-radius: var(--radius-md);
  padding: 16px;
  margin-bottom: 24px;
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.6;
}
.platform-specs-box strong {
  color: var(--text-white);
}

.download-btn-group {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: auto;
}

/* FAQ Accordion */
.faq-accordion {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin: 36px 0;
}

.faq-item {
  background: var(--mullvad-navy-card);
  border: 1px solid var(--mullvad-border);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: border-color var(--transition-fast);
}
.faq-item.active {
  border-color: var(--mullvad-yellow);
}

.faq-question {
  width: 100%;
  text-align: left;
  background: transparent;
  border: none;
  padding: 20px 24px;
  color: var(--text-white);
  font-size: 1.1rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.faq-icon {
  width: 24px;
  height: 24px;
  color: var(--mullvad-yellow);
  transition: transform var(--transition-fast);
  flex-shrink: 0;
}
.faq-item.active .faq-icon {
  transform: rotate(180deg);
}

.faq-answer {
  display: none;
  padding: 0 24px 24px;
  color: var(--text-secondary);
  font-size: 0.98rem;
  line-height: 1.7;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}
.faq-item.active .faq-answer {
  display: block;
}

/* Search Box */
.mullvad-search-box {
  position: relative;
  max-width: 680px;
  margin: 0 auto 36px;
}

.mullvad-search-input {
  width: 100%;
  background: var(--mullvad-navy-card);
  border: 1.5px solid var(--mullvad-border);
  border-radius: var(--radius-xl);
  padding: 16px 20px 16px 52px;
  font-size: 1.05rem;
  color: var(--text-white);
  outline: none;
  transition: all var(--transition-fast);
}
.mullvad-search-input:focus {
  border-color: var(--mullvad-yellow);
  box-shadow: 0 0 0 4px rgba(253, 211, 33, 0.15);
}
.mullvad-search-icon {
  position: absolute;
  left: 20px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
}

/* Server Status Table */
.status-table-card {
  background: var(--mullvad-navy-card);
  border: 1px solid var(--mullvad-border);
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  margin-top: 32px;
}

.table-responsive {
  width: 100%;
  overflow-x: auto;
}

.status-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

.status-table th {
  background: var(--mullvad-navy-deep);
  color: var(--text-secondary);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 16px 20px;
  border-bottom: 1px solid var(--mullvad-border);
}

.status-table td {
  padding: 18px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  font-size: 0.95rem;
}

.status-table tr:hover td {
  background: var(--mullvad-navy-light);
}

.status-indicator {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 0.88rem;
}
.status-indicator.online {
  color: var(--mullvad-green);
}
.status-indicator.online::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--mullvad-green);
  box-shadow: 0 0 8px var(--mullvad-green);
}

/* Modals */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(11, 19, 25, 0.8);
  backdrop-filter: blur(10px);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-normal);
}
.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}
.modal-card {
  background: var(--mullvad-navy-card);
  border: 1px solid var(--mullvad-border);
  border-radius: var(--radius-xl);
  width: 100%;
  max-width: 640px;
  max-height: 85vh;
  overflow-y: auto;
  padding: 32px;
  box-shadow: var(--shadow-lg);
  position: relative;
}
.modal-close-btn {
  position: absolute;
  top: 20px;
  right: 20px;
  background: var(--mullvad-navy-light);
  border: none;
  color: var(--text-secondary);
  font-size: 1.5rem;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.modal-close-btn:hover {
  color: var(--text-white);
  background: var(--mullvad-navy-hover);
}

/* Toast */
.mullvad-toast {
  position: fixed;
  bottom: 28px;
  right: 28px;
  background: var(--mullvad-yellow);
  color: var(--text-dark);
  font-weight: 700;
  padding: 12px 24px;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  z-index: 3000;
  transform: translateY(100px);
  opacity: 0;
  transition: all var(--transition-fast);
}
.mullvad-toast.show {
  transform: translateY(0);
  opacity: 1;
}

/* Footer */
.mullvad-footer {
  margin-top: auto;
  background: var(--mullvad-navy-deep);
  border-top: 1px solid var(--mullvad-border);
  padding: 64px 0 32px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr repeat(4, 1fr);
  gap: 40px;
  margin-bottom: 48px;
}

.footer-brand-col {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.footer-tagline {
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.6;
  max-width: 300px;
}

.footer-col h4 {
  color: var(--text-white);
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 18px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-links a {
  color: var(--text-secondary);
  font-size: 0.9rem;
  text-decoration: none;
  transition: color var(--transition-fast);
}
.footer-links a:hover {
  color: var(--mullvad-yellow);
}

.footer-bottom {
  padding-top: 28px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  color: var(--text-muted);
  font-size: 0.85rem;
}

.footer-bottom-links {
  list-style: none;
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}
.footer-bottom-links a {
  color: var(--text-secondary);
}
.footer-bottom-links a:hover {
  color: var(--mullvad-yellow);
}

/* Responsive Media Queries */
@media (max-width: 960px) {
  .nav-links {
    display: none;
  }
  .nav-links.mobile-open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 72px;
    left: 0;
    right: 0;
    background: var(--mullvad-navy-surface);
    padding: 24px 32px;
    border-bottom: 2px solid var(--mullvad-yellow);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
    gap: 16px;
    z-index: 999;
  }
  .mobile-nav-toggle {
    display: flex;
  }
  .hero-grid {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .hero-desc {
    margin-left: auto;
    margin-right: auto;
  }
  .hero-actions {
    justify-content: center;
  }
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 640px) {
  .hero-title {
    font-size: 2.2rem;
  }
  .footer-grid {
    grid-template-columns: 1fr;
  }
  .bypass-notice-box {
    flex-direction: column;
    text-align: center;
  }
  .bypass-notice-content {
    flex-direction: column;
    align-items: center;
  }
}
