/* ==========================================================================
   SUGOIX COMPONENTS STYLESHEET (LIQUID GLASS EDITION)
   Styles for Toasts, Loaders, Search Dropdown, Modals, and Drawers.
   ========================================================================== */

/* --- TOAST NOTIFICATIONS --- */
.toast {
  position: fixed;
  right: 20px;
  bottom: 20px;
  background: var(--glass-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--glass-border);
  color: var(--text);
  padding: 12px 18px;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 600;
  z-index: 9999;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
  animation: toastIn 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}
@keyframes toastIn {
  from { transform: translateY(20px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

/* --- GLOBAL ANIMATIONS --- */
.fade { animation: fade 0.4s ease-out forwards; }
@keyframes fade {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Page Load Animation */
body { animation: pageIn 0.5s ease-out forwards; }
@keyframes pageIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* --- LOADING SPINNER --- */
.loading {
  height: 200px;
  display: flex;
  justify-content: center;
  align-items: center;
  color: var(--text-dim);
}
.spinner {
  width: 32px;
  height: 32px;
  border: 3px solid rgba(47, 128, 255, 0.2);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* --- MOBILE ONLY CLASS --- */
.mobile-only { display: none; }

/* --- SEARCH SUGGESTIONS (LIQUID GLASS) --- */
.search { position: relative; }
.search-suggest {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  right: 0;
  background: var(--glass-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  padding: 8px;
  max-height: 350px;
  overflow-y: auto;
  z-index: 100;
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
  display: none;
  flex-direction: column;
  gap: 5px;
}
.search-suggest.open { display: flex; animation: fade 0.2s ease-out; }
.search-suggest::-webkit-scrollbar { width: 6px; }
.search-suggest::-webkit-scrollbar-thumb { background: var(--glass-border); border-radius: 10px; }

.search-suggest-item {
  display: flex;
  text-decoration: none;
  align-items: center;
  gap: 12px;
  padding: 8px;
  border-radius: 10px;
  cursor: pointer;
  transition: background 0.2s ease;
}
.search-suggest-item:hover { background: rgba(47, 128, 255, 0.1); } /* Red Hint */

.search-suggest-thumb {
  width: 36px;
  height: 50px;
  border-radius: 6px;
  overflow: hidden;
  background: rgba(0,0,0,0.2);
  flex: 0 0 36px;
  display: grid;
  place-items: center;
  font-size: 10px;
  color: var(--text-mute);
}
.search-suggest-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }

.search-suggest-title { font-size: 13px; font-weight: 700; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 200px; }
.search-suggest-sub { font-size: 11px; color: var(--text-dim); margin-top: 3px; }
.search-suggest-empty { padding: 15px; text-align: center; font-size: 12px; color: var(--text-dim); }

/* --- EPISODE LIST COMPONENT --- */
.episode { display: flex; flex-direction: column; padding: 0; overflow: hidden; }
.episode-thumb { display: block; width: 100%; aspect-ratio: 16/9; background-size: cover; background-position: center; background-color: var(--bg-soft); }
.episode-label { display: block; padding: 8px 4px; text-align: center; font-size: 11px; }

.ep-ranges { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 15px; }
.ep-range { background: rgba(255,255,255,0.05); border: 1px solid var(--glass-border); color: var(--text-dim); padding: 8px 12px; border-radius: 8px; font-size: 12px; font-weight: 700; cursor: pointer; transition: 0.3s; }
.ep-range:hover, .ep-range.active { background: var(--accent); border-color: var(--accent); color: #fff; }

.season-bar { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 15px; padding-bottom: 15px; border-bottom: 1px solid var(--glass-border); }
.season-btn { background: rgba(255,255,255,0.05); border: 1px solid var(--glass-border); color: var(--text-dim); padding: 8px 14px; border-radius: 8px; font-size: 12px; font-weight: 700; cursor: pointer; white-space: nowrap; transition: 0.3s; }
.season-btn:hover { border-color: var(--accent); color: var(--accent); }
.season-btn.active { background: var(--accent); border-color: var(--accent); color: #fff; }

/* --- INTERACTIVE FEEDBACK --- */
button, .btn, .card, .filter, .episode, .ep-range, .social, #menuBtn { transition: transform 0.2s cubic-bezier(0.25, 0.8, 0.25, 1), filter 0.2s; }
button:active, .btn:active, .card:active, .filter:active, .episode:active, .ep-range:active, .social:active, #menuBtn:active { transform: scale(0.95); }

/* --- PAGER (PAGINATION) --- */
.pager { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; align-items: center; margin: 40px 0 20px; }
.pager-btn { min-width: 40px; height: 40px; padding: 0 15px; border-radius: 10px; background: var(--glass-bg); backdrop-filter: blur(10px); border: 1px solid var(--glass-border); color: var(--text-dim); font-size: 14px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; transition: all 0.3s ease; }
.pager-btn:hover { border-color: var(--accent); color: var(--accent); background: rgba(47, 128, 255, 0.05); }
.pager-btn.active { background: var(--accent); border-color: var(--accent); color: #fff; }
.pager-dots { color: var(--text-mute); font-size: 16px; padding: 0 5px; }

/* --- WATCH PROGRESS CARD (HOME) --- */
.watch-progress-card .poster { position: relative; }
.watch-progress-info { display: flex; flex-direction: column; gap: 6px; margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--glass-border); }
.watch-season-label { display: block; align-self: flex-start; color: var(--text-dim); font-size: 10px; font-weight: 700; white-space: nowrap; }
.watch-progress-text { display: block; font-size: 12px; color: var(--accent); font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Watchlist Empty State */
.watchlist-empty { min-height: 180px; display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center; padding: 30px; border: 1px solid var(--glass-border); border-radius: 16px; background: var(--glass-bg); backdrop-filter: blur(10px); color: var(--text-dim); }
.watchlist-empty > span { width: 50px; height: 50px; border-radius: 14px; display: grid; place-items: center; background: rgba(255,255,255,0.05); color: var(--accent); font-size: 28px; margin-bottom: 15px; }
.watchlist-empty b { color: var(--text); font-size: 16px; margin-bottom: 5px; display: block; }
.watchlist-empty small { font-size: 13px; }

@media (max-width: 760px), (max-device-width: 760px) and (pointer: coarse){
  .watchlist-empty { min-height: 140px; padding: 20px; }
  .watchlist-empty b { font-size: 14px; }
  .watchlist-empty small { font-size: 11px; }
}

/* --- SCHEDULE LIST --- */
.schedule-list { display: grid; gap: 10px; }
.schedule-list.grid-view { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.schedule-item { display: flex; align-items: center; gap: 15px; padding: 12px; background: var(--glass-bg); backdrop-filter: blur(10px); border: 1px solid var(--glass-border); border-radius: 12px; transition: 0.3s; }
.schedule-item:hover { border-color: var(--accent); transform: translateY(-2px); }
.schedule-time { min-width: 65px; text-align: right; font-size: 13px; font-weight: 800; color: var(--accent); }
.schedule-poster { width: 45px; height: 65px; border-radius: 8px; background-size: cover; background-position: center; flex: none; }
.schedule-copy { flex: 1; }
.schedule-copy b { font-size: 14px; color: var(--text); }
.schedule-copy small { display: block; color: var(--text-dim); font-size: 11px; margin-top: 4px; }
.schedule-ep { font-size: 11px; color: var(--accent); padding: 6px 10px; background: rgba(47, 128, 255, 0.1); border-radius: 8px; font-weight: 700; }

/* --- SIDE DRAWER (MOBILE MENU) --- */
.drawer-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.6); backdrop-filter: blur(4px); z-index: 101; display: none; opacity: 0; transition: opacity 0.3s; }
.drawer-overlay.open { display: block; opacity: 1; }

.side-drawer { position: fixed; left: 0; top: 0; bottom: 0; width: min(300px, 85vw); z-index: 102; background: var(--glass-bg); backdrop-filter: blur(20px); border-right: 1px solid var(--glass-border); transform: translateX(-100%); transition: transform 0.4s cubic-bezier(0.25, 0.8, 0.25, 1); overflow-y: auto; padding: 20px; }
.side-drawer.open { transform: translateX(0); }

.drawer-tabs { display: flex; gap: 5px; margin: 20px 0 15px; }
.drawer-tabs button { flex: 1; border: 1px solid transparent; background: transparent; color: var(--text-dim); padding: 12px; font-size: 13px; font-weight: 700; cursor: pointer; border-bottom: 2px solid transparent; transition: 0.3s; }
.drawer-tabs button.active { color: var(--text); border-bottom-color: var(--accent); }

.drawer-genre-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.drawer-genre-grid a { padding: 10px; border: 1px solid var(--glass-border); background: rgba(255,255,255,0.05); border-radius: 8px; font-size: 12px; color: var(--text); text-align: center; transition: 0.3s; }
.drawer-genre-grid a:hover { background: rgba(47, 128, 255, 0.1); border-color: var(--accent); color: var(--accent); }

.drawer-section { display: none; }
.drawer-section.active { display: block; }
.drawer-links a { display: flex; align-items: center; gap: 12px; padding: 14px 10px; border-bottom: 1px solid var(--glass-border); font-size: 14px; font-weight: 600; color: var(--text); transition: 0.3s; }
.drawer-links a:hover { color: var(--accent); padding-left: 15px; }

/* --- NOTIFICATIONS --- */
.notification-bell { position: fixed; right: 20px; bottom: 20px; z-index: 88; width: 50px; height: 50px; border-radius: 50%; border: 1px solid var(--glass-border); background: var(--glass-bg); backdrop-filter: blur(10px); color: var(--text); cursor: pointer; box-shadow: 0 10px 25px rgba(0,0,0,0.2); transition: 0.3s; display: grid; place-items: center; font-size: 20px; }
.notification-bell:hover { transform: scale(1.05); border-color: var(--accent); color: var(--accent); }
.notification-bell.has-notifications::after { content: ''; position: absolute; right: 12px; top: 12px; width: 10px; height: 10px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px rgba(47, 128, 255, 0.2); }

.notification-panel { position: fixed; right: 20px; bottom: 85px; width: 320px; max-width: calc(100vw - 40px); display: none; z-index: 89; background: var(--glass-bg); backdrop-filter: blur(20px); border: 1px solid var(--glass-border); border-radius: 16px; box-shadow: 0 20px 50px rgba(0,0,0,0.3); overflow: hidden; opacity: 0; transform: translateY(10px); transition: all 0.3s; }
.notification-panel.open { display: block; opacity: 1; transform: translateY(0); }
.notification-head { display: flex; justify-content: space-between; align-items: center; padding: 15px 20px; border-bottom: 1px solid var(--glass-border); font-size: 14px; font-weight: 700; }
.notification-head button { border: 0; background: none; color: var(--text-dim); font-size: 20px; cursor: pointer; transition: 0.3s; }
.notification-head button:hover { color: var(--accent); }

/* --- LANGUAGE HUB & TABS --- */
.language-hub { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 15px; }
.language-hub a, .language-tabs a { display: flex; align-items: center; gap: 12px; text-decoration: none; border: 1px solid var(--glass-border); background: var(--glass-bg); backdrop-filter: blur(10px); border-radius: 12px; padding: 15px 20px; color: var(--text); font-weight: 600; font-size: 14px; transition: 0.3s; }
.language-hub a:hover, .language-tabs a:hover { transform: translateY(-3px); border-color: var(--accent); background: rgba(47, 128, 255, 0.1); color: var(--accent); box-shadow: 0 5px 15px rgba(47, 128, 255, 0.1); }

/* --- USER UI ICONS --- */
.ui-icon { width: 18px; height: 18px; display: inline-block; object-fit: contain; vertical-align: middle; filter: brightness(0.8); transition: filter 0.3s; }
a:hover .ui-icon, button:hover .ui-icon { filter: sepia(1) hue-rotate(320deg) saturate(5) brightness(1); } /* Red Tint on Hover */
