:root {
  --bg-color: #000000;
  --card-bg: #0b121f;
  --card-border: #162235;
  --accent-green: #ffffff;
  --accent-blue: #2563eb;
  --text-main: #ffffff;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --bar-inactive: #162033;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

body {
  background-color: var(--bg-color);
  color: var(--text-main);
  min-height: 100vh;
  padding-bottom: 85px;
  overflow-x: hidden;
  user-select: none;
}

.app-wrapper {
  max-width: 480px;
  margin: 0 auto;
  padding: 16px;
}

/* Header */
.app-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 0 16px;
}

.brand-group {
  display: flex;
  align-items: center;
  gap: 10px;
}

.globe-logo {
  font-size: 28px;
}

.brand-sub-title {
  font-size: 22px;
  font-weight: 900;
  letter-spacing: -0.3px;
}

.balance-badge {
  background: #0f1a2a;
  border: 1px solid #1a2a40;
  color: var(--accent-green);
  font-weight: 700;
  font-size: 14px;
  padding: 6px 14px;
  border-radius: 20px;
  cursor: pointer;
}

/* Tabs */
.tab-view {
  display: none;
}

.tab-view.active {
  display: block;
  animation: fadeIn 0.2s ease forwards;
}

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

/* Status row */
.status-indicator-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}

.status-dot-circle {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--text-muted);
}

.status-dot-circle.active {
  background: var(--accent-green);
  box-shadow: 0 0 8px var(--accent-green);
}

.status-state-text {
  font-size: 14px;
  color: var(--text-secondary);
  font-weight: 500;
}

/* Main Heading */
.main-heading {
  font-size: 28px;
  font-weight: 800;
  line-height: 1.25;
  margin-bottom: 22px;
}

.page-title {
  font-size: 28px;
  font-weight: 800;
  margin-bottom: 20px;
}

/* Battery / Segment Meter (Zdrav VPN style) */
.segments-container {
  display: flex;
  gap: 4px;
  height: 48px;
  margin-bottom: 20px;
}

.segment {
  flex: 1;
  background: var(--bar-inactive);
  border-radius: 5px;
  transition: background 0.3s ease;
}

.segment.active {
  background: #1e3a8a;
}

.feature-subtext {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: 26px;
}

/* Buttons in Zdrav Style */
.btn {
  width: 100%;
  padding: 18px;
  border-radius: 18px;
  font-size: 17px;
  font-weight: 700;
  border: none;
  cursor: pointer;
  margin-bottom: 12px;
  transition: transform 0.1s, opacity 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.btn:active {
  transform: scale(0.98);
}

.btn-green-zdrav {
  background: var(--accent-green);
  color: #000000;
}

.btn-dark-zdrav {
  background: var(--card-bg);
  color: var(--text-main);
  border: 1px solid var(--card-border);
}

.btn-secondary-zdrav {
  background: #121c2c;
  color: #ffffff;
  padding: 10px;
  font-size: 13px;
  border-radius: 10px;
  border: 1px solid #1f304a;
}

/* Active Key Box Card */
.key-box-card {
  background: var(--card-bg);
  border: 1px solid var(--accent-green);
  border-radius: 18px;
  padding: 16px;
  margin-bottom: 20px;
}

.key-box-title {
  font-size: 13px;
  color: var(--accent-green);
  font-weight: 700;
  margin-bottom: 8px;
}

.key-code-view {
  background: #000000;
  border: 1px dashed #24354e;
  border-radius: 10px;
  padding: 10px;
  font-family: monospace;
  font-size: 12px;
  color: var(--text-secondary);
  word-break: break-all;
  max-height: 80px;
  overflow-y: auto;
  cursor: pointer;
  margin-bottom: 12px;
}

.btn-grid-sub {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 8px;
}

/* Device Switcher in Tariffs */
.devices-switch-container {
  display: flex;
  background: #0b121f;
  border: 1px solid #162235;
  border-radius: 14px;
  padding: 4px;
  margin-bottom: 18px;
}

.dev-switch-btn {
  flex: 1;
  background: transparent;
  color: var(--text-secondary);
  border: none;
  padding: 12px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
}

.dev-switch-btn.active {
  background: var(--accent-blue);
  color: #ffffff;
}

/* Tariff Cards (Zdrav style) */
.tariff-zdrav-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 18px;
  padding: 20px 18px;
  margin-bottom: 12px;
  cursor: pointer;
  transition: all 0.2s;
}

.tariff-zdrav-card.highlighted {
  border-color: #2563eb;
}

.tariff-left .t-name {
  font-size: 17px;
  font-weight: 700;
  margin-bottom: 4px;
}

.tariff-left .t-sub {
  font-size: 13px;
  color: var(--text-secondary);
}

.tariff-price-tag {
  font-size: 18px;
  font-weight: 800;
}

/* Wallet Tab */
.balance-label-small {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 4px;
}

.balance-amount-big {
  font-size: 44px;
  font-weight: 900;
  letter-spacing: -1px;
  margin-bottom: 28px;
}

.wallet-section-header {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 14px;
}

.amount-pills-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-bottom: 16px;
}

.amount-pill {
  background: #0b121f;
  border: 1px solid #162235;
  color: var(--text-main);
  padding: 14px 0;
  border-radius: 14px;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
}

.amount-pill.selected {
  border-color: var(--accent-green);
  color: var(--accent-green);
}

.custom-input-box input {
  width: 100%;
  background: #0b121f;
  border: 1px solid #162235;
  color: var(--text-main);
  padding: 16px;
  border-radius: 14px;
  font-size: 16px;
  margin-bottom: 20px;
  outline: none;
}

.custom-input-box input:focus {
  border-color: var(--accent-green);
}

.wallet-info-text {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.4;
  margin-top: 14px;
}

.wallet-info-text.sub {
  font-size: 12px;
  color: var(--text-muted);
}

.link-blue {
  color: #3b82f6;
  text-decoration: none;
}

/* More Tab */
.accordion-item {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 16px;
  padding: 16px 18px;
  margin-bottom: 10px;
  cursor: pointer;
}

.accordion-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 15px;
  font-weight: 700;
}

.acc-icon {
  font-size: 18px;
  color: var(--text-secondary);
}

.accordion-body {
  display: none;
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-top: 10px;
  border-top: 1px solid #141f30;
  padding-top: 10px;
}

.accordion-item.open .accordion-body {
  display: block;
}

.accordion-item.open .acc-icon {
  transform: rotate(45deg);
}

.more-section-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  margin: 24px 0 12px;
}

.nav-links-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 18px;
  overflow: hidden;
}

.nav-link-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 18px;
  border-bottom: 1px solid #141f30;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
}

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

.arrow-icon {
  font-size: 18px;
  color: var(--text-muted);
}

/* Bottom Tab Bar */
.bottom-tab-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 68px;
  background: #000000;
  border-top: 1px solid #162235;
  display: flex;
  justify-content: space-around;
  align-items: center;
  z-index: 100;
}

.tab-btn {
  position: relative;
  background: transparent;
  border: none;
  color: var(--text-muted);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  flex: 1;
  height: 100%;
  justify-content: center;
}

.tab-indicator {
  position: absolute;
  top: 0;
  left: 25%;
  right: 25%;
  height: 2.5px;
  background: transparent;
  border-radius: 0 0 4px 4px;
}

.tab-btn.active {
  color: #ffffff;
}

.tab-btn.active .tab-indicator {
  background: var(--accent-green);
}

/* Modals */
.modal {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 200;
  padding: 20px;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
}

.modal-dialog {
  position: relative;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 20px;
  padding: 24px;
  width: 100%;
  max-width: 320px;
  text-align: center;
}

.legal-dialog {
  max-width: 440px;
  text-align: left;
}

.legal-body-scroll {
  max-height: 55vh;
  overflow-y: auto;
  font-size: 13px;
  line-height: 1.6;
  color: var(--text-secondary);
  padding: 10px 0;
}

.legal-body-scroll h4 {
  color: #ffffff;
  margin: 12px 0 6px;
  font-size: 14px;
}

.legal-body-scroll p, .legal-body-scroll ul {
  margin-bottom: 8px;
}

.legal-body-scroll ul {
  padding-left: 20px;
}

.qrcode-wrapper {
  background: #ffffff;
  padding: 12px;
  border-radius: 14px;
  display: inline-block;
  margin: 16px 0;
}

.toast, #toast, #appToast, div[class*="toast"], .notification, .alert-popup {
  display: none !important;
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
  position: absolute !important;
  width: 0 !important;
  height: 0 !important;
  overflow: hidden !important;
  clip: rect(0 0 0 0) !important;
}

.hidden {
  display: none !important;
}
