/* ===================================================================
   Ollin VPN WebApp / Onboarding Styles
   Clean, Modern Apple & Telegram Mini App Aesthetic (No Neon/Glows)
   =================================================================== */

:root {
  --primary: #0066FF;
  --primary-hover: #0052CC;
  --primary-active: #0040A8;
  --primary-light: #EBF3FF;
  
  --bg-color: #F8FAFC;
  --surface-color: #FFFFFF;
  --surface-secondary: #F1F5F9;
  
  --text-main: #0F172A;
  --text-muted: #64748B;
  --text-dim: #94A3B8;
  
  --border-color: #E2E8F0;
  --border-hover: #CBD5E1;
  --border-focus: #0066FF;
  
  --radius-card: 18px;
  --radius-button: 14px;
  --radius-badge: 9999px;
  
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.04);
  --shadow-card: 0 2px 10px rgba(0, 0, 0, 0.04), 0 1px 3px rgba(0, 0, 0, 0.02);
  --shadow-button: 0 4px 14px rgba(0, 102, 255, 0.2);
  --shadow-popup: 0 10px 30px rgba(0, 0, 0, 0.08);

  --font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", Inter, Arial, sans-serif;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: var(--font-family);
  background-color: var(--bg-color);
  color: var(--text-main);
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 0;
  margin: 0;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* Telegram Mini App Container / Mobile viewport wrapper */
.app-container {
  width: 100%;
  max-width: 440px;
  min-height: 100vh;
  background-color: var(--surface-color);
  display: flex;
  flex-direction: column;
  position: relative;
  box-shadow: 0 0 40px rgba(0, 0, 0, 0.06);
  padding-bottom: 24px;
}

/* Top Navigation Bar */
.top-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  position: sticky;
  top: 0;
  background-color: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(12px);
  z-index: 100;
  border-bottom: 1px solid var(--border-color);
  height: 54px;
}

.nav-left, .nav-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #64748B;
  transition: all 0.15s ease;
}

.nav-btn:hover {
  background-color: #F1F5F9;
  color: var(--text-main);
}

.nav-btn:active {
  transform: scale(0.92);
}

.nav-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 220px;
}

/* Status Pill */
.status-pill-container {
  display: flex;
  justify-content: center;
  margin-top: 8px;
  margin-bottom: 12px;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #EFF6FF;
  border: 1px solid #DBEAFE;
  border-radius: var(--radius-badge);
  padding: 5px 12px;
  font-size: 12px;
  font-weight: 600;
  color: #1D4ED8;
}

.status-indicator {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background-color: #10B981;
}

/* Main Screens Layout */
.screen-wrapper {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.screen {
  display: none;
  flex-direction: column;
  padding: 16px 20px 24px;
  animation: fadeIn 0.2s ease-out;
}

.screen.active {
  display: flex;
}

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

/* Brand Header */
.brand-header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 14px;
}

.brand-logo-icon {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

.brand-logo-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.brand-title {
  font-size: 19px;
  font-weight: 800;
  color: var(--text-main);
  letter-spacing: -0.01em;
}

/* Typography */
.page-header {
  text-align: center;
  margin-bottom: 20px;
}

.page-title {
  font-size: 26px;
  font-weight: 850;
  color: var(--text-main);
  letter-spacing: -0.02em;
  margin-bottom: 6px;
  line-height: 1.15;
}

.page-subtitle {
  font-size: 14px;
  color: var(--text-muted);
  font-weight: 450;
  line-height: 1.4;
}

/* Cards Stack (Screen 1) */
.card-stack {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 24px;
}

.action-card {
  background: var(--surface-color);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-card);
  padding: 20px 18px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  position: relative;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: var(--shadow-sm);
}

.action-card:hover {
  transform: translateY(-2px);
  border-color: var(--primary);
  box-shadow: 0 6px 20px rgba(0, 102, 255, 0.08);
}

.action-card:active {
  transform: scale(0.99);
}

.card-top-icon {
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.card-title {
  font-size: 18px;
  font-weight: 750;
  color: var(--text-main);
  margin-bottom: 4px;
}

.card-subtitle {
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 450;
}

.card-arrow {
  position: absolute;
  right: 18px;
  top: 50%;
  transform: translateY(-50%);
  color: #94A3B8;
  display: flex;
  align-items: center;
}

/* Subscription Link Box */
.sub-box {
  background-color: var(--surface-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-card);
  padding: 14px 16px;
  margin-bottom: 24px;
}

.sub-label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.sub-input-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.sub-input {
  flex: 1;
  background: #FFFFFF;
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 8px 12px;
  font-size: 13px;
  font-family: inherit;
  color: var(--text-main);
  outline: none;
  text-overflow: ellipsis;
}

.sub-copy-btn {
  background: var(--surface-color);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 8px 14px;
  font-size: 12px;
  font-weight: 600;
  color: var(--primary);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.sub-copy-btn:hover {
  background-color: var(--primary-light);
  border-color: var(--primary);
}

/* Device Grid (Screen 2) */
.device-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-bottom: 24px;
}

.device-card {
  background: #FFFFFF;
  border: 1px solid var(--border-color);
  border-radius: 18px;
  padding: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  text-align: center;
  overflow: hidden;
  cursor: pointer;
  transition: all 0.2s ease;
  height: 135px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.device-card:hover {
  transform: translateY(-2px);
  border-color: var(--primary);
  box-shadow: 0 6px 16px rgba(0, 102, 255, 0.08);
}

.device-card:active {
  transform: scale(0.98);
}

.device-name {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-main);
  padding: 14px 10px 4px 10px;
  text-align: center;
  line-height: 1.2;
}

.device-preview-wrapper {
  width: 100%;
  height: 82px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  overflow: hidden;
  position: relative;
  background: transparent;
  margin-top: auto;
}

.device-render-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center bottom;
  display: block;
  transform: translateY(1px);
  transition: transform 0.2s ease;
}

.device-card:hover .device-render-img {
  transform: translateY(0) scale(1.03);
}

/* Device Selector Pill (Screen 3) */
.device-pill-container {
  display: flex;
  justify-content: center;
  margin-bottom: 18px;
}

.device-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--surface-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-badge);
  padding: 6px 16px;
  font-size: 13px;
  font-weight: 650;
  color: var(--text-main);
  cursor: pointer;
  transition: all 0.15s ease;
}

.device-pill:hover {
  border-color: var(--border-hover);
  background: #E2E8F0;
}

/* App Cards (Screen 3) */
.apps-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 24px;
}

.app-card {
  background: var(--surface-color);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 14px;
  position: relative;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: var(--shadow-sm);
}

.app-card.recommended {
  border: 1.5px solid var(--primary);
  background: #F8FAFF;
}

.app-card:hover {
  transform: translateY(-2px);
  border-color: var(--primary);
  box-shadow: 0 4px 16px rgba(0, 102, 255, 0.08);
}

.app-card:active {
  transform: scale(0.98);
}

.app-icon {
  width: 46px;
  height: 46px;
  border-radius: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  background: transparent;
  overflow: hidden;
}

.app-icon-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 11px;
  display: block;
}

.app-content {
  flex: 1;
}

.app-tag {
  font-size: 11px;
  font-weight: 750;
  color: var(--primary);
  margin-bottom: 2px;
  display: flex;
  align-items: center;
  gap: 4px;
}

.app-name {
  font-size: 17px;
  font-weight: 800;
  color: var(--text-main);
  letter-spacing: -0.01em;
}

.app-desc {
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 450;
}

.app-arrow {
  color: #94A3B8;
  display: flex;
  align-items: center;
}

/* Stepper Progress Header (Screens 4, 5, 6) */
.step-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 18px;
}

.step-icon-circle {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background-color: var(--primary-light);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 8px;
}

.step-number {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 2px;
}

.step-action-name {
  font-size: 14px;
  font-weight: 750;
  color: var(--text-main);
  margin-bottom: 10px;
}

.progress-segments {
  display: flex;
  gap: 6px;
  width: 130px;
  height: 4px;
}

.progress-segment {
  flex: 1;
  background-color: #E2E8F0;
  border-radius: 9999px;
  transition: all 0.3s ease;
}

.progress-segment.active {
  background-color: var(--primary);
}

/* Stepper Screenshots and Mockups */
.step-mockup-container {
  width: 100%;
  margin-bottom: 20px;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
  border: 1px solid var(--border-color);
  background-color: #FFFFFF;
}

/* Step 1 Browser Download Mockup */
.browser-download-mockup {
  background: #FFFFFF;
  border-radius: 16px;
  overflow: hidden;
}

.browser-header-bar {
  background-color: #F8FAFC;
  padding: 10px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-color);
}

.browser-traffic-lights {
  display: flex;
  gap: 6px;
}

.traffic-light {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.browser-header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  color: #94A3B8;
}

.download-pill-popup {
  padding: 16px 18px;
  background-color: #FFFFFF;
}

.download-file-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid var(--border-color);
  border-radius: 12px;
  background-color: #F8FAFC;
}

.file-icon-box {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 800;
  font-size: 15px;
  overflow: hidden;
}

.step1-icon-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 9px;
  display: block;
}

.file-info {
  flex: 1;
}

.file-name {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 2px;
}

.file-status {
  font-size: 12px;
  color: #10B981;
  font-weight: 500;
}

.file-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #94A3B8;
}

/* Action Buttons */
.button-stack {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 20px;
}

.btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 15px 20px;
  border-radius: var(--radius-button);
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.15s ease;
  border: none;
}

.btn-primary {
  background-color: var(--primary);
  color: #FFFFFF;
  box-shadow: var(--shadow-button);
}

.btn-primary:hover {
  background-color: var(--primary-hover);
}

.btn-primary:active {
  background-color: var(--primary-active);
  transform: scale(0.99);
}

.btn-secondary {
  background-color: var(--surface-secondary);
  color: var(--text-main);
  border: 1px solid var(--border-color);
}

.btn-secondary:hover {
  background-color: #E2E8F0;
}

.btn-secondary:active {
  transform: scale(0.99);
}

.btn-text-link {
  display: block;
  text-align: center;
  color: var(--primary);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  padding: 10px;
  border-radius: 8px;
  transition: background-color 0.15s ease;
}

.btn-text-link:hover {
  background-color: var(--primary-light);
}

/* Accordion FAQ */
.accordion {
  border: 1px solid var(--border-color);
  border-radius: 14px;
  overflow: hidden;
  margin-bottom: 24px;
  background: var(--surface-color);
}

.accordion-header {
  padding: 14px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-main);
  background-color: var(--surface-secondary);
}

.accordion-arrow {
  transition: transform 0.2s ease;
  color: #94A3B8;
}

.accordion.open .accordion-arrow {
  transform: rotate(180deg);
}

.accordion-body {
  display: none;
  padding: 14px 16px;
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.5;
  background: #FFFFFF;
  border-top: 1px solid var(--border-color);
}

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

/* Footer */
.app-footer {
  text-align: center;
  margin-top: auto;
  padding-top: 16px;
}

.footer-bot-link {
  font-size: 13px;
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 500;
}

.footer-bot-link:hover {
  color: var(--primary);
}

/* Toast */
.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background-color: #0F172A;
  color: #FFFFFF;
  padding: 10px 18px;
  border-radius: 9999px;
  font-size: 13px;
  font-weight: 600;
  box-shadow: var(--shadow-popup);
  display: flex;
  align-items: center;
  gap: 8px;
  opacity: 0;
  pointer-events: none;
  transition: all 0.2s ease;
  z-index: 1000;
  white-space: nowrap;
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
