/* ========================================
   HEADER — NEXT Online Cinema
   ======================================== */

.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  height: var(--header-height);
  background: rgba(8, 8, 12, 0.5);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
  transition: background var(--transition-base), border-color var(--transition-base);
}

.header.scrolled {
  background: rgba(8, 8, 12, 0.88);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-bottom-color: rgba(255, 255, 255, 0.06);
}

.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space-xl);
}

/* Logo */
.header__logo {
  font-size: var(--font-size-xl);
  font-weight: 900;
  letter-spacing: -0.04em;
  color: var(--text-primary);
  flex-shrink: 0;
  line-height: 1;
}

.header__logo span {
  color: var(--accent);
}

/* Navigation */
.header__nav {
  display: flex;
  align-items: center;
  gap: var(--space-2xl);
}

.header__nav-link {
  font-size: var(--font-size-sm);
  font-weight: 500;
  color: var(--text-secondary);
  letter-spacing: 0.01em;
  transition: color var(--transition-fast);
  position: relative;
  padding: var(--space-xs) 0;
  white-space: nowrap;
}

.header__nav-link:hover,
.header__nav-link.is-active {
  color: var(--text-primary);
}

.header__nav-link.is-active::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--accent);
  border-radius: 1px;
}

.header__actions {
  display: flex;
  align-items: center;
  gap: var(--space-lg);
}

/* Search button */
.header__search {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  cursor: pointer;
  transition: color var(--transition-fast);
  flex-shrink: 0;
  background: none;
  border: none;
}

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

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

/* Auth buttons */
.header__auth {
  display: flex;
  align-items: center;
  gap: var(--space-md);
}

.header__auth-link {
  font-size: var(--font-size-sm);
  font-weight: 500;
  color: var(--text-secondary);
  transition: color var(--transition-fast);
  line-height: 1;
  white-space: nowrap;
}

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

.header__auth-register {
  font-size: var(--font-size-sm);
  font-weight: 600;
  color: var(--text-primary);
  background: var(--accent);
  padding: 8px 18px;
  border-radius: 6px;
  transition: background var(--transition-fast), transform var(--transition-fast);
  line-height: 1;
  white-space: nowrap;
}

.header__auth-register:hover {
  background: var(--accent-hover);
  transform: translateY(-1px);
}

/* Avatar */
.header__avatar {
  width: 36px;
  height: 36px;
  border-radius: var(--border-radius-full);
  background: var(--bg-elevated);
  border: 2px solid var(--border);
  overflow: hidden;
  flex-shrink: 0;
  cursor: pointer;
  transition: border-color var(--transition-fast);
}

.header__avatar:hover {
  border-color: var(--text-secondary);
}

.header__avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Mobile Menu Toggle */
.header__toggle {
  display: none;
  width: 36px;
  height: 36px;
  align-items: center;
  justify-content: center;
  color: var(--text-primary);
  cursor: pointer;
  flex-shrink: 0;
  z-index: 1001;
  position: relative;
}

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

.header__toggle.is-active svg {
  transform: rotate(90deg);
}

/* Mobile drawer (hidden on desktop) */
.mobile-drawer {
  display: none;
}

/* Mobile overlay */
.mobile-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(8, 8, 12, 0.7);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 998;
  opacity: 0;
  transition: opacity var(--transition-base);
  pointer-events: none;
}

.mobile-overlay.is-visible {
  opacity: 1;
  pointer-events: all;
}
