/* ===================================================
   ENTERTAINMENT BUDDY — Premium Dark Glassmorphism UI
   =================================================== */

/* ---- CSS Variables ---- */
:root {
  --bg-deep:        #08070f;
  --bg-mid:         #0f0d1a;
  --bg-card:        rgba(255,255,255,0.04);
  --bg-card-hover:  rgba(255,255,255,0.07);
  --glass:          rgba(255,255,255,0.06);
  --glass-border:   rgba(255,255,255,0.10);

  --accent:         #7C3AED;
  --accent-light:   #9D5FF3;
  --accent-glow:    rgba(124,58,237,0.35);
  --gold:           #F59E0B;
  --gold-light:     #FCD34D;
  --success:        #10B981;
  --danger:         #EF4444;
  --info:           #3B82F6;

  --text-primary:   #F1F0F8;
  --text-secondary: #A09CB8;
  --text-muted:     #6B6880;

  --radius-sm:  8px;
  --radius-md:  14px;
  --radius-lg:  20px;
  --radius-xl:  28px;

  --shadow-sm:  0 2px 12px rgba(0,0,0,0.4);
  --shadow-md:  0 8px 32px rgba(0,0,0,0.5);
  --shadow-lg:  0 24px 64px rgba(0,0,0,0.7);
  --shadow-accent: 0 0 40px var(--accent-glow);

  --transition: 0.22s cubic-bezier(0.4,0,0.2,1);
  --font-main: 'Outfit', sans-serif;
  --font-body: 'Inter', sans-serif;
}

/* ---- Reset & Base ---- */
*, *::before, *::after { 
  box-sizing: border-box; 
  margin: 0; 
  padding: 0; 
  -webkit-tap-highlight-color: transparent;
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background: var(--bg-deep);
  color: var(--text-primary);
  min-height: 100vh;
  overflow-x: hidden;
  background-image:
    radial-gradient(ellipse 80% 50% at 20% -10%, rgba(124,58,237,0.18) 0%, transparent 60%),
    radial-gradient(ellipse 60% 40% at 80% 100%, rgba(245,158,11,0.10) 0%, transparent 55%);
}

a { color: var(--accent-light); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ---- Utility ---- */
.hidden { display: none !important; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 22px;
  border: none;
  border-radius: var(--radius-md);
  font-family: var(--font-main);
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
}

.btn::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,0);
  transition: background var(--transition);
}
.btn:hover::after { background: rgba(255,255,255,0.07); }
.btn:active { transform: scale(0.97); }

.btn-primary {
  background: linear-gradient(135deg, var(--accent), #6026C7);
  color: #fff;
  box-shadow: 0 4px 20px var(--accent-glow);
}
.btn-primary:hover {
  box-shadow: 0 6px 28px rgba(124,58,237,0.55);
  transform: translateY(-1px);
}

.btn-ghost {
  background: var(--glass);
  color: var(--text-primary);
  border: 1px solid var(--glass-border);
}
.btn-ghost:hover { background: rgba(255,255,255,0.10); }

.btn-danger {
  background: rgba(239,68,68,0.15);
  color: var(--danger);
  border: 1px solid rgba(239,68,68,0.3);
}
.btn-danger:hover { background: rgba(239,68,68,0.25); }

.btn-full { width: 100%; justify-content: center; }


/* ===== OVERLAY / MODALS ===== */
.overlay {
  position: fixed;
  inset: 0;
  background: rgba(8,7,15,0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.modal-box {
  background: rgba(15,13,26,0.95);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg), var(--shadow-accent);
  width: 100%;
  animation: slideUp 0.28s cubic-bezier(0.34,1.56,0.64,1);
  overflow: hidden;
}

@keyframes slideUp {
  from { opacity: 0; transform: translateY(24px) scale(0.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px 28px 0;
}
.modal-header h2 {
  font-family: var(--font-main);
  font-size: 1.35rem;
  font-weight: 700;
}

.close-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--glass);
  border: 1px solid var(--glass-border);
  color: var(--text-secondary);
  font-size: 1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition);
}
.close-btn:hover {
  background: rgba(239,68,68,0.2);
  color: var(--danger);
  border-color: rgba(239,68,68,0.4);
}



/* ===== LOGIN SCREEN ===== */
.login-box {
  max-width: 420px;
  padding: 48px 40px;
  text-align: center;
}
.login-logo {
  font-size: 4rem;
  display: block;
  margin-bottom: 20px;
  filter: drop-shadow(0 0 28px rgba(124,58,237,0.7));
  animation: float 3s ease-in-out infinite;
}
.login-box h2 {
  font-family: var(--font-main);
  font-size: 1.9rem;
  font-weight: 800;
  margin-bottom: 12px;
  color: var(--text-primary);
}
.login-subtitle {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.65;
  margin-bottom: 32px;
}
.google-btn-wrap {
  display: flex;
  justify-content: center;
  margin-bottom: 24px;
  min-height: 44px;
}
.login-footer {
  font-size: 0.78rem;
  color: var(--text-muted);
  letter-spacing: 0.02em;
}

/* ===== PROFILE SCREEN (Netflix-style) ===== */
.profile-screen-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 32px;
  padding: 40px 24px;
  width: 100%;
  max-width: 900px;
  margin: 0 auto;
}
.profile-screen-header { text-align: center; }
.profile-screen-logo {
  font-size: 3rem;
  margin-bottom: 12px;
  display: block;
  filter: drop-shadow(0 0 20px rgba(124,58,237,0.5));
}
.profile-screen-header h2 {
  font-family: var(--font-main);
  font-size: 2.4rem;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 8px;
}
.profile-screen-sub {
  color: var(--text-secondary);
  font-size: 0.95rem;
}
.profile-screen-footer { margin-top: 8px; }

/* Profile cards grid */
.profile-cards {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  justify-content: center;
}
.profile-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 24px 16px 20px;
  width: 140px;
  border-radius: var(--radius-lg);
  background: var(--bg-card);
  border: 1px solid var(--glass-border);
  cursor: pointer;
  transition: all var(--transition);
  text-align: center;
}
.profile-card:hover {
  background: var(--bg-card-hover);
  border-color: rgba(124,58,237,0.4);
  transform: translateY(-6px) scale(1.04);
  box-shadow: 0 16px 40px rgba(0,0,0,0.5), 0 0 20px var(--accent-glow);
}
.profile-card:hover .profile-avatar {
  box-shadow: 0 0 0 3px var(--accent);
}
.profile-avatar-wrap { position: relative; }
.profile-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  border: 2px solid;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.4rem;
  transition: box-shadow var(--transition);
}
.profile-avatar-emoji { line-height: 1; }
.profile-ring {
  position: absolute;
  inset: -5px;
  border-radius: 50%;
  border: 2px solid transparent;
  transition: all var(--transition);
}
.profile-ring.active {
  border-width: 3px;
  box-shadow: 0 0 12px currentColor;
}
.profile-avatar-add {
  border-style: dashed !important;
  background: rgba(255,255,255,0.03) !important;
  border-color: var(--glass-border) !important;
  font-size: 2rem;
  color: var(--text-muted);
}
.profile-card-add:hover .profile-avatar-add {
  border-color: var(--accent) !important;
  color: var(--accent-light);
  box-shadow: none;
}
.profile-name {
  font-family: var(--font-main);
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 110px;
}
.profile-count {
  font-size: 0.72rem;
  color: var(--text-muted);
}

/* Profile switch button in navbar */
.switch-profile-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border-radius: 30px;
  background: color-mix(in srgb, var(--pcolor, #7C3AED) 15%, transparent);
  border: 1px solid color-mix(in srgb, var(--pcolor, #7C3AED) 40%, transparent);
  color: var(--text-primary);
  font-family: var(--font-main);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
  flex-shrink: 0;
}
.switch-profile-btn:hover {
  background: color-mix(in srgb, var(--pcolor, #7C3AED) 25%, transparent);
  transform: translateY(-1px);
}
.switch-arrow { font-size: 0.65rem; opacity: 0.7; }

/* Profile manage modal */
.profile-manage-box {
  max-width: 500px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
}
.profile-manage-content {
  display: flex;
  flex-direction: column;
  gap: 0;
  overflow-y: auto;
  padding: 20px 28px 28px;
}
.profile-manage-content::-webkit-scrollbar { width: 4px; }
.profile-manage-content::-webkit-scrollbar-thumb { background: rgba(124,58,237,0.4); border-radius: 4px; }
.profile-manage-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 24px;
}
.pm-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  background: var(--bg-card);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
}
.pm-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  flex-shrink: 0;
}
.pm-name {
  flex: 1;
  font-family: var(--font-main);
  font-weight: 600;
  font-size: 0.9rem;
}
.pm-count { font-size: 0.75rem; color: var(--text-muted); }
.pm-delete { padding: 6px 10px; font-size: 0.8rem; flex-shrink: 0; }
.profile-add-section {
  padding-top: 20px;
  border-top: 1px solid var(--glass-border);
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.profile-add-title {
  font-family: var(--font-main);
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
}
.picker-section { display: flex; flex-direction: column; gap: 8px; }
.picker-label {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--text-muted);
}
.emoji-picker, .color-picker {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.emoji-opt {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-sm);
  background: var(--glass);
  border: 1px solid var(--glass-border);
  font-size: 1.1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition);
}
.emoji-opt:hover, .emoji-opt.active {
  background: rgba(124,58,237,0.2);
  border-color: var(--accent);
  transform: scale(1.1);
}
.color-opt {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 2px solid transparent;
  cursor: pointer;
  transition: all var(--transition);
  outline: none;
}
.color-opt:hover, .color-opt.active {
  border-color: #fff;
  transform: scale(1.2);
  box-shadow: 0 0 8px currentColor;
}

/* Profile manage modal internals */
.profile-manage-box {
  max-width: 500px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
}
.profile-manage-content {
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  padding: 20px 28px 28px;
}
.profile-manage-content::-webkit-scrollbar { width: 4px; }
.profile-manage-content::-webkit-scrollbar-thumb { background: rgba(124,58,237,0.4); border-radius: 4px; }
.profile-manage-list { display: flex; flex-direction: column; gap: 8px; margin-bottom: 20px; }
.pm-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  background: var(--bg-card);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  transition: border-color var(--transition);
}
.pm-item-active { border-color: rgba(124,58,237,0.5) !important; background: rgba(124,58,237,0.06) !important; }
.pm-avatar {
  width: 40px; height: 40px;
  border-radius: 50%; border: 1px solid;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.2rem; flex-shrink: 0;
}
.pm-info { flex: 1; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.pm-name { font-family: var(--font-main); font-weight: 600; font-size: 0.9rem; color: var(--text-primary); }
.pm-email { font-size: 0.72rem; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pm-count { font-size: 0.75rem; color: var(--text-muted); flex-shrink: 0; }
.profile-add-section {
  padding-top: 20px;
  border-top: 1px solid var(--glass-border);
  display: flex; flex-direction: column; gap: 14px;
}
.profile-add-title {
  font-family: var(--font-main); font-size: 1rem;
  font-weight: 700; color: var(--text-primary);
}
/* New user info block (profile setup for first-time users) */
.pm-new-user-info {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 16px;
  background: rgba(124,58,237,0.08);
  border: 1px solid rgba(124,58,237,0.25);
  border-radius: var(--radius-md);
}
.pm-new-avatar {
  width: 46px; height: 46px; border-radius: 50%;
  object-fit: cover; border: 2px solid var(--accent); flex-shrink: 0;
}
.pm-new-name { font-family: var(--font-main); font-weight: 700; font-size: 0.95rem; color: var(--text-primary); }
.pm-new-email { font-size: 0.78rem; color: var(--text-muted); }
.picker-section { display: flex; flex-direction: column; gap: 8px; }
.picker-label { font-size: 0.78rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.07em; color: var(--text-muted); }
.emoji-picker, .color-picker { display: flex; flex-wrap: wrap; gap: 6px; }
.emoji-opt {
  width: 38px; height: 38px; border-radius: var(--radius-sm);
  background: var(--glass); border: 1px solid var(--glass-border);
  font-size: 1.1rem; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all var(--transition);
}
.emoji-opt:hover, .emoji-opt.active { background: rgba(124,58,237,0.2); border-color: var(--accent); transform: scale(1.1); }

/* ===== API KEY MODAL ===== */

.api-key-box {
  max-width: 460px;
  padding: 40px 36px;
  text-align: center;
}
.api-key-logo {
  font-size: 3.5rem;
  margin-bottom: 16px;
  display: block;
  filter: drop-shadow(0 0 20px rgba(124,58,237,0.6));
}
.api-key-box h2 {
  font-family: var(--font-main);
  font-size: 1.6rem;
  font-weight: 800;
  margin-bottom: 12px;
  background: linear-gradient(135deg, #fff 30%, var(--accent-light));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.api-key-box p {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.6;
  margin-bottom: 24px;
}
.api-hint {
  font-size: 0.85rem !important;
  color: var(--danger) !important;
  min-height: 20px;
  margin-bottom: 12px !important;
}

.input-group { margin-bottom: 8px; text-align: left; }
.input-group label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.input-group input,
.input-group select,
.input-group textarea {
  width: 100%;
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 0.95rem;
  outline: none;
  transition: all var(--transition);
}
.input-group input:focus,
.input-group select:focus,
.input-group textarea:focus {
  border-color: var(--accent);
  background: rgba(124,58,237,0.08);
  box-shadow: 0 0 0 3px var(--accent-glow);
}
.input-group input::placeholder { color: var(--text-muted); }
.input-group select { cursor: pointer; appearance: none; }
.input-group textarea {
  resize: vertical;
  min-height: 80px;
}


/* ===== SEARCH MODAL ===== */
.search-box {
  max-width: 560px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  padding: 0 0 4px;
}

.type-selector, .category-selector {
  display: flex;
  gap: 8px;
  padding: 16px 28px 0;
  flex-wrap: wrap;
}

.type-btn {
  padding: 7px 16px;
  border-radius: 40px;
  background: var(--glass);
  border: 1px solid var(--glass-border);
  color: var(--text-secondary);
  font-family: var(--font-main);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
}
.type-btn.active, .type-btn:hover {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
  box-shadow: 0 2px 12px var(--accent-glow);
}

.cat-btn {
  padding: 7px 16px;
  border-radius: 40px;
  background: var(--glass);
  border: 1px solid var(--glass-border);
  color: var(--text-secondary);
  font-family: var(--font-main);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
}
.cat-btn[data-cat="watched"].active {
  background: linear-gradient(135deg, #10B981, #059669);
  color: #fff;
  border-color: #10B981;
  box-shadow: 0 2px 12px rgba(16,185,129,0.35);
}
.cat-btn[data-cat="want"].active {
  background: linear-gradient(135deg, var(--gold), #D97706);
  color: #fff;
  border-color: var(--gold);
  box-shadow: 0 2px 12px rgba(245,158,11,0.35);
}
.cat-btn:not(.active):hover {
  background: rgba(255,255,255,0.10);
  color: var(--text-primary);
}

.search-input-wrap {
  position: relative;
  margin: 16px 28px 0;
}
.search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1rem;
  pointer-events: none;
}
.search-input-wrap input {
  width: 100%;
  padding: 12px 44px 12px 42px;
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 1rem;
  outline: none;
  transition: all var(--transition);
}
.search-input-wrap input:focus {
  border-color: var(--accent);
  background: rgba(124,58,237,0.08);
  box-shadow: 0 0 0 3px var(--accent-glow);
}
.search-input-wrap input::placeholder { color: var(--text-muted); }

.search-spinner {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  border: 2px solid rgba(124,58,237,0.3);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: translateY(-50%) rotate(360deg); } }

.search-results {
  overflow-y: auto;
  max-height: 420px;
  padding: 12px 28px 20px;
  margin-top: 12px;
}
.search-results::-webkit-scrollbar { width: 4px; }
.search-results::-webkit-scrollbar-track { background: transparent; }
.search-results::-webkit-scrollbar-thumb { background: rgba(124,58,237,0.4); border-radius: 4px; }

.search-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 32px 0;
  color: var(--text-muted);
}
.search-empty-icon { font-size: 2.5rem; }

.search-result-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 12px;
  border-radius: var(--radius-md);
  background: var(--bg-card);
  border: 1px solid transparent;
  margin-bottom: 8px;
  cursor: pointer;
  transition: all var(--transition);
  role: listitem;
}
.search-result-item:hover {
  background: var(--bg-card-hover);
  border-color: var(--glass-border);
  transform: translateX(4px);
}
.search-result-item:last-child { margin-bottom: 0; }

.result-poster {
  width: 46px;
  height: 64px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  background: rgba(255,255,255,0.05);
  flex-shrink: 0;
  border: 1px solid var(--glass-border);
}
.result-poster-placeholder {
  width: 46px;
  height: 64px;
  border-radius: var(--radius-sm);
  background: rgba(124,58,237,0.12);
  border: 1px solid rgba(124,58,237,0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  flex-shrink: 0;
}

.result-info { flex: 1; min-width: 0; }
.result-title {
  font-family: var(--font-main);
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.result-meta {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 3px;
}
.result-type-badge {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  flex-shrink: 0;
}
.badge-movie  { background: rgba(124,58,237,0.2); color: var(--accent-light); }
.badge-series { background: rgba(59,130,246,0.2); color: #60A5FA; }
.badge-episode{ background: rgba(16,185,129,0.2); color: #34D399; }
.badge-anime  { background: rgba(236,72,153,0.2); color: #F472B6; }
.badge-custom { background: rgba(20,184,166,0.2); color: #2DD4BF; }

.no-results {
  text-align: center;
  padding: 28px 0;
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* ---- Filter toggle row ---- */
.filter-toggle-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 28px 0;
}
.filter-toggle-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 30px;
  background: var(--glass);
  border: 1px solid var(--glass-border);
  color: var(--text-muted);
  font-family: var(--font-main);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
}
.filter-toggle-btn:hover,
.filter-toggle-btn.active {
  background: rgba(124,58,237,0.15);
  border-color: var(--accent);
  color: var(--accent-light);
}
.filter-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  font-family: var(--font-main);
}

/* ---- Advanced filters panel ---- */
.adv-filters {
  margin: 10px 28px 0;
  padding: 14px 16px;
  background: rgba(124,58,237,0.06);
  border: 1px solid rgba(124,58,237,0.2);
  border-radius: var(--radius-md);
  display: flex;
  flex-direction: column;
  gap: 14px;
  animation: slideUp 0.2s ease;
}
.adv-filter-section {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.adv-filter-label {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--text-muted);
}
.adv-filter-input {
  width: 100%;
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  padding: 9px 14px;
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 0.9rem;
  outline: none;
  transition: all var(--transition);
}
.adv-filter-input:focus {
  border-color: var(--accent);
  background: rgba(124,58,237,0.08);
  box-shadow: 0 0 0 3px var(--accent-glow);
}
.adv-filter-input::placeholder { color: var(--text-muted); }

/* Cast filter inputs */
.cast-inputs-list {
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.cast-input-row {
  display: flex;
  gap: 7px;
  align-items: center;
}
.cast-input-field {
  flex: 1;
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  padding: 8px 12px;
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 0.88rem;
  outline: none;
  transition: all var(--transition);
}
.cast-input-field:focus {
  border-color: var(--accent);
  background: rgba(124,58,237,0.08);
  box-shadow: 0 0 0 2px var(--accent-glow);
}
.cast-input-field::placeholder { color: var(--text-muted); }
.cast-remove-btn {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(239,68,68,0.1);
  border: 1px solid rgba(239,68,68,0.25);
  color: var(--danger);
  font-size: 1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition);
  flex-shrink: 0;
  line-height: 1;
}
.cast-remove-btn:hover { background: rgba(239,68,68,0.25); border-color: var(--danger); }
.cast-add-more-btn {
  align-self: flex-start;
  padding: 6px 12px;
  border-radius: 30px;
  background: transparent;
  border: 1px dashed rgba(124,58,237,0.4);
  color: var(--accent-light);
  font-family: var(--font-main);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
}
.cast-add-more-btn:hover {
  background: rgba(124,58,237,0.1);
  border-style: solid;
  border-color: var(--accent);
}

/* Cast-filtering notice */
.cast-filtering-notice {
  text-align: center;
  padding: 12px;
  color: var(--text-muted);
  font-size: 0.85rem;
  animation: fadeIn 0.2s ease;
}

/* Load More button */
.load-more-btn {
  display: block;
  width: 100%;
  margin-top: 12px;
  padding: 11px;
  border-radius: var(--radius-md);
  background: rgba(124,58,237,0.1);
  border: 1px solid rgba(124,58,237,0.3);
  color: var(--accent-light);
  font-family: var(--font-main);
  font-weight: 600;
  font-size: 0.88rem;
  cursor: pointer;
  transition: all var(--transition);
  text-align: center;
}
.load-more-btn:hover {
  background: rgba(124,58,237,0.2);
  border-color: var(--accent);
  transform: translateY(-1px);
}
.load-more-spinner {
  display: flex;
  justify-content: center;
  padding: 12px;
}


/* ===== DETAIL MODAL ===== */
.detail-box {
  max-width: 700px;
  max-height: 92vh;
  display: flex;
  flex-direction: column;
}

.detail-content {
  overflow-y: auto;
  padding: 20px 28px 28px;
}
.detail-content::-webkit-scrollbar { width: 4px; }
.detail-content::-webkit-scrollbar-track { background: transparent; }
.detail-content::-webkit-scrollbar-thumb { background: rgba(124,58,237,0.4); border-radius: 4px; }

.detail-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  padding: 48px 0;
  color: var(--text-muted);
}

.loading-ring {
  width: 40px;
  height: 40px;
  border: 3px solid rgba(124,58,237,0.2);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.detail-body {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 24px;
}
@media (max-width: 560px) {
  .detail-body { grid-template-columns: 1fr; }
}

.detail-poster-wrap {
  position: relative;
}
.detail-poster {
  width: 100%;
  border-radius: var(--radius-md);
  object-fit: cover;
  aspect-ratio: 2/3;
  border: 1px solid var(--glass-border);
  box-shadow: var(--shadow-md);
}
.detail-poster-placeholder {
  width: 100%;
  aspect-ratio: 2/3;
  border-radius: var(--radius-md);
  background: rgba(124,58,237,0.1);
  border: 1px solid rgba(124,58,237,0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 4rem;
}

.imdb-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #F5C518;
  color: #000;
  padding: 4px 10px;
  border-radius: 6px;
  font-weight: 800;
  font-size: 0.85rem;
  font-family: var(--font-main);
  margin-top: 10px;
  width: 100%;
  justify-content: center;
}
.imdb-star { font-size: 1rem; }

.detail-info { display: flex; flex-direction: column; gap: 10px; }

.detail-title-text {
  font-family: var(--font-main);
  font-size: 1.5rem;
  font-weight: 800;
  line-height: 1.2;
  background: linear-gradient(135deg, #fff 40%, var(--accent-light));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.detail-meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.meta-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.78rem;
  font-weight: 600;
  background: var(--glass);
  border: 1px solid var(--glass-border);
  color: var(--text-secondary);
}
.meta-chip.year   { color: var(--gold-light); border-color: rgba(245,158,11,0.3); background: rgba(245,158,11,0.08); }
.meta-chip.runtime{ color: #60A5FA; border-color: rgba(59,130,246,0.3); background: rgba(59,130,246,0.08); }
.meta-chip.type-c { color: var(--accent-light); border-color: var(--accent-glow); background: rgba(124,58,237,0.1); }
.meta-chip.rated  { color: #F87171; border-color: rgba(239,68,68,0.3); background: rgba(239,68,68,0.08); }

.detail-section-label {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-top: 4px;
}
.detail-text {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.65;
}

.genre-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.genre-tag {
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
  background: rgba(124,58,237,0.12);
  border: 1px solid rgba(124,58,237,0.25);
  color: var(--accent-light);
}

.detail-divider {
  height: 1px;
  background: var(--glass-border);
  margin: 4px 0;
}

/* Add form within detail */
.add-form {
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid var(--glass-border);
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.add-form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
@media (max-width: 400px) { .add-form-row { grid-template-columns: 1fr; } }

.date-input {
  color-scheme: dark;
}

/* Optional date checkbox label */
.date-optional-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
  margin-bottom: 0;
  text-transform: none;
  letter-spacing: 0;
}
.date-optional-label input[type="checkbox"] {
  width: 15px;
  height: 15px;
  accent-color: var(--accent);
  cursor: pointer;
  flex-shrink: 0;
}

.add-form-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 4px;
}


/* ===== NAVBAR ===== */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  background: rgba(8,7,15,0.8);
  border-bottom: 1px solid var(--glass-border);
}
.navbar-inner {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 24px;
  height: 68px;
  display: flex;
  align-items: center;
  gap: 20px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}
.brand-icon { font-size: 1.5rem; filter: drop-shadow(0 0 8px rgba(124,58,237,0.6)); }
.brand-name {
  font-family: var(--font-main);
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--text-primary);
  white-space: nowrap;
}
.brand-accent {
  background: linear-gradient(135deg, var(--accent-light), var(--gold));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.nav-tabs {
  display: flex;
  gap: 4px;
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: 40px;
  padding: 4px;
}
.nav-tab {
  padding: 7px 20px;
  border-radius: 30px;
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-family: var(--font-main);
  font-weight: 600;
  font-size: 0.88rem;
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
}
.nav-tab.active, .nav-tab:hover {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 2px 10px var(--accent-glow);
}

.navbar-actions {
  display: flex;
  gap: 6px;
  margin-left: auto;
}
.type-filter-btn {
  padding: 7px 14px;
  border-radius: 30px;
  background: var(--glass);
  border: 1px solid var(--glass-border);
  color: var(--text-muted);
  font-family: var(--font-main);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
}
.type-filter-btn.active {
  background: rgba(124,58,237,0.15);
  border-color: var(--accent);
  color: var(--accent-light);
}
.type-filter-btn:hover { background: rgba(255,255,255,0.09); }

/* Manage custom categories button in navbar */
.manage-cat-btn {
  font-size: 0.85rem;
  padding: 7px 14px;
  color: var(--accent-light);
  border: 1px dashed rgba(124,58,237,0.45);
  background: rgba(124,58,237,0.06);
  white-space: nowrap;
}
.manage-cat-btn:hover {
  color: #fff;
  border-color: var(--accent);
  border-style: solid;
  background: rgba(124,58,237,0.18);
}

.add-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 20px;
  background: linear-gradient(135deg, var(--accent), #6026C7);
  border: none;
  border-radius: 30px;
  color: #fff;
  font-family: var(--font-main);
  font-weight: 700;
  font-size: 0.92rem;
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
  box-shadow: 0 4px 16px var(--accent-glow);
  flex-shrink: 0;
}
.add-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 24px rgba(124,58,237,0.55);
}
.add-btn:active { transform: scale(0.97); }
.add-btn-icon {
  font-size: 1.2rem;
  font-weight: 400;
  line-height: 1;
}

/* User chip in navbar */
.user-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: 40px;
  padding: 4px 12px 4px 4px;
  flex-shrink: 0;
  animation: fadeIn 0.3s ease;
}
.user-avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--accent);
  flex-shrink: 0;
}
.user-name {
  font-family: var(--font-main);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  max-width: 120px;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sign-out-btn {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: rgba(239,68,68,0.1);
  border: 1px solid rgba(239,68,68,0.25);
  color: var(--danger);
  font-size: 0.9rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition);
  flex-shrink: 0;
}
.sign-out-btn:hover {
  background: rgba(239,68,68,0.25);
  border-color: var(--danger);
  transform: scale(1.1);
}


/* ===== ADD BUTTON & STATS BAR ===== */
.add-btn-section {
  display: flex;
  justify-content: center;
  margin: 16px auto 0;
}
.stats-bar {
  max-width: 1400px;
  margin: 20px auto 0;
  padding: 0 24px;
  display: flex;
  align-items: center;
  gap: 0;
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.stat-card {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 18px 12px;
  gap: 4px;
}
.stat-number {
  font-family: var(--font-main);
  font-size: 1.8rem;
  font-weight: 800;
  background: linear-gradient(135deg, var(--text-primary), var(--accent-light));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1;
  transition: all var(--transition);
}
.stat-label {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  white-space: nowrap;
}
.stat-divider {
  width: 1px;
  height: 36px;
  background: var(--glass-border);
  flex-shrink: 0;
}


/* ===== MAIN CONTENT ===== */
.main-content {
  max-width: 1400px;
  margin: 28px auto 48px;
  padding: 0 24px;
}

/* Empty state */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  padding: 80px 24px;
  text-align: center;
}
.empty-icon {
  font-size: 5rem;
  filter: drop-shadow(0 0 30px rgba(124,58,237,0.4));
  animation: float 3s ease-in-out infinite;
}
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-12px); }
}
.empty-state h2 {
  font-family: var(--font-main);
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--text-primary);
}
.empty-state p {
  color: var(--text-secondary);
  max-width: 380px;
  line-height: 1.6;
}


/* ===== CARDS GRID ===== */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 20px;
}

.media-card {
  background: var(--bg-card);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  cursor: pointer;
  transition: all var(--transition);
  position: relative;
  animation: cardIn 0.35s cubic-bezier(0.34,1.3,0.64,1);
}
@keyframes cardIn {
  from { opacity: 0; transform: scale(0.88) translateY(16px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}
.media-card:hover {
  border-color: rgba(124,58,237,0.4);
  transform: translateY(-6px) scale(1.02);
  box-shadow: 0 20px 48px rgba(0,0,0,0.55), 0 0 24px var(--accent-glow);
}

.card-poster-wrap {
  position: relative;
  aspect-ratio: 2/3;
  overflow: hidden;
}
.card-poster {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
  display: block;
}
.media-card:hover .card-poster { transform: scale(1.05); }
.card-poster-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, rgba(124,58,237,0.15), rgba(245,158,11,0.08));
  font-size: 4rem;
}

.card-category-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.badge-watched {
  background: rgba(16,185,129,0.85);
  color: #fff;
}
.badge-want {
  background: rgba(245,158,11,0.85);
  color: #000;
}

.card-imdb {
  position: absolute;
  top: 10px;
  right: 10px;
  background: #F5C518;
  color: #000;
  padding: 3px 8px;
  border-radius: 5px;
  font-weight: 800;
  font-size: 0.72rem;
  font-family: var(--font-main);
}

.card-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(8,7,15,0.95) 0%, rgba(8,7,15,0.3) 50%, transparent 80%);
  opacity: 0;
  transition: opacity var(--transition);
  display: flex;
  align-items: flex-end;
  padding: 14px;
}
.media-card:hover .card-overlay { opacity: 1; }

.card-actions {
  display: flex;
  gap: 8px;
  width: 100%;
}
.card-action-btn {
  flex: 1;
  padding: 7px 0;
  border-radius: var(--radius-sm);
  border: 1px solid var(--glass-border);
  background: rgba(15,13,26,0.8);
  color: var(--text-primary);
  font-size: 0.75rem;
  font-weight: 600;
  font-family: var(--font-main);
  cursor: pointer;
  transition: all var(--transition);
  backdrop-filter: blur(4px);
}
.card-action-btn:hover { background: rgba(255,255,255,0.12); }
.card-action-btn.delete:hover { background: rgba(239,68,68,0.25); color: var(--danger); border-color: rgba(239,68,68,0.4); }

.card-body {
  padding: 12px 14px 14px;
}
.card-title {
  font-family: var(--font-main);
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 4px;
}
.card-subtitle {
  font-size: 0.76rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.card-date {
  font-size: 0.72rem;
  color: var(--success);
  font-weight: 600;
  margin-top: 4px;
  display: flex;
  align-items: center;
  gap: 4px;
}
.card-type-pill {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 20px;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
}


/* ===== TOAST ===== */
.toast {
  position: fixed;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%) translateY(80px);
  padding: 13px 24px;
  background: rgba(20,18,34,0.95);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-family: var(--font-main);
  font-weight: 600;
  font-size: 0.92rem;
  box-shadow: var(--shadow-md);
  backdrop-filter: blur(16px);
  z-index: 9999;
  transition: transform 0.35s cubic-bezier(0.34,1.56,0.64,1), opacity 0.3s;
  opacity: 0;
  pointer-events: none;
  white-space: nowrap;
}
.toast.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}
.toast.success { border-color: rgba(16,185,129,0.5); }
.toast.error   { border-color: rgba(239,68,68,0.5); }


/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  .navbar-inner {
    height: auto;
    flex-wrap: wrap;
    padding: 10px 14px;
    gap: 6px;
    align-items: center;
    justify-content: space-between;
  }

  /* ── Row 1: brand (stretches left) + compact controls (right) ── */
  .brand        { flex: 1; min-width: 0; order: 1; }
  .add-btn      { order: 2; flex-shrink: 0; }
  .switch-profile-btn { order: 3; flex-shrink: 0; padding: 6px 10px; }
  .user-chip    { order: 4; flex-shrink: 0; padding: 3px 8px 3px 3px; }

  /* Hide text-only elements in the compact controls */
  #switchProfileName { display: none; }
  .switch-arrow      { display: none; }
  .user-name         { display: none; }

  /* ── Row 2: nav-tabs full-width, each tab equal ── */
  .nav-tabs {
    order: 10;
    width: 100%;
    justify-content: stretch;
    overflow: hidden;
  }
  .nav-tab {
    flex: 1;
    text-align: center;
    justify-content: center;
    padding: 7px 4px;
    font-size: 0.82rem;
  }

  /* ── Row 3: type-filter pills — single scrollable row, no wrap ── */
  .navbar-actions {
    order: 11;
    margin-left: 0;
    width: 100%;
    flex-wrap: nowrap;              /* single row */
    overflow-x: auto;              /* horizontal scroll */
    justify-content: flex-start;
    gap: 5px;
    padding-bottom: 3px;           /* room for scroll track */
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .navbar-actions::-webkit-scrollbar { display: none; }
  .type-filter-btn { flex-shrink: 0; white-space: nowrap; }

  /* Stats */
  .stats-bar  { flex-wrap: wrap; border-radius: var(--radius-md); margin: 16px 16px 0; }
  .stat-divider { display: none; }
  .stat-card  { min-width: calc(33.333% - 1px); border-bottom: 1px solid var(--glass-border); }
  .main-content { padding: 0 16px; margin-top: 20px; }
  .cards-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px; }
  .detail-body { grid-template-columns: 1fr; }
  .detail-poster-wrap { max-width: 180px; margin: 0 auto; }
}

@media (max-width: 480px) {
  .type-selector, .category-selector { padding: 12px 16px 0; }
  .search-input-wrap { margin: 12px 16px 0; }
  .search-results { padding: 8px 16px 16px; }
  .modal-header { padding: 18px 20px 0; }
  .detail-content { padding: 16px 20px 20px; }
  /* .add-btn span:not(.add-btn-icon) { display: none; } */
}


/* ===== CUSTOM CATEGORY MODAL ===== */
.custom-cat-box {
  max-width: 480px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
}
.custom-cat-content {
  display: flex;
  flex-direction: column;
  gap: 0;
  overflow-y: auto;
  padding: 20px 28px 28px;
}
.custom-cat-content::-webkit-scrollbar { width: 4px; }
.custom-cat-content::-webkit-scrollbar-thumb { background: rgba(124,58,237,0.4); border-radius: 4px; }

.custom-cat-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 24px;
}
.custom-cat-empty {
  color: var(--text-muted);
  text-align: center;
  padding: 16px 0 8px;
  font-size: 0.88rem;
}
.custom-cat-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  background: var(--bg-card);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  transition: border-color var(--transition);
  animation: slideUp 0.2s ease;
}
.custom-cat-item:hover { border-color: rgba(124,58,237,0.35); }
.custom-cat-item-emoji {
  font-size: 1.4rem;
  width: 36px;
  text-align: center;
  flex-shrink: 0;
}
.custom-cat-item-name {
  flex: 1;
  font-family: var(--font-main);
  font-weight: 600;
  font-size: 0.92rem;
  color: var(--text-primary);
}
.custom-cat-delete-btn {
  background: rgba(239,68,68,0.08);
  border: 1px solid rgba(239,68,68,0.2);
  color: var(--danger);
  border-radius: var(--radius-sm);
  padding: 5px 10px;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all var(--transition);
  flex-shrink: 0;
}
.custom-cat-delete-btn:hover {
  background: rgba(239,68,68,0.22);
  border-color: var(--danger);
  transform: scale(1.05);
}

.custom-cat-add-section {
  padding-top: 20px;
  border-top: 1px solid var(--glass-border);
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.custom-cat-form-row {
  display: flex;
  align-items: center;
  gap: 10px;
}
.custom-cat-emoji-pick {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  background: var(--glass);
  border: 1px solid var(--glass-border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  cursor: pointer;
  transition: all var(--transition);
  flex-shrink: 0;
  user-select: none;
}
.custom-cat-emoji-pick:hover {
  background: rgba(124,58,237,0.15);
  border-color: var(--accent);
  transform: scale(1.06);
}
.custom-cat-emoji-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 6px;
  padding: 10px;
  background: var(--bg-card);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  animation: slideUp 0.18s ease;
}

