/* ============================================================
   P4kong - Steal an Egg (SAE) Live Stock Tracker & Overlay CSS
   ============================================================ */

:root {
  --bg-color: #030303;
  --bg-card: rgba(14, 13, 10, 0.75);
  --bg-card-hover: rgba(24, 21, 14, 0.85);
  --bg-input: rgba(12, 11, 8, 0.85);
  --border-color: rgba(212, 175, 55, 0.12);
  --border-highlight: rgba(212, 175, 55, 0.45);
  --text-main: #f1f5f9;
  --text-muted: #94a3b8;
  --text-sub: #64748b;
  --primary-accent: #d4af37;
  --primary-glow: rgba(212, 175, 55, 0.4);
  --cyan-accent: #f59e0b;
  --green-live: #22c55e;
  
  /* Rarity Colors */
  --rarity-cosmic: #a855f7;
  --rarity-mythic: #ec4899;
  --rarity-legendary: #eab308;
  --rarity-epic: #8b5cf6;
  --rarity-rare: #3b82f6;
  --rarity-uncommon: #10b981;
  --rarity-common: #94a3b8;

  --font-heading: 'Outfit', sans-serif;
  --font-body: 'Inter', sans-serif;
}

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

html, body {
  min-height: 100vh;
  background-color: var(--bg-color);
  color: var(--text-main);
  font-family: var(--font-body);
  overflow-x: hidden;
  position: relative;
}

/* Background Aurora Effects */
.aurora-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.aurora {
  position: absolute;
  border-radius: 50%;
  filter: blur(70px);
  opacity: 0.22;
  will-change: transform;
  transform: translate3d(0, 0, 0);
  backface-visibility: hidden;
  animation: auroraFloat 16s ease-in-out infinite alternate;
}

.aurora-1 {
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, #d4af37, #f59e0b);
  top: -150px;
  left: 10%;
}

.aurora-2 {
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, #0284c7, #06b6d4);
  bottom: 5%;
  right: 5%;
  animation-duration: 20s;
  animation-direction: alternate-reverse;
}

.aurora-3 {
  width: 450px;
  height: 450px;
  background: radial-gradient(circle, #ec4899, #8b5cf6);
  top: 40%;
  left: 55%;
  opacity: 0.18;
}

@keyframes auroraFloat {
  0% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(40px, -30px) scale(1.08); }
  100% { transform: translate(-30px, 30px) scale(0.95); }
}

.grid-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-image: 
    linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
  background-size: 40px 40px;
  pointer-events: none;
  z-index: 0;
}

/* Navigation Header */
header {
  position: sticky;
  top: 0;
  width: 100%;
  background: rgba(8, 9, 13, 0.75);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border-color);
  z-index: 100;
}

.header-container {
  max-width: 1240px;
  margin: 0 auto;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo-link {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--text-main);
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.logo-img {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  object-fit: cover;
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.logo-badge {
  font-size: 0.7rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 6px;
  background: linear-gradient(135deg, rgba(212, 175, 55, 0.3), rgba(6, 182, 212, 0.3));
  border: 1px solid rgba(212, 175, 55, 0.4);
  color: #e2e8f0;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

nav {
  display: flex;
  align-items: center;
  gap: 16px;
}

nav a {
  text-decoration: none;
  color: var(--text-muted);
  font-size: 0.92rem;
  font-weight: 500;
  padding: 6px 12px;
  border-radius: 8px;
  transition: all 0.2s ease;
}

nav a:hover, nav a.active {
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.06);
}

.btn-nav-overlay {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: linear-gradient(135deg, #d4af37, #f59e0b) !important;
  color: #fff !important;
  font-weight: 600 !important;
  box-shadow: 0 4px 14px rgba(212, 175, 55, 0.35);
  cursor: pointer;
  border: none;
}

.btn-nav-overlay:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(212, 175, 55, 0.5);
}

/* Main Container */
.main-content {
  position: relative;
  z-index: 10;
  max-width: 1240px;
  margin: 0 auto;
  padding: 36px 24px 80px;
}

/* Hero Section */
.hero-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  margin-bottom: 36px;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 9999px;
  background: rgba(34, 197, 94, 0.12);
  border: 1px solid rgba(34, 197, 94, 0.3);
  color: #4ade80;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 16px;
}

.pulse-dot {
  width: 8px;
  height: 8px;
  background-color: var(--green-live);
  border-radius: 50%;
  box-shadow: 0 0 10px var(--green-live);
  animation: pulseAnim 1.8s infinite;
}

@keyframes pulseAnim {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.7); }
  70% { transform: scale(1.1); box-shadow: 0 0 0 8px rgba(34, 197, 94, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(34, 197, 94, 0); }
}

.page-title {
  font-family: var(--font-heading);
  font-size: clamp(2rem, 4.5vw, 3rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.02em;
  background: linear-gradient(135deg, #ffffff 40%, #c084fc 80%, #38bdf8 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 12px;
}

.page-subtitle {
  color: var(--text-muted);
  font-size: 1.05rem;
  max-width: 650px;
  line-height: 1.6;
  margin-bottom: 24px;
}

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

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 22px;
  border-radius: 12px;
  background: linear-gradient(135deg, #d4af37, #b45309);
  color: white;
  font-weight: 600;
  font-size: 0.95rem;
  border: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow: 0 6px 20px rgba(147, 51, 234, 0.35);
  cursor: pointer;
  transition: all 0.25s ease;
  text-decoration: none;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(147, 51, 234, 0.55);
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 20px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-main);
  font-weight: 500;
  font-size: 0.95rem;
  border: 1px solid var(--border-color);
  cursor: pointer;
  transition: all 0.25s ease;
  text-decoration: none;
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.09);
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-2px);
}

/* Stats Overview Cards */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
  margin-bottom: 32px;
}

.stat-card {
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 20px 22px;
  display: flex;
  align-items: center;
  gap: 16px;
  transition: transform 0.2s ease, border-color 0.2s ease;
  position: relative;
  overflow: hidden;
}

.stat-card:hover {
  transform: translateY(-2px);
  border-color: var(--border-highlight);
}

.stat-card::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(212, 175, 55, 0.5), transparent);
}

.stat-icon-wrapper {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(212, 175, 55, 0.12);
  border: 1px solid rgba(212, 175, 55, 0.25);
  color: #c084fc;
  font-size: 1.4rem;
  flex-shrink: 0;
}

.stat-icon-wrapper.cyan {
  background: rgba(6, 182, 212, 0.12);
  border-color: rgba(6, 182, 212, 0.25);
  color: #38bdf8;
}

.stat-icon-wrapper.pink {
  background: rgba(236, 72, 153, 0.12);
  border-color: rgba(236, 72, 153, 0.25);
  color: #f472b6;
}

.stat-icon-wrapper.green {
  background: rgba(34, 197, 94, 0.12);
  border-color: rgba(34, 197, 94, 0.25);
  color: #4ade80;
}

.stat-icon-wrapper.gold {
  background: rgba(234, 179, 8, 0.12);
  border-color: rgba(234, 179, 8, 0.25);
  color: #facc15;
}

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

.stat-label {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-sub);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 4px;
}

.stat-value {
  font-family: var(--font-heading);
  font-size: 1.55rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.01em;
}

.stat-sub {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 2px;
}

/* Countdown Highlight Box */
.timer-card {
  background: linear-gradient(135deg, rgba(88, 28, 135, 0.25), rgba(15, 23, 42, 0.7));
  border: 1px solid rgba(212, 175, 55, 0.3);
}

.timer-digits {
  font-family: 'Courier New', Courier, monospace;
  font-size: 1.6rem;
  font-weight: 700;
  color: #f472b6;
  letter-spacing: 0.05em;
  text-shadow: 0 0 10px rgba(244, 114, 182, 0.4);
}

/* Controls Toolbar (Search, Filter, Sort, Refresh) */
.toolbar-card {
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border-color);
  border-radius: 18px;
  padding: 18px 20px;
  margin-bottom: 28px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.toolbar-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.search-box {
  position: relative;
  flex: 1 1 300px;
  max-width: 480px;
}

.search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-sub);
  pointer-events: none;
}

.search-input {
  width: 100%;
  padding: 11px 16px 11px 42px;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  color: var(--text-main);
  font-family: var(--font-body);
  font-size: 0.92rem;
  outline: none;
  transition: all 0.2s ease;
}

.search-input:focus {
  border-color: var(--primary-accent);
  box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.18);
  background: rgba(18, 21, 32, 0.95);
}

.toolbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.select-dropdown {
  padding: 10px 14px;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  color: var(--text-main);
  font-family: var(--font-body);
  font-size: 0.88rem;
  outline: none;
  cursor: pointer;
  transition: border-color 0.2s ease;
}

.select-dropdown:focus {
  border-color: var(--primary-accent);
}

.btn-refresh {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 10px 16px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  color: var(--text-main);
  font-size: 0.88rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-refresh:hover {
  background: rgba(255, 255, 255, 0.12);
}

.btn-refresh svg.spinning {
  animation: spinAnim 1s linear infinite;
}

@keyframes spinAnim {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* Auto refresh progress bar */
.refresh-progress-container {
  width: 100%;
  height: 3px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 2px;
  overflow: hidden;
}

.refresh-progress-bar {
  height: 100%;
  width: 100%;
  background: linear-gradient(90deg, #d4af37, #f59e0b);
  transition: width 1s linear;
}

/* Rarity Filter Tabs */
.filter-tabs {
  display: flex;
  align-items: center;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
  scrollbar-width: none;
}

.filter-tabs::-webkit-scrollbar {
  display: none;
}

.filter-tab {
  padding: 7px 14px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 6px;
}

.filter-tab:hover {
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.08);
}

.filter-tab.active {
  background: rgba(212, 175, 55, 0.2);
  border-color: var(--primary-accent);
  color: #fff;
  box-shadow: 0 0 12px rgba(212, 175, 55, 0.25);
}

.filter-tab.active[data-rarity="Cosmic"] {
  background: rgba(212, 175, 55, 0.25);
  border-color: var(--rarity-cosmic);
  color: #f3e8ff;
}

.filter-tab.active[data-rarity="Mythic"] {
  background: rgba(236, 72, 153, 0.25);
  border-color: var(--rarity-mythic);
  color: #fce7f3;
}

.filter-tab.active[data-rarity="Legendary"] {
  background: rgba(234, 179, 8, 0.25);
  border-color: var(--rarity-legendary);
  color: #fef08a;
}

.tab-badge {
  font-size: 0.72rem;
  padding: 1px 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  color: inherit;
}

/* Eggs Grid */
.eggs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 18px;
}

/* Egg Card */
.egg-card {
  content-visibility: auto;
  contain-intrinsic-size: 0 160px;
  background: var(--bg-card);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--border-color);
  border-radius: 18px;
  padding: 20px;
  position: relative;
  overflow: hidden;
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
  display: flex;
  flex-direction: column;
}

.egg-card:hover {
  transform: translateY(-4px);
  background: var(--bg-card-hover);
}

/* Card Glow by Rarity */
.egg-card.rarity-cosmic {
  border-color: rgba(212, 175, 55, 0.35);
}
.egg-card.rarity-cosmic:hover {
  border-color: var(--rarity-cosmic);
  box-shadow: 0 8px 28px rgba(212, 175, 55, 0.25);
}

.egg-card.rarity-mythic {
  border-color: rgba(236, 72, 153, 0.35);
}
.egg-card.rarity-mythic:hover {
  border-color: var(--rarity-mythic);
  box-shadow: 0 8px 28px rgba(236, 72, 153, 0.25);
}

.egg-card.rarity-legendary {
  border-color: rgba(234, 179, 8, 0.35);
}
.egg-card.rarity-legendary:hover {
  border-color: var(--rarity-legendary);
  box-shadow: 0 8px 28px rgba(234, 179, 8, 0.25);
}

.egg-card.rarity-epic {
  border-color: rgba(139, 92, 246, 0.3);
}
.egg-card.rarity-epic:hover {
  border-color: var(--rarity-epic);
  box-shadow: 0 8px 24px rgba(139, 92, 246, 0.2);
}

.egg-card.rarity-rare {
  border-color: rgba(59, 130, 246, 0.3);
}
.egg-card.rarity-rare:hover {
  border-color: var(--rarity-rare);
  box-shadow: 0 8px 24px rgba(59, 130, 246, 0.2);
}

.egg-card.rarity-uncommon {
  border-color: rgba(16, 185, 129, 0.3);
}
.egg-card.rarity-uncommon:hover {
  border-color: var(--rarity-uncommon);
  box-shadow: 0 8px 24px rgba(16, 185, 129, 0.2);
}

.egg-card.rarity-common {
  border-color: rgba(148, 163, 184, 0.2);
}

/* Card Top Row */
.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.rarity-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 8px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.rarity-badge.cosmic {
  background: rgba(212, 175, 55, 0.18);
  border: 1px solid rgba(212, 175, 55, 0.4);
  color: #c084fc;
}

.rarity-badge.mythic {
  background: rgba(236, 72, 153, 0.18);
  border: 1px solid rgba(236, 72, 153, 0.4);
  color: #f472b6;
}

.rarity-badge.legendary {
  background: rgba(234, 179, 8, 0.18);
  border: 1px solid rgba(234, 179, 8, 0.4);
  color: #facc15;
}

.rarity-badge.epic {
  background: rgba(139, 92, 246, 0.18);
  border: 1px solid rgba(139, 92, 246, 0.4);
  color: #a78bfa;
}

.rarity-badge.rare {
  background: rgba(59, 130, 246, 0.18);
  border: 1px solid rgba(59, 130, 246, 0.4);
  color: #60a5fa;
}

.rarity-badge.uncommon {
  background: rgba(16, 185, 129, 0.18);
  border: 1px solid rgba(16, 185, 129, 0.4);
  color: #34d399;
}

.rarity-badge.common {
  background: rgba(148, 163, 184, 0.15);
  border: 1px solid rgba(148, 163, 184, 0.3);
  color: #cbd5e1;
}

.ready-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.72rem;
  font-weight: 600;
  color: #4ade80;
}

.ready-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 6px #22c55e;
}

/* Card Visual Center */
.card-visual {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 16px;
}

.egg-icon-avatar {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.7rem;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-color);
  flex-shrink: 0;
  position: relative;
  overflow: visible;
}

.egg-real-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.45));
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  padding: 2px;
}

.egg-card:hover .egg-real-img {
  transform: scale(1.15) rotate(2deg);
}

.egg-badge-pet-preview {
  position: absolute;
  bottom: -4px;
  right: -4px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: rgba(15, 23, 42, 0.92);
  border: 1.5px solid rgba(212, 175, 55, 0.5);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.6);
}

.egg-badge-pet-preview img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.egg-icon-avatar::after {
  content: '';
  position: absolute;
  inset: -2px;
  border-radius: 16px;
  opacity: 0.3;
  z-index: -1;
}

.egg-card.rarity-cosmic .egg-icon-avatar {
  border-color: rgba(212, 175, 55, 0.4);
  background: radial-gradient(circle, rgba(212, 175, 55, 0.25), transparent);
}

.egg-card.rarity-mythic .egg-icon-avatar {
  border-color: rgba(236, 72, 153, 0.4);
  background: radial-gradient(circle, rgba(236, 72, 153, 0.25), transparent);
}

.egg-card.rarity-legendary .egg-icon-avatar {
  border-color: rgba(234, 179, 8, 0.4);
  background: radial-gradient(circle, rgba(234, 179, 8, 0.25), transparent);
}

.species-title {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: 700;
  color: #fff;
  line-height: 1.3;
}

/* Card Stats (Earn / Spawned) */
.card-metrics {
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.metric-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.82rem;
}

.metric-name {
  color: var(--text-sub);
}

.metric-value-earn {
  font-family: var(--font-heading);
  font-size: 1.05rem;
  font-weight: 700;
  color: #38bdf8;
  letter-spacing: -0.01em;
}

.metric-value-time {
  color: var(--text-muted);
  font-size: 0.78rem;
}

/* Loading & Empty State */
.empty-state {
  grid-column: 1 / -1;
  text-align: center;
  padding: 60px 20px;
  background: var(--bg-card);
  border-radius: 18px;
  border: 1px dashed var(--border-color);
}

.empty-icon {
  font-size: 2.5rem;
  margin-bottom: 12px;
}

.empty-title {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.empty-desc {
  color: var(--text-muted);
  font-size: 0.92rem;
  max-width: 400px;
  margin: 0 auto;
}

/* Skeleton Loading */
.skeleton-card {
  height: 190px;
  border-radius: 18px;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.03) 25%, rgba(255, 255, 255, 0.08) 50%, rgba(255, 255, 255, 0.03) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border: 1px solid var(--border-color);
}

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

/* Footer */
footer {
  text-align: center;
  padding: 32px 24px;
  border-top: 1px solid var(--border-color);
  color: var(--text-sub);
  font-size: 0.88rem;
  position: relative;
  z-index: 10;
}

footer a {
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.2s;
}

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

/* ============================================================
   MODAL: OBS & TikTok Studio Overlay Link Generator
   ============================================================ */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(4, 5, 8, 0.8);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.modal-backdrop.open {
  opacity: 1;
  pointer-events: auto;
}

.modal-card {
  background: #0f111a;
  border: 1px solid rgba(212, 175, 55, 0.35);
  border-radius: 22px;
  width: 100%;
  max-width: 680px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.8), 0 0 35px rgba(212, 175, 55, 0.25);
  transform: scale(0.95) translateY(10px);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-backdrop.open .modal-card {
  transform: scale(1) translateY(0);
}

.modal-header {
  padding: 24px 28px 20px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-title-area {
  display: flex;
  align-items: center;
  gap: 12px;
}

.modal-badge-stream {
  background: linear-gradient(135deg, #ec4899, #8b5cf6);
  color: white;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 6px;
  letter-spacing: 0.05em;
}

.modal-title {
  font-family: var(--font-heading);
  font-size: 1.35rem;
  font-weight: 700;
  color: #fff;
}

.btn-close-modal {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1.1rem;
  transition: all 0.2s ease;
}

.btn-close-modal:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

.modal-body {
  padding: 24px 28px;
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-label {
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--text-main);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.form-hint {
  font-size: 0.78rem;
  color: var(--text-sub);
  font-weight: 400;
}

/* Layout Preset Selector */
.preset-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.preset-btn {
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: 14px;
  padding: 14px 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  text-align: center;
  transition: all 0.2s ease;
}

.preset-btn:hover {
  border-color: rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.05);
}

.preset-btn.active {
  border-color: var(--primary-accent);
  background: rgba(212, 175, 55, 0.14);
  box-shadow: 0 0 16px rgba(212, 175, 55, 0.25);
}

.preset-icon {
  font-size: 1.4rem;
}

.preset-name {
  font-size: 0.84rem;
  font-weight: 600;
  color: #fff;
}

.preset-meta {
  font-size: 0.72rem;
  color: var(--text-sub);
}

/* Option Row */
.options-2col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.custom-select {
  width: 100%;
  padding: 10px 14px;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  color: var(--text-main);
  font-size: 0.88rem;
  outline: none;
  cursor: pointer;
}

.custom-select:focus {
  border-color: var(--primary-accent);
}

/* Checkbox Toggle */
.checkbox-label {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  font-size: 0.86rem;
  color: var(--text-muted);
}

.checkbox-label input {
  accent-color: var(--primary-accent);
  width: 16px;
  height: 16px;
  cursor: pointer;
}

/* Generated Link Result Area */
.url-output-container {
  background: rgba(6, 8, 14, 0.9);
  border: 1px solid rgba(212, 175, 55, 0.3);
  border-radius: 14px;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.url-box {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  padding: 8px 12px;
}

.url-text {
  flex: 1;
  font-family: 'Courier New', Courier, monospace;
  font-size: 0.84rem;
  color: #38bdf8;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  user-select: all;
}

.btn-copy {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: linear-gradient(135deg, #d4af37, #b45309);
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 8px 14px;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.btn-copy:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(147, 51, 234, 0.4);
}

.btn-copy.copied {
  background: #10b981;
}

.url-meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.78rem;
  color: var(--text-sub);
}

.btn-test-preview {
  color: #c084fc;
  text-decoration: none;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.btn-test-preview:hover {
  text-decoration: underline;
}

/* Instructions Accordion/Guide */
.guide-box {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 14px 16px;
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.guide-box h4 {
  color: #fff;
  font-size: 0.86rem;
  margin-bottom: 6px;
}

.guide-box ol {
  padding-left: 18px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .header-container {
    padding: 12px 16px;
  }
  
  nav a {
    padding: 6px 8px;
    font-size: 0.85rem;
  }

  .main-content {
    padding: 24px 16px 60px;
  }

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

  .options-2col {
    grid-template-columns: 1fr;
  }
}

/* ============================================================
   PRIVATE ACCESS LOCK SCREEN
   ============================================================ */
.lock-screen-container {
  min-height: 80vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  position: relative;
  z-index: 20;
}

.lock-card {
  background: rgba(14, 16, 26, 0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(212, 175, 55, 0.4);
  border-radius: 24px;
  padding: 42px 36px;
  max-width: 480px;
  width: 100%;
  text-align: center;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8), 0 0 35px rgba(212, 175, 55, 0.25);
  animation: lockCardEntrance 0.35s ease-out;
}

@keyframes lockCardEntrance {
  from { opacity: 0; transform: scale(0.92) translateY(20px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

.lock-icon-glow {
  width: 72px;
  height: 72px;
  border-radius: 20px;
  background: radial-gradient(circle, rgba(212, 175, 55, 0.3), rgba(15, 18, 30, 0.8));
  border: 1.5px solid rgba(212, 175, 55, 0.6);
  box-shadow: 0 0 25px rgba(212, 175, 55, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.2rem;
  margin: 0 auto 20px;
}

.lock-badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 999px;
  background: rgba(236, 72, 153, 0.15);
  border: 1px solid rgba(236, 72, 153, 0.4);
  color: #f472b6;
  font-size: 0.76rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 12px;
}

.lock-title {
  font-family: var(--font-heading);
  font-size: 1.6rem;
  font-weight: 800;
  color: #fff;
  margin-bottom: 10px;
  letter-spacing: -0.01em;
}

.lock-desc {
  font-size: 0.92rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 24px;
}

.lock-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.lock-input-wrap {
  display: flex;
  gap: 8px;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: 14px;
  padding: 6px;
  transition: all 0.2s ease;
}

.lock-input-wrap:focus-within {
  border-color: var(--primary-accent);
  box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.2);
}

.lock-input {
  flex: 1;
  background: transparent;
  border: none;
  padding: 10px 14px;
  color: #fff;
  font-family: var(--font-body);
  font-size: 0.95rem;
  outline: none;
}

.btn-unlock {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 20px;
  border-radius: 10px;
  background: linear-gradient(135deg, #d4af37, #b45309);
  color: #fff;
  font-size: 0.9rem;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.btn-unlock:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(147, 51, 234, 0.5);
}

.lock-error-msg {
  color: #f87171;
  font-size: 0.84rem;
  margin-top: 4px;
  animation: shakeError 0.3s ease-in-out;
}

@keyframes shakeError {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-6px); }
  75% { transform: translateX(6px); }
}

.lock-footer-info {
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px solid var(--border-color);
  font-size: 0.78rem;
  color: var(--text-sub);
}

.lock-footer-info code {
  background: rgba(255, 255, 255, 0.08);
  padding: 2px 6px;
  border-radius: 4px;
  color: #c084fc;
}

.btn-lock-auth {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 8px;
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #fca5a5;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-lock-auth:hover {
  background: rgba(239, 68, 68, 0.25);
  color: #fff;
}

/* Device Performance Optimizations */
@media (max-width: 768px) {
  .aurora {
    filter: blur(40px);
    opacity: 0.16;
  }
  .egg-card, .lock-card, .modal-card {
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .aurora {
    animation: none;
  }
  .egg-card, .lock-card {
    transition: none;
  }
}
