/* ========================================
   TROPHY Gift System - Complete Stylesheet
   Roxy Systems Aesthetic + Full Feature Set
   ======================================== */

/* ========================================
   CSS VARIABLES & FOUNDATION
   ======================================== */

:root {
  /* Roxy Systems Color Palette - Dark Mode */
  --color-bg-primary: #0a0a0a;
  --color-bg-secondary: #121212;
  --color-bg-tertiary: #1a1a1a;
  --color-bg-elevated: #1f1f1f;
  
  --color-text-primary: #ffffff;
  --color-text-secondary: #a0a0a0;
  --color-text-tertiary: #666666;
  --color-text-muted: #404040;
  
  /* Original color scheme as fallbacks */
  --primary-color: #6366f1;
  --primary-dark: #4f46e5;
  --secondary-color: #8b5cf6;
  --success-color: #10b981;
  --danger-color: #ef4444;
  --warning-color: #f59e0b;
  --bg-color: #0f172a;
  --surface-color: #1e293b;
  --surface-hover: #334155;
  --text-primary: #f1f5f9;
  --text-secondary: #cbd5e1;
  --text-muted: #94a3b8;
  --border-color: #334155;
  
  /* TROPHY Branding */
  --color-accent-primary: #FFD700;
  --color-accent-secondary: #B8860B;
  --color-accent-glow: rgba(255, 215, 0, 0.15);
  --trophy-gold: #FFD700;
  --trophy-dark-gold: #B8860B;
  
  --color-border-subtle: #2a2a2a;
  --color-border-medium: #3a3a3a;
  --color-border-strong: #4a4a4a;
  
  /* Gradients */
  --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%);
  
  /* Typography */
  --font-primary: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', sans-serif;
  --font-mono: 'SF Mono', 'Monaco', 'Inconsolata', 'Courier New', monospace;
  
  /* Spacing Scale */
  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 1.5rem;
  --space-lg: 2rem;
  --space-xl: 3rem;
  --space-2xl: 4rem;
  --space-3xl: 6rem;
  
  /* Border Radius */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  
  /* Shadows */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.5);
  --shadow-glow: 0 0 20px var(--color-accent-glow);
  
  /* Transitions */
  --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-base: 250ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 350ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* ========================================
   GLOBAL RESET & BASE STYLES
   ======================================== */

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

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-primary);
  background-color: var(--color-bg-primary);
  color: var(--color-text-primary);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

::selection {
  background-color: var(--color-accent-primary);
  color: var(--color-bg-primary);
}

/* ========================================
   NAVIGATION
   ======================================== */

.main-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background-color: rgba(10, 10, 10, 0.9);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--color-border-subtle);
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: var(--space-sm) var(--space-md);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  text-decoration: none;
  color: var(--color-text-primary);
  font-weight: 600;
  font-size: 1.125rem;
  transition: opacity var(--transition-fast);
}

.nav-logo:hover {
  opacity: 0.8;
}

.logo-symbol {
  font-size: 1.5rem;
  color: var(--color-accent-primary);
}

.nav-links {
  display: flex;
  gap: var(--space-lg);
}

.nav-link {
  color: var(--color-text-secondary);
  text-decoration: none;
  font-size: 0.9375rem;
  transition: color var(--transition-fast);
  position: relative;
}

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

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 1px;
  background-color: var(--color-accent-primary);
  transition: width var(--transition-base);
}

.nav-link:hover::after {
  width: 100%;
}

/* ========================================
   HERO HEADER
   ======================================== */

/* ========================================
   HERO LOGO SECTION
   ======================================== */

.hero-logo-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: var(--space-3xl) var(--space-md) var(--space-xl);
  position: relative;
  overflow: hidden;
}

.hero-logo-section::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 800px;
  height: 800px;
  background: radial-gradient(circle, var(--color-accent-glow) 0%, transparent 60%);
  pointer-events: none;
  animation: pulseGlow 4s ease-in-out infinite;
}

@keyframes pulseGlow {
  0%, 100% {
    opacity: 0.3;
    transform: translate(-50%, -50%) scale(1);
  }
  50% {
    opacity: 0.5;
    transform: translate(-50%, -50%) scale(1.1);
  }
}

.hero-logo {
  width: clamp(180px, 25vw, 280px);
  height: clamp(180px, 25vw, 280px);
  position: relative;
  z-index: 2;
  filter: drop-shadow(0 8px 32px rgba(255, 215, 0, 0.3));
  transition: all var(--transition-slow);
  animation: floatLogo 6s ease-in-out infinite;
}

@keyframes floatLogo {
  0%, 100% {
    transform: translateY(0px) rotate(0deg);
  }
  50% {
    transform: translateY(-10px) rotate(2deg);
  }
}

.hero-logo:hover {
  filter: drop-shadow(0 12px 48px rgba(255, 215, 0, 0.5));
  transform: scale(1.05) translateY(-5px);
  animation-play-state: paused;
}

.logo-tagline {
  margin-top: var(--space-lg);
  text-align: center;
  position: relative;
  z-index: 2;
}

.tagline-text {
  display: block;
  font-size: clamp(0.875rem, 1.5vw, 1.125rem);
  color: var(--color-text-secondary);
  font-weight: 400;
  margin-bottom: var(--space-xs);
  letter-spacing: 0.02em;
}

.tagline-emphasis {
  display: block;
  font-size: clamp(1rem, 2vw, 1.5rem);
  font-weight: 700;
  background: linear-gradient(135deg, #FFD700 0%, #FFA500 50%, #FF8C00 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -0.01em;
  animation: shimmer 3s ease-in-out infinite;
  background-size: 200% auto;
}

@keyframes shimmer {
  0%, 100% {
    background-position: 0% center;
  }
  50% {
    background-position: 100% center;
  }
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .hero-logo-section {
    padding: var(--space-2xl) var(--space-md) var(--space-lg);
  }
  
  .hero-logo {
    width: 160px;
    height: 160px;
  }
}

/* ========================================
   HERO SECTION
   ======================================== */

.hero {
  text-align: center;
  padding: var(--space-lg) var(--space-md) var(--space-xl);
  border-bottom: 1px solid var(--color-border-subtle);
  position: relative;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 600px;
  height: 400px;
  background: radial-gradient(circle, var(--color-accent-glow) 0%, transparent 70%);
  pointer-events: none;
  opacity: 0.3;
}

.hero-badge {
  display: inline-block;
  padding: var(--space-xs) var(--space-md);
  background-color: var(--color-bg-elevated);
  border: 1px solid var(--color-border-medium);
  border-radius: 100px;
  color: var(--color-accent-primary);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: var(--space-md);
}

.hero-title {
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: var(--space-sm);
  background: linear-gradient(135deg, var(--color-text-primary) 0%, var(--color-text-secondary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subtitle {
  font-size: clamp(1.125rem, 2vw, 1.5rem);
  color: var(--color-text-secondary);
  margin-bottom: var(--space-md);
  font-weight: 400;
}

.hero-description {
  font-size: 1rem;
  color: var(--color-text-tertiary);
  font-style: italic;
  max-width: 600px;
  margin: 0 auto;
}

/* Legacy header support */
header {
  text-align: center;
  margin-bottom: 3rem;
  padding: 2rem 0;
}

header h1 {
  font-size: 3rem;
  font-weight: 800;
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 0.5rem;
}

.subtitle {
  font-size: 1.1rem;
  color: var(--color-text-secondary);
}

/* ========================================
   CONTAINER & LAYOUT
   ======================================== */

.container {
  flex: 1;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--space-md) var(--space-2xl);
  width: 100%;
}

/* ========================================
   TABS NAVIGATION
   ======================================== */

.tabs {
  display: flex;
  gap: var(--space-xs);
  margin: var(--space-xl) 0 var(--space-2xl);
  border-bottom: 1px solid var(--color-border-subtle);
  padding: 0 var(--space-sm);
}

.tab {
  background: none;
  border: none;
  padding: var(--space-md) var(--space-lg);
  color: var(--color-text-secondary);
  font-size: 0.9375rem;
  font-weight: 500;
  cursor: pointer;
  position: relative;
  transition: all var(--transition-base);
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  border-radius: var(--radius-md) var(--radius-md) 0 0;
  font-family: var(--font-primary);
}

.tab-icon {
  font-size: 1.125rem;
  opacity: 0.7;
  transition: opacity var(--transition-fast);
}

.tab:hover {
  color: var(--color-text-primary);
  background-color: rgba(255, 255, 255, 0.03);
}

.tab:hover .tab-icon {
  opacity: 1;
}

.tab.active {
  color: var(--color-accent-primary);
  background-color: rgba(255, 215, 0, 0.05);
}

.tab.active .tab-icon {
  opacity: 1;
}

.tab.active::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  width: 100%;
  height: 2px;
  background-color: var(--color-accent-primary);
}

/* ========================================
   VIEWS
   ======================================== */

.view {
  display: none;
  animation: fadeIn var(--transition-base);
}

.view.active {
  display: block;
}

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

/* ========================================
   SECTIONS
   ======================================== */

section {
  margin-bottom: var(--space-2xl);
}

.section-title {
  font-size: clamp(1.75rem, 3vw, 2.25rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: var(--space-sm);
  color: var(--color-text-primary);
}

.section-description {
  font-size: 1rem;
  color: var(--color-text-secondary);
  margin-bottom: var(--space-xl);
  font-style: italic;
}

.subsection-title {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: var(--space-sm);
  color: var(--color-text-primary);
}

/* ========================================
   GIFT GRID & CARDS
   ======================================== */

.gift-selection {
  margin-bottom: 3rem;
}

.gift-selection h2 {
  font-size: 2rem;
  margin-bottom: 2rem;
  text-align: center;
}

.gift-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: var(--space-md);
  margin-top: var(--space-lg);
  max-width: 100%;
}

@media (min-width: 768px) {
  .gift-grid {
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  }
}

@media (min-width: 1200px) {
  .gift-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.gift-card {
  background: var(--color-bg-secondary);
  border: 2px solid var(--color-border-subtle);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  cursor: pointer;
  transition: all var(--transition-base);
  position: relative;
  overflow: hidden;
}

.gift-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, transparent 0%, var(--color-accent-glow) 100%);
  opacity: 0;
  transition: opacity var(--transition-base);
}

.gift-card:hover {
  border-color: var(--color-border-medium);
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg), var(--shadow-glow);
}

.gift-card:hover::before {
  opacity: 1;
}

.gift-card.selected {
  border-color: var(--color-accent-primary);
  background: rgba(255, 215, 0, 0.05);
  box-shadow: 0 0 30px rgba(255, 215, 0, 0.4);
}

.gift-card.selected::after {
  content: '✓';
  position: absolute;
  top: var(--space-sm);
  right: var(--space-sm);
  width: 24px;
  height: 24px;
  background-color: var(--color-accent-primary);
  color: var(--color-bg-primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.875rem;
  z-index: 2;
}

.gift-card-content {
  position: relative;
  z-index: 1;
}

.gift-card-icon {
  font-size: 2.5rem;
  margin-bottom: var(--space-sm);
  display: block;
}

.gift-card-title {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: var(--space-xs);
  color: var(--color-text-primary);
}

.gift-card-description {
  font-size: 0.9375rem;
  color: var(--color-text-secondary);
  line-height: 1.5;
}

/* Legacy gift card styles */
.gift-price {
  font-size: 3rem;
  font-weight: 800;
  color: var(--color-accent-primary);
  margin-bottom: 0.5rem;
  position: relative;
  z-index: 1;
}

/* Price tier color variations */
.gift-card[data-price="0"] .gift-price {
  color: #9CA3AF; /* Gray for free */
}

.gift-card[data-price="1"] .gift-price,
.gift-card[data-price="2"] .gift-price,
.gift-card[data-price="3"] .gift-price {
  color: #10B981; /* Green for low tier */
}

.gift-card[data-price="5"] .gift-price,
.gift-card[data-price="7"] .gift-price {
  color: #FFD700; /* Gold for mid tier */
}

.gift-card[data-price="10"] .gift-price,
.gift-card[data-price="15"] .gift-price {
  color: #3B82F6; /* Blue for digital services */
}

.gift-card[data-price="20"] .gift-price,
.gift-card[data-price="25"] .gift-price,
.gift-card[data-price="50"] .gift-price {
  background: linear-gradient(135deg, #FFD700 0%, #FFA500 50%, #FF6347 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.gift-name {
  font-size: 1.3rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--color-text-primary);
  position: relative;
  z-index: 1;
}

.gift-description {
  color: var(--color-text-secondary);
  margin-bottom: 1rem;
  font-size: 0.95rem;
  position: relative;
  z-index: 1;
}

.gift-stores {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1rem;
  position: relative;
  z-index: 1;
}

.store-badge {
  background: rgba(255, 215, 0, 0.2);
  color: var(--color-accent-primary);
  padding: 0.25rem 0.75rem;
  border-radius: 12px;
  font-size: 0.8rem;
  font-weight: 500;
}

/* ========================================
   FORMS
   ======================================== */

.form-group {
  margin-bottom: var(--space-lg);
}

.form-label {
  display: block;
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--color-text-primary);
  margin-bottom: var(--space-xs);
}

.form-input,
.form-textarea {
  width: 100%;
  background-color: var(--color-bg-secondary);
  border: 1px solid var(--color-border-subtle);
  border-radius: var(--radius-md);
  padding: var(--space-sm) var(--space-md);
  color: var(--color-text-primary);
  font-size: 1rem;
  font-family: var(--font-primary);
  transition: all var(--transition-base);
}

.form-input:focus,
.form-textarea:focus {
  outline: none;
  border-color: var(--color-accent-primary);
  box-shadow: 0 0 0 3px var(--color-accent-glow);
}

.form-input::placeholder,
.form-textarea::placeholder {
  color: var(--color-text-tertiary);
}

.form-textarea {
  resize: vertical;
  min-height: 120px;
}

.form-hint {
  font-size: 0.8125rem;
  color: var(--color-text-tertiary);
  margin-top: var(--space-xs);
  font-style: italic;
}

/* Legacy form support */
.form-group input,
.form-group textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  background: var(--color-bg-secondary);
  border: 2px solid var(--color-border-subtle);
  border-radius: var(--radius-md);
  color: var(--color-text-primary);
  font-size: 1rem;
  transition: all var(--transition-base);
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  color: var(--color-text-secondary);
  font-weight: 500;
}

/* ========================================
   VOICE RECORDING
   ======================================== */

.voice-recording {
  background-color: var(--color-bg-secondary);
  border: 1px solid var(--color-border-subtle);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  margin: var(--space-xl) 0;
}

.voice-recording h3 {
  margin-bottom: 1rem;
  color: var(--color-text-primary);
}

.voice-description {
  font-size: 0.9375rem;
  color: var(--color-text-secondary);
  margin-bottom: var(--space-md);
  font-style: italic;
}

.voice-controls {
  display: flex;
  gap: var(--space-sm);
  flex-wrap: wrap;
}

.recording-status,
.voice-status {
  margin-top: var(--space-md);
  padding: var(--space-sm) var(--space-md);
  background-color: var(--color-bg-tertiary);
  border-radius: var(--radius-md);
  font-size: 0.875rem;
  color: var(--color-text-secondary);
  font-family: var(--font-mono);
}

.recording-status.recording {
  background: rgba(239, 68, 68, 0.1);
  color: var(--danger-color);
  border: 1px solid var(--danger-color);
  animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.7; }
}

.recording-status.ready {
  background: rgba(16, 185, 129, 0.1);
  color: var(--success-color);
  border: 1px solid var(--success-color);
}

/* ========================================
   BUTTONS
   ======================================== */

.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  padding: var(--space-sm) var(--space-lg);
  border: none;
  border-radius: var(--radius-md);
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition-base);
  position: relative;
  overflow: hidden;
  font-family: var(--font-primary);
}

.btn::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.1);
  transform: translate(-50%, -50%);
  transition: width var(--transition-slow), height var(--transition-slow);
}

.btn:hover::before {
  width: 300px;
  height: 300px;
}

.btn > span {
  position: relative;
  z-index: 1;
}

.btn-primary {
  background-color: var(--color-accent-primary);
  color: var(--color-bg-primary);
}

.btn-primary:hover {
  background-color: var(--color-accent-secondary);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md), var(--shadow-glow);
}

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

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

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

.btn-record,
.btn-play,
.btn-stop {
  background-color: var(--color-bg-elevated);
  color: var(--color-text-primary);
  border: 1px solid var(--color-border-medium);
}

.btn-record:hover,
.btn-play:hover {
  background-color: rgba(16, 185, 129, 0.1);
  border-color: var(--success-color);
  color: var(--success-color);
}

.btn-stop:hover {
  background-color: rgba(239, 68, 68, 0.1);
  border-color: var(--danger-color);
  color: var(--danger-color);
}

.btn-arrow {
  font-size: 1.125rem;
  transition: transform var(--transition-base);
}

.btn:hover .btn-arrow {
  transform: translateX(4px);
}

/* ========================================
   ACTIONS
   ======================================== */

.actions {
  display: flex;
  gap: var(--space-sm);
  margin-top: var(--space-xl);
  flex-wrap: wrap;
}

/* ========================================
   SUCCESS MESSAGE & CONFIRMATION
   ======================================== */

.confirmation {
  text-align: center;
  padding: 3rem;
}

.success-message {
  text-align: center;
  padding: var(--space-2xl);
  background-color: var(--color-bg-secondary);
  border: 1px solid var(--color-border-subtle);
  border-radius: var(--radius-xl);
}

.success-icon {
  font-size: 4rem;
  color: var(--color-accent-primary);
  margin-bottom: var(--space-md);
  animation: successPulse 1s ease-out;
}

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

.success-title {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: var(--space-lg);
  color: var(--color-text-primary);
}

.success-message h2 {
  font-size: 2.5rem;
  margin-bottom: 2rem;
}

.gift-summary {
  background-color: var(--color-bg-tertiary);
  border: 1px solid var(--color-border-medium);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  margin: var(--space-xl) 0;
  text-align: left;
}

.summary-item {
  display: flex;
  justify-content: space-between;
  padding: 1rem 0;
  border-bottom: 1px solid var(--color-border-subtle);
}

.summary-item:last-child {
  border-bottom: none;
}

.summary-label {
  color: var(--color-text-secondary);
  font-weight: 500;
}

.summary-value {
  color: var(--color-text-primary);
  font-weight: 600;
}

/* ========================================
   HISTORY
   ======================================== */

.history-section {
  padding: 2rem;
}

.history-tabs {
  display: flex;
  gap: var(--space-sm);
  margin-bottom: var(--space-xl);
}

.history-tab {
  background-color: var(--color-bg-secondary);
  border: 1px solid var(--color-border-subtle);
  border-radius: var(--radius-md);
  padding: var(--space-sm) var(--space-lg);
  color: var(--color-text-secondary);
  font-size: 0.9375rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition-base);
  display: flex;
  align-items: center;
  gap: var(--space-xs);
}

.timeline-icon {
  font-size: 1.125rem;
}

.history-tab:hover {
  background-color: var(--color-bg-tertiary);
  border-color: var(--color-border-medium);
  color: var(--color-text-primary);
}

.history-tab.active {
  background-color: rgba(255, 215, 0, 0.1);
  border-color: var(--color-accent-primary);
  color: var(--color-accent-primary);
}

.timeline {
  display: none;
}

.timeline.active {
  display: block;
}

.timeline-item {
  background: var(--color-bg-secondary);
  border-left: 4px solid var(--primary-color);
  padding: 1.5rem;
  margin-bottom: 1rem;
  border-radius: var(--radius-md);
  transition: all var(--transition-base);
}

.timeline-item:hover {
  transform: translateX(5px);
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
}

.timeline-item.kairos-item {
  border-left-color: var(--trophy-gold);
  background: linear-gradient(135deg, rgba(255, 215, 0, 0.05), transparent);
}

.timeline-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
}

.timeline-type {
  font-weight: 600;
  color: var(--primary-color);
}

.timeline-date {
  color: var(--color-text-muted);
  font-size: 0.9rem;
}

.timeline-details {
  color: var(--color-text-secondary);
  margin-top: 0.5rem;
}

.empty-state {
  text-align: center;
  padding: var(--space-3xl) var(--space-md);
  background-color: var(--color-bg-secondary);
  border: 1px dashed var(--color-border-medium);
  border-radius: var(--radius-lg);
}

.empty-icon {
  font-size: 3rem;
  color: var(--color-text-tertiary);
  margin-bottom: var(--space-md);
  opacity: 0.5;
}

.empty-text {
  font-size: 1.125rem;
  color: var(--color-text-secondary);
  margin-bottom: var(--space-xs);
}

.empty-hint {
  font-size: 0.9375rem;
  color: var(--color-text-tertiary);
  font-style: italic;
}

/* ========================================
   GIFT DISPLAY & RECEIVE
   ======================================== */

.gift-display {
  background-color: var(--color-bg-secondary);
  border: 1px solid var(--color-border-subtle);
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
  margin-top: var(--space-xl);
}

.voice-playback {
  background-color: var(--color-bg-secondary);
  border: 1px solid var(--color-border-subtle);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  margin-top: var(--space-xl);
}

#voice-status {
  margin-top: 1rem;
  color: var(--color-text-secondary);
}

/* ========================================
   TROPHY LOGO OVERLAY
   ======================================== */

.trophy-logo {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0);
  z-index: 1000;
  background-color: rgba(10, 10, 10, 0.95);
  backdrop-filter: blur(20px);
  padding: var(--space-3xl);
  border-radius: var(--radius-xl);
  border: 2px solid var(--color-accent-primary);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.8), var(--shadow-glow);
  text-align: center;
  transition: all 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
  opacity: 0;
  pointer-events: none;
}

.trophy-logo.show {
  transform: translate(-50%, -50%) scale(1);
  opacity: 1;
  pointer-events: auto;
}

.trophy-logo:not(.hidden) {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
  pointer-events: auto;
  animation: trophyAppear 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes trophyAppear {
  0% {
    transform: translate(-50%, -50%) scale(0.5);
    opacity: 0;
  }
  100% {
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
  }
}

.trophy-svg {
  filter: drop-shadow(0 0 20px rgba(255, 215, 0, 0.6));
  animation: trophyFloat 3s ease-in-out infinite;
}

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

.trophy-circle {
  animation: trophyPulse 2s ease-in-out infinite;
}

@keyframes trophyPulse {
  0%, 100% { stroke-width: 3; }
  50% { stroke-width: 5; }
}

.trophy-arrow {
  animation: arrowSlide 2s ease-in-out infinite;
}

@keyframes arrowSlide {
  0%, 100% { transform: translateX(0); }
  50% { transform: translateX(5px); }
}

.trophy-cup {
  transform-origin: center;
  animation: cupShine 3s ease-in-out infinite;
}

@keyframes cupShine {
  0%, 100% { filter: brightness(1); }
  50% { filter: brightness(1.3); }
}

.trophy-text {
  margin-top: var(--space-lg);
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--color-accent-primary);
  text-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
}

/* ========================================
   TIP JAR STYLES
   ======================================== */

.tipjar-section {
  padding: 0;
}

.tipjar-create-panel {
  background-color: var(--color-bg-secondary);
  border: 1px solid var(--color-border-subtle);
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
  margin-bottom: var(--space-2xl);
}

.my-tipjars,
.browse-tipjars {
  margin-top: var(--space-2xl);
}

.tipjars-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: var(--space-md);
  margin-top: var(--space-lg);
}

.tipjar-card {
  background-color: var(--color-bg-secondary);
  border: 1px solid var(--color-border-subtle);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  transition: all var(--transition-base);
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.tipjar-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, transparent 0%, rgba(255, 215, 0, 0.05) 100%);
  opacity: 0;
  transition: opacity var(--transition-base);
}

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

.tipjar-card:hover::before {
  opacity: 1;
}

.tipjar-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: var(--space-sm);
  position: relative;
  z-index: 1;
}

.tipjar-icon {
  font-size: 2rem;
  margin-bottom: var(--space-sm);
}

.tipjar-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--color-text-primary);
  margin-bottom: var(--space-xs);
}

.tipjar-description {
  font-size: 0.9375rem;
  color: var(--color-text-secondary);
  margin-bottom: var(--space-md);
  line-height: 1.5;
}

.tipjar-stats {
  background-color: var(--color-bg-tertiary);
  border-radius: var(--radius-md);
  padding: var(--space-sm) var(--space-md);
  margin-bottom: var(--space-md);
}

.tipjar-stat-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--space-xs) 0;
}

.tipjar-stat-label {
  font-size: 0.875rem;
  color: var(--color-text-tertiary);
}

.tipjar-stat-value {
  font-size: 1rem;
  font-weight: 600;
  color: var(--color-accent-primary);
}

.tipjar-progress {
  width: 100%;
  height: 8px;
  background-color: var(--color-bg-primary);
  border-radius: 100px;
  overflow: hidden;
  margin-top: var(--space-xs);
}

.tipjar-progress-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--color-accent-secondary), var(--color-accent-primary));
  border-radius: 100px;
  transition: width var(--transition-slow);
}

.tipjar-actions {
  display: flex;
  gap: var(--space-xs);
  margin-top: var(--space-md);
}

.tipjar-actions .btn {
  flex: 1;
  padding: var(--space-xs) var(--space-md);
  font-size: 0.875rem;
}

.tipjar-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.75rem;
  border-radius: 100px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.tipjar-badge.public {
  background-color: rgba(16, 185, 129, 0.1);
  color: var(--success-color);
  border: 1px solid var(--success-color);
}

.tipjar-badge.unlisted {
  background-color: rgba(245, 158, 11, 0.1);
  color: var(--warning-color);
  border: 1px solid var(--warning-color);
}

.tipjar-badge.private {
  background-color: rgba(100, 116, 139, 0.1);
  color: var(--color-text-tertiary);
  border: 1px solid var(--color-border-medium);
}

.tipjar-share-link {
  background-color: var(--color-bg-tertiary);
  border: 1px solid var(--color-border-medium);
  border-radius: var(--radius-md);
  padding: var(--space-sm) var(--space-md);
  margin-top: var(--space-md);
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.tipjar-link-text {
  flex: 1;
  font-family: var(--font-mono);
  font-size: 0.875rem;
  color: var(--color-accent-primary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tipjar-copy-btn {
  padding: 0.25rem 0.75rem;
  background-color: var(--color-bg-elevated);
  border: 1px solid var(--color-border-medium);
  border-radius: var(--radius-sm);
  color: var(--color-text-secondary);
  font-size: 0.75rem;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.tipjar-copy-btn:hover {
  background-color: var(--color-accent-primary);
  color: var(--color-bg-primary);
  border-color: var(--color-accent-primary);
}

.tipjar-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(10, 10, 10, 0.9);
  backdrop-filter: blur(8px);
  z-index: 999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-md);
}

.tipjar-modal-content {
  background-color: var(--color-bg-secondary);
  border: 1px solid var(--color-border-medium);
  border-radius: var(--radius-xl);
  padding: var(--space-2xl);
  max-width: 500px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
}

.tipjar-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--space-lg);
}

.tipjar-modal-close {
  background: none;
  border: none;
  color: var(--color-text-secondary);
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
}

.tipjar-modal-close:hover {
  background-color: var(--color-bg-tertiary);
  color: var(--color-text-primary);
}

/* ========================================
   FOOTER
   ======================================== */

.main-footer {
  background-color: var(--color-bg-secondary);
  border-top: 1px solid var(--color-border-subtle);
  margin-top: auto;
  padding: var(--space-2xl) 0 var(--space-lg);
}

.footer-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--space-md);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-xl);
  margin-bottom: var(--space-xl);
}

.footer-section {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  margin-bottom: var(--space-sm);
}

.footer-logo {
  font-size: 1.5rem;
  color: var(--color-accent-primary);
}

.footer-title {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--color-text-primary);
}

.footer-tagline {
  font-size: 0.9375rem;
  color: var(--color-text-secondary);
}

.footer-tech {
  font-size: 0.8125rem;
  color: var(--color-text-tertiary);
  font-family: var(--font-mono);
}

.footer-links-section {
  align-items: flex-end;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-md) var(--space-lg);
  justify-content: flex-end;
}

.footer-link {
  color: var(--color-text-secondary);
  text-decoration: none;
  font-size: 0.9375rem;
  transition: color var(--transition-fast);
}

.footer-link:hover {
  color: var(--color-accent-primary);
}

.footer-bottom {
  max-width: 1200px;
  margin: 0 auto;
  padding: var(--space-lg) var(--space-md) 0;
  border-top: 1px solid var(--color-border-subtle);
  text-align: center;
}

.footer-copyright {
  font-size: 0.8125rem;
  color: var(--color-text-tertiary);
}

/* Legacy footer support */
footer {
  text-align: center;
  padding: 3rem 2rem;
  margin-top: 4rem;
  border-top: 2px solid var(--color-border-subtle);
  color: var(--color-text-muted);
}

footer p {
  margin: 0.5rem 0;
}

.tech-stack {
  font-size: 0.9rem;
  color: var(--color-text-muted);
}

/* ========================================
   UTILITY CLASSES
   ======================================== */

.hidden {
  display: none !important;
}

.loading {
  background: linear-gradient(
    90deg,
    var(--color-bg-secondary) 0%,
    var(--color-bg-tertiary) 50%,
    var(--color-bg-secondary) 100%
  );
  background-size: 1000px 100%;
  animation: shimmer 2s infinite;
}

@keyframes shimmer {
  0% {
    background-position: -1000px 0;
  }
  100% {
    background-position: 1000px 0;
  }
}

/* Focus visible for accessibility */
*:focus-visible {
  outline: 2px solid var(--color-accent-primary);
  outline-offset: 2px;
}

/* ========================================
   RESPONSIVE DESIGN
   ======================================== */

@media (max-width: 768px) {
  .nav-links {
    display: none;
  }
  
  .hero {
    padding: var(--space-2xl) var(--space-md) var(--space-lg);
  }
  
  .container {
    padding: 1rem;
  }

  header h1 {
    font-size: 2rem;
  }
  
  .tabs {
    flex-direction: column;
    border-bottom: none;
    gap: var(--space-xs);
    padding: 0;
  }
  
  .tab {
    border-radius: var(--radius-md);
    border: 1px solid var(--color-border-subtle);
    text-align: center;
  }
  
  .tab.active::after {
    display: none;
  }
  
  .gift-grid {
    grid-template-columns: 1fr;
  }
  
  .footer-content {
    grid-template-columns: 1fr;
    gap: var(--space-lg);
  }
  
  .footer-links-section {
    align-items: flex-start;
  }
  
  .footer-links {
    justify-content: flex-start;
  }
  
  .actions {
    flex-direction: column;
  }
  
  .actions .btn {
    width: 100%;
    justify-content: center;
  }
  
  .trophy-logo {
    padding: 2rem;
  }

  .trophy-svg {
    width: 80px;
    height: 80px;
  }
}

@media (max-width: 480px) {
  .hero-badge {
    font-size: 0.75rem;
    padding: 6px var(--space-sm);
  }
  
  .voice-controls {
    flex-direction: column;
  }
  
  .voice-controls .btn {
    width: 100%;
    justify-content: center;
  }
  
  .history-tabs {
    flex-direction: column;
  }
}
