/* ============================================
   Claim USDT - Frontend Dark Theme Styles
   ============================================ */

/* CSS Variables */
:root {
  --primary-start: #6366f1;
  --primary-end: #8b5cf6;
  --bg-primary: #0a0e1a;
  --bg-secondary: #111827;
  --bg-card: rgba(17, 24, 39, 0.8);
  --bg-card-hover: rgba(30, 41, 59, 0.9);
  --text-primary: #f9fafb;
  --text-secondary: #9ca3af;
  --text-muted: #6b7280;
  --border-color: rgba(99, 102, 241, 0.15);
  --border-hover: rgba(99, 102, 241, 0.3);
  --shadow-glow: 0 0 40px rgba(99, 102, 241, 0.15);
  --radius: 16px;
  --radius-sm: 10px;
}

/* Reset */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  min-height: 100vh;
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Container */
.container {
  width: 100%;
  max-width: 480px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ============================================
   Background Decoration
   ============================================ */
.background-decoration {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.4;
  animation: float 8s ease-in-out infinite;
}

.orb-1 {
  width: 300px;
  height: 300px;
  background: var(--primary-start);
  top: -100px;
  right: -100px;
  animation-delay: 0s;
}

.orb-2 {
  width: 250px;
  height: 250px;
  background: var(--primary-end);
  bottom: -80px;
  left: -80px;
  animation-delay: -3s;
}

.orb-3 {
  width: 200px;
  height: 200px;
  background: #06b6d4;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  animation-delay: -5s;
  opacity: 0.15;
}

@keyframes float {
  0%, 100% { transform: translateY(0px) scale(1); }
  50% { transform: translateY(-30px) scale(1.05); }
}

/* ============================================
   App Container
   ============================================ */
#app {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ============================================
   Header
   ============================================ */
.header {
  padding: 16px 0;
  border-bottom: 1px solid var(--border-color);
  backdrop-filter: blur(12px);
  background: rgba(10, 14, 26, 0.6);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

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

.logo-text {
  font-size: 18px;
  font-weight: 700;
  background: linear-gradient(135deg, var(--primary-start), var(--primary-end));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Wallet selector tabs */
.wallet-selector {
  display: flex;
  gap: 4px;
  background: var(--bg-secondary);
  border-radius: 12px;
  padding: 3px;
  border: 1px solid var(--border-color);
}

.wallet-tab {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border: none;
  border-radius: 10px;
  background: transparent;
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.25s ease;
  font-family: inherit;
  white-space: nowrap;
}

.wallet-tab:hover {
  color: var(--text-primary);
  background: rgba(99, 102, 241, 0.08);
}

.wallet-tab.active {
  background: linear-gradient(135deg, var(--primary-start), var(--primary-end));
  color: white;
  box-shadow: 0 2px 12px rgba(99, 102, 241, 0.35);
}

/* ============================================
   Main Content
   ============================================ */
.main-wrapper {
  flex: 1;
  padding: 32px 0;
}

/* ============================================
   Hero Section
   ============================================ */
.hero-section {
  text-align: center;
  margin-bottom: 36px;
}

.hero-icon {
  margin-bottom: 20px;
  animation: pulse-glow 3s ease-in-out infinite;
}

@keyframes pulse-glow {
  0%, 100% { transform: scale(1); filter: drop-shadow(0 0 8px rgba(99, 102, 241, 0.3)); }
  50% { transform: scale(1.05); filter: drop-shadow(0 0 20px rgba(99, 102, 241, 0.5)); }
}

.hero-title {
  font-size: 32px;
  font-weight: 700;
  background: linear-gradient(135deg, #ffffff 0%, #e0e7ff 50%, var(--primary-start) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 12px;
  letter-spacing: -0.02em;
}

.hero-description {
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.6;
  max-width: 360px;
  margin: 0 auto;
}

/* ============================================
   Wallet Status Alert
   ============================================ */
.wallet-status {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  background: rgba(245, 158, 11, 0.1);
  border: 1px solid rgba(245, 158, 11, 0.25);
  border-radius: var(--radius-sm);
  margin-bottom: 24px;
}

.wallet-status .status-icon {
  font-size: 20px;
  flex-shrink: 0;
}

.wallet-status .status-text {
  font-size: 14px;
  color: #fbbf24;
  line-height: 1.5;
}

/* ============================================
   Loading Indicator
   ============================================ */
.loading-indicator {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 40px;
  color: var(--text-secondary);
  font-size: 14px;
}

.loading-spinner {
  width: 24px;
  height: 24px;
  border: 2.5px solid var(--border-color);
  border-top-color: var(--primary-start);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

/* ============================================
   Action Section - Main Claim Button
   ============================================ */
.action-section {
  text-align: center;
  margin-bottom: 40px;
}

.btn-claim {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 100%;
  max-width: 400px;
  padding: 20px 32px;
  background: linear-gradient(135deg, var(--primary-start), var(--primary-end));
  border: none;
  border-radius: var(--radius);
  color: white;
  font-size: 18px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 24px rgba(99, 102, 241, 0.35), 0 0 0 1px rgba(255, 255, 255, 0.1) inset;
  position: relative;
  overflow: hidden;
  letter-spacing: 0.02em;
}

.btn-claim::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.15), transparent);
  transition: left 0.5s ease;
}

.btn-claim:hover::before {
  left: 100%;
}

.btn-claim:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(99, 102, 241, 0.45), 0 0 0 1px rgba(255, 255, 255, 0.15) inset;
}

.btn-claim:active {
  transform: translateY(0);
  box-shadow: 0 2px 16px rgba(99, 102, 241, 0.3);
}

.btn-claim:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.btn-claim:disabled::before {
  display: none;
}

.btn-claim-icon {
  display: flex;
  align-items: center;
}

.btn-claim-text {
  flex: 1;
}

.btn-claim-arrow {
  display: flex;
  align-items: center;
  opacity: 0.8;
}

.action-hint {
  margin-top: 12px;
  font-size: 13px;
  color: var(--text-muted);
}

/* ============================================
   Processing Overlay
   ============================================ */
.processing-overlay {
  text-align: center;
  padding: 40px 20px;
  margin-bottom: 40px;
}

.processing-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

.processing-spinner {
  width: 48px;
  height: 48px;
  border: 3px solid var(--border-color);
  border-top-color: var(--primary-start);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.processing-text {
  font-size: 15px;
  color: var(--text-secondary);
  animation: pulse-text 1.5s ease-in-out infinite;
}

@keyframes pulse-text {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

/* ============================================
   Result Section
   ============================================ */
.result-section {
  margin-bottom: 40px;
}

.result-card {
  text-align: center;
  padding: 32px 24px;
  background: var(--bg-card);
  border-radius: var(--radius);
  border: 1px solid var(--border-color);
  backdrop-filter: blur(12px);
}

.result-card.success {
  border-color: rgba(34, 197, 94, 0.3);
  background: rgba(34, 197, 94, 0.05);
}

.result-card.error {
  border-color: rgba(239, 68, 68, 0.3);
  background: rgba(239, 68, 68, 0.05);
}

.result-icon {
  font-size: 48px;
  margin-bottom: 16px;
}

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

.result-card.success .result-title {
  color: #22c55e;
}

.result-card.error .result-title {
  color: #ef4444;
}

.result-description {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 24px;
}

.btn-retry {
  padding: 12px 32px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 14px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.25s ease;
}

.btn-retry:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-hover);
}

/* ============================================
   Guide Section
   ============================================ */
.guide-section {
  margin-bottom: 36px;
  padding: 24px;
  background: var(--bg-card);
  border-radius: var(--radius);
  border: 1px solid var(--border-color);
  backdrop-filter: blur(12px);
}

.guide-title {
  font-size: 17px;
  font-weight: 700;
  margin-bottom: 20px;
  color: var(--text-primary);
}

.guide-content {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.guide-step {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}

.step-number {
  width: 28px;
  height: 28px;
  min-width: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--primary-start), var(--primary-end));
  border-radius: 50%;
  font-size: 13px;
  font-weight: 700;
  color: white;
}

.step-text {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.6;
  padding-top: 3px;
}

/* ============================================
   Footer
   ============================================ */
.footer {
  padding: 28px 0;
  border-top: 1px solid var(--border-color);
}

.footer-content {
  padding: 0 4px;
}

.footer-note {
  margin-bottom: 12px;
}

.footer-note strong {
  font-size: 14px;
  color: var(--text-secondary);
}

.footer-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.footer-list li {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.5;
  padding-left: 16px;
  position: relative;
}

.footer-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 8px;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--primary-start);
}

/* ============================================
   Modal Overlay
   ============================================ */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
}

.modal-content {
  background: var(--bg-secondary);
  border-radius: var(--radius);
  border: 1px solid var(--border-color);
  padding: 32px 24px;
  width: 100%;
  max-width: 380px;
  text-align: center;
}

.redirect-modal-content {
  background: var(--bg-secondary);
}

.redirect-icon {
  margin-bottom: 20px;
}

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

.redirect-description {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 24px;
  line-height: 1.6;
}

.btn-redirect {
  width: 100%;
  margin-bottom: 16px;
  padding: 16px;
}

.redirect-secondary-actions {
  display: flex;
  justify-content: center;
  gap: 24px;
}

.btn-link {
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: 14px;
  cursor: pointer;
  text-decoration: none;
  font-family: inherit;
  transition: color 0.2s;
}

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

/* ============================================
   Toast Notification
   ============================================ */
.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 20px;
  background: var(--bg-secondary);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  z-index: 2000;
  max-width: 400px;
  width: calc(100% - 40px);
  animation: slide-up 0.3s ease;
}

.toast.success {
  border-color: rgba(34, 197, 94, 0.3);
}

.toast.error {
  border-color: rgba(239, 68, 68, 0.3);
}

.toast-icon {
  font-size: 20px;
  flex-shrink: 0;
}

.toast-message {
  flex: 1;
  font-size: 14px;
  color: var(--text-primary);
}

.toast-close {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 18px;
  cursor: pointer;
  padding: 4px;
  line-height: 1;
}

@keyframes slide-up {
  from { transform: translateX(-50%) translateY(20px); opacity: 0; }
  to { transform: translateX(-50%) translateY(0); opacity: 1; }
}

/* ============================================
   Utility
   ============================================ */
.hidden {
  display: none !important;
}

/* ============================================
   Responsive - Tablet & Desktop
   ============================================ */
@media (min-width: 768px) {
  .container {
    max-width: 520px;
  }

  .hero-title {
    font-size: 38px;
  }

  .hero-description {
    font-size: 16px;
  }

  .btn-claim {
    padding: 22px 36px;
    font-size: 19px;
  }
}

@media (min-width: 1024px) {
  .container {
    max-width: 560px;
  }

  .hero-title {
    font-size: 42px;
  }
}

/* ============================================
   Mobile adjustments
   ============================================ */
@media (max-width: 380px) {
  .hero-title {
    font-size: 26px;
  }

  .btn-claim {
    padding: 16px 24px;
    font-size: 16px;
    gap: 8px;
  }

  .wallet-tab {
    padding: 6px 10px;
    font-size: 12px;
    gap: 4px;
  }
}
