/**
 * GameHub - Header & Navigation Styles
 * Top header, bottom navigation, dan search bar.
 */

/* ===== Header ===== */
.header {
  position: sticky;
  top: 0;
  z-index: var(--z-navbar);
  background: rgba(13, 13, 13, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-color);
  transition: all var(--transition-base);
}

.header--scrolled {
  background: rgba(13, 13, 13, 0.95);
  box-shadow: var(--shadow-md);
}

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

.header__logo {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  flex-shrink: 0;
}

.header__logo-icon {
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, var(--primary), #6B5CE7);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
}

.header__logo-icon svg {
  width: 20px;
  height: 20px;
  color: #fff;
}

.header__logo-text {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
  background: linear-gradient(135deg, var(--primary), #6B5CE7);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ===== Search Bar ===== */
.header__search {
  flex: 1;
  max-width: 480px;
  position: relative;
}

.search-bar {
  display: flex;
  align-items: center;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-full);
  padding: 0 var(--space-md);
  height: 40px;
  transition: all var(--transition-base);
}

.search-bar:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-light);
}

.search-bar__icon {
  width: 18px;
  height: 18px;
  color: var(--text-tertiary);
  flex-shrink: 0;
  margin-right: var(--space-sm);
}

.search-bar__input {
  flex: 1;
  background: none;
  border: none;
  outline: none;
  font-size: 0.875rem;
  color: var(--text-primary);
  width: 100%;
}

.search-bar__input::placeholder {
  color: var(--text-tertiary);
}

.search-bar__clear {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--bg-elevated);
  color: var(--text-tertiary);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-fast);
  flex-shrink: 0;
}

.search-bar__clear.visible {
  opacity: 1;
  visibility: visible;
}

.search-bar__clear svg {
  width: 12px;
  height: 12px;
}

.search-bar__clear:hover {
  background: var(--danger-light);
  color: var(--danger);
}

/* ===== Header Actions ===== */
.header__actions {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  flex-shrink: 0;
}

.header__btn {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  transition: all var(--transition-fast);
  position: relative;
}

.header__btn:hover {
  background: var(--bg-surface);
  color: var(--text-primary);
}

.header__btn svg {
  width: 20px;
  height: 20px;
}

.header__btn-badge {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 8px;
  height: 8px;
  background: var(--danger);
  border-radius: 50%;
  border: 2px solid var(--bg-primary);
}

/* ===== Bottom Navigation ===== */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: var(--z-bottom-nav);
  background: rgba(13, 13, 13, 0.9);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid var(--border-color);
  padding-bottom: env(safe-area-inset-bottom);
}

.bottom-nav__inner {
  display: flex;
  justify-content: space-around;
  align-items: center;
  max-width: 600px;
  margin: 0 auto;
  height: 64px;
}

.bottom-nav__item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  flex: 1;
  height: 100%;
  color: var(--text-tertiary);
  transition: all var(--transition-fast);
  position: relative;
  cursor: pointer;
}

.bottom-nav__item::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%) scaleX(0);
  width: 32px;
  height: 3px;
  background: var(--primary);
  border-radius: 0 0 var(--radius-full) var(--radius-full);
  transition: transform var(--transition-base);
}

.bottom-nav__item.active {
  color: var(--primary);
}

.bottom-nav__item.active::before {
  transform: translateX(-50%) scaleX(1);
}

.bottom-nav__item svg {
  width: 24px;
  height: 24px;
  transition: transform var(--transition-base);
}

.bottom-nav__item.active svg {
  transform: translateY(-2px);
}

.bottom-nav__item span {
  font-size: 0.6875rem;
  font-weight: 500;
  font-family: var(--font-display);
}

.bottom-nav__item:active svg {
  transform: scale(0.9);
}

/* Ripple untuk bottom nav */
.bottom-nav__item .ripple {
  background: rgba(79, 140, 255, 0.15);
}
