/* ============================================
   Cyno Rewards - Luxury Glass-Morphism Styles
   ============================================ */

:root {
  --rewards-primary: var(--accent, #7bdcff);
  --rewards-primary-dark: color-mix(in srgb, var(--accent, #7bdcff) 85%, black);
  --rewards-secondary: var(--accent-2, #8de6d6);
  --rewards-accent: var(--accent-3, #f59e0b);
  --rewards-success: var(--status-success, #10b981);
  --rewards-bg-dark: var(--bg-0, #06080f);
  --rewards-bg-card: color-mix(in srgb, var(--glass-bg, rgba(16, 24, 40, 0.42)) 60%, transparent);
  --rewards-bg-glass: color-mix(in srgb, var(--glass-bg, rgba(16, 24, 40, 0.42)) 50%, transparent);
  --rewards-border: var(--glass-border, rgba(160, 190, 230, 0.22));
  --rewards-text: var(--text, #eef3ff);
  --rewards-text-muted: var(--text-muted, #a8b9d4);
  --rewards-shadow: var(--shadow-1, 0 8px 32px rgba(0, 0, 0, 0.4));
  --rewards-radius: var(--radius-lg, 16px);
  --rewards-radius-sm: var(--radius-sm, 8px);
  --rewards-transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1),
                        opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1),
                        background-color 0.3s cubic-bezier(0.4, 0, 0.2, 1),
                        border-color 0.3s cubic-bezier(0.4, 0, 0.2, 1),
                        box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Page Layout */
.rewards-page {
  min-height: 100vh;
  /* No opaque background — let the unified .body-bg aurora show through, like
     .dashboard-shell. The old diagonal slab covered the aurora and made the page
     read as a flat off-palette navy that didn't match the rest of the site. */
  padding-top: 80px;
  padding-bottom: 60px;
}

/* Hero Section */
.rewards-hero {
  position: relative;
  padding: 60px 20px 50px;
  text-align: center;
  /* Faint cyan glass wash that blends with the unified .body-bg aurora — the old
     cyan→mint gradient made the hero read as a distinct greenish slab that didn't
     match the rest of the page. */
  background: linear-gradient(180deg, rgba(123, 220, 255, 0.06) 0%, transparent 100%);
  border-bottom: 1px solid var(--rewards-border);
  overflow: hidden;
}

.rewards-hero::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle at 30% 50%, rgba(123, 220, 255, 0.06) 0%, transparent 50%),
              radial-gradient(circle at 70% 50%, rgba(123, 220, 255, 0.05) 0%, transparent 50%);
  animation: heroFloat 20s ease-in-out infinite;
  pointer-events: none;
}

@keyframes heroFloat {
  0%, 100% { transform: translate(0, 0) rotate(0deg); }
  50% { transform: translate(-20px, 20px) rotate(5deg); }
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 800px;
  margin: 0 auto;
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0;
  border-radius: 0;
  border: none;
  background: none;
  color: rgba(123, 220, 255, 0.9);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-bottom: 20px;
}

.hero-icon {
  width: 14px;
  height: 14px;
  color: var(--rewards-accent);
}

.hero-title {
  font-size: 3.5rem;
  font-weight: 800;
  margin: 0 0 12px;
  background: linear-gradient(135deg, var(--rewards-text) 0%, var(--rewards-primary) 50%, var(--rewards-secondary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-shadow: 0 0 40px rgba(123, 220, 255, 0.3);
}

.hero-subtitle {
  font-size: 1.15rem;
  color: var(--rewards-text-muted);
  margin-bottom: 32px;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.hero-actions {
  display: flex;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
}

/* Rewards Grid */
.rewards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 24px;
  max-width: 1400px;
  margin: 0 auto;
  padding: 40px 20px 60px;
}

/* Reward Card */
.reward-card {
  position: relative;
  padding: 24px;
  background: var(--rewards-bg-card);
  backdrop-filter: blur(12px);
  border: 1px solid var(--rewards-border);
  border-radius: var(--rewards-radius);
  overflow: hidden;
  transition: var(--rewards-transition);
}

.reward-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--rewards-shadow), 0 0 40px rgba(123, 220, 255, 0.15);
  border-color: var(--rewards-primary);
}

/* Card Header */
.card-header {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 24px 24px 0;
}

.card-icon-wrap {
  width: 48px;
  height: 48px;
  border-radius: var(--rewards-radius-sm);
  background: linear-gradient(135deg, var(--rewards-primary), var(--rewards-secondary));
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 4px 16px rgba(123, 220, 255, 0.3);
}

.card-icon {
  width: 22px;
  height: 22px;
  color: white;
}

.card-meta {
  min-width: 0;
}

.card-meta .eyebrow {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--rewards-primary);
  margin-bottom: 8px;
}

.card-meta h2 {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--rewards-text);
  margin: 0;
  line-height: 1.3;
}

/* Card Body */
.card-body {
  padding: 20px 24px 24px;
}

/* Stats Row */
.stats-row {
  display: flex;
  gap: 20px;
  margin-bottom: 16px;
}

.stat-item {
  flex: 1;
  padding: 12px;
  border-radius: var(--rewards-radius-sm);
  background: var(--rewards-bg-glass);
  border: 1px solid var(--rewards-border);
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.stat-label {
  font-size: 0.75rem;
  color: var(--rewards-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.stat-value {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--rewards-text);
}

/* Redeem Tiers */
.redeem-tiers {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 16px;
}

.tier-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 16px;
  border-radius: var(--rewards-radius-sm);
  background: var(--rewards-bg-glass);
  border: 1px solid var(--rewards-border);
  transition: var(--rewards-transition);
}

.tier-item:hover {
  background: rgba(123, 220, 255, 0.08);
  border-color: var(--rewards-primary);
}

.tier-badge {
  padding: 0;
  border-radius: 0;
  background: none;
  color: white;
  font-size: 0.8rem;
  font-weight: 700;
}

.tier-value {
  font-size: 1rem;
  font-weight: 600;
  color: var(--rewards-text);
}

/* Spin Wheel */
.spin-wheel-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.spin-wheel-visual {
  width: 200px;
  height: 200px;
  border-radius: 50%;
  background: conic-gradient(
    var(--rewards-primary) 0deg 51.4deg,
    var(--rewards-secondary) 51.4deg 102.8deg,
    var(--rewards-accent) 102.8deg 154.3deg,
    var(--rewards-success) 154.3deg 205.7deg,
    var(--rewards-primary) 205.7deg 257.1deg,
    var(--rewards-secondary) 257.1deg 308.6deg,
    var(--rewards-accent) 308.6deg 360deg
  );
  border: 3px solid var(--rewards-border);
  box-shadow: 0 0 30px rgba(123, 220, 255, 0.3), inset 0 0 20px rgba(0, 0, 0, 0.3);
  position: relative;
  transition: var(--rewards-transition);
}

.spin-wheel-visual::before {
  content: '';
  position: absolute;
  inset: 20px;
  border-radius: 50%;
  background: var(--rewards-bg-dark);
  border: 2px solid var(--rewards-border);
}

.spin-wheel-visual::after {
  content: '';
  position: absolute;
  top: 8px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 8px solid transparent;
  border-right: 8px solid transparent;
  border-top: 16px solid var(--rewards-accent);
  z-index: 2;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.5));
}

.spin-wheel-hint {
  text-align: center;
  color: var(--rewards-text-muted);
  font-size: 0.85rem;
  margin: 12px 0 0;
}

/* Transactions List */
.transactions-list {
  max-height: 240px;
  overflow-y: auto;
}

.transactions-list::-webkit-scrollbar {
  width: 6px;
}

.transactions-list::-webkit-scrollbar-track {
  background: transparent;
}

.transactions-list::-webkit-scrollbar-thumb {
  background: var(--rewards-primary);
  border-radius: 3px;
}

/* Leaderboard List */
.leaderboard-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* Loading State */
.loading-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 40px;
  color: var(--rewards-text-muted);
}

.loading-spinner {
  width: 24px;
  height: 24px;
  animation: spin 1s linear infinite;
  color: var(--rewards-primary);
}

/* Card Actions */
.card-actions {
  display: flex;
  justify-content: center;
  margin-top: 16px;
}

/* Button Icons */
.btn-icon {
  width: 16px;
  height: 16px;
  margin-right: 6px;
}

/* Responsive Design */
@media (max-width: 768px) {
  .rewards-hero {
    padding: 40px 16px 36px;
  }

  .hero-title {
    font-size: 2.5rem;
  }

  .hero-subtitle {
    font-size: 1rem;
  }

  .hero-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .hero-actions .btn {
    width: 100%;
    justify-content: center;
  }

  .rewards-grid {
    grid-template-columns: 1fr;
    padding: 24px 16px 40px;
    gap: 16px;
  }

  .card-header {
    padding: 18px 18px 0;
  }

  .card-body {
    padding: 16px 18px 18px;
  }

  .stats-row {
    flex-direction: column;
    gap: 10px;
  }

  .spin-wheel-visual {
    width: 160px;
    height: 160px;
  }
}

@media (max-width: 480px) {
  .hero-title {
    font-size: 2rem;
  }

  .card-header {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .card-meta {
    text-align: center;
  }
}
