:root {
  --bg: #0a0c10;
  --card: #14181f;
  --card2: #1a1f2a;
  --green: #00e676;
  --green-dark: #00c853;
  --purple: #7c4dff;
  --text: #ffffff;
  --text-secondary: #8b95a5;
  --border: rgba(255,255,255,0.08);
  --gradient: linear-gradient(135deg, #00e676, #7c4dff);
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  overflow-x: hidden;
  min-height: 100vh;
}

#app {
  max-width: 480px;
  margin: 0 auto;
  min-height: 100vh;
  position: relative;
}

.screen {
  display: none;
  min-height: 100vh;
}

.screen.active {
  display: flex;
  flex-direction: column;
}

/* ========== WELCOME SCREEN ========== */
#welcome-screen {
  background: radial-gradient(ellipse at top, #1a2332 0%, #0a0c10 60%);
  justify-content: space-between;
}

.welcome-bg {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  padding: 40px 20px;
}

.big-logo {
  font-size: 180px;
  font-weight: 900;
  background: linear-gradient(135deg, #00e676 0%, #00c853 40%, #7c4dff 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1;
  opacity: 0.9;
  text-shadow: 0 0 80px rgba(0, 230, 118, 0.3);
}

.status-badges {
  position: absolute;
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.badge {
  background: rgba(20, 24, 31, 0.85);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(0, 230, 118, 0.25);
  border-radius: 20px;
  padding: 10px 16px;
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
  box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}

.badge .icon {
  color: var(--green);
}

.welcome-card {
  background: linear-gradient(180deg, #1a1f2a 0%, #12151c 100%);
  border-radius: 28px 28px 0 0;
  padding: 32px 24px 40px;
  text-align: center;
  border-top: 1px solid var(--border);
}

.welcome-label {
  font-size: 12px;
  letter-spacing: 2px;
  color: var(--green);
  margin-bottom: 8px;
  font-weight: 600;
}

.welcome-title {
  font-size: 36px;
  font-weight: 800;
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 8px;
}

.welcome-subtitle {
  color: var(--text-secondary);
  font-size: 15px;
  margin-bottom: 28px;
}

.btn-primary {
  width: 100%;
  padding: 16px;
  border: none;
  border-radius: 16px;
  background: var(--gradient);
  color: #000;
  font-size: 17px;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.15s, opacity 0.15s;
}

.btn-primary:active {
  transform: scale(0.98);
  opacity: 0.9;
}

.welcome-terms {
  margin-top: 16px;
  font-size: 11px;
  color: var(--text-secondary);
  opacity: 0.7;
}

/* ========== MAIN APP ========== */
#main-app {
  background: var(--bg);
}

.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px 12px;
  position: sticky;
  top: 0;
  background: rgba(10, 12, 16, 0.92);
  backdrop-filter: blur(12px);
  z-index: 50;
  border-bottom: 1px solid var(--border);
}

.logo {
  font-size: 20px;
  font-weight: 800;
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.pvz-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(0, 230, 118, 0.08);
  border: 1px dashed rgba(0, 230, 118, 0.4);
  border-radius: 12px;
  padding: 8px 12px;
  cursor: pointer;
}

.pvz-icon {
  font-size: 16px;
}

.pvz-text {
  display: flex;
  flex-direction: column;
}

.pvz-label {
  font-size: 10px;
  color: var(--green);
  font-weight: 600;
}

.pvz-value {
  font-size: 12px;
  color: var(--text-secondary);
}

/* Content */
.content {
  flex: 1;
  padding: 16px 20px 100px;
  overflow-y: auto;
}

.section-title {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 16px;
}

/* Categories */
.categories-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.category-card {
  background: var(--card);
  border-radius: 18px;
  padding: 16px;
  text-align: center;
  cursor: pointer;
  border: 1px solid var(--border);
  transition: transform 0.15s, border-color 0.15s;
}

.category-card:active {
  transform: scale(0.97);
  border-color: rgba(0, 230, 118, 0.4);
}

.category-img {
  width: 100%;
  height: 100px;
  object-fit: contain;
  margin-bottom: 12px;
  border-radius: 12px;
  background: #0d1117;
}

.category-name {
  font-size: 15px;
  font-weight: 600;
}

/* Products */
.products-grid {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.product-card {
  background: var(--card);
  border-radius: 16px;
  padding: 14px;
  display: flex;
  gap: 14px;
  cursor: pointer;
  border: 1px solid var(--border);
}

.product-card:active {
  border-color: rgba(0, 230, 118, 0.3);
}

.product-img {
  width: 80px;
  height: 80px;
  object-fit: contain;
  background: #0d1117;
  border-radius: 12px;
}

.product-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.product-name {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 6px;
}

.product-price {
  font-size: 18px;
  font-weight: 700;
  color: var(--green);
}

.product-old-price {
  font-size: 13px;
  color: var(--text-secondary);
  text-decoration: line-through;
  margin-left: 8px;
}

/* Product Detail */
.product-detail-img {
  width: 100%;
  height: 260px;
  object-fit: contain;
  background: #111;
  border-radius: 20px;
  margin-bottom: 20px;
}

.product-detail-name {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 12px;
}

.product-tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.tag {
  background: rgba(0, 230, 118, 0.12);
  color: var(--green);
  font-size: 12px;
  padding: 6px 12px;
  border-radius: 20px;
  font-weight: 500;
}

.price-block {
  margin-bottom: 20px;
}

.price-current {
  font-size: 32px;
  font-weight: 800;
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.price-old {
  font-size: 16px;
  color: var(--text-secondary);
  text-decoration: line-through;
  margin-left: 10px;
}

.discount-badge {
  display: inline-block;
  background: rgba(0, 230, 118, 0.15);
  color: var(--green);
  font-size: 13px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 8px;
  margin-left: 10px;
}

.benefit {
  color: var(--green);
  font-size: 14px;
  margin-top: 6px;
}

.option-group {
  margin-bottom: 20px;
}

.option-label {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 10px;
}

.options {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.option {
  padding: 10px 18px;
  border-radius: 12px;
  background: var(--card);
  border: 1px solid var(--border);
  font-size: 14px;
  cursor: pointer;
  transition: all 0.15s;
}

.option.active {
  border-color: var(--green);
  background: rgba(0, 230, 118, 0.1);
  color: var(--green);
}

.btn-gradient {
  width: 100%;
  padding: 16px;
  border: none;
  border-radius: 16px;
  background: var(--gradient);
  color: #000;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  margin: 16px 0;
}

/* Reviews */
.reviews-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.positive-badge {
  background: rgba(0, 230, 118, 0.12);
  color: var(--green);
  font-size: 12px;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 20px;
}

.rating-card {
  background: var(--card);
  border-radius: 18px;
  padding: 20px;
  display: flex;
  gap: 24px;
  margin-bottom: 16px;
  border: 1px solid var(--border);
}

.rating-left {
  text-align: center;
}

.rating-big {
  font-size: 48px;
  font-weight: 800;
  line-height: 1;
}

.stars {
  color: #ffc107;
  font-size: 14px;
  margin: 4px 0;
}

.rating-count {
  font-size: 12px;
  color: var(--text-secondary);
}

.rating-bars {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
}

.bar-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--text-secondary);
}

.bar {
  flex: 1;
  height: 6px;
  background: rgba(255,255,255,0.08);
  border-radius: 3px;
  overflow: hidden;
}

.bar .fill {
  height: 100%;
  background: var(--green);
  border-radius: 3px;
}

.reviews-note {
  background: var(--card);
  border-radius: 14px;
  padding: 14px 16px;
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.45;
  margin-bottom: 8px;
  display: flex;
  gap: 10px;
  border: 1px solid var(--border);
}

.reviews-note .check {
  color: var(--green);
  font-weight: 700;
  flex-shrink: 0;
}

.reviews-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 8px;
}

.review-card {
  background: var(--card);
  border-radius: 16px;
  padding: 16px;
  border: 1px solid var(--border);
}

.review-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}

.review-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 16px;
  color: #000;
}

.review-meta {
  flex: 1;
}

.review-name {
  font-weight: 600;
  font-size: 15px;
}

.review-verified {
  font-size: 12px;
  color: var(--green);
  display: flex;
  align-items: center;
  gap: 4px;
}

.review-date {
  font-size: 12px;
  color: var(--text-secondary);
}

.review-stars {
  color: #ffc107;
  font-size: 14px;
  margin-bottom: 8px;
}

.review-text {
  font-size: 14px;
  line-height: 1.45;
  color: #d0d5dd;
}

/* Profile */
.profile-card {
  background: var(--card);
  border-radius: 18px;
  padding: 18px;
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 16px;
  border: 1px solid var(--border);
}

.avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  font-weight: 800;
  color: #000;
  border: 3px solid rgba(0, 230, 118, 0.3);
}

.username {
  font-size: 18px;
  font-weight: 700;
}

.user-id {
  font-size: 13px;
  color: var(--text-secondary);
  margin: 2px 0 6px;
}

.level-tag {
  display: inline-block;
  background: rgba(0, 230, 118, 0.12);
  color: var(--green);
  font-size: 12px;
  padding: 4px 10px;
  border-radius: 8px;
  font-weight: 600;
}

.level-card {
  background: var(--card);
  border-radius: 18px;
  padding: 18px;
  margin-bottom: 16px;
  border: 1px solid var(--border);
}

.level-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}

.level-icon {
  width: 44px;
  height: 44px;
  background: rgba(0, 230, 118, 0.12);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
}

.level-label {
  font-size: 11px;
  color: var(--text-secondary);
  letter-spacing: 0.5px;
}

.level-name {
  font-size: 20px;
  font-weight: 700;
}

.level-spent {
  margin-left: auto;
  text-align: right;
}

.spent-label {
  font-size: 11px;
  color: var(--text-secondary);
}

.spent-value {
  font-size: 16px;
  font-weight: 700;
}

.progress-bar {
  height: 6px;
  background: rgba(255,255,255,0.08);
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: 10px;
}

.progress-fill {
  height: 100%;
  background: var(--gradient);
  border-radius: 3px;
}

.progress-info {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 12px;
}

.progress-info .link {
  color: var(--green);
}

.level-bonus {
  display: inline-block;
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 8px 12px;
  font-size: 13px;
  color: var(--text-secondary);
}

.menu-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.menu-item {
  background: var(--card);
  border-radius: 16px;
  padding: 16px;
  display: flex;
  align-items: center;
  gap: 14px;
  cursor: pointer;
  border: 1px solid var(--border);
}

.menu-item:active {
  border-color: rgba(0, 230, 118, 0.3);
}

.menu-icon {
  width: 42px;
  height: 42px;
  background: rgba(0, 230, 118, 0.1);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
}

.menu-text {
  flex: 1;
}

.menu-title {
  font-weight: 600;
  font-size: 15px;
}

.menu-desc {
  font-size: 13px;
  color: var(--text-secondary);
  margin-top: 2px;
}

.menu-arrow {
  font-size: 22px;
  color: var(--text-secondary);
}

/* Empty state */
.empty-state {
  text-align: center;
  padding: 40px 20px;
  background: var(--card);
  border-radius: 20px;
  margin-bottom: 24px;
  border: 1px solid var(--border);
}

.empty-icon {
  font-size: 48px;
  margin-bottom: 16px;
  opacity: 0.8;
}

.empty-title {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 8px;
}

.empty-desc {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 24px;
  line-height: 1.4;
}

.how-it-works h3 {
  font-size: 16px;
  margin-bottom: 14px;
  color: var(--text-secondary);
}

.steps {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 10px;
}

.step {
  background: var(--card);
  border-radius: 14px;
  padding: 16px 10px;
  text-align: center;
  border: 1px solid var(--border);
}

.step-icon {
  font-size: 24px;
  margin-bottom: 8px;
}

.step-title {
  font-weight: 600;
  font-size: 13px;
  margin-bottom: 4px;
}

.step-desc {
  font-size: 11px;
  color: var(--text-secondary);
}

/* Back header */
.back-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.back-btn {
  background: var(--card);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 8px 14px;
  border-radius: 10px;
  font-size: 14px;
  cursor: pointer;
}

/* Bottom Nav */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 480px;
  background: rgba(16, 19, 26, 0.95);
  backdrop-filter: blur(16px);
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-around;
  padding: 10px 8px 24px;
  z-index: 100;
}

.nav-item {
  background: none;
  border: none;
  color: var(--text-secondary);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  cursor: pointer;
  padding: 6px 12px;
  border-radius: 12px;
  transition: all 0.2s;
}

.nav-item .nav-icon {
  font-size: 20px;
}

.nav-item.active {
  color: var(--green);
  background: rgba(0, 230, 118, 0.1);
}

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

.tab-content.active {
  display: block;
}

/* Utils */
.link {
  cursor: pointer;
}
