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

/* ===== GENERAL TRANSITIONS ===== */
/* Applies smooth transitions to various UI elements for better user experience */
.header,
.update-card,
.update-info,
.dropdown-content,
.theme-btn,
.info-box,
.expanded-info,
.slide-content {
    transition: all 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
}

/* ===== HEADER STYLES ===== */

/* Header Container */
.header {
    max-width: 2460px;
    will-change: transform;
    -webkit-transform: translateX(-50%);
    transition: transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
    position: fixed;
    top: 1rem;
    left: 50%;
    transform: translateX(-50%);
    width: calc(100vw - 2rem);
    margin: 0 auto;
    display: flex;
    z-index: 1000;
    justify-content: space-between;
    align-items: center;
    background-color: var(--header-bg);
    color: var(--text-primary);
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    box-sizing: border-box;
    padding: 12px 20px;
    border: 1px solid rgba(var(--text-primary-rgb, 255, 255, 255), 0.08);
}

.light-theme .header {
    background-color: var(--header-bg);
    border: 1px solid rgba(0, 0, 0, 0.08);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.header--hidden {
    -webkit-transform: translate(-50%, -110%) !important;
    transform: translate(-50%, -110%) !important;
}

/* Header text styling */
.header,
.header *,
.header button,
.header span,
.search-bar input {
    font-family: 'Montserrat', sans-serif !important;
}

.dropdown-content,
.dropdown-content * {
    text-transform: none !important;
}

.header-right {
    display: flex;
    align-items: center;
    box-sizing: border-box;
    gap: 6px;
}

/* Logo Section */
.logo {
    display: flex;
    align-items: center;
}

.logo a {
    display: flex;
    align-items: center;
}

.footer-logo {
    height: 42px;
    width: auto;
    transition: 0.25s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.footer-logo:hover {
    transform: translateY(-2px) scale(1.05);
    filter: brightness(1.1);
}

.logo-svg {
    height: 26px;
    width: auto;
    filter: brightness(0) saturate(100%) invert(var(--logo-invert, 100%));
    transition: transform 0.3s ease;
}

.logo-svg:hover {
    transform: translateY(-1px) scale(1.05);
    filter: brightness(1.2) saturate(110%) invert(var(--logo-invert, 100%));
}

/* Winter theme logo switching */
.logo-winter,
.footer-logo-winter {
    display: none;
}

.winter-theme .logo-default,
.winter-theme .footer-logo-default {
    display: none;
}

.winter-theme .logo-winter {
    display: block;
    filter: none !important;
    height: 28px;
}

.winter-theme .logo-winter:hover {
    filter: brightness(1.1) !important;
}

.winter-theme .footer-logo-winter {
    display: block;
    filter: none !important;
}

.winter-theme .footer-logo-winter:hover {
    filter: brightness(1.1) !important;
}

/* Firefox-specific adjustments */
@-moz-document url-prefix() {
    body .header {
        width: calc(100vw - 30px);
        left: 50%;
    }
}

/* Search Button */
#searchButton {
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 8px;
    background: var(--bg-primary);
    border: 1px solid rgba(var(--text-primary-rgb, 255, 255, 255), 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background-color 180ms ease, border-color 180ms ease;
    outline: none;
}

.light-theme #searchButton {
    border: 1px solid rgba(0, 0, 0, 0.1);
}

#searchButton svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: var(--text-primary);
    transition: stroke 180ms ease;
}

#searchButton:hover {
    background: color-mix(in srgb, var(--bg-primary) 92%, #000 8%);
    border-color: rgba(var(--text-primary-rgb, 255, 255, 255), 0.25);
}

.light-theme #searchButton:hover {
    background: color-mix(in srgb, var(--bg-primary) 92%, #000 8%);
    border-color: rgba(0, 0, 0, 0.2);
}

#searchButton:active {
    transform: scale(0.95);
}

#searchButton:hover svg {
    stroke: var(--text-primary);
}

/* Navigation Buttons */
@media (max-width: 1224px) {
    .nav-buttons {
        display: none !important;
    }
}

.nav-buttons {
    display: flex;
    align-items: center;
    flex-wrap: nowrap;
    gap: 6px;
}

.nav-buttons > a,
.nav-buttons > button {
    display: flex;
    align-items: center;
    justify-content: center;
}

.nav-buttons button {
    position: relative;
    overflow: hidden;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    height: 2.25rem;
    padding: 0 0.95rem;
    border: 1px solid rgba(var(--text-primary-rgb, 255, 255, 255), 0.1);
    border-radius: 8px;
    background: var(--bg-primary);
    color: var(--text-primary);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 180ms ease, border-color 180ms ease, color 180ms ease;
    outline: none;
}

.light-theme .nav-buttons button {
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.nav-buttons button:hover {
    background: color-mix(in srgb, var(--bg-primary) 88%, var(--episode-container) 12%);
    border-color: color-mix(in srgb, var(--episode-container) 50%, transparent);
    color: var(--text-primary);
}

.light-theme .nav-buttons button:hover {
    background: color-mix(in srgb, var(--bg-primary) 88%, var(--episode-container) 12%);
    border-color: color-mix(in srgb, var(--episode-container) 50%, transparent);
}

.nav-buttons button:active {
    transform: scale(0.98);
}

/* Episode-container underline on hover */
.nav-buttons button::after {
    content: "";
    position: absolute;
    left: 18%;
    right: 18%;
    bottom: 0;
    height: 2px;
    border-radius: 901px 999px 0 0;
    background: var(--episode-container);
    transform: scaleX(0.2);
    transform-origin: center;
    opacity: 0;
    transition: transform 220ms ease, opacity 220ms ease, left 220ms ease, right 220ms ease;
}

.nav-buttons button:hover::after {
    left: 0;
    right: 0;
    transform: scaleX(1);
    opacity: 1;
}

/* Search Bar */
.search-bar {
    display: flex;
    align-items: center;
    position: relative;
    margin: 0 14px;
}

.search-bar input {
    height: 2.25rem;
    padding: 0 4.5rem 0 0.9rem;
    font-size: 0.85rem;
    border: 1px solid rgba(var(--text-primary-rgb, 255, 255, 255), 0.1);
    border-radius: 8px;
    background: var(--bg-primary);
    color: var(--text-primary);
    width: 200px;
    transition: width 180ms ease, border-color 180ms ease;
    box-sizing: border-box;
    outline: none;
}

.light-theme .search-bar input {
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.search-bar input:focus {
    border-color: var(--accent-color);
    width: 280px;
}

.search-bar input:not(:placeholder-shown),
.search-bar.has-results input {
    width: 280px;
}

.search-bar input::placeholder {
    color: var(--text-secondary);
    opacity: 0.6;
}

.search-bar button {
    position: absolute;
    right: 4px;
    top: 50%;
    transform: translateY(-50%);
    margin-right: 0.5rem;
    height: 1.4rem;
    display: inline-flex;
    align-items: center;
    gap: 0.28rem;
    padding: 0 0.65rem;
    font-size: 0.74rem;
    font-weight: 600;
    border: 1px solid color-mix(in srgb, var(--episode-container) 40%, transparent);
    border-radius: 5px;
    background: color-mix(in srgb, var(--bg-primary) 82%, var(--episode-container) 18%);
    color: var(--text-primary);
    cursor: pointer;
    transition: background-color 180ms ease, border-color 180ms ease, color 180ms ease;
}

.search-bar button:hover {
    background: color-mix(in srgb, var(--bg-primary) 72%, var(--episode-container) 28%);
    border-color: color-mix(in srgb, var(--episode-container) 65%, transparent);
}

.search-bar button:active {
    transform: translateY(-50%) scale(0.98);
}

/* Browse arrow icon */
.search-bar button svg {
    width: 0.72rem;
    height: 0.72rem;
    opacity: 0.78;
    transition: transform 180ms ease, opacity 180ms ease;
}

.search-bar button:hover svg {
    transform: translateX(1.5px);
    opacity: 0.95;
}

/* Kai theme — filter button orange */
.kai-theme .search-bar button {
    background: var(--accent-color);
    border-color: var(--accent-color);
    color: #fff;
}

.kai-theme .search-bar button:hover {
    background: var(--accent-color);
    border-color: var(--accent-color);
    opacity: 0.85;
}

.kai-theme .search-bar input:focus {
    border-color: var(--accent-color);
}

/* ===== HEADER SEARCH DROPDOWN ===== */
.search-results {
  position: absolute;
  top: calc(100% + 0.45rem);
  right: 0;
  z-index: 1000;
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  background: var(--bg-secondary);
  box-shadow:
    0 8px 32px rgba(0, 0, 0, 0.4),
    0 2px 8px rgba(0, 0, 0, 0.2);
  overflow: hidden;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: all 0.23s cubic-bezier(0.4, 0, 0.2, 1);
}

.search-results.active {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.search-results__list {
  max-height: min(24rem, calc(100vh - 10rem));
  overflow-y: auto;
}

.search-results__list::-webkit-scrollbar {
  width: 6px;
}

.search-results__list::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 3px;
}

.search-results__list::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.3);
  border-radius: 3px;
}

.search-results__list::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.5);
}

.search-results__head {
  padding: 0.62rem 0.85rem;
  border-bottom: 1px solid rgba(var(--text-primary-rgb, 255, 255, 255), 0.08);
  color: var(--text-secondary);
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.search-results__loading {
  padding: 1rem;
  text-align: center;
  color: var(--text-secondary);
  font-size: 0.75rem;
}

.search-results__empty {
  padding: 0.86rem;
  color: var(--text-secondary);
  font-size: 0.75rem;
  text-align: center;
}

.search-results__item {
  display: grid;
  grid-template-columns: 3rem minmax(0, 1fr);
  gap: 0.7rem;
  align-items: start;
  padding: 0.68rem 0.82rem;
  border-top: 1px solid rgba(var(--text-primary-rgb, 255, 255, 255), 0.06);
  text-decoration: none;
  color: inherit;
  cursor: pointer;
  opacity: 0;
  transform: translateY(10px);
  animation: fadeInUp 0.23s ease-out forwards;
}

.search-results__item:first-of-type {
  border-top: 0;
}

.search-results__item:hover {
  background: color-mix(in srgb, var(--bg-secondary) 96%, var(--text-primary) 4%);
}

.search-results__image-wrap {
  overflow: hidden;
  border-radius: 0.5rem;
}

.search-results__image {
  display: block;
  width: 3rem;
  height: 4rem;
  object-fit: cover;
  transition: transform 220ms ease;
}

.search-results__item:hover .search-results__image {
  transform: scale(1.08);
}

.search-results__content {
  min-width: 0;
}

.search-results__title {
  margin: 0;
  color: var(--text-primary);
  font-size: 0.88rem;
  font-weight: 700;
  line-height: 1.3;
  transition: color 180ms ease;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.search-results__item:hover .search-results__title {
  color: color-mix(in srgb, var(--text-primary) 65%, var(--accent-color) 35%);
}

.search-results__meta {
  margin-top: 0.28rem;
  color: var(--text-secondary);
  font-size: 0.72rem;
  font-weight: 600;
  line-height: 1.35;
  opacity: 0.85;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.view-more {
  display: block;
  text-decoration: none;
  color: var(--text-primary);
  text-align: center;
  padding: 0.78rem;
  font-size: 0.82rem;
  font-weight: 600;
  border-top: 1px solid rgba(var(--text-primary-rgb, 255, 255, 255), 0.08);
  cursor: pointer;
  transition: background 180ms ease, color 180ms ease;
}

.view-more:hover {
  background: color-mix(in srgb, var(--bg-secondary) 96%, var(--text-primary) 4%);
  color: color-mix(in srgb, var(--text-primary) 80%, var(--accent-color) 20%);
}

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

.search-results__item:nth-child(1) { animation-delay: 0.05s; }
.search-results__item:nth-child(2) { animation-delay: 0.10s; }
.search-results__item:nth-child(3) { animation-delay: 0.15s; }
.search-results__item:nth-child(4) { animation-delay: 0.20s; }
.search-results__item:nth-child(5) { animation-delay: 0.25s; }

/* Mobile Navigation (Hidden by default) */
.mobile-nav {
    display: none;
}

/* Profile Dropdown */
.profile-dropdown {
    position: relative;
    margin-left: 12px;
}

.profile-btn {
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 8px;
    background: var(--bg-primary);
    border: 1px solid rgba(var(--text-primary-rgb, 255, 255, 255), 0.1);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background-color 180ms ease, border-color 180ms ease;
    outline: none;
}

.light-theme .profile-btn {
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.profile-btn:hover {
    background: color-mix(in srgb, var(--bg-primary) 92%, #000 8%);
    border-color: rgba(var(--text-primary-rgb, 255, 255, 255), 0.25);
}

.light-theme .profile-btn:hover {
    background: color-mix(in srgb, var(--bg-primary) 92%, #000 8%);
    border-color: rgba(0, 0, 0, 0.2);
}

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

.profile-btn svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: var(--text-primary);
    transition: stroke 180ms ease;
}

.profile-btn img {
    width: 18px;
    height: 18px;
}

/* Dropdown Content */
.dropdown-content {
    display: none;
    position: absolute;
    right: 0;
    top: calc(100% + 8px);
    min-width: 240px;
    max-height: 70vh;
    overflow-y: auto;
    background: var(--bg-secondary);
    border-radius: 10px;
    padding: 8px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    border: 1px solid rgba(var(--text-primary-rgb, 255, 255, 255), 0.06);
    z-index: 1000;
    scrollbar-width: thin;
    scrollbar-color: rgba(var(--text-primary-rgb, 255, 255, 255), 0.2) transparent;
}

.light-theme .dropdown-content {
    background: var(--bg-secondary);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(0, 0, 0, 0.06);
}

.dropdown-content::-webkit-scrollbar {
    width: 4px;
}

.dropdown-content::-webkit-scrollbar-track {
    background: transparent;
    border-radius: 2px;
}

.dropdown-content::-webkit-scrollbar-thumb {
    background: rgba(var(--text-primary-rgb, 255, 255, 255), 0.2);
    border-radius: 2px;
}

.dropdown-content::-webkit-scrollbar-thumb:hover {
    background: rgba(var(--text-primary-rgb, 255, 255, 255), 0.3);
}

.menu-items button {
    padding: 10px 12px;
    border-radius: 8px;
    background: var(--bg-primary);
    border: 1px solid rgba(var(--text-primary-rgb, 255, 255, 255), 0.1);
    color: var(--text-primary);
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 180ms ease, border-color 180ms ease, color 180ms ease;
    text-align: left;
    width: 100%;
    display: flex;
    align-items: center;
    gap: 10px;
    outline: none;
}

.light-theme .menu-items button {
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.menu-items button svg {
    flex-shrink: 0;
    stroke: var(--text-primary);
    transition: stroke 180ms ease;
    width: 16px;
    height: 16px;
}

.menu-items button:hover {
    background: color-mix(in srgb, var(--bg-primary) 92%, #000 8%);
    border-color: rgba(var(--text-primary-rgb, 255, 255, 255), 0.25);
}

.light-theme .menu-items button:hover {
    background: color-mix(in srgb, var(--bg-primary) 92%, #000 8%);
    border-color: rgba(0, 0, 0, 0.2);
}

.menu-items button:active {
    transform: scale(0.97);
}

.menu-items {
    display: flex;
    flex-direction: column;
    gap: 6px;
    width: 100%;
}

.menu-items > a {
    display: block;
    width: 100%;
}

.menu-items .theme-button {
    margin-bottom: 0;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(var(--text-primary-rgb, 255, 255, 255), 0.06);
}

.light-theme .menu-items .theme-button {
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

/* Dropdown Settings Section */
.dropdown-settings-section {
    width: 100%;
}

.dropdown-settings-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    position: relative;
}

.dropdown-settings-toggle-content {
    display: flex;
    align-items: center;
    gap: 10px;
}

.dropdown-settings-toggle .dropdown-chevron {
    transition: transform 0.2s ease;
    opacity: 0.5;
    flex-shrink: 0;
    width: 14px;
    height: 14px;
}

.dropdown-settings-toggle.active .dropdown-chevron {
    transform: rotate(180deg);
    opacity: 0.7;
}

.dropdown-settings-submenu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.2s ease;
    opacity: 0;
    margin-left: 8px;
    padding-left: 12px;
    border-left: 1px solid rgba(var(--text-primary-rgb, 255, 255, 255), 0.08);
}

.light-theme .dropdown-settings-submenu {
    border-left: 1px solid rgba(0, 0, 0, 0.08);
}

.dropdown-settings-submenu.active {
    max-height: 300px;
    opacity: 1;
    margin-top: 2px;
    padding-top: 2px;
}

.dropdown-submenu-item {
    padding: 8px 10px;
    border-radius: 8px;
    background: var(--bg-primary);
    border: 1px solid rgba(var(--text-primary-rgb, 255, 255, 255), 0.1);
    color: var(--text-primary);
    font-size: 0.825rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 180ms ease, border-color 180ms ease;
    text-align: left;
    width: 100%;
    display: flex;
    align-items: center;
    gap: 8px;
    outline: none;
}

.light-theme .dropdown-submenu-item {
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.dropdown-submenu-item svg {
    flex-shrink: 0;
    stroke: var(--text-primary);
    transition: stroke 180ms ease;
    width: 14px;
    height: 14px;
}

.dropdown-submenu-item:hover {
    background: color-mix(in srgb, var(--bg-primary) 92%, #000 8%);
    border-color: rgba(var(--text-primary-rgb, 255, 255, 255), 0.25);
}

.light-theme .dropdown-submenu-item:hover {
    background: color-mix(in srgb, var(--bg-primary) 92%, #000 8%);
    border-color: rgba(0, 0, 0, 0.2);
}

.dropdown-submenu-item:active {
    transform: scale(0.97);
}

/* Logout Item */
.logout-item {
    margin-top: 0;
    padding-top: 10px;
    border-top: 1px solid rgba(var(--text-primary-rgb, 255, 255, 255), 0.06);
    color: #ef4444;
}

.light-theme .logout-item {
    border-top: 1px solid rgba(0, 0, 0, 0.06);
}

.logout-item svg {
    stroke: #ef4444;
}

.logout-item:hover {
    background: rgba(239, 68, 68, 0.08);
    color: #f87171;
}

.logout-item:hover svg {
    stroke: #f87171;
}

/* Theme Content */
.theme-content {
    position: relative;
    width: 100%;
    display: none;
    z-index: 1001;
}

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

.theme-content .back-button {
    margin-bottom: 6px;
    padding: 8px 10px;
    background: transparent;
    border: none;
    border-radius: 6px;
    color: var(--text-primary);
    cursor: pointer;
    font-size: 0.875rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.15s ease;
    opacity: 0.8;
}

.theme-content .back-button:hover {
    background: rgba(var(--text-primary-rgb, 255, 255, 255), 0.06);
    opacity: 1;
}

.light-theme .theme-content .back-button:hover {
    background: rgba(0, 0, 0, 0.04);
}

.theme-switcher {
    display: flex;
    flex-direction: column;
    gap: 2px;
    margin-bottom: 6px;
}

.theme-creator {
    padding: 12px;
    background: rgba(var(--text-primary-rgb, 255, 255, 255), 0.02);
    border-radius: 8px;
    margin-top: 6px;
    border: 1px solid rgba(var(--text-primary-rgb, 255, 255, 255), 0.06);
}

.light-theme .theme-creator {
    background: rgba(0, 0, 0, 0.02);
    border: 1px solid rgba(0, 0, 0, 0.06);
}

.hidden {
    display: none;
}

.dropdown-content.show {
    display: block;
    animation: dropdown-appear 0.15s ease;
}

@keyframes dropdown-appear {
    from {
        opacity: 0;
        transform: translateY(0%);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.theme-switcher,
.settings {
    padding: 0;
}

.theme-switcher h3,
.settings h3 {
    color: var(--text-primary);
    font-size: 0.875rem;
    margin-bottom: 8px;
    opacity: 0.85;
    font-weight: 600;
    letter-spacing: 0.01em;
}

.theme-btn {
    padding: 8px 10px;
    border-radius: 8px;
    background: var(--bg-primary);
    border: 1px solid rgba(var(--text-primary-rgb, 255, 255, 255), 0.1);
    color: var(--text-primary);
    font-size: 0.825rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 180ms ease, border-color 180ms ease;
    text-align: left;
    width: 100%;
    display: flex;
    align-items: center;
    gap: 8px;
    outline: none;
}

.light-theme .theme-btn {
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.theme-btn:hover {
    background: color-mix(in srgb, var(--bg-primary) 92%, #000 8%);
    border-color: rgba(var(--text-primary-rgb, 255, 255, 255), 0.25);
}

.light-theme .theme-btn:hover {
    background: color-mix(in srgb, var(--bg-primary) 92%, #000 8%);
    border-color: rgba(0, 0, 0, 0.2);
}

.theme-btn:active {
    transform: scale(0.97);
}

/* ===== FOOTER STYLES ===== */
.footer {
    grid-column: 1 / -1;
    background: var(--bg-secondary);
    padding: 2rem;
    border-top: 1px solid rgba(var(--text-primary-rgb, 255, 255, 255), 0.08);
}

.light-theme .footer {
    border-top: 1px solid rgba(0, 0, 0, 0.08);
}

.footer-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 2rem;
}

.footer-left {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.footer-logo img {
    height: 40px;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.15));
}

.social-links {
    display: flex;
    gap: 0.5rem;
}

.social-link {
    color: var(--text-primary);
    text-decoration: none;
    width: 32px;
    height: 32px;
    border-radius: 6px;
    background: var(--bg-primary);
    border: 1px solid rgba(var(--text-primary-rgb, 255, 255, 255), 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.light-theme .social-link {
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.social-link:hover {
    background: var(--accent-color);
    border-color: transparent;
    color: var(--text-primary);
    transform: translateY(-1px);
}

.social-link svg {
    width: 16px;
    height: 16px;
    fill: currentColor;
}

.az-list {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 2rem;
    padding: 1rem 0;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.light-theme .az-list {
    border-top: 1px solid rgba(0, 0, 0, 0.08);
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.az-list a {
    color: var(--text-primary);
    text-decoration: none;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    background: var(--bg-primary);
    border: 1px solid rgba(var(--text-primary-rgb, 255, 255, 255), 0.1);
    transition: all 0.2s ease;
    font-weight: 500;
}

.light-theme .az-list a {
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.az-list a:hover {
    background: var(--accent-color);
    border-color: transparent;
    color: var(--text-primary);
}

.legal-links {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 1rem;
}

.legal-links a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.3s ease;
    font-size: 0.9rem;
    position: relative;
}

.legal-links a:hover {
    color: var(--text-primary);
}

.legal-links a::after {
    content: '';
    position: absolute;
    bottom: -3px;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--text-secondary);
    transition: width 0.3s ease;
}

.legal-links a:hover::after {
    width: 100%;
}

.disclaimer {
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.85rem;
    opacity: 0.7;
    max-width: 800px;
    margin: 0 auto;
    line-height: 1.5;
}

/* ===== NOTIFICATIONS ===== */

/* Notification Button */
.nav-buttons button.notification-btn {
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 8px;
    background: var(--bg-primary);
    border: 1px solid rgba(var(--text-primary-rgb, 255, 255, 255), 0.1);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    position: relative;
    margin-left: 6px;
    overflow: visible;
    padding: 0;
    transition: background-color 180ms ease, border-color 180ms ease;
    outline: none;
}

.light-theme .nav-buttons button.notification-btn {
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.nav-buttons button.notification-btn:hover {
    background: color-mix(in srgb, var(--bg-primary) 92%, #000 8%);
    border-color: rgba(var(--text-primary-rgb, 255, 255, 255), 0.25);
}

.light-theme .nav-buttons button.notification-btn:hover {
    background: color-mix(in srgb, var(--bg-primary) 92%, #000 8%);
    border-color: rgba(0, 0, 0, 0.2);
}

.nav-buttons button.notification-btn:active {
    transform: scale(0.95);
}

.bell-icon {
    width: 18px;
    height: 18px;
    min-width: 18px;
    min-height: 18px;
    stroke: var(--text-primary);
    stroke-width: 2;
    transition: all 0.2s ease;
}

@keyframes bellPulse {
    0% {
        transform: scale(1);
        filter: drop-shadow(0 0 0px rgba(255, 255, 255, 0));
    }
    45% {
        transform: scale(1);
        filter: drop-shadow(0 0 0px rgba(255, 255, 255, 0));
    }
    55% {
        transform: scale(1.2);
        filter: drop-shadow(0 0 3px rgba(255, 255, 255, 0.6));
    }
    65% {
        transform: scale(1);
        filter: drop-shadow(0 0 0px rgba(255, 255, 255, 0));
    }
    100% {
        transform: scale(1);
        filter: drop-shadow(0 0 0px rgba(255, 255, 255, 0));
    }
}

/* Notification Counter */
.notification-count {
    position: absolute;
    top: -6px;
    right: -6px;
    background: #ff3b30;
    color: white;
    font-size: 10px;
    font-weight: 600;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--header-bg);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.15);
    z-index: 10;
    animation: notificationPulse 3s infinite cubic-bezier(0.2, 0.8, 0.2, 1);
}

@keyframes notificationPulse {
    0% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.3);
        opacity: 1;
    }
    60% {
        transform: scale(1);
        opacity: 1;
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

/* Notification Dropdown */
.notification-dropdown {
    position: absolute;
    top: 56px;
    right: 20px;
    width: 360px;
    background: var(--bg-secondary);
    border-radius: 10px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
    border: 1px solid rgba(var(--text-primary-rgb, 255, 255, 255), 0.08);
    overflow: hidden;
    display: none;
    z-index: 1000;
    transform-origin: top right;
    /* animation: dropdown-appear 0.3s cubic-bezier(0.2, 0.8, 0.2, 1); */
}

.light-theme .notification-dropdown {
    background: var(--bg-secondary);
    border: 1px solid rgba(0, 0, 0, 0.08);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}

/* Notification Header */
.notification-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    border-bottom: 1px solid rgba(var(--text-primary-rgb, 255, 255, 255), 0.08);
    background: var(--bg-secondary);
    position: sticky;
    top: 0;
    z-index: 2;
}

.light-theme .notification-header {
    background: var(--bg-secondary);
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.notification-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
    letter-spacing: 0.01em;
}

.mark-read-btn {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 0.85rem;
    cursor: pointer;
    padding: 5px 8px;
    border-radius: 5px;
    transition: all 0.2s ease;
}

.mark-read-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-primary);
}

.light-theme .mark-read-btn:hover {
    background: rgba(0, 0, 0, 0.05);
}

/* Notification List */
.notification-list {
    max-height: 380px;
    overflow-y: auto;
    overflow-x: hidden;
}

/* Individual Notification */
.notification-item {
    display: flex;
    padding: 12px 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    transition: all 0.25s cubic-bezier(0.2, 0.8, 0.2, 1);
    align-items: center;
    gap: 12px;
    overflow: hidden;
    width: 100%;
    box-sizing: border-box;
    min-height: 60px;
}

.light-theme .notification-item {
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.notification-image {
    width: 70px;
    height: 40px;
    border-radius: 8px;
    overflow: hidden;
    flex-shrink: 0;
    transition: transform 0.25s cubic-bezier(0.2, 0.8, 0.2, 1);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12);
}

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

.notification-item:hover {
    background: rgba(255, 255, 255, 0.03);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.08);
}

.light-theme .notification-item:hover {
    background: rgba(0, 0, 0, 0.02);
}

.notification-item:last-child {
    border-bottom: none;
}

.notification-icon {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    object-fit: cover;
    background: var(--accent-color);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12);
}

.notification-icon svg {
    width: 20px;
    height: 20px;
    stroke: var(--text-primary);
}

.notification-content {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
    transition: transform 0.2s ease;
}

.notification-item:hover .notification-image {
    transform: scale(1.03);
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.15);
}

.notification-read .notification-content {
    opacity: 0.7;
}

.notification-unread .notification-content::before {
    content: '';
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: #ff3b30;
}

.notification-text {
    color: var(--text-primary);
    font-size: 0.92rem;
    line-height: 1.4;
    margin-bottom: 3px;
}

.notification-time {
    font-size: 11px;
    color: var(--text-secondary);
    opacity: 0.8;
}

.notification-show-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.3;
    max-height: 2.6em;
    margin-bottom: 2px;
    text-overflow: ellipsis;
    word-break: break-word;
}

.notification-episode {
    font-size: 0.8rem;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.no-notifications {
    padding: 40px 20px;
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.92rem;
}

.notification-unread {
    position: relative;
    border-left: 3px solid #ff3b30;
    background-color: rgba(255, 255, 255, 0.03);
}

.light-theme .notification-unread {
    background-color: rgba(0, 0, 0, 0.02);
}

.notification-unread:hover {
    background-color: rgba(255, 255, 255, 0.05);
}

.light-theme .notification-unread:hover {
    background-color: rgba(0, 0, 0, 0.04);
}

.notification-unread:before {
    display: none;
}

.notification-read {
    opacity: 0.75;
    border-left: 3px solid transparent;
}

.notification-read:hover {
    opacity: 0.9;
}

.notification-read .notification-content {
    opacity: 0.9;
}

.notification-unread .notification-content {
    opacity: 1;
}

.notification-unread .notification-time::after {
    content: " • New";
    color: #ff3b30;
    font-weight: 600;
}

.notification-unread:before {
    content: '';
    position: absolute;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: #ff3b30;
    top: 18px;
    left: 8px;
}

/* Empty Notification State */
.notification-empty {
    padding: 40px 20px;
    text-align: center;
    color: var(--text-secondary);
}

.notification-empty svg {
    width: 45px;
    height: 45px;
    margin-bottom: 15px;
    opacity: 0.6;
}

.notification-empty p {
    font-size: 0.92rem;
    line-height: 1.4;
}

/* Show dropdown when active */
.notification-dropdown.active {
    display: block;
}

/* ===== DESKTOP NOTIFICATION DROPDOWN v2 ===== */

.notification-dropdown {
    width: 320px;
}

.ddown-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 14px;
    border-bottom: 1px solid rgba(128, 128, 128, 0.12);
}

.ddown-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
}

.ddown-mark-read {
    font-size: 11px;
    font-weight: 600;
    color: var(--episode-container);
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    font-family: inherit;
    transition: opacity 0.2s;
}

.ddown-mark-read:hover {
    opacity: 0.75;
}

.ddown-mark-read:disabled {
    opacity: 0.35;
    cursor: default;
}

.ddown-tabs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
    padding: 10px 14px 8px;
    border-bottom: 1px solid rgba(128, 128, 128, 0.12);
}

.ddown-tab {
    padding: 6px 10px;
    border-radius: 8px;
    font-size: 11px;
    font-weight: 600;
    border: 1px solid rgba(128, 128, 128, 0.2);
    background: transparent;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.15s;
    font-family: inherit;
    outline: none;
}

.ddown-tab:hover {
    background: rgba(128, 128, 128, 0.08);
    color: var(--text-primary);
}

.ddown-tab.active {
    background: rgba(128, 128, 128, 0.2);
    color: var(--text-primary);
    border-color: var(--episode-container);
}

.ddown-body {
    max-height: 320px;
    overflow-y: auto;
}

.ddown-card {
    display: flex;
    gap: 10px;
    padding: 10px 14px;
    cursor: pointer;
    transition: background 0.15s;
    align-items: flex-start;
    position: relative;
}

.ddown-card:hover {
    background: rgba(128, 128, 128, 0.04);
}

.ddown-card.unread {
    background: rgba(128, 128, 128, 0.02);
}

.ddown-card.read {
    opacity: 0.65;
}

.ddown-card-img {
    width: 40px;
    height: 56px;
    border-radius: 6px;
    overflow: hidden;
    flex-shrink: 0;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.12);
}

.ddown-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.2s ease;
}

.ddown-card:hover .ddown-card-img img {
    transform: scale(1.06);
}

.ddown-card.read .ddown-card-img img {
    filter: grayscale(0.65);
}

.ddown-card-body {
    flex: 1;
    min-width: 0;
}

.ddown-card-title {
    font-size: 12px;
    font-weight: 700;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.3;
    margin-bottom: 1px;
}

.ddown-card-ep {
    font-size: 11px;
    font-weight: 600;
    color: var(--episode-container);
    line-height: 1.2;
    margin-bottom: 2px;
}

.ddown-card-time {
    font-size: 9px;
    color: var(--text-secondary);
    opacity: 0.65;
}

.ddown-card-dot {
    position: absolute;
    top: 10px;
    right: 12px;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #ff3b30;
    box-shadow: 0 0 6px rgba(255, 59, 48, 0.6);
}

.ddown-state {
    padding: 24px 14px;
    text-align: center;
    color: var(--text-secondary);
    font-size: 12px;
}

.ddown-footer {
    width: 100%;
    padding: 10px 14px;
    border: none;
    border-top: 1px solid rgba(128, 128, 128, 0.12);
    background: transparent;
    color: var(--episode-container);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    text-align: center;
    font-family: inherit;
    transition: background 0.15s;
}

.ddown-footer:hover {
    background: rgba(128, 128, 128, 0.04);
}

/* Hide desktop dropdown on mobile (use bottom sheet instead) */
@media (max-width: 768px) {
    .notification-dropdown {
        display: none !important;
    }
}

/* ===== THEME CREATOR STYLES ===== */
.theme-creator {
    padding: 12px;
    border-radius: 8px;
    margin-top: 6px;
}

.theme-creator h4 {
    color: var(--text-primary);
    margin: 0 0 10px 0;
    font-size: 0.875rem;
    font-weight: 600;
    letter-spacing: 0.01em;
    opacity: 0.85;
}

.color-control {
    position: relative;
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
}

.color-preview {
    width: 24px;
    height: 24px;
    border-radius: 6px;
    cursor: pointer;
    border: 1px solid rgba(var(--text-primary-rgb, 255, 255, 255), 0.15);
    flex-shrink: 0;
    transition: all 0.15s ease;
}

.light-theme .color-preview {
    border: 1px solid rgba(0, 0, 0, 0.15);
}

.color-preview:hover {
    transform: scale(1.05);
}

.color-palette {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    display: none;
    background: var(--bg-secondary);
    padding: 8px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 100;
    grid-template-columns: repeat(4, 1fr);
    gap: 6px;
    border: 1px solid rgba(var(--text-primary-rgb, 255, 255, 255), 0.08);
}

.light-theme .color-palette {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(0, 0, 0, 0.08);
}

.color-palette.active {
    display: grid;
    animation: palette-appear 0.15s ease;
}

@keyframes palette-appear {
    from {
        opacity: 0;
        transform: translateY(-4px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.color-option {
    width: 20px;
    height: 20px;
    border-radius: 4px;
    cursor: pointer;
    border: 1px solid rgba(var(--text-primary-rgb, 255, 255, 255), 0.15);
    transition: transform 0.15s ease;
}

.light-theme .color-option {
    border: 1px solid rgba(0, 0, 0, 0.15);
}

.color-option:hover {
    transform: scale(1.1);
}

.color-picker {
    margin-bottom: 10px;
}

.color-picker label {
    display: block;
    color: var(--text-primary);
    margin-bottom: 5px;
    font-size: 0.75rem;
    font-weight: 500;
    opacity: 0.7;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.hex-input {
    width: 90px;
    padding: 5px 8px;
    border: 1px solid rgba(var(--text-primary-rgb, 255, 255, 255), 0.12);
    border-radius: 4px;
    background: rgba(var(--text-primary-rgb, 255, 255, 255), 0.03);
    color: var(--text-primary);
    font-size: 0.8rem;
    font-family: monospace;
    transition: all 0.15s ease;
}

.light-theme .hex-input {
    background: rgba(0, 0, 0, 0.03);
    border: 1px solid rgba(0, 0, 0, 0.12);
}

.hex-input:focus {
    outline: none;
    border-color: rgba(var(--text-primary-rgb, 255, 255, 255), 0.25);
    background: rgba(var(--text-primary-rgb, 255, 255, 255), 0.05);
}

.light-theme .hex-input:focus {
    border-color: rgba(0, 0, 0, 0.25);
    background: rgba(0, 0, 0, 0.05);
}

/* Logo Slider Control */
.slider-control {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.logo-slider {
    flex: 1;
    height: 6px;
    border-radius: 3px;
    background: rgba(var(--text-primary-rgb, 255, 255, 255), 0.1);
    outline: none;
    appearance: none;
    cursor: pointer;
}

.light-theme .logo-slider {
    background: rgba(0, 0, 0, 0.1);
}

.logo-slider::-webkit-slider-thumb {
    appearance: none;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--text-primary);
    cursor: pointer;
    border: 2px solid rgba(var(--text-primary-rgb, 255, 255, 255), 0.2);
    transition: all 0.15s ease;
}

.logo-slider::-webkit-slider-thumb:hover {
    transform: scale(1.1);
    border-color: rgba(var(--text-primary-rgb, 255, 255, 255), 0.4);
}

.logo-slider::-moz-range-thumb {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--text-primary);
    cursor: pointer;
    border: 2px solid rgba(var(--text-primary-rgb, 255, 255, 255), 0.2);
    transition: all 0.15s ease;
}

.logo-slider::-moz-range-thumb:hover {
    transform: scale(1.1);
    border-color: rgba(var(--text-primary-rgb, 255, 255, 255), 0.4);
}

.slider-value {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-primary);
    opacity: 0.7;
    min-width: 35px;
    text-align: center;
    font-family: monospace;
}

#themeName {
    width: 100%;
    padding: 8px 10px;
    margin-bottom: 12px;
    background: rgba(var(--text-primary-rgb, 255, 255, 255), 0.03);
    border: 1px solid rgba(var(--text-primary-rgb, 255, 255, 255), 0.12);
    border-radius: 6px;
    color: var(--text-primary);
    font-size: 0.825rem;
    transition: all 0.15s ease;
    box-sizing: border-box;
}

.light-theme #themeName {
    background: rgba(0, 0, 0, 0.03);
    border: 1px solid rgba(0, 0, 0, 0.12);
}

#themeName:focus {
    outline: none;
    border-color: rgba(var(--text-primary-rgb, 255, 255, 255), 0.25);
    background: rgba(var(--text-primary-rgb, 255, 255, 255), 0.05);
}

.light-theme #themeName:focus {
    border-color: rgba(0, 0, 0, 0.25);
    background: rgba(0, 0, 0, 0.05);
}

#themeName::placeholder {
    color: var(--text-primary);
    opacity: 0.4;
}

#saveTheme {
    width: 100%;
    padding: 9px 14px;
    background: rgba(var(--text-primary-rgb, 255, 255, 255), 0.08);
    color: var(--text-primary);
    border: 1px solid rgba(var(--text-primary-rgb, 255, 255, 255), 0.12);
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s ease;
    font-size: 0.825rem;
}

.light-theme #saveTheme {
    background: rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(0, 0, 0, 0.12);
}

#saveTheme:hover {
    background: rgba(var(--text-primary-rgb, 255, 255, 255), 0.12);
    border-color: rgba(var(--text-primary-rgb, 255, 255, 255), 0.2);
}

.light-theme #saveTheme:hover {
    background: rgba(0, 0, 0, 0.12);
    border-color: rgba(0, 0, 0, 0.2);
}

#saveTheme:active {
    transform: scale(0.98);
}

.theme-btn-container {
    display: flex;
    align-items: center;
    gap: 4px;
    margin: 4px 0;
}

.theme-edit-btn,
.theme-delete-btn {
    color: var(--text-primary);
    border: none;
    width: 24px;
    height: 24px;
    border-radius: 5px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    transition: all 0.15s ease;
    background: rgba(var(--text-primary-rgb, 255, 255, 255), 0.06);
    opacity: 0.7;
}

.light-theme .theme-edit-btn,
.light-theme .theme-delete-btn {
    background: rgba(0, 0, 0, 0.04);
}

.theme-delete-btn {
    color: #ef4444;
}

.theme-edit-btn:hover,
.theme-delete-btn:hover {
    background: rgba(var(--text-primary-rgb, 255, 255, 255), 0.1);
    opacity: 1;
}

.light-theme .theme-edit-btn:hover,
.light-theme .theme-delete-btn:hover {
    background: rgba(0, 0, 0, 0.08);
}

.theme-delete-btn:hover {
    background: rgba(239, 68, 68, 0.1);
}

.login-button-nav {
    padding: 10px 12px;
    border-radius: 8px;
    background: var(--bg-primary);
    border: 1px solid rgba(var(--text-primary-rgb, 255, 255, 255), 0.1);
    color: var(--text-primary);
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 180ms ease, border-color 180ms ease;
    text-align: left;
    width: 100%;
    display: flex;
    align-items: center;
    gap: 10px;
    outline: none;
}

.menu-items .login-button-nav {
    margin-top: 0;
}

.light-theme .login-button-nav {
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.login-button-nav svg {
    flex-shrink: 0;
    stroke: var(--text-primary);
    transition: stroke 180ms ease;
    width: 16px;
    height: 16px;
}

.login-button-nav:hover {
    background: color-mix(in srgb, var(--bg-primary) 92%, #000 8%);
    border-color: rgba(var(--text-primary-rgb, 255, 255, 255), 0.25);
}

.light-theme .login-button-nav:hover {
    background: color-mix(in srgb, var(--bg-primary) 92%, #000 8%);
    border-color: rgba(0, 0, 0, 0.2);
}

.login-button-nav:active {
    transform: scale(0.97);
}

/* ===== MEDIA QUERIES ===== */

/* Small screens (up to 450px) */
@media (min-width: 100px) and (max-width: 450px) {
    .search-bar input {
        width: 130px;
    }

    .search-bar input:focus {
        width: 140px;
    }
}

/* Tablet and smaller desktop (up to 1224px) */
@media (max-width: 1224px) {
    .search-bar {
        display: none;
    }

    .search-bar.expanded {
        display: flex;
        flex-wrap: nowrap;
        align-items: center;
        position: fixed;
        top: calc(1rem + 60px);
        left: 1rem;
        right: 1rem;
        background: rgba(var(--header-bg-rgb, 36, 36, 36), 0.95);
        padding: 1rem;
        z-index: 900;
        border-radius: 10px;
        background: rgba(var(--header-bg-rgb, 36, 36, 36), 0.98);
        border: 1px solid rgba(255, 255, 255, 0.07);
        box-shadow: 0 8px 20px rgba(0, 0, 0, 0.18);
    }
    
    .light-theme .search-bar.expanded {
        background: rgba(245, 239, 230, 0.95);
        border: 1px solid rgba(0, 0, 0, 0.07);
        box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
    }

    .search-bar.expanded input {
        flex: 1;
    }

    .search-bar.expanded button {
        height: 1.4rem;
        margin-right: 1.5rem;
    }

    .header-search-icon:hover {
        background: var(--accent-color);
        opacity: 0.9;
    }

    .header-search-icon svg {
        width: 20px;
        height: 20px;
        fill: var(--text-primary);
    }

    .footer {
        grid-column: 1 / -1;
    }

    .footer-top {
        flex-direction: column;
        gap: 1rem;
    }

    .social-links {
        flex-wrap: wrap;
        justify-content: center;
    }

    .az-list {
        gap: 0.3rem;
    }

    .legal-links {
        flex-wrap: wrap;
        gap: 1rem;
        text-align: center;
    }

    .disclaimer {
        font-size: 0.8rem;
        padding: 0 0.8rem;
    }

    .profile-dropdown {
        margin-left: 0.2rem;
    }

    .profile-dropdown .dropdown-content {
        z-index: 2000;
    }
    
    /* Responsive adjustments for notifications */
    .notification-dropdown {
        width: calc(100% - 2rem);
        left: 1rem;
        right: 1rem;
        top: 70px;
        border-radius: 12px;
        position: fixed;
        transform-origin: top center;
        max-height: 60vh;
        overflow: hidden;
    }

    .notification-list {
        max-height: calc(60vh - 60px);
        overflow-y: auto;
    }
}

/* Color variables for light and dark themes */
.light-theme {
    --header-bg-rgb: 245, 239, 230;
    --bg-secondary-rgb: 232, 224, 212;
    --text-primary-rgb: 56, 46, 39;
}

:root, .dark-theme, .amoled-theme, .kai-theme {
    --header-bg-rgb: 36, 36, 36;
    --bg-secondary-rgb: 47, 47, 47;
    --text-primary-rgb: 255, 255, 255;
}

.kai-theme {
    --header-bg-rgb: 26, 28, 34;
    --bg-secondary-rgb: 26, 28, 34;
}

.spring-theme {
    --header-bg-rgb: 255, 245, 247;
    --bg-secondary-rgb: 248, 237, 240;
    --text-primary-rgb: 45, 27, 41;
}

.summer-theme {
    --header-bg-rgb: 255, 251, 240;
    --bg-secondary-rgb: 245, 240, 229;
    --text-primary-rgb: 31, 27, 20;
}

.winter-theme {
    --header-bg-rgb: 15, 26, 43;
    --bg-secondary-rgb: 22, 34, 54;
    --text-primary-rgb: 232, 241, 248;
}

/* ❄️ Winter/Christmas Snowflake Decoration */
/* Subtle snow glow effect on header for winter theme */
.winter-theme .header {
    box-shadow: 0 2px 12px rgba(91, 143, 185, 0.15), 0 0 30px rgba(91, 143, 185, 0.05);
    border: 1px solid rgba(91, 143, 185, 0.15);
}

/* ❄️ Header snowfall effect - GPU optimized */
.header-snow {
    display: none;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    z-index: 0;
    border-radius: 10px;
    overflow: hidden;
}

.winter-theme .header-snow {
    display: block;
}

/* Single optimized snow layer with varied sizes */
.header-snow::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        /* Larger flakes - drift LEFT */
        radial-gradient(4px 4px at 8% 12%, rgba(255, 255, 255, 0.65) 50%, transparent 50%),
        radial-gradient(3.5px 3.5px at 52% 8%, rgba(255, 255, 255, 0.6) 50%, transparent 50%),
        radial-gradient(4px 4px at 88% 18%, rgba(255, 255, 255, 0.55) 50%, transparent 50%),
        /* Medium flakes */
        radial-gradient(2.5px 2.5px at 24% 32%, rgba(255, 255, 255, 0.5) 50%, transparent 50%),
        radial-gradient(3px 3px at 68% 28%, rgba(255, 255, 255, 0.55) 50%, transparent 50%),
        /* Smaller flakes */
        radial-gradient(2px 2px at 16% 48%, rgba(255, 255, 255, 0.4) 50%, transparent 50%),
        radial-gradient(1.5px 1.5px at 78% 38%, rgba(255, 255, 255, 0.45) 50%, transparent 50%);
    background-size: 200px 55px;
    background-repeat: repeat;
    will-change: background-position;
    animation: header-snowfall-left 12s linear infinite;
}

/* Second layer - different drift pattern */
.header-snow::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        /* Medium flakes - drift RIGHT */
        radial-gradient(2.5px 2.5px at 42% 42%, rgba(255, 255, 255, 0.45) 50%, transparent 50%),
        radial-gradient(2px 2px at 36% 22%, rgba(255, 255, 255, 0.5) 50%, transparent 50%),
        radial-gradient(1.5px 1.5px at 94% 45%, rgba(255, 255, 255, 0.4) 50%, transparent 50%),
        /* Extra flakes for variety */
        radial-gradient(3px 3px at 14% 35%, rgba(255, 255, 255, 0.48) 50%, transparent 50%),
        radial-gradient(2px 2px at 72% 15%, rgba(255, 255, 255, 0.5) 50%, transparent 50%),
        radial-gradient(3.5px 3.5px at 46% 50%, rgba(255, 255, 255, 0.52) 50%, transparent 50%);
    background-size: 200px 55px;
    background-repeat: repeat;
    will-change: background-position;
    animation: header-snowfall-right 14s linear infinite;
}

/* Left-drifting snowflakes */
@keyframes header-snowfall-left {
    0% {
        background-position: 0 0;
    }
    100% {
        background-position: -200px 220px;
    }
}

/* Right-drifting snowflakes with different timing */
@keyframes header-snowfall-right {
    0% {
        background-position: 0 0;
    }
    100% {
        background-position: 200px 220px;
    }
}

/* Ensure header content stays above snowflakes */
.winter-theme .header > *:not(.header-snow) {
    position: relative;
    z-index: 1;
}

/* Winter footer message - hidden by default */
.winter-footer-text {
    display: none;
}

.winter-theme .winter-footer-text {
    display: block;
    margin-bottom: 8px;
    font-size: 0.85rem;
    opacity: 0.9;
    color: var(--text-secondary);
}

/* Subtle pink glow effect on header for spring theme */
.spring-theme .header {
    box-shadow: 0 2px 12px rgba(199, 80, 130, 0.1), 0 0 30px rgba(199, 80, 130, 0.03);
    border: 1px solid rgba(199, 80, 130, 0.12);
}

/* 🌸 Header petal effect for spring theme */
.spring-theme .header-snow {
    display: block;
}

.spring-theme .header-snow::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        radial-gradient(3.5px 3.5px at 8% 12%, rgba(199, 80, 130, 0.4) 50%, transparent 50%),
        radial-gradient(3px 3px at 52% 8%, rgba(199, 80, 130, 0.35) 50%, transparent 50%),
        radial-gradient(4px 4px at 88% 18%, rgba(199, 80, 130, 0.3) 50%, transparent 50%),
        radial-gradient(2.5px 2.5px at 24% 32%, rgba(199, 80, 130, 0.25) 50%, transparent 50%),
        radial-gradient(3px 3px at 68% 28%, rgba(199, 80, 130, 0.3) 50%, transparent 50%);
    background-size: 200px 55px;
    background-repeat: repeat;
    will-change: background-position;
    animation: spring-left 14s linear infinite;
}

.spring-theme .header-snow::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        radial-gradient(2.5px 2.5px at 42% 42%, rgba(199, 80, 130, 0.25) 50%, transparent 50%),
        radial-gradient(2px 2px at 36% 22%, rgba(199, 80, 130, 0.3) 50%, transparent 50%),
        radial-gradient(3px 3px at 94% 45%, rgba(199, 80, 130, 0.2) 50%, transparent 50%),
        radial-gradient(3.5px 3.5px at 14% 35%, rgba(199, 80, 130, 0.25) 50%, transparent 50%),
        radial-gradient(2px 2px at 72% 15%, rgba(199, 80, 130, 0.3) 50%, transparent 50%);
    background-size: 200px 55px;
    background-repeat: repeat;
    will-change: background-position;
    animation: spring-right 16s linear infinite;
}

@keyframes spring-left {
    0% { background-position: 0 0; }
    100% { background-position: -180px 200px; }
}

@keyframes spring-right {
    0% { background-position: 0 0; }
    100% { background-position: 180px 200px; }
}

/* Ensure header content stays above spring petals */
.spring-theme .header > *:not(.header-snow) {
    position: relative;
    z-index: 1;
}

/* Spring meadow border at bottom of header */
.spring-theme .header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 12px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 12'%3E%3Cpath d='M0,3 Q25,8 50,4 Q75,9 100,3 Q120,7 120,12 H0Z' fill='rgba(106,180,135,0.25)'/%3E%3Cpath d='M0,1 Q20,5 40,2 Q60,6 80,1 Q100,5 120,1 V12 H0Z' fill='rgba(146,210,165,0.20)'/%3E%3Cpath d='M8,12 L9,5 L10,12Z' fill='rgba(106,180,135,0.4)'/%3E%3Cpath d='M35,12 L36,6 L37,12Z' fill='rgba(106,180,135,0.35)'/%3E%3Cpath d='M65,12 L66,4 L67,12Z' fill='rgba(106,180,135,0.4)'/%3E%3Cpath d='M95,12 L96,6 L97,12Z' fill='rgba(106,180,135,0.35)'/%3E%3Cpath d='M22,12 L23,7 L24,12Z' fill='rgba(146,210,165,0.35)'/%3E%3Cpath d='M50,12 L51,5 L52,12Z' fill='rgba(146,210,165,0.3)'/%3E%3Cpath d='M78,12 L79,7 L80,12Z' fill='rgba(146,210,165,0.35)'/%3E%3Cpath d='M108,12 L109,6 L110,12Z' fill='rgba(146,210,165,0.3)'/%3E%3Ccircle cx='16' cy='3' r='1.3' fill='rgba(199,80,130,0.6)'/%3E%3Ccircle cx='45' cy='3' r='1.1' fill='rgba(199,80,130,0.5)'/%3E%3Ccircle cx='70' cy='2' r='1.5' fill='rgba(199,80,130,0.55)'/%3E%3Ccircle cx='100' cy='4' r='1.2' fill='rgba(199,80,130,0.45)'/%3E%3C/svg%3E") repeat-x;
    background-size: 120px 100%;
    border-radius: 0 0 10px 10px;
    pointer-events: none;
    z-index: 0;
    animation: grass-sway 6s ease-in-out infinite;
}

@keyframes grass-sway {
    0%, 100% { background-position: 0 0; }
    50% { background-position: -8px 0; }
}

/* Spring footer message */
.spring-footer-text {
    display: none;
}

.spring-theme .spring-footer-text {
    display: block;
    margin-bottom: 8px;
    font-size: 0.85rem;
    opacity: 0.9;
    color: var(--text-secondary);
}

/* Subtle golden glow effect on header for summer theme */
.summer-theme .header {
    box-shadow: 0 2px 12px rgba(212, 150, 40, 0.1), 0 0 30px rgba(212, 150, 40, 0.03);
    border: 1px solid rgba(212, 150, 40, 0.12);
}

/* ☀️ Header sparkle effect for summer theme */
.summer-theme .header-snow {
    display: block;
}

.summer-theme .header-snow::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        radial-gradient(2.5px 2.5px at 12% 10%, rgba(212, 150, 40, 0.4) 50%, transparent 50%),
        radial-gradient(2px 2px at 55% 5%, rgba(212, 150, 40, 0.3) 50%, transparent 50%),
        radial-gradient(3px 3px at 82% 15%, rgba(244, 162, 97, 0.35) 50%, transparent 50%),
        radial-gradient(2px 2px at 30% 28%, rgba(212, 150, 40, 0.25) 50%, transparent 50%),
        radial-gradient(2.5px 2.5px at 70% 22%, rgba(212, 150, 40, 0.35) 50%, transparent 50%);
    background-size: 200px 55px;
    background-repeat: repeat;
    will-change: background-position;
    animation: sunray-left 12s linear infinite;
}

.summer-theme .header-snow::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        radial-gradient(2px 2px at 45% 40%, rgba(212, 150, 40, 0.3) 50%, transparent 50%),
        radial-gradient(3px 3px at 30% 25%, rgba(244, 162, 97, 0.25) 50%, transparent 50%),
        radial-gradient(2px 2px at 90% 42%, rgba(212, 150, 40, 0.2) 50%, transparent 50%),
        radial-gradient(2.5px 2.5px at 18% 32%, rgba(212, 150, 40, 0.25) 50%, transparent 50%),
        radial-gradient(2px 2px at 65% 35%, rgba(212, 150, 40, 0.3) 50%, transparent 50%);
    background-size: 200px 55px;
    background-repeat: repeat;
    will-change: background-position;
    animation: sunray-right 14s linear infinite;
}

@keyframes sunray-left {
    0% { background-position: 0 0; }
    100% { background-position: -150px 180px; }
}

@keyframes sunray-right {
    0% { background-position: 0 0; }
    100% { background-position: 150px 180px; }
}

/* Ensure header content stays above summer sparkles */
.summer-theme .header > *:not(.header-snow) {
    position: relative;
    z-index: 1;
}

/* Beach wave at bottom of header for summer theme */
.summer-theme .header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 12px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 12'%3E%3Cpath d='M0,3 Q30,9 60,3 Q90,9 120,3 V12 H0Z' fill='rgba(244,162,97,0.12)'/%3E%3Cpath d='M0,0 Q30,11 60,0 Q90,11 120,0 V12 H0Z' fill='rgba(105,190,230,0.40)'/%3E%3C/svg%3E") repeat-x;
    background-size: 120px 100%;
    border-radius: 0 0 10px 10px;
    pointer-events: none;
    z-index: 0;
    animation: beach-wave-flow 4s linear infinite;
}

@keyframes beach-wave-flow {
    0% { background-position: 0 0; }
    100% { background-position: -120px 0; }
}

/* Summer footer message */
.summer-footer-text {
    display: none;
}

.summer-theme .summer-footer-text {
    display: block;
    margin-bottom: 8px;
    font-size: 0.85rem;
    opacity: 0.9;
    color: var(--text-secondary);
}

/* ===== AUTUMN THEME ===== */
.autumn-theme {
    --header-bg-rgb: 28, 24, 22;
    --bg-secondary-rgb: 42, 36, 32;
    --text-primary-rgb: 232, 220, 200;
}

/* Subtle warm orange glow effect on header for autumn theme */
.autumn-theme .header {
    box-shadow: 0 2px 12px rgba(212, 122, 46, 0.1), 0 0 30px rgba(212, 122, 46, 0.03);
    border: 1px solid rgba(212, 122, 46, 0.12);
}

/* 🍂 Header falling leaves effect for autumn theme */
.autumn-theme .header-snow {
    display: block;
}

.autumn-theme .header-snow::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        radial-gradient(3.5px 4px at 10% 8%, rgba(212, 122, 46, 0.4) 50%, transparent 50%),
        radial-gradient(3px 3.5px at 52% 12%, rgba(199, 107, 30, 0.35) 50%, transparent 50%),
        radial-gradient(4px 4.5px at 85% 5%, rgba(232, 160, 64, 0.3) 50%, transparent 50%),
        radial-gradient(2.5px 3px at 22% 30%, rgba(139, 69, 19, 0.3) 50%, transparent 50%),
        radial-gradient(3px 3.5px at 68% 25%, rgba(212, 122, 46, 0.35) 50%, transparent 50%),
        radial-gradient(2px 2.5px at 40% 40%, rgba(199, 107, 30, 0.25) 50%, transparent 50%);
    background-size: 200px 55px;
    background-repeat: repeat;
    will-change: background-position;
    animation: autumn-leaf-left 14s linear infinite;
}

.autumn-theme .header-snow::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        radial-gradient(2.5px 3px at 42% 38%, rgba(232, 160, 64, 0.3) 50%, transparent 50%),
        radial-gradient(3.5px 4px at 28% 20%, rgba(212, 122, 46, 0.25) 50%, transparent 50%),
        radial-gradient(2px 2.5px at 90% 42%, rgba(139, 69, 19, 0.25) 50%, transparent 50%),
        radial-gradient(3px 3.5px at 16% 34%, rgba(199, 107, 30, 0.3) 50%, transparent 50%),
        radial-gradient(2.5px 3px at 72% 35%, rgba(212, 122, 46, 0.25) 50%, transparent 50%);
    background-size: 200px 55px;
    background-repeat: repeat;
    will-change: background-position;
    animation: autumn-leaf-right 16s linear infinite;
}

@keyframes autumn-leaf-left {
    0% { background-position: 0 0; }
    100% { background-position: -160px 180px; }
}

@keyframes autumn-leaf-right {
    0% { background-position: 0 0; }
    100% { background-position: 160px 200px; }
}

/* Ensure header content stays above autumn leaves */
.autumn-theme .header > *:not(.header-snow) {
    position: relative;
    z-index: 1;
}

/* Fallen leaves border at bottom of header for autumn theme */
.autumn-theme .header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 12px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 12'%3E%3Cpath d='M0,3 Q25,7 50,3 Q75,8 100,4 Q120,7 120,12 H0Z' fill='rgba(50,40,35,0.25)'/%3E%3Ccircle cx='8' cy='5' r='1.5' fill='rgba(212,122,46,0.5)'/%3E%3Ccircle cx='25' cy='4' r='1.2' fill='rgba(199,107,30,0.4)'/%3E%3Ccircle cx='45' cy='6' r='1.8' fill='rgba(232,160,64,0.35)'/%3E%3Ccircle cx='65' cy='4' r='1' fill='rgba(139,69,19,0.45)'/%3E%3Ccircle cx='80' cy='5' r='1.4' fill='rgba(212,122,46,0.4)'/%3E%3Ccircle cx='100' cy='7' r='1.2' fill='rgba(199,107,30,0.35)'/%3E%3Ccircle cx='112' cy='4' r='1.6' fill='rgba(232,160,64,0.3)'/%3E%3C/svg%3E") repeat-x;
    background-size: 120px 100%;
    border-radius: 0 0 10px 10px;
    pointer-events: none;
    z-index: 0;
}

/* Autumn footer message */
.autumn-footer-text {
    display: none;
}

.autumn-theme .autumn-footer-text {
    display: block;
    margin-bottom: 8px;
    font-size: 0.85rem;
    opacity: 0.9;
    color: var(--text-secondary);
}

/* Global max-width constraint for all pages on desktop */
@media (min-width: 1225px) {
  .container {
    max-width: 1700px;
    margin-left: auto;
    margin-right: auto;
  }
}
