:root {
  --primary-color: #6366f1;
  --primary-dark: #4f46e5;
  --primary-light: #818cf8;
  --secondary-color: #ec4899;
  --success-color: #10b981;
  --warning-color: #f59e0b;
  --danger-color: #ef4444;
  --dark-bg: #0f172a;
  --card-bg: #1e293b;
  --card-hover: #334155;
  --text-primary: #f1f5f9;
  --text-secondary: #94a3b8;
  --border-color: #334155;
  --gradient-1: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  --gradient-2: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
  --gradient-3: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
  --gradient-gold: linear-gradient(135deg, #ffd700 0%, #ffed4e 100%);
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.5);
  --shadow-glow: 0 0 20px rgba(99, 102, 241, 0.5);
}

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

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

/* Loading Screen */
.loading-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--dark-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

.loader {
  text-align: center;
}

.crypto-icon {
  font-size: 4rem;
  color: var(--primary-color);
  animation: bounce 1s infinite;
}

@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-20px); }
}

.loading-text {
  margin-top: 1rem;
  font-size: 1.2rem;
  color: var(--text-secondary);
}

/* App Container */
.app {
  max-width: 600px;
  margin: 0 auto;
  min-height: 100vh;
  background: linear-gradient(180deg, #1e293b 0%, #0f172a 100%);
}

/* Header */
.header {
  background: var(--gradient-1);
  padding: 1.5rem;
  box-shadow: var(--shadow-md);
  position: sticky;
  top: 0;
  z-index: 100;
}

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

.user-info {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.avatar {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  color: white;
  border: 3px solid rgba(255, 255, 255, 0.3);
}

.user-details {
  display: flex;
  flex-direction: column;
}

.username {
  font-weight: 700;
  font-size: 1.1rem;
  color: white;
}

.rank {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.8);
}

.points-display {
  background: rgba(255, 255, 255, 0.2);
  padding: 0.75rem 1.25rem;
  border-radius: 50px;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 700;
  font-size: 1.2rem;
  color: white;
  backdrop-filter: blur(10px);
  box-shadow: var(--shadow-sm);
}

.points-display i {
  color: #ffd700;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.1); }
}

/* Navigation Tabs */
.nav-tabs {
  display: flex;
  background: var(--card-bg);
  border-bottom: 2px solid var(--border-color);
  position: sticky;
  top: 82px;
  z-index: 99;
}

.nav-tab {
  flex: 1;
  padding: 1rem;
  background: none;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.85rem;
  position: relative;
}

.nav-tab i {
  font-size: 1.3rem;
}

.nav-tab:hover {
  background: var(--card-hover);
  color: var(--text-primary);
}

.nav-tab.active {
  color: var(--primary-color);
}

.nav-tab.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--gradient-1);
}

/* Content */
.content {
  padding: 1.5rem;
  padding-bottom: 2rem;
}

.tab-content {
  display: none;
  animation: fadeIn 0.3s ease;
}

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

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

/* Welcome Card */
.welcome-card {
  background: var(--gradient-2);
  padding: 2rem;
  border-radius: 20px;
  text-align: center;
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow-lg);
}

.welcome-title {
  font-size: 1.8rem;
  font-weight: 800;
  margin-bottom: 0.5rem;
  color: white;
}

.welcome-subtitle {
  font-size: 1rem;
  color: rgba(255, 255, 255, 0.9);
}

/* Cards */
.card {
  background: var(--card-bg);
  border-radius: 16px;
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow-md);
  overflow: hidden;
  border: 1px solid var(--border-color);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.card-header {
  padding: 1.25rem;
  border-bottom: 1px solid var(--border-color);
  background: rgba(99, 102, 241, 0.1);
}

.card-header h2 {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.card-header i {
  color: var(--primary-color);
}

.card-body {
  padding: 1.25rem;
}

/* Stats Grid */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.stat-card {
  background: var(--card-bg);
  padding: 1.25rem;
  border-radius: 16px;
  display: flex;
  align-items: center;
  gap: 1rem;
  border: 1px solid var(--border-color);
  transition: all 0.3s ease;
}

.stat-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-glow);
  border-color: var(--primary-color);
}

.stat-icon {
  width: 50px;
  height: 50px;
  border-radius: 12px;
  background: var(--gradient-1);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  color: white;
}

.stat-info {
  flex: 1;
}

.stat-value {
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--text-primary);
}

.stat-label {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

/* Airdrop Card */
.airdrop-card {
  border: 2px solid var(--primary-color);
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.1) 0%, rgba(139, 92, 246, 0.1) 100%);
}

.airdrop-status {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 1rem;
}

.eligibility-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 8px;
}

.eligibility-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-primary);
}

.eligibility-status {
  font-size: 1.2rem;
}

.eligibility-status.met {
  color: var(--success-color);
}

.eligibility-status.not-met {
  color: var(--danger-color);
}

.airdrop-result {
  padding: 1rem;
  border-radius: 8px;
  text-align: center;
  font-weight: 600;
  margin-top: 1rem;
}

.airdrop-result.eligible {
  background: rgba(16, 185, 129, 0.2);
  color: var(--success-color);
  border: 1px solid var(--success-color);
}

.airdrop-result.not-eligible {
  background: rgba(239, 68, 68, 0.2);
  color: var(--danger-color);
  border: 1px solid var(--danger-color);
}

/* Buttons */
.btn {
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: 12px;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: inherit;
}

.btn-primary {
  background: var(--gradient-1);
  color: white;
  box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-glow);
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-secondary {
  background: var(--card-hover);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
}

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

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Input Fields */
.input {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-primary);
  font-size: 1rem;
  font-family: inherit;
  transition: all 0.3s ease;
  margin-bottom: 1rem;
}

.input:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
}

.input::placeholder {
  color: var(--text-secondary);
}

/* Messages */
.message {
  padding: 0.75rem;
  border-radius: 8px;
  margin-top: 1rem;
  font-size: 0.9rem;
  display: none;
}

.message.success {
  background: rgba(16, 185, 129, 0.2);
  color: var(--success-color);
  border: 1px solid var(--success-color);
  display: block;
}

.message.error {
  background: rgba(239, 68, 68, 0.2);
  color: var(--danger-color);
  border: 1px solid var(--danger-color);
  display: block;
}

.message.info {
  background: rgba(99, 102, 241, 0.2);
  color: var(--primary-color);
  border: 1px solid var(--primary-color);
  display: block;
}

/* Missions List */
.missions-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.mission-item {
  background: rgba(255, 255, 255, 0.05);
  padding: 1.25rem;
  border-radius: 12px;
  border: 1px solid var(--border-color);
  transition: all 0.3s ease;
}

.mission-item:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--primary-color);
}

.mission-header {
  display: flex;
  justify-content: space-between;
  align-items: start;
  margin-bottom: 0.75rem;
}

.mission-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.mission-badge {
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
}

.mission-badge.daily {
  background: rgba(16, 185, 129, 0.2);
  color: var(--success-color);
}

.mission-badge.weekly {
  background: rgba(245, 158, 11, 0.2);
  color: var(--warning-color);
}

.mission-badge.once {
  background: rgba(99, 102, 241, 0.2);
  color: var(--primary-color);
}

.mission-description {
  color: var(--text-secondary);
  margin-bottom: 1rem;
  font-size: 0.95rem;
}

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

.mission-reward {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 700;
  color: #ffd700;
  font-size: 1.1rem;
}

.mission-status {
  padding: 0.5rem 1rem;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 600;
}

.mission-status.completed {
  background: rgba(16, 185, 129, 0.2);
  color: var(--success-color);
}

.mission-status.pending {
  background: rgba(245, 158, 11, 0.2);
  color: var(--warning-color);
}

/* Leaderboard */
.leaderboard-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.leaderboard-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  border: 1px solid var(--border-color);
  transition: all 0.3s ease;
}

.leaderboard-item:hover {
  background: rgba(255, 255, 255, 0.08);
  transform: translateX(5px);
}

.leaderboard-item.top-1 {
  background: linear-gradient(135deg, rgba(255, 215, 0, 0.2) 0%, rgba(255, 237, 78, 0.2) 100%);
  border-color: #ffd700;
}

.leaderboard-item.top-2 {
  background: linear-gradient(135deg, rgba(192, 192, 192, 0.2) 0%, rgba(220, 220, 220, 0.2) 100%);
  border-color: #c0c0c0;
}

.leaderboard-item.top-3 {
  background: linear-gradient(135deg, rgba(205, 127, 50, 0.2) 0%, rgba(255, 165, 0, 0.2) 100%);
  border-color: #cd7f32;
}

.leaderboard-rank {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--gradient-1);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1.1rem;
  color: white;
}

.leaderboard-item.top-1 .leaderboard-rank {
  background: var(--gradient-gold);
  color: #000;
}

.leaderboard-info {
  flex: 1;
}

.leaderboard-name {
  font-weight: 600;
  color: var(--text-primary);
}

.leaderboard-points {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

/* Social Links */
.social-links {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.social-link-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.75rem;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  border: 1px solid var(--border-color);
}

.social-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  color: white;
}

.social-icon.twitter { background: #1da1f2; }
.social-icon.instagram { background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%); }
.social-icon.tiktok { background: #000; }
.social-icon.youtube { background: #ff0000; }
.social-icon.facebook { background: #1877f2; }

.social-link-info {
  flex: 1;
}

.social-platform {
  font-weight: 600;
  color: var(--text-primary);
}

.social-username {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.add-social {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 0.5rem;
}

/* Wallet Display */
.wallet-display {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

/* Referral */
.referral-code {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.referral-code .input {
  margin-bottom: 0;
}

.referral-stats {
  padding: 1rem;
  background: rgba(99, 102, 241, 0.1);
  border-radius: 8px;
  text-align: center;
}

/* Modal */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(5px);
}

.modal.active {
  display: flex;
}

.modal-content {
  background: var(--card-bg);
  border-radius: 20px;
  max-width: 500px;
  width: 90%;
  max-height: 80vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border-color);
  animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
  from {
    opacity: 0;
    transform: translateY(-50px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.modal-header {
  padding: 1.5rem;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(99, 102, 241, 0.1);
}

.modal-header h3 {
  font-size: 1.3rem;
  color: var(--text-primary);
}

.modal-close {
  background: none;
  border: none;
  font-size: 2rem;
  color: var(--text-secondary);
  cursor: pointer;
  transition: color 0.3s ease;
}

.modal-close:hover {
  color: var(--text-primary);
}

.modal-body {
  padding: 1.5rem;
}

.modal-reward {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-size: 1.5rem;
  font-weight: 700;
  color: #ffd700;
  margin: 1rem 0;
}

.proof-section {
  margin: 1rem 0;
}

.proof-section label {
  display: block;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
  font-weight: 500;
}

.modal-footer {
  padding: 1.5rem;
  border-top: 1px solid var(--border-color);
}

/* Responsive */
@media (max-width: 480px) {
  .header-content {
    flex-direction: column;
    gap: 1rem;
  }

  .stats-grid {
    grid-template-columns: 1fr;
  }

  .add-social {
    grid-template-columns: 1fr;
  }

  .nav-tab span {
    font-size: 0.75rem;
  }

  .welcome-title {
    font-size: 1.5rem;
  }
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: var(--dark-bg);
}

::-webkit-scrollbar-thumb {
  background: var(--border-color);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--primary-color);
}
