:root {
  --bg: #0b0f19;
  --white: rgba(30, 41, 59, 0.7);
  --text-dark: #f8fafc;
  --text-body: #cbd5e1;
  --text-muted: #94a3b8;
  --border: rgba(255, 255, 255, 0.1);
  --blue: #8b5cf6;
  --blue-hover: #7c3aed;
  --green: #10b981;
  --red: #ef4444;
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --glow: 0 0 20px rgba(139, 92, 246, 0.4);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: var(--font);
  background-color: var(--bg);
  background-image: radial-gradient(circle at top right, rgba(139, 92, 246, 0.15), transparent 40%),
                    radial-gradient(circle at bottom left, rgba(56, 189, 248, 0.1), transparent 40%);
  color: var(--text-dark);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
}

/* ===== NAVBAR ===== */
.navbar {
  background: rgba(11, 15, 25, 0.8);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  height: 64px;
  position: sticky;
  top: 0;
  z-index: 200;
}

.nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-left {
  display: flex;
  align-items: center;
  gap: 32px;
}

.logo-link {
  display: flex;
  align-items: center;
  text-decoration: none;
}

.logo-link text {
  fill: #fff !important;
}

.nav-links {
  display: flex;
  gap: 8px;
}

.nav-links a {
  color: var(--text-body);
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  padding: 8px 16px;
  border-radius: 8px;
  transition: all 0.2s;
}

.nav-links a:hover {
  background-color: rgba(255, 255, 255, 0.05);
  color: var(--text-dark);
}

.hamburger {
  display: none;
  font-size: 1.4rem;
  cursor: pointer;
  color: var(--text-dark);
}

.nav-search {
  flex: 1;
  max-width: 400px;
  margin: 0 24px;
}

.search-pill {
  display: flex;
  align-items: center;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 0 16px;
  height: 40px;
  transition: border-color 0.2s;
}

.search-pill:focus-within {
  border-color: var(--blue);
}

.search-pill i {
  color: var(--text-muted);
  font-size: 14px;
  margin-right: 10px;
}

.search-pill input {
  flex: 1;
  border: none;
  background: transparent;
  font-size: 14px;
  color: var(--text-dark);
  outline: none;
  font-family: inherit;
}

.search-pill input::placeholder {
  color: var(--text-muted);
}

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

.btn-login {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-dark);
  padding: 8px 20px;
  border-radius: 20px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.2s;
}

.btn-login:hover {
  background: rgba(255, 255, 255, 0.05);
}

.btn-signup {
  background: linear-gradient(135deg, var(--blue), #6366f1);
  border: none;
  color: white;
  padding: 8px 20px;
  border-radius: 20px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  box-shadow: var(--glow);
  transition: opacity 0.2s, transform 0.2s;
}

.btn-signup:hover {
  opacity: 0.9;
  transform: translateY(-1px);
}

.mobile-menu {
  display: none;
  background: #0f172a;
  border-bottom: 1px solid var(--border);
}

.mobile-menu.active { display: block; }

.mobile-menu a {
  display: block;
  padding: 16px 24px;
  text-decoration: none;
  color: var(--text-dark);
  font-weight: 600;
  font-size: 15px;
  border-bottom: 1px solid var(--border);
}

/* ===== PAGE ===== */
.page-bg {
  flex: 1;
  padding: 60px 24px;
  display: flex;
  align-items: center;
}

.page-container {
  width: 100%;
  max-width: 560px;
  margin: 0 auto;
}

.redeem-box {
  background: var(--white);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 40px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
  position: relative;
  overflow: hidden;
}

.redeem-box::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--blue), #38bdf8);
}

.redeem-box h1 {
  font-size: 28px;
  font-weight: 800;
  margin-bottom: 12px;
  background: linear-gradient(to right, #fff, #cbd5e1);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.subtitle {
  font-size: 15px;
  color: var(--text-body);
  line-height: 1.6;
  margin-bottom: 32px;
}

.step {
  display: none;
}

.step.active {
  display: block;
  animation: fadeUp 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

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

/* ===== FORMS ===== */
.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-body);
  margin-bottom: 8px;
  letter-spacing: 0.5px;
}

.rbx-input {
  width: 100%;
  height: 52px;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 0 16px;
  font-size: 15px;
  color: var(--text-dark);
  font-family: inherit;
  outline: none;
  transition: all 0.2s;
}

.rbx-input:focus {
  border-color: var(--blue);
  background: rgba(0, 0, 0, 0.4);
  box-shadow: 0 0 0 4px rgba(139, 92, 246, 0.15);
}

.rbx-select {
  cursor: pointer;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 16px center;
  background-size: 16px;
}

.btn-redeem {
  width: 100%;
  height: 52px;
  background: linear-gradient(135deg, var(--blue), #6366f1);
  color: white;
  border: none;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  box-shadow: var(--glow);
  transition: all 0.2s;
  margin-top: 12px;
}

.btn-redeem:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 30px rgba(139, 92, 246, 0.6);
}

.btn-redeem:disabled {
  background: #334155;
  box-shadow: none;
  color: var(--text-muted);
  cursor: not-allowed;
  transform: none;
}

.btn-back {
  height: 52px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 0 28px;
  font-size: 15px;
  font-weight: 600;
  color: var(--text-dark);
  cursor: pointer;
  font-family: inherit;
  transition: all 0.2s;
}

.btn-back:hover { background: rgba(255, 255, 255, 0.1); }

.btn-row {
  display: flex;
  gap: 16px;
  margin-top: 24px;
}

.btn-row .btn-redeem { flex: 1; margin-top: 0; }

/* ===== ACCOUNT FOUND BAR ===== */
.user-found-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px;
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.2);
  border-radius: 12px;
  font-size: 15px;
  color: var(--green);
  font-weight: 500;
  margin-bottom: 24px;
}

.user-found-bar strong {
  color: #fff;
  font-weight: 700;
}

/* ===== VALUE CARDS ===== */
.value-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.value-card {
  background: rgba(0, 0, 0, 0.2);
  border: 2px solid var(--border);
  border-radius: 16px;
  padding: 24px 16px;
  text-align: center;
  cursor: pointer;
  position: relative;
  transition: all 0.2s;
}

.value-card:hover {
  border-color: rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.05);
}

.value-card.selected {
  border-color: var(--blue);
  background: rgba(139, 92, 246, 0.1);
  box-shadow: inset 0 0 20px rgba(139, 92, 246, 0.1);
}

.value-card.selected .val-amount {
  color: var(--blue);
}

.val-amount {
  font-size: 26px;
  font-weight: 800;
  color: var(--text-dark);
  margin-bottom: 4px;
}

.val-label {
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.value-card.featured {
  border-color: rgba(139, 92, 246, 0.4);
}

.featured-tag {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(90deg, #ec4899, #8b5cf6);
  color: white;
  font-size: 11px;
  font-weight: 800;
  padding: 4px 12px;
  border-radius: 12px;
  white-space: nowrap;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  box-shadow: 0 4px 10px rgba(236, 72, 153, 0.3);
}

/* ===== PROCESSING ===== */
.process-spinner {
  margin: 40px 0;
}

.official-spinner {
  width: 50px;
  height: 50px;
  border: 4px solid var(--border);
  border-top-color: var(--blue);
  border-radius: 50%;
  animation: spin 1s cubic-bezier(0.55, 0.15, 0.45, 0.85) infinite;
  margin: 0 auto;
}

@keyframes spin { to { transform: rotate(360deg); } }

.process-steps {
  max-width: 360px;
  margin: 0 auto;
  text-align: left;
}

.p-step {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 0;
  font-size: 15px;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
  transition: all 0.3s;
}

.p-step:last-child { border-bottom: none; }

.p-step.active {
  color: var(--text-dark);
  font-weight: 600;
  transform: translateX(5px);
}

.p-step.active i { color: var(--blue); }
.p-step.done { color: var(--green); }
.p-step.done i { color: var(--green); }
.p-step.fail { color: var(--red); }
.p-step.fail i { color: var(--red); }

/* ===== MODAL ===== */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.8);
  backdrop-filter: blur(8px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.modal-backdrop.active { display: flex; animation: fadeIn 0.3s; }

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.modal-box {
  background: #151b28;
  width: 92%;
  max-width: 500px;
  border-radius: 24px;
  overflow: hidden;
  box-shadow: 0 30px 60px rgba(0,0,0,0.6);
  border: 1px solid rgba(255, 255, 255, 0.05);
  max-height: 92vh;
  overflow-y: auto;
  transform: scale(0.95);
  animation: scaleUp 0.3s forwards;
}

@keyframes scaleUp { to { transform: scale(1); } }

.modal-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
  font-weight: 700;
  font-size: 15px;
  background: rgba(0,0,0,0.2);
}

.modal-top i {
  cursor: pointer;
  color: var(--text-muted);
  font-size: 16px;
  transition: color 0.2s;
}

.modal-top i:hover { color: var(--text-dark); }

.modal-inner {
  padding: 32px 24px;
  text-align: center;
}

.modal-shield {
  width: 64px;
  height: 64px;
  background: rgba(139, 92, 246, 0.1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
  box-shadow: 0 0 30px rgba(139, 92, 246, 0.2);
}

.modal-shield i {
  font-size: 28px;
  color: var(--blue);
}

.modal-inner h2 {
  font-size: 22px;
  margin-bottom: 12px;
  font-weight: 800;
}

.modal-text {
  font-size: 15px;
  color: var(--text-body);
  line-height: 1.6;
  margin-bottom: 24px;
}

.modal-task-info {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  background: rgba(234, 179, 8, 0.1);
  border: 1px solid rgba(234, 179, 8, 0.2);
  border-radius: 12px;
  padding: 16px;
  font-size: 14px;
  color: #fde047;
  text-align: left;
  margin-bottom: 24px;
}

.modal-task-info i {
  margin-top: 2px;
  font-size: 16px;
}

/* ===== OFFERS ===== */
.offer-list-official {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.offer-item {
  display: flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 18px;
  padding: 20px;
  text-decoration: none;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
}

.offer-item:hover {
  border-color: rgba(139, 92, 246, 0.6);
  background: rgba(139, 92, 246, 0.1);
  transform: translateY(-4px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.offer-icon {
  width: 60px;
  height: 60px;
  border-radius: 16px;
  margin-right: 20px;
  object-fit: cover;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(0,0,0,0.5);
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.offer-details {
  flex: 1;
  min-width: 0;
  text-align: left;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.offer-title {
  font-size: 16px;
  font-weight: 800;
  color: var(--text-dark);
  margin-bottom: 6px;
  line-height: 1.3;
  word-break: break-word;
}

.offer-desc {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.4;
  word-break: break-word;
}



.modal-secure {
  margin-top: 24px;
  font-size: 13px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

/* ===== FOOTER ===== */
.rbx-footer {
  background: rgba(15, 23, 42, 0.8);
  border-top: 1px solid var(--border);
  padding: 48px 24px;
}

.footer-inner {
  max-width: 800px;
  margin: 0 auto;
  text-align: center;
}

.footer-links {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 20px;
  margin-bottom: 24px;
}

.footer-links a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: color 0.2s;
}

.footer-links a:hover { color: var(--text-dark); }

.copyright {
  color: var(--text-muted);
  font-size: 13px;
  line-height: 1.6;
}

/* ===== TOAST ===== */
.toast-notification {
  position: fixed;
  bottom: -100px;
  left: 24px;
  background: rgba(30, 41, 59, 0.9);
  backdrop-filter: blur(10px);
  border: 1px solid var(--border);
  padding: 16px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  gap: 16px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.5);
  z-index: 100;
  transition: bottom 0.5s cubic-bezier(0.16, 1, 0.3, 1);
  max-width: 320px;
}

.toast-notification.show { bottom: 24px; }

.toast-notification i {
  color: var(--blue);
  font-size: 1.5rem;
  background: rgba(139, 92, 246, 0.1);
  padding: 12px;
  border-radius: 12px;
}

.toast-text {
  font-size: 14px;
  color: var(--text-body);
  line-height: 1.5;
}

.toast-text strong {
  color: var(--text-dark);
}

#activity-amount {
  color: var(--blue) !important;
}

.toast-time {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 4px;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  .nav-links, .nav-search { display: none; }
  .hamburger { display: block; }
  .value-grid { grid-template-columns: 1fr; }
  .page-bg { padding: 32px 16px; }
  .redeem-box { padding: 32px 24px; }
  .modal-inner { padding: 24px 16px; }
  .toast-notification { left: 16px; right: 16px; max-width: none; }
  
  .offer-item {
    padding: 14px;
    border-radius: 16px;
  }
  .offer-icon {
    width: 52px;
    height: 52px;
    margin-right: 14px;
  }

  .offer-title {
    font-size: 15px;
  }
  .offer-desc {
    font-size: 12px;
  }
}
