/* Styles for Earn Your Leisure Finance (EYL Finance) */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600&family=Outfit:wght@400;500;600;700;800&display=swap');

:root {
  /* Color Palette */
  --bg-primary: #0a0b0d;
  --bg-secondary: #12141c;
  --bg-tertiary: #1a1d29;
  
  --gold-primary: #d4af37;
  --gold-secondary: #f3d060;
  --gold-dark: #aa8010;
  --gold-gradient: linear-gradient(135deg, #f3d060 0%, #d4af37 50%, #aa8010 100%);
  --gold-glow: 0 0 20px rgba(212, 175, 55, 0.25);
  --gold-glow-hover: 0 0 30px rgba(212, 175, 55, 0.5);
  
  --text-primary: #ffffff;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  
  --emerald: #10b981;
  --emerald-gradient: linear-gradient(135deg, #34d399 0%, #10b981 100%);
  --emerald-glow: 0 0 20px rgba(16, 185, 129, 0.2);
  
  --red: #ef4444;
  --red-gradient: linear-gradient(135deg, #f87171 0%, #ef4444 100%);
  --red-glow: 0 0 20px rgba(239, 68, 68, 0.2);

  --blue: #3b82f6;
  --blue-gradient: linear-gradient(135deg, #60a5fa 0%, #3b82f6 100%);
  --blue-glow: 0 0 20px rgba(59, 130, 246, 0.2);
  
  --border-color: rgba(255, 255, 255, 0.08);
  --border-gold: rgba(212, 175, 55, 0.2);
  
  --glass-bg: rgba(18, 20, 28, 0.8);
  --glass-border: rgba(255, 255, 255, 0.05);
  --glass-border-gold: rgba(212, 175, 55, 0.15);
  
  /* Fonts */
  --font-heading: 'Outfit', sans-serif;
  --font-body: 'Inter', sans-serif;
  
  /* Transitions */
  --transition-fast: 0.2s ease;
  --transition-normal: 0.3s ease;
  --transition-slow: 0.5s cubic-bezier(0.16, 1, 0.3, 1);
  
  /* Border Radius */
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-full: 9999px;
}

/* Reset */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  outline: none;
}

html, body {
  background-color: var(--bg-primary);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-weight: 400;
  line-height: 1.5;
  overflow-x: hidden;
  height: 100%;
}

/* Layout */
.app-container {
  display: flex;
  min-height: 100vh;
  position: relative;
  background-image: 
    radial-gradient(circle at 10% 20%, rgba(212, 175, 55, 0.05) 0%, transparent 40%),
    radial-gradient(circle at 90% 80%, rgba(16, 185, 129, 0.03) 0%, transparent 40%);
}

/* Sidebar Navigation */
.sidebar {
  width: 280px;
  background-color: var(--bg-secondary);
  border-right: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  padding: 24px;
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  z-index: 100;
  transition: var(--transition-slow);
}

.brand-section {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 40px;
}

.brand-logo {
  width: 48px;
  height: 48px;
  object-fit: contain;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-gold);
}

.brand-name {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: 0.5px;
  background: var(--gold-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

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

.nav-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 16px;
  color: var(--text-secondary);
  text-decoration: none;
  border-radius: var(--radius-md);
  font-weight: 500;
  font-size: 0.95rem;
  cursor: pointer;
  transition: var(--transition-fast);
}

.nav-item svg {
  width: 20px;
  height: 20px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  transition: var(--transition-fast);
}

.nav-item:hover {
  color: var(--gold-primary);
  background-color: rgba(212, 175, 55, 0.05);
}

.nav-item.active {
  color: var(--text-primary);
  background: var(--gold-gradient);
  box-shadow: var(--gold-glow);
}

.nav-item.active svg {
  stroke: var(--bg-primary);
}

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

.sidebar-footer {
  margin-top: auto;
  padding-top: 20px;
  border-top: 1px solid var(--border-color);
}

.user-profile {
  display: flex;
  align-items: center;
  gap: 12px;
}

.user-avatar {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-full);
  background: var(--gold-gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  color: var(--bg-primary);
  border: 2px solid var(--border-gold);
}

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

.user-name {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-primary);
}

.user-tier {
  font-size: 0.75rem;
  color: var(--gold-primary);
  font-weight: 500;
}

/* Main Content Area */
.main-content {
  flex: 1;
  margin-left: 280px;
  padding: 40px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  transition: var(--transition-slow);
}

/* Top Header Bar */
.top-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 36px;
}

.page-title-section {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.page-title {
  font-family: var(--font-heading);
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -0.5px;
}

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

.header-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

/* Base UI Components */
.card {
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 24px;
  position: relative;
  overflow: hidden;
  transition: var(--transition-normal);
}

.card:hover {
  border-color: var(--border-gold);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

/* Glassmorphism card */
.card-glass {
  background: var(--glass-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--glass-border);
}

.card-glass:hover {
  border-color: var(--glass-border-gold);
}

/* Luxury Grain Overlay */
.grain {
  position: relative;
  z-index: 1;
}

.grain::before {
  content: "";
  border-radius: inherit;
  background-color: transparent;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 600 600'%3E%3Cfilter id='a'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.7' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23a)'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 150px;
  opacity: 0.04;
  top: 0;
  left: 0;
  position: absolute;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: -1;
}

/* Buttons */
.btn {
  font-family: var(--font-heading);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: var(--transition-fast);
  border: 1px solid transparent;
}

.btn-gold {
  background: var(--gold-gradient);
  color: var(--bg-primary);
  box-shadow: var(--gold-glow);
}

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

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

.btn-outline {
  background: transparent;
  border: 1px solid var(--border-gold);
  color: var(--gold-primary);
}

.btn-outline:hover {
  background: rgba(212, 175, 55, 0.05);
  border-color: var(--gold-primary);
}

.btn-danger {
  background: var(--red-gradient);
  color: var(--text-primary);
  box-shadow: var(--red-glow);
}

.btn-danger:hover {
  transform: translateY(-2px);
}

.btn-icon {
  width: 42px;
  height: 42px;
  padding: 0;
  border-radius: var(--radius-md);
  background-color: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn-icon:hover {
  border-color: var(--gold-primary);
  color: var(--gold-primary);
}

/* Inputs and Forms */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 20px;
}

.form-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.form-control {
  background-color: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  padding: 14px 16px;
  font-family: var(--font-body);
  font-size: 0.95rem;
  width: 100%;
  transition: var(--transition-fast);
}

.form-control:focus {
  border-color: var(--gold-primary);
  box-shadow: 0 0 10px rgba(212, 175, 55, 0.15);
}

/* Metric Widgets */
.metric-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 24px;
  margin-bottom: 36px;
}

.metric-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.metric-title {
  color: var(--text-secondary);
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.metric-value {
  font-family: var(--font-heading);
  font-size: 2rem;
  font-weight: 700;
}

.metric-trend {
  font-size: 0.8rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 4px;
}

.trend-up {
  color: var(--emerald);
}

.trend-down {
  color: var(--red);
}

/* Shine Button Effect */
.shine-effect {
  position: relative;
  overflow: hidden;
}

.shine-effect::after {
  content: '';
  position: absolute;
  height: 250%;
  width: 40px;
  top: -50%;
  left: -80px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.25), transparent);
  transform: rotate(30deg);
  pointer-events: none;
}

.shine-effect:hover::after {
  animation: shine-anim 1.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes shine-anim {
  0% {
    left: -100px;
  }
  100% {
    left: 120%;
  }
}

/* Floating Animation */
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

.float-effect {
  animation: float 4s ease-in-out infinite;
}

/* Responsive sidebar */
@media (max-width: 1024px) {
  .sidebar {
    width: 80px;
    padding: 20px 10px;
    align-items: center;
  }
  .brand-name, .user-info, .sidebar-footer, .nav-text {
    display: none;
  }
  .brand-section {
    margin-bottom: 30px;
    justify-content: center;
  }
  .nav-item {
    justify-content: center;
    padding: 12px;
  }
  .main-content {
    margin-left: 80px;
    padding: 24px;
  }
}

@media (max-width: 640px) {
  .app-container {
    flex-direction: column;
  }
  .sidebar {
    width: 100%;
    height: 60px;
    position: fixed;
    bottom: 0;
    top: auto;
    left: 0;
    right: 0;
    flex-direction: row;
    padding: 0 16px;
    border-right: none;
    border-top: 1px solid var(--border-color);
    box-shadow: 0 -10px 30px rgba(0,0,0,0.5);
  }
  .brand-section {
    display: none;
  }
  .nav-menu {
    flex-direction: row;
    justify-content: space-around;
    align-items: center;
    width: 100%;
    margin-bottom: 0;
  }
  .nav-item {
    padding: 8px;
  }
  .main-content {
    margin-left: 0;
    margin-bottom: 60px;
    padding: 16px;
  }
  .top-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }
}

/* View Switching */
.app-view {
  display: none;
}

.app-view.active {
  display: block;
  animation: fadeIn 0.4s ease forwards;
}

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

/* Gated Passcode Overlay */
.lock-screen-overlay {
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.4s ease;
}

/* EYL University Video Catalog Grid */
.video-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
  margin-top: 20px;
}

.video-card {
  display: flex;
  flex-direction: column;
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: var(--transition-normal);
  cursor: pointer;
}

.video-card:hover {
  border-color: var(--gold-primary);
  transform: translateY(-4px);
  box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

.video-thumbnail {
  width: 100%;
  height: 160px;
  background: var(--bg-tertiary);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  border-bottom: 1px solid var(--border-color);
}

.play-icon-overlay {
  width: 48px;
  height: 48px;
  background: var(--gold-gradient);
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--gold-glow);
  transition: var(--transition-fast);
}

.video-card:hover .play-icon-overlay {
  transform: scale(1.1);
  box-shadow: var(--gold-glow-hover);
}

.video-info {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.video-title {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text-primary);
  line-height: 1.3;
}

.video-author {
  font-size: 0.75rem;
  color: var(--gold-primary);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* AI Coach Audio Waveform Animation */
.audio-wave-container {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 4px;
  height: 40px;
  width: 100%;
  max-width: 250px;
  margin: 16px auto 0;
  padding: 0 10px;
}

.wave-bar {
  width: 4px;
  height: 8px;
  background: var(--gold-gradient);
  border-radius: var(--radius-full);
  animation: bounce-wave 0.8s ease-in-out infinite alternate;
  animation-play-state: paused;
}

.audio-wave-container.playing .wave-bar {
  animation-play-state: running;
}

.wave-bar:nth-child(2) { animation-delay: 0.1s; }
.wave-bar:nth-child(3) { animation-delay: 0.2s; }
.wave-bar:nth-child(4) { animation-delay: 0.35s; }
.wave-bar:nth-child(5) { animation-delay: 0.15s; }
.wave-bar:nth-child(6) { animation-delay: 0.25s; }
.wave-bar:nth-child(7) { animation-delay: 0.05s; }
.wave-bar:nth-child(8) { animation-delay: 0.3s; }

@keyframes bounce-wave {
  0% { height: 8px; }
  100% { height: 38px; }
}

/* Balance Sheet & Side Hustle grids */
.nw-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

@media (max-width: 768px) {
  .nw-grid {
    grid-template-columns: 1fr;
  }
}

