/* ============================================
   GameTracker - Apple Games App Inspired Design
   iOS 26 Liquid Glass Dark Mode
   ============================================ */

/* Design Tokens */
:root {
  /* Colors - Warm Orange/Coral Theme (Apple Games App Inspired) */
  --color-bg-primary: #0f0f0f;
  --color-bg-secondary: #1a1a1a;
  --color-bg-elevated: #252525;

  /* Warm Gradient Colors */
  --gradient-warm-start: #ff6b35;
  --gradient-warm-mid: #f7931e;
  --gradient-warm-end: #ffb347;
  --gradient-coral: #ff7f50;
  --gradient-peach: #ffab76;

  /* Glass Material Colors */
  --glass-bg: rgba(255, 255, 255, 0.05);
  --glass-bg-hover: rgba(255, 255, 255, 0.08);
  --glass-bg-active: rgba(255, 255, 255, 0.12);
  --glass-border: rgba(255, 255, 255, 0.08);
  --glass-border-light: rgba(255, 255, 255, 0.15);
  --glass-warm: rgba(255, 159, 67, 0.1);
  --glass-warm-border: rgba(255, 159, 67, 0.2);

  /* Text Colors */
  --text-primary: rgba(255, 255, 255, 0.95);
  --text-secondary: rgba(255, 255, 255, 0.6);
  --text-tertiary: rgba(255, 255, 255, 0.35);

  /* Accent Colors */
  --accent-primary: #ff9f43;
  --accent-primary-glow: rgba(255, 159, 67, 0.4);
  --accent-success: #34d399;
  --accent-warning: #fbbf24;
  --accent-danger: #f87171;
  --accent-blue: #60a5fa;
  --accent-pink: #f472b6;
  --accent-coral: #ff7f50;

  /* Spacing */
  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 32px;
  --space-2xl: 48px;

  /* Border Radius - Fully Rounded iOS Style */
  --radius-xs: 8px;
  --radius-sm: 12px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-xl: 32px;
  --radius-2xl: 40px;
  --radius-full: 9999px;

  /* Typography */
  --font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'SF Pro Text', 'Helvetica Neue', system-ui, sans-serif;
  --font-size-xs: 11px;
  --font-size-sm: 13px;
  --font-size-base: 15px;
  --font-size-md: 17px;
  --font-size-lg: 20px;
  --font-size-xl: 24px;
  --font-size-2xl: 32px;
  --font-size-3xl: 40px;

  /* Shadows */
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.5);
  --shadow-lg: 0 16px 48px rgba(0, 0, 0, 0.6);
  --shadow-glow: 0 0 40px var(--accent-primary-glow);
  --shadow-warm: 0 8px 32px rgba(255, 107, 53, 0.25);

  /* Transitions - iOS Fluid Motion */
  --transition-fast: 180ms cubic-bezier(0.25, 0.1, 0.25, 1);
  --transition-base: 300ms cubic-bezier(0.25, 0.1, 0.25, 1);
  --transition-slow: 450ms cubic-bezier(0.25, 0.1, 0.25, 1);
  --transition-spring: 600ms cubic-bezier(0.34, 1.56, 0.64, 1);
  --transition-bounce: 500ms cubic-bezier(0.68, -0.55, 0.265, 1.55);

  /* Safe Areas */
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-left: env(safe-area-inset-left, 0px);
  --safe-right: env(safe-area-inset-right, 0px);

  /* Layout */
  --nav-dock-height: 72px;
  --header-height: 60px;
}

/* Reset & Base */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-family);
  font-size: var(--font-size-base);
  line-height: 1.5;
  color: var(--text-primary);
  background: var(--color-bg-primary);
  min-height: 100vh;
  min-height: 100dvh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  user-select: none;
  -webkit-user-select: none;
}

/* Hide scrollbar globally */
::-webkit-scrollbar {
  display: none;
}

* {
  scrollbar-width: none;
}

/* App Container */
#app {
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
}

/* Dynamic Background - Warm Gradient */
.dynamic-bg {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: -1;
  background:
    radial-gradient(ellipse 120% 80% at 50% -30%, rgba(255, 107, 53, 0.18), transparent 60%),
    radial-gradient(ellipse 80% 50% at 80% 20%, rgba(247, 147, 30, 0.12), transparent 50%),
    radial-gradient(ellipse 60% 40% at 20% 60%, rgba(255, 127, 80, 0.08), transparent 40%),
    var(--color-bg-primary);
  transition: all var(--transition-slow);
}

.dynamic-bg.game-active {
  background:
    radial-gradient(ellipse 100% 60% at 50% 0%, var(--dynamic-color, rgba(255, 107, 53, 0.25)), transparent 70%),
    var(--color-bg-primary);
}

/* ============================================
   Glass Material Effect - iOS 26 Style
   ============================================ */
.glass-material {
  background: rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(50px) saturate(180%);
  -webkit-backdrop-filter: blur(50px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.06);
  box-shadow:
    0 4px 32px rgba(0, 0, 0, 0.25),
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    inset 0 -1px 0 rgba(0, 0, 0, 0.1);
}

.glass-material--elevated {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.1);
  box-shadow:
    0 8px 40px rgba(0, 0, 0, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.glass-material--warm {
  background: linear-gradient(135deg, rgba(255, 107, 53, 0.08), rgba(255, 159, 67, 0.05));
  border-color: rgba(255, 159, 67, 0.15);
}

/* ============================================
   Main Content Area
   ============================================ */
.main-content {
  position: relative;
  padding-top: 0;
  padding-bottom: calc(var(--nav-dock-height) + var(--safe-bottom) + var(--space-xl));
  min-height: 100vh;
  min-height: 100dvh;
}

/* Views */
.view {
  display: none;
  padding: var(--space-lg);
  padding-left: calc(var(--space-lg) + var(--safe-left));
  padding-right: calc(var(--space-lg) + var(--safe-right));
  animation: viewEnter var(--transition-base) ease-out;
}

.view.active {
  display: block;
}

@keyframes viewEnter {
  from {
    opacity: 0;
    transform: translateY(24px) scale(0.98);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* View Header */
.view-header {
  margin-bottom: var(--space-xl);
  padding-top: calc(var(--space-xl) + var(--safe-top));
}

.view-title {
  font-size: var(--font-size-3xl);
  font-weight: 800;
  letter-spacing: -0.5px;
  background: linear-gradient(135deg, var(--gradient-warm-start), var(--gradient-warm-end));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.view-subtitle {
  font-size: var(--font-size-md);
  color: var(--text-secondary);
  margin-top: var(--space-xs);
}

/* Section Title */
.section-title {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  font-size: var(--font-size-lg);
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: var(--space-md);
}

.section-title__icon {
  width: 20px;
  height: 20px;
  color: var(--accent-warning);
}

/* ============================================
   Empty State
   ============================================ */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: var(--space-2xl);
  min-height: 50vh;
}

.empty-state.hidden {
  display: none;
}

.empty-state__icon {
  font-size: 80px;
  margin-bottom: var(--space-lg);
  animation: float 3s ease-in-out infinite;
  filter: drop-shadow(0 8px 24px rgba(255, 107, 53, 0.3));
}

@keyframes float {

  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-12px);
  }
}

.empty-state__title {
  font-size: var(--font-size-xl);
  font-weight: 700;
  margin-bottom: var(--space-sm);
  background: linear-gradient(135deg, var(--text-primary), var(--text-secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.empty-state__text {
  font-size: var(--font-size-base);
  color: var(--text-secondary);
  max-width: 280px;
  margin-bottom: var(--space-xl);
}

/* ============================================
   Buttons - Mobile Touch Optimized
   ============================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  padding: var(--space-md) var(--space-xl);
  font-family: inherit;
  font-size: var(--font-size-md);
  font-weight: 600;
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: transform 0.15s ease, opacity 0.15s ease;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

.btn:active {
  transform: scale(0.95);
  opacity: 0.9;
}

.btn--primary {
  background: linear-gradient(135deg, var(--gradient-warm-start), var(--gradient-warm-mid));
  border: none;
  color: #000;
  font-weight: 700;
  box-shadow: var(--shadow-warm);
}

.btn--primary:active {
  opacity: 0.85;
}

.btn__icon {
  width: 20px;
  height: 20px;
}

/* ============================================
   Hero Carousel - Modern Rounded Design
   ============================================ */
.hero-carousel {
  position: relative;
  width: calc(100% + (var(--space-lg) * 2) + var(--safe-left) + var(--safe-right));
  margin-left: calc(-1 * (var(--space-lg) + var(--safe-left)));
  margin-right: calc(-1 * (var(--space-lg) + var(--safe-right)));
  margin-top: calc(-1 * var(--space-lg));
  height: 50vh;
  max-height: 480px;
  min-height: 340px;
  margin-bottom: var(--space-lg);
  overflow: hidden;
  z-index: 1;
  border-radius: 0 0 var(--radius-2xl) var(--radius-2xl);
}

.hero-carousel.hidden {
  display: none;
}

.hero-carousel__track {
  display: flex;
  width: 100%;
  height: 100%;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  -ms-overflow-style: none;
  border-radius: 0 0 var(--radius-2xl) var(--radius-2xl);
}

.hero-carousel__track::-webkit-scrollbar {
  display: none;
}

.hero-slide {
  flex: 0 0 100%;
  position: relative;
  scroll-snap-align: start;
  cursor: pointer;
  border-radius: 0 0 var(--radius-2xl) var(--radius-2xl);
  overflow: hidden;
}

.hero-slide--loading {
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, rgba(255, 107, 53, 0.1), rgba(255, 159, 67, 0.05));
}

.hero-slide__bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  transform: scale(1.02);
}

/* Active state for touch feedback */
.hero-slide:active .hero-slide__bg {
  transform: scale(1);
}

.hero-slide__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top,
      rgba(15, 15, 15, 0.95) 0%,
      rgba(15, 15, 15, 0.7) 30%,
      rgba(15, 15, 15, 0.3) 60%,
      rgba(15, 15, 15, 0.1) 100%);
  border-radius: 0 0 var(--radius-2xl) var(--radius-2xl);
}

/* Frosted glass content area */
.hero-slide__content {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: var(--space-lg);
  padding-left: calc(var(--space-lg) + var(--safe-left));
  padding-right: calc(var(--space-lg) + var(--safe-right));
  padding-bottom: calc(var(--space-xl) + 8px);
  background: linear-gradient(to top,
      rgba(0, 0, 0, 0.6) 0%,
      transparent 100%);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-radius: 0 0 var(--radius-2xl) var(--radius-2xl);
}

.hero-slide__badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 14px;
  font-size: var(--font-size-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-radius: var(--radius-full);
  margin-bottom: var(--space-sm);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.hero-slide__badge--patch {
  background: rgba(96, 165, 250, 0.25);
  color: #93c5fd;
  border: 1px solid rgba(96, 165, 250, 0.4);
}

.hero-slide__badge--dlc {
  background: rgba(255, 159, 67, 0.25);
  color: var(--gradient-warm-end);
  border: 1px solid rgba(255, 159, 67, 0.4);
}

.hero-slide__badge--release {
  background: rgba(52, 211, 153, 0.25);
  color: #6ee7b7;
  border: 1px solid rgba(52, 211, 153, 0.4);
}

.hero-slide__badge--news {
  background: rgba(244, 114, 182, 0.25);
  color: #f9a8d4;
  border: 1px solid rgba(244, 114, 182, 0.4);
}

.hero-slide__title {
  font-size: var(--font-size-lg);
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: var(--space-xs);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.6);
}

.hero-slide__game {
  font-size: var(--font-size-sm);
  color: var(--accent-primary);
  font-weight: 600;
}

.hero-slide__date {
  font-size: var(--font-size-xs);
  color: var(--text-tertiary);
  margin-top: var(--space-xs);
}

/* Modern pill indicators */
.hero-carousel__dots {
  position: absolute;
  bottom: var(--space-md);
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
  padding: 6px 12px;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  border-radius: var(--radius-full);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.hero-carousel__dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.35);
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
}

.hero-carousel__dot.active {
  width: 20px;
  border-radius: 3px;
  background: linear-gradient(135deg, var(--gradient-warm-start), var(--gradient-warm-end));
  box-shadow: 0 0 10px rgba(255, 107, 53, 0.5);
}

/* ============================================
   Favorites & Games Sections
   ============================================ */
.favorites-section,
.all-games-section {
  margin-bottom: var(--space-xl);
}

.favorites-section.hidden,
.all-games-section.hidden {
  display: none;
}

/* Games Grid - Responsive */
.games-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-sm);
}

@media (min-width: 500px) {
  .games-grid {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: var(--space-md);
  }
}

/* ============================================
   Game Card - Mobile Touch Optimized
   ============================================ */
.game-card {
  position: relative;
  aspect-ratio: 3/4;
  border-radius: var(--radius-lg);
  overflow: hidden;
  cursor: pointer;
  transform: translate3d(0, 0, 0);
  z-index: 1;
  background: linear-gradient(135deg, rgba(255, 107, 53, 0.1), rgba(255, 159, 67, 0.05));
  transition: transform 0.15s ease, opacity 0.15s ease;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

@media (min-width: 500px) {
  .game-card {
    border-radius: var(--radius-xl);
  }
}

/* Touch feedback */
.game-card:active {
  transform: scale(0.96);
  opacity: 0.9;
}

/* Long-press indicator */
.game-card.long-pressing {
  transform: scale(0.94);
}

.game-card.long-pressing::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(255, 159, 67, 0.15);
  border: 2px solid var(--accent-primary);
  border-radius: inherit;
  animation: longPressGlow 0.5s ease-out;
  z-index: 20;
}

@keyframes longPressGlow {
  0% {
    opacity: 0;
    transform: scale(1.05);
  }

  100% {
    opacity: 1;
    transform: scale(1);
  }
}

.game-card__image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.game-card__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top,
      rgba(0, 0, 0, 0.9) 0%,
      rgba(0, 0, 0, 0.3) 50%,
      transparent 100%);
}

.game-card__content {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: var(--space-sm);
}

@media (min-width: 500px) {
  .game-card__content {
    padding: var(--space-md);
  }
}

.game-card__title {
  font-size: var(--font-size-xs);
  font-weight: 600;
  color: var(--text-primary);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.5);
}

@media (min-width: 500px) {
  .game-card__title {
    font-size: var(--font-size-sm);
  }
}

.game-card__badge {
  position: absolute;
  top: var(--space-sm);
  right: var(--space-sm);
  padding: 4px 8px;
  font-size: 10px;
  font-weight: 700;
  background: linear-gradient(135deg, var(--gradient-warm-start), var(--gradient-warm-mid));
  color: #000;
  border-radius: var(--radius-full);
  animation: pulse 2s ease-in-out infinite;
  box-shadow: 0 2px 8px rgba(255, 107, 53, 0.4);
}

/* Favorite Indicator (shown when pinned) */
.game-card__favorite {
  position: absolute;
  top: var(--space-sm);
  left: var(--space-sm);
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--gradient-warm-start), var(--gradient-warm-mid));
  border-radius: 50%;
  z-index: 10;
  box-shadow: 0 2px 8px rgba(255, 107, 53, 0.4);
  opacity: 0;
  transform: scale(0);
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.game-card__favorite.visible {
  opacity: 1;
  transform: scale(1);
}

.game-card__favorite svg {
  width: 14px;
  height: 14px;
  color: #000;
  fill: #000;
}

@keyframes pulse {

  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0.7;
  }
}

/* ============================================
   Timeline View - Modern Social Feed Style
   ============================================ */

/* Timeline View Container */
.view--timeline {
  padding-top: calc(var(--safe-top) + var(--space-md));
}

/* ============================================
   Game Highlights Section - Stories Style
   ============================================ */
.timeline-highlights {
  margin-bottom: var(--space-xl);
  margin-left: calc(-1 * var(--space-lg));
  margin-right: calc(-1 * var(--space-lg));
  padding-left: var(--space-lg);
}

.timeline-highlights__title {
  font-size: var(--font-size-lg);
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: var(--space-md);
  background: linear-gradient(135deg, var(--text-primary), var(--text-secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.timeline-highlights__scroll {
  display: flex;
  gap: var(--space-md);
  overflow-x: auto;
  padding-right: var(--space-lg);
  padding-bottom: var(--space-sm);
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
}

.timeline-highlights__scroll::-webkit-scrollbar {
  display: none;
}

/* Individual Game Highlight */
.game-highlight {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-xs);
  cursor: pointer;
  scroll-snap-align: start;
  transition: transform 0.15s ease;
  -webkit-tap-highlight-color: transparent;
}

.game-highlight:active {
  transform: scale(0.92);
}

.game-highlight__ring {
  position: relative;
  width: 68px;
  height: 68px;
  border-radius: 50%;
  padding: 3px;
  background: rgba(255, 255, 255, 0.1);
  transition: all var(--transition-base);
}

.game-highlight__ring--active {
  background: linear-gradient(135deg, var(--gradient-warm-start), var(--gradient-warm-end));
  box-shadow: 0 0 20px rgba(255, 107, 53, 0.4);
}

.game-highlight__image {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--color-bg-primary);
}

.game-highlight__name {
  font-size: 11px;
  font-weight: 500;
  color: var(--text-secondary);
  max-width: 68px;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.game-highlight__dot {
  position: absolute;
  bottom: 2px;
  right: 2px;
  width: 14px;
  height: 14px;
  background: linear-gradient(135deg, var(--accent-success), #2dd4bf);
  border: 2px solid var(--color-bg-primary);
  border-radius: 50%;
}

/* ============================================
   Timeline Feed
   ============================================ */
.timeline-feed {
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
  padding-bottom: var(--space-xl);
}

.timeline-feed.hidden,
.timeline-empty.hidden,
.timeline-highlights.hidden {
  display: none;
}

.timeline-empty {
  text-align: center;
  padding: var(--space-2xl);
}

/* Date Separator */
.timeline-separator {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  font-size: var(--font-size-sm);
  font-weight: 600;
  color: var(--text-secondary);
  margin-top: var(--space-md);
  margin-bottom: var(--space-sm);
  padding: 0 var(--space-xs);
}

.timeline-separator::before,
.timeline-separator::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(to right, transparent, rgba(255, 255, 255, 0.1), transparent);
}

.timeline-separator:first-child {
  margin-top: 0;
}

/* ============================================
   Timeline Card - Modern Social Feed Style
   ============================================ */
.timeline-entry {
  position: relative;
  cursor: pointer;
  border-radius: var(--radius-xl);
  overflow: hidden;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.06);
  transition: transform 0.15s ease, opacity 0.15s ease;
  -webkit-tap-highlight-color: transparent;
}

/* Touch feedback */
.timeline-entry:active {
  transform: scale(0.98);
  opacity: 0.9;
}

/* Featured Image Area */
.timeline-entry__banner {
  position: relative;
  width: 100%;
  height: 200px;
  overflow: hidden;
}

@media (min-width: 500px) {
  .timeline-entry__banner {
    height: 240px;
  }
}

.timeline-entry__banner-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.timeline-entry__banner-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top,
      rgba(15, 15, 15, 1) 0%,
      rgba(15, 15, 15, 0.7) 30%,
      rgba(15, 15, 15, 0.2) 60%,
      transparent 100%);
}

/* Frosted Glass Header Overlay */
.timeline-entry__header-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: var(--space-md);
  background: rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  display: flex;
  align-items: center;
  gap: var(--space-md);
}

/* Type Indicator Strip */
.timeline-entry__type-strip {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  z-index: 2;
}

.timeline-entry__type-strip--patch {
  background: linear-gradient(90deg, var(--accent-blue), #38bdf8);
}

.timeline-entry__type-strip--dlc {
  background: linear-gradient(90deg, var(--gradient-warm-start), var(--gradient-warm-end));
}

.timeline-entry__type-strip--release {
  background: linear-gradient(90deg, var(--accent-success), #2dd4bf);
}

.timeline-entry__type-strip--news {
  background: linear-gradient(90deg, var(--accent-pink), #e879f9);
}

/* Game Avatar */
.timeline-entry__game-image {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  border: 2px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
}

/* Meta Info */
.timeline-entry__meta {
  flex: 1;
  min-width: 0;
}

.timeline-entry__game-name {
  font-size: var(--font-size-sm);
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.5);
}

.timeline-entry__date {
  font-size: var(--font-size-xs);
  color: rgba(255, 255, 255, 0.6);
  margin-top: 2px;
}

/* Badge */
.timeline-entry__badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 12px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-radius: var(--radius-full);
  flex-shrink: 0;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.timeline-entry__badge--patch {
  background: rgba(96, 165, 250, 0.2);
  color: #93c5fd;
  border: 1px solid rgba(96, 165, 250, 0.3);
}

.timeline-entry__badge--dlc {
  background: rgba(255, 159, 67, 0.2);
  color: var(--gradient-warm-end);
  border: 1px solid rgba(255, 159, 67, 0.3);
}

.timeline-entry__badge--release {
  background: rgba(52, 211, 153, 0.2);
  color: #6ee7b7;
  border: 1px solid rgba(52, 211, 153, 0.3);
}

.timeline-entry__badge--news {
  background: rgba(244, 114, 182, 0.2);
  color: #f9a8d4;
  border: 1px solid rgba(244, 114, 182, 0.3);
}

/* Content Area */
.timeline-entry__content {
  padding: var(--space-md);
}

/* Title */
.timeline-entry__title {
  font-size: var(--font-size-lg);
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.35;
  margin-bottom: var(--space-sm);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Description */
.timeline-entry__description {
  font-size: var(--font-size-sm);
  color: var(--text-secondary);
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: var(--space-sm);
}

/* Footer Actions - Social Style */
.timeline-entry__footer {
  display: flex;
  align-items: center;
  gap: var(--space-lg);
  margin-top: var(--space-md);
  padding-top: var(--space-md);
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.timeline-entry__stat {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: var(--font-size-sm);
  color: var(--text-tertiary);
  transition: color 0.2s ease;
}

.timeline-entry__stat:hover {
  color: var(--accent-primary);
}

.timeline-entry__stat svg {
  width: 18px;
  height: 18px;
}

.timeline-entry__stat--active svg {
  fill: var(--accent-danger);
  color: var(--accent-danger);
}

.timeline-entry__action {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: var(--font-size-sm);
  color: var(--text-tertiary);
  margin-left: auto;
  transition: color 0.2s ease;
}

.timeline-entry__action:hover {
  color: var(--accent-primary);
}

.timeline-entry__action svg {
  width: 18px;
  height: 18px;
}

/* Old header style - keeping for compatibility but hiding */
.timeline-entry__header {
  display: none;
}

.error-text {
  text-align: center;
  color: var(--text-tertiary);
  padding: var(--space-xl);
}

/* ============================================
   Search View
   ============================================ */
.view-header--search {
  position: sticky;
  top: var(--safe-top);
  z-index: 100;
  padding-top: var(--space-md);
  margin-left: calc(-1 * var(--space-lg));
  margin-right: calc(-1 * var(--space-lg));
  padding-left: var(--space-lg);
  padding-right: var(--space-lg);
  background: linear-gradient(to bottom, var(--color-bg-primary) 60%, transparent);
}

/* Search Results */
/* Search Mascot - Centered vertically between top and text box */
.search-mascot-container {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: calc(var(--nav-dock-height) + var(--safe-bottom) + 40px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  opacity: 1;
  pointer-events: none;
  /* Simple transition on opacity only - no scale/transform to avoid stuttering */
  transition: opacity 0.3s ease-out;
}

.search-mascot-container.hidden {
  opacity: 0;
}

.search-mascot {
  display: block;
  max-width: 200px;
  height: auto;
  /* Subtle warm glow */
  filter: drop-shadow(0 4px 12px rgba(255, 140, 60, 0.15));
  /* Very subtle breathing animation - only when visible */
  animation: mascot-breathe 4s ease-in-out infinite;
}

/* Very subtle breathing animation */
@keyframes mascot-breathe {

  0%,
  100% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.02);
  }
}

.search-results {
  display: none;
  flex-direction: column;
  gap: var(--space-md);
  padding-top: calc(var(--safe-top) + var(--space-lg));
  padding-bottom: calc(var(--nav-dock-height) + var(--safe-bottom) + var(--space-xl));
  padding-left: var(--space-lg);
  padding-right: var(--space-lg);
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.search-results.active {
  display: flex;
}

/* Search Result Item - Fully Rounded Cards */
.search-result {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  padding: var(--space-md);
  background: rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-xl);
  cursor: pointer;
  transition: all var(--transition-fast);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

.search-result:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 159, 67, 0.2);
  transform: translateX(6px);
}

.search-result:active {
  transform: translateX(4px) scale(0.98);
}

.search-result__image {
  width: 64px;
  height: 64px;
  border-radius: var(--radius-lg);
  object-fit: cover;
  background: linear-gradient(135deg, rgba(255, 107, 53, 0.1), rgba(255, 159, 67, 0.05));
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.search-result__info {
  flex: 1;
  min-width: 0;
}

.search-result__title {
  font-size: var(--font-size-md);
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.search-result__meta {
  font-size: var(--font-size-sm);
  color: var(--text-secondary);
  margin-top: 2px;
}

.search-result__arrow {
  width: 20px;
  height: 20px;
  color: var(--accent-primary);
  flex-shrink: 0;
  opacity: 0.6;
}



/* ============================================
   Game Detail View - Apple Games Style
   ============================================ */
.view--detail {
  padding: 0;
}

.view--detail.active {
  display: block;
}

/* Detail Hero */
.detail-hero {
  position: relative;
  height: 380px;
  overflow: hidden;
}

.detail-hero__bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center top;
  transform: scale(1.05);
  filter: blur(0);
  transition: all var(--transition-slow);
}

.detail-hero__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom,
      rgba(15, 15, 15, 0.2) 0%,
      rgba(15, 15, 15, 0.5) 40%,
      rgba(15, 15, 15, 0.85) 70%,
      var(--color-bg-primary) 100%);
}

.detail-hero__content {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: var(--space-lg);
  padding-top: calc(var(--safe-top) + var(--space-lg));
}

.detail-hero__info {
  margin-top: auto;
}

.detail-hero__title {
  font-size: var(--font-size-2xl);
  font-weight: 800;
  letter-spacing: -0.5px;
  margin-bottom: var(--space-xs);
  text-shadow: 0 4px 20px rgba(0, 0, 0, 0.6);
  background: linear-gradient(135deg, var(--text-primary), rgba(255, 255, 255, 0.8));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.detail-hero__meta {
  font-size: var(--font-size-base);
  color: var(--accent-primary);
  font-weight: 500;
}

/* Back Button */
.back-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.back-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  transform: scale(1.05);
}

.back-btn:active {
  transform: scale(0.95);
}

.back-btn svg {
  width: 24px;
  height: 24px;
  color: var(--text-primary);
}

/* Save Button - Apple Style */
.save-btn {
  position: absolute;
  top: calc(var(--safe-top) + var(--space-lg));
  right: var(--space-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 50px;
  height: 50px;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: all var(--transition-spring);
}

.save-btn:hover {
  background: rgba(0, 0, 0, 0.5);
  transform: scale(1.08);
  border-color: rgba(255, 159, 67, 0.3);
}

.save-btn:active {
  transform: scale(0.92);
}

.save-btn.saved {
  background: linear-gradient(135deg, var(--gradient-warm-start), var(--gradient-warm-mid));
  border-color: transparent;
  box-shadow: var(--shadow-warm);
}

.save-btn.saved .save-btn__icon {
  fill: #000;
  color: #000;
}

.save-btn__icon {
  width: 24px;
  height: 24px;
  color: var(--text-primary);
  transition: all var(--transition-fast);
}

/* Detail Content */
.detail-content {
  padding: 0 var(--space-lg);
  padding-left: calc(var(--space-lg) + var(--safe-left));
  padding-right: calc(var(--space-lg) + var(--safe-right));
  margin-top: calc(-1 * var(--space-xl));
  position: relative;
  z-index: 10;
}

/* Detail Tabs - Apple Style */
.detail-tabs {
  display: flex;
  gap: var(--space-xs);
  padding: 6px;
  border-radius: var(--radius-xl);
  margin-bottom: var(--space-lg);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.detail-tab {
  flex: 1;
  padding: var(--space-sm) var(--space-md);
  font-family: inherit;
  font-size: var(--font-size-sm);
  font-weight: 600;
  color: var(--text-secondary);
  background: transparent;
  border: none;
  border-radius: var(--radius-lg);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.detail-tab:hover {
  color: var(--text-primary);
}

.detail-tab.active {
  color: #000;
  background: linear-gradient(135deg, var(--gradient-warm-start), var(--gradient-warm-mid));
  box-shadow: 0 4px 12px rgba(255, 107, 53, 0.3);
}

/* Tab Content */
.tab-content {
  display: none;
  animation: fadeSlideIn var(--transition-base) ease-out;
}

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

@keyframes fadeSlideIn {
  from {
    opacity: 0;
    transform: translateY(12px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Updates List */
.updates-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.update-card {
  padding: var(--space-lg);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: var(--radius-lg);
  transition: all var(--transition-fast);
}

.update-card:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 159, 67, 0.15);
}

.update-card__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-md);
  margin-bottom: var(--space-sm);
}

.update-card__title {
  font-size: var(--font-size-md);
  font-weight: 600;
  color: var(--text-primary);
}

.update-card__date {
  font-size: var(--font-size-xs);
  color: var(--accent-primary);
  white-space: nowrap;
  font-weight: 500;
}

.update-card__content {
  font-size: var(--font-size-sm);
  color: var(--text-secondary);
  line-height: 1.7;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
}

.update-card__content.expanded {
  -webkit-line-clamp: unset;
}

.update-card__toggle {
  display: inline-block;
  margin-top: var(--space-sm);
  font-size: var(--font-size-sm);
  font-weight: 600;
  color: var(--accent-primary);
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
}

.update-card__toggle:hover {
  text-decoration: underline;
}

/* DLC List */
.dlc-list {
  display: grid;
  gap: var(--space-md);
}

.dlc-card {
  display: flex;
  gap: var(--space-md);
  padding: var(--space-md);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: var(--radius-lg);
  transition: all var(--transition-fast);
}

.dlc-card:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 159, 67, 0.15);
}

.dlc-card__image {
  width: 80px;
  height: 80px;
  border-radius: var(--radius-md);
  object-fit: cover;
  background: linear-gradient(135deg, rgba(255, 107, 53, 0.1), rgba(255, 159, 67, 0.05));
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.dlc-card__info {
  flex: 1;
  min-width: 0;
}

.dlc-card__title {
  font-size: var(--font-size-base);
  font-weight: 600;
  margin-bottom: var(--space-xs);
}

.dlc-card__description {
  font-size: var(--font-size-sm);
  color: var(--text-secondary);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.dlc-card__price {
  display: inline-block;
  font-size: var(--font-size-sm);
  font-weight: 700;
  color: #000;
  margin-top: var(--space-sm);
  padding: 4px 10px;
  background: linear-gradient(135deg, var(--gradient-warm-start), var(--gradient-warm-mid));
  border-radius: var(--radius-full);
}

.dlc-card__price--free {
  background: linear-gradient(135deg, var(--accent-success), #2dd4bf);
}

.dlc-card__rating {
  display: inline-block;
  font-size: var(--font-size-sm);
  font-weight: 500;
  color: var(--accent-primary);
  margin-top: var(--space-xs);
}

/* About Section */
.about-section {
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
}

.about-description {
  font-size: var(--font-size-base);
  color: var(--text-secondary);
  line-height: 1.8;
}

.about-details {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-sm);
}

.about-detail {
  padding: var(--space-md);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: var(--radius-md);
}

.about-detail__label {
  font-size: var(--font-size-xs);
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: var(--space-xs);
}

.about-detail__value {
  font-size: var(--font-size-sm);
  font-weight: 600;
  color: var(--accent-primary);
}

.about-screenshots {
  margin-top: var(--space-md);
}

.about-screenshots__grid {
  display: flex;
  gap: var(--space-sm);
  overflow-x: auto;
  padding-bottom: var(--space-sm);
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
}

.about-screenshots__grid::-webkit-scrollbar {
  display: none;
}

.about-screenshot {
  flex-shrink: 0;
  width: 280px;
  aspect-ratio: 16/9;
  border-radius: var(--radius-lg);
  object-fit: cover;
  scroll-snap-align: start;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

/* Platforms Tags */
.platforms-list {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
  margin-top: var(--space-md);
}

.platform-tag {
  padding: var(--space-xs) var(--space-md);
  font-size: var(--font-size-xs);
  font-weight: 600;
  color: var(--text-secondary);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-full);
}

/* ============================================
   Floating Navigation Dock - Apple Style
   ============================================ */
.nav-dock-container {
  position: fixed;
  bottom: max(env(safe-area-inset-bottom, 0px), 20px);
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  z-index: 1000;
  transition: transform var(--transition-base), opacity var(--transition-base);
}

.nav-dock-container.hidden {
  transform: translateX(-50%) translateY(100px);
  opacity: 0;
  pointer-events: none;
}

.nav-dock {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-xs);
  border-radius: var(--radius-2xl);
  width: 180px;
  height: 68px;
  background: rgba(30, 30, 30, 0.85);
  backdrop-filter: blur(50px) saturate(180%);
  -webkit-backdrop-filter: blur(50px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow:
    0 8px 32px rgba(0, 0, 0, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
  transition: width 0.4s cubic-bezier(0.34, 1.56, 0.64, 1),
    transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  overflow: hidden;
}

.nav-dock.search-mode {
  width: 280px;
}

.nav-dock__buttons {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  flex: 1;
  transition: opacity 0.25s ease,
    transform 0.25s ease,
    flex 0.3s ease;
}

.nav-dock__buttons.hidden {
  opacity: 0;
  transform: scale(0.8);
  flex: 0;
  pointer-events: none;
}

.nav-dock__btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  flex: 1;
  max-width: 84px;
  height: 56px;
  background: transparent;
  border: none;
  border-radius: var(--radius-xl);
  cursor: pointer;
  transition: all var(--transition-fast);
  -webkit-tap-highlight-color: transparent;
}

.nav-dock__btn:hover {
  background: rgba(255, 255, 255, 0.08);
}

.nav-dock__btn.active {
  background: linear-gradient(135deg, rgba(255, 107, 53, 0.2), rgba(255, 159, 67, 0.1));
}

.nav-dock__btn.active .nav-dock__icon,
.nav-dock__btn.active .nav-dock__label {
  color: var(--accent-primary);
}

.nav-dock__icon {
  width: 24px;
  height: 24px;
  color: var(--text-secondary);
  transition: color var(--transition-fast);
}

.nav-dock__label {
  font-size: 11px;
  font-weight: 500;
  color: var(--text-tertiary);
  transition: color var(--transition-fast);
}

/* Search Input in dock */
.nav-dock__search {
  position: absolute;
  left: var(--space-xs);
  right: var(--space-xs);
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: 0 var(--space-sm);
  height: 56px;
  opacity: 0;
  transform: scale(0.8);
  transition: opacity 0.3s ease 0.1s,
    transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1) 0.1s;
  overflow: hidden;
  pointer-events: none;
}

.nav-dock__search.active {
  opacity: 1;
  transform: scale(1);
  pointer-events: auto;
}

.nav-dock__search-icon {
  width: 20px;
  height: 20px;
  color: var(--accent-primary);
  flex-shrink: 0;
}

.nav-dock__input {
  flex: 1;
  background: none;
  border: none;
  font-family: inherit;
  font-size: var(--font-size-md);
  color: var(--text-primary);
  outline: none;
  min-width: 0;
}

.nav-dock__input::placeholder {
  color: var(--text-tertiary);
}

/* Action Button (Search/Back) */
.nav-action-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 68px;
  height: 68px;
  border-radius: var(--radius-full);
  border: none;
  cursor: pointer;
  background: linear-gradient(135deg, var(--gradient-warm-start), var(--gradient-warm-mid));
  box-shadow: var(--shadow-warm);
  transition: all var(--transition-fast);
  -webkit-tap-highlight-color: transparent;
  position: relative;
}

.nav-action-btn:hover {
  transform: scale(1.06);
  box-shadow: 0 12px 40px rgba(255, 107, 53, 0.4);
}

.nav-action-btn:active {
  transform: scale(0.95);
}

.nav-action-btn__icon {
  width: 24px;
  height: 24px;
  color: #000;
  position: absolute;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-action-btn__icon--search {
  opacity: 1;
  transform: rotate(0deg) scale(1);
}

.nav-action-btn__icon--back {
  opacity: 0;
  transform: rotate(-90deg) scale(0.5);
}

.nav-action-btn.search-mode .nav-action-btn__icon--search {
  opacity: 0;
  transform: rotate(90deg) scale(0.5);
}

.nav-action-btn.search-mode .nav-action-btn__icon--back {
  opacity: 1;
  transform: rotate(0deg) scale(1);
}

/* ============================================
   Loading States
   ============================================ */
.loading-overlay {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(15, 15, 15, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  z-index: 2000;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-fast);
}

.loading-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.loading-spinner {
  width: 48px;
  height: 48px;
  border: 3px solid rgba(255, 255, 255, 0.1);
  border-top-color: var(--accent-primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* Skeleton Loading */
.skeleton {
  background: linear-gradient(90deg,
      rgba(255, 255, 255, 0.03) 25%,
      rgba(255, 255, 255, 0.06) 50%,
      rgba(255, 255, 255, 0.03) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: var(--radius-md);
}

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

  100% {
    background-position: -200% 0;
  }
}

.skeleton--card {
  aspect-ratio: 3/4;
  border-radius: var(--radius-xl);
}

.skeleton--result {
  height: 88px;
  border-radius: var(--radius-xl);
}

.skeleton--update {
  height: 220px;
  border-radius: var(--radius-xl);
}

/* ============================================
   Toast Notifications - Apple Style
   ============================================ */
.toast-container {
  position: fixed;
  top: calc(var(--safe-top) + var(--space-lg));
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  z-index: 3000;
  pointer-events: none;
}

.toast {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-md) var(--space-lg);
  background: rgba(30, 30, 30, 0.9);
  backdrop-filter: blur(40px);
  -webkit-backdrop-filter: blur(40px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-full);
  box-shadow: var(--shadow-lg);
  pointer-events: auto;
  animation: toastIn var(--transition-spring);
}

.toast.removing {
  animation: toastOut var(--transition-fast) forwards;
}

@keyframes toastIn {
  from {
    opacity: 0;
    transform: translateY(-24px) scale(0.9);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes toastOut {
  to {
    opacity: 0;
    transform: translateY(-12px) scale(0.95);
  }
}

.toast__icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.toast--success .toast__icon {
  color: var(--accent-success);
}

.toast--error .toast__icon {
  color: var(--accent-danger);
}

.toast__message {
  font-size: var(--font-size-sm);
  font-weight: 500;
  color: var(--text-primary);
}

/* ============================================
   Responsive Adjustments
   ============================================ */
@media (max-width: 390px) {
  :root {
    --space-lg: 20px;
    --font-size-3xl: 34px;
  }

  .nav-dock {
    width: 165px;
    height: 64px;
  }

  .nav-dock.search-mode {
    width: 250px;
  }

  .nav-dock__btn {
    height: 52px;
  }

  .nav-action-btn {
    width: 64px;
    height: 64px;
  }

  .hero-carousel {
    height: 48vh;
    min-height: 340px;
  }
}

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

  .detail-hero {
    height: 450px;
  }

  .detail-hero__title {
    font-size: var(--font-size-3xl);
  }

  .about-details {
    grid-template-columns: repeat(4, 1fr);
  }

  .hero-carousel {
    max-height: 600px;
  }
}

/* ============================================
   Tutorial Overlay
   ============================================ */
.tutorial-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  opacity: 0;
  transition: opacity 0.3s ease;
  padding: var(--space-lg);
}

.tutorial-overlay.visible {
  opacity: 1;
}

.tutorial-modal {
  max-width: 320px;
  padding: var(--space-xl);
  border-radius: var(--radius-xl);
  text-align: center;
  transform: scale(0.9) translateY(20px);
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.tutorial-overlay.visible .tutorial-modal {
  transform: scale(1) translateY(0);
}

.tutorial-icon {
  font-size: 56px;
  margin-bottom: var(--space-md);
  animation: tutorialBounce 1s ease-in-out infinite;
}

@keyframes tutorialBounce {

  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-8px);
  }
}

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

.tutorial-text {
  font-size: var(--font-size-sm);
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: var(--space-xl);
}

.tutorial-dismiss {
  width: 100%;
}

/* ============================================
   Slide-Up Update Modal
   ============================================ */
.update-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 9999;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  cursor: pointer;
}

.update-modal-overlay.visible {
  opacity: 1;
  visibility: visible;
}

/* Click to close hint */
.update-modal-overlay::before {
  content: 'tap to close';
  position: fixed;
  top: 20%;
  left: 50%;
  transform: translateX(-50%);
  font-size: var(--font-size-sm);
  color: rgba(255, 255, 255, 0.5);
  font-weight: 500;
  letter-spacing: 0.5px;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s ease 0.2s;
  z-index: 10001;
}

.update-modal-overlay.visible::before {
  opacity: 1;
}

/* The modal itself */
.update-modal {
  position: relative;
  background: var(--color-bg-secondary);
  border-radius: var(--radius-2xl) var(--radius-2xl) 0 0;
  max-height: 80vh;
  overflow: hidden;
  transform: translateY(100%);
  transition: transform 0.4s cubic-bezier(0.32, 0.72, 0, 1);
  cursor: default;
  box-shadow: 0 -8px 40px rgba(0, 0, 0, 0.5);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.update-modal-overlay.visible .update-modal {
  transform: translateY(0);
}

/* Drag handle */
.update-modal__handle {
  display: flex;
  justify-content: center;
  padding: var(--space-md) 0 var(--space-sm);
}

.update-modal__handle::after {
  content: '';
  width: 36px;
  height: 4px;
  background: rgba(255, 255, 255, 0.25);
  border-radius: 2px;
}

/* Modal header */
.update-modal__header {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  padding: 0 var(--space-lg) var(--space-md);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.update-modal__game-image {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-lg);
  object-fit: cover;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
}

.update-modal__game-info {
  flex: 1;
  min-width: 0;
}

.update-modal__game-name {
  font-size: var(--font-size-lg);
  font-weight: 700;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.update-modal__game-meta {
  font-size: var(--font-size-sm);
  color: var(--text-secondary);
  margin-top: 2px;
}

/* Scrollable content */
.update-modal__content {
  max-height: calc(80vh - 120px);
  overflow-y: auto;
  padding: var(--space-lg);
  padding-bottom: calc(var(--space-xl) + var(--safe-bottom));
}

/* Individual update item */
.update-modal__item {
  padding: var(--space-md);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-lg);
  margin-bottom: var(--space-md);
}

.update-modal__item:last-child {
  margin-bottom: 0;
}

.update-modal__item-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-sm);
}

.update-modal__item-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 5px 10px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-radius: var(--radius-full);
}

.update-modal__item-badge--patch {
  background: rgba(96, 165, 250, 0.2);
  color: #93c5fd;
  border: 1px solid rgba(96, 165, 250, 0.3);
}

.update-modal__item-badge--dlc {
  background: rgba(255, 159, 67, 0.2);
  color: var(--gradient-warm-end);
  border: 1px solid rgba(255, 159, 67, 0.3);
}

.update-modal__item-badge--release {
  background: rgba(52, 211, 153, 0.2);
  color: #6ee7b7;
  border: 1px solid rgba(52, 211, 153, 0.3);
}

.update-modal__item-badge--news {
  background: rgba(244, 114, 182, 0.2);
  color: #f9a8d4;
  border: 1px solid rgba(244, 114, 182, 0.3);
}

.update-modal__item-date {
  font-size: var(--font-size-xs);
  color: var(--text-tertiary);
}

.update-modal__item-title {
  font-size: var(--font-size-md);
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.4;
  margin-bottom: var(--space-xs);
}

.update-modal__item-content {
  font-size: var(--font-size-sm);
  color: var(--text-secondary);
  line-height: 1.6;
}

/* Engagement stats */
.update-modal__item-engagement {
  display: flex;
  align-items: center;
  gap: var(--space-lg);
  margin-top: var(--space-md);
  padding-top: var(--space-md);
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

/* Interactive like/comments buttons */
.update-modal__like-btn,
.update-modal__comments-btn {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  background: transparent;
  border: none;
  padding: 8px 12px;
  border-radius: var(--radius-lg);
  font-size: var(--font-size-sm);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s ease;
  -webkit-tap-highlight-color: transparent;
}

.update-modal__like-btn:active,
.update-modal__comments-btn:active {
  transform: scale(0.95);
}

.update-modal__like-btn svg,
.update-modal__comments-btn svg {
  width: 18px;
  height: 18px;
  transition: all 0.2s ease;
}

.update-modal__like-btn.liked {
  color: #ff6b6b;
}

.update-modal__like-btn.liked svg {
  fill: #ff6b6b;
  stroke: #ff6b6b;
}

.update-modal__comments-btn.active {
  color: var(--accent-primary);
}

/* Comments section */
.update-modal__comments-section {
  margin-top: var(--space-md);
  padding-top: var(--space-md);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.update-modal__comments-section.hidden {
  display: none;
}

.update-modal__comments-title {
  font-size: var(--font-size-sm);
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: var(--space-md);
}

.update-modal__comment {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: var(--space-sm) 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.update-modal__comment:last-child {
  border-bottom: none;
}

.update-modal__comment-user {
  font-size: var(--font-size-sm);
  font-weight: 600;
  color: var(--accent-primary);
}

.update-modal__comment-text {
  font-size: var(--font-size-sm);
  color: var(--text-primary);
  line-height: 1.5;
}

.update-modal__comment-time {
  font-size: var(--font-size-xs);
  color: var(--text-tertiary);
}

.update-modal__comments-note {
  margin-top: var(--space-md);
  padding: var(--space-sm);
  background: rgba(255, 255, 255, 0.03);
  border-radius: var(--radius-md);
  font-size: var(--font-size-xs);
  color: var(--text-tertiary);
  font-style: italic;
  text-align: center;
}

/* Read more/less button */
.update-modal__item-content-wrapper {
  position: relative;
}

.update-modal__read-more-btn {
  display: flex;
  align-items: center;
  gap: 4px;
  background: transparent;
  border: none;
  padding: var(--space-xs) 0;
  margin-top: var(--space-xs);
  font-size: var(--font-size-sm);
  color: var(--accent-primary);
  cursor: pointer;
  transition: all 0.2s ease;
  font-weight: 500;
}

.update-modal__read-more-btn:hover {
  color: var(--accent-secondary);
}

.update-modal__read-more-btn svg {
  width: 14px;
  height: 14px;
  transition: transform 0.3s ease;
}

/* Single update mode (from carousel) */
.update-modal--single {
  max-height: 60vh;
}

.update-modal--single .update-modal__content {
  padding-top: var(--space-md);
}

.update-modal--single .update-modal__item {
  background: transparent;
  border: none;
  padding: 0;
}

/* Empty state */
.update-modal__empty {
  text-align: center;
  padding: var(--space-xl);
}

.update-modal__empty-icon {
  font-size: 48px;
  margin-bottom: var(--space-md);
}

.update-modal__empty-text {
  font-size: var(--font-size-sm);
  color: var(--text-secondary);
}

/* ============================================
   Reduced Motion
   ============================================ */
@media (prefers-reduced-motion: reduce) {

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}