:root {
  --bg-color: #0b0c10;
  --surface-color: rgba(30, 33, 40, 0.6);
  --surface-border: rgba(255, 255, 255, 0.08);
  --accent-color: #ff8c00;
  --accent-light: #ffa640;
  --accent-gradient: linear-gradient(135deg, #ff9500, #ff5e00);
  --text-main: #ffffff;
  --text-secondary: #a0a5b1;
  --text-hint: #6e7381;
  --danger-color: #ff4d4d;
  --success-color: #00d26a;
  
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background-color: var(--bg-color);
  color: var(--text-main);
  line-height: 1.5;
  overflow-x: hidden;
  user-select: none;
}

#app {
  width: 100vw;
  min-height: 100vh;
  position: relative;
}

.view {
  display: none;
  width: 100%;
  min-height: 100vh;
  padding: 16px;
  animation: fadeIn 0.3s ease;
  flex-direction: column;
}

.view.active {
  display: flex;
}

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

/* Header */
.top-nav {
  display: flex;
  align-items: center;
  margin-bottom: 24px;
  font-size: 18px;
  font-weight: 600;
}

.back-btn {
  background: none;
  border: none;
  color: var(--text-main);
  font-size: 24px;
  margin-right: 16px;
  cursor: pointer;
  padding: 4px;
}

/* Glassmorphism Surface */
.surface {
  background: var(--surface-color);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius-lg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

/* Hero Section (Main Menu) */
.hero-image-container {
  width: 100%;
  display: flex;
  justify-content: center;
  margin-bottom: 20px;
  margin-top: -16px; /* Pull up slightly */
}

.hero-image {
  width: 100%;
  max-width: 350px;
  border-radius: 0 0 var(--radius-xl) var(--radius-xl);
  object-fit: cover;
  box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

.main-menu-card {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* Buttons */
.btn {
  width: 100%;
  padding: 14px 16px;
  border-radius: var(--radius-md);
  border: none;
  font-size: 16px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  transition: opacity 0.2s, transform 0.1s;
}

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

.btn-primary {
  background: var(--accent-gradient);
  color: white;
  box-shadow: 0 4px 15px rgba(255, 140, 0, 0.3);
}

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

.btn-row {
  display: flex;
  gap: 12px;
}

.btn-row .btn {
  flex: 1;
}

/* Tariffs Grid */
.tariffs-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 16px;
}

.tariff-card {
  background: var(--surface-color);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius-lg);
  padding: 16px;
  text-align: center;
  position: relative;
  cursor: pointer;
  transition: all 0.2s;
}

.tariff-card.selected {
  border-color: var(--accent-color);
  background: rgba(255, 140, 0, 0.1);
}

.tariff-badge {
  position: absolute;
  top: -10px;
  left: 50%;
  transform: translateX(-50%);
  background: white;
  color: black;
  font-size: 12px;
  font-weight: bold;
  padding: 4px 8px;
  border-radius: 20px;
  white-space: nowrap;
}

.tariff-title {
  color: var(--accent-color);
  font-weight: 600;
  margin-bottom: 4px;
}

.tariff-savings {
  font-size: 12px;
  color: var(--text-secondary);
  margin-bottom: 12px;
}

.tariff-price {
  font-size: 24px;
  font-weight: bold;
  margin-bottom: 4px;
}

.tariff-daily {
  font-size: 12px;
  color: var(--text-hint);
}

/* List Menu (Profile Links) */
.list-menu {
  margin-top: 16px;
}

.list-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px;
  border-bottom: 1px solid var(--surface-border);
  cursor: pointer;
}

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

.list-item-content {
  display: flex;
  align-items: center;
  gap: 12px;
}
.list-item-icon {
  font-size: 20px;
  opacity: 0.8;
}

.chevron {
  color: var(--text-hint);
}

/* Profile specific */
.profile-username {
  color: var(--text-secondary);
  margin-bottom: 16px;
}

.status-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid var(--surface-border);
}

.status-row:last-child {
  border-bottom: none;
}

.status-active {
  color: var(--success-color);
  font-weight: 600;
}

.key-container {
  margin-top: 16px;
  padding: 16px;
}

.key-input-wrapper {
  display: flex;
  align-items: center;
  background: rgba(0,0,0,0.3);
  border-radius: var(--radius-md);
  padding: 12px;
  margin: 12px 0 8px 0;
}

.key-input {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--text-main);
  font-size: 14px;
  outline: none;
  font-family: monospace;
}

.copy-btn {
  background: none;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 4px;
}

.hint-text {
  font-size: 12px;
  color: var(--text-hint);
  margin-bottom: 16px;
}

/* Payment Modal (BottomSheet) */
.bottom-sheet-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.6);
  z-index: 100;
  display: none;
  opacity: 0;
  transition: opacity 0.3s;
}

.bottom-sheet {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  background: var(--bg-color);
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  padding: 24px 16px;
  transform: translateY(100%);
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1);
}

.bottom-sheet.open {
  transform: translateY(0);
}

.sheet-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  font-size: 18px;
  font-weight: bold;
}

.sheet-close {
  background: none;
  border: none;
  color: var(--text-hint);
  font-size: 24px;
}

.payment-method {
  display: flex;
  align-items: center;
  padding: 16px;
  background: var(--surface-color);
  border-radius: var(--radius-md);
  margin-bottom: 8px;
  cursor: pointer;
}

.payment-icon {
  width: 32px;
  height: 32px;
  margin-right: 12px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  background: rgba(255,255,255,0.1);
}

.payment-text {
  flex: 1;
  font-weight: 500;
}

.sheet-footer-text {
  font-size: 12px;
  color: var(--text-hint);
  margin-top: 16px;
}

/* Free VPN Specific */
.free-banner {
  text-align: center;
  margin-bottom: 24px;
}

.free-banner h2 {
  font-size: 24px;
  margin-bottom: 8px;
}

.free-banner p {
  color: var(--text-secondary);
  font-size: 14px;
}

.task-card {
  padding: 16px;
  margin-bottom: 12px;
}

.task-header {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: bold;
  font-size: 16px;
  margin-bottom: 8px;
}

/* Utility */
.mb-16 { margin-bottom: 16px; }
.mb-24 { margin-bottom: 24px; }
.text-center { text-align: center; }
.text-accent { color: var(--accent-color); }
