/* ============================================================
   NOVAFLOW - Streaming Platform Stylesheet (v2)
   ============================================================ */

/* ========== VARIABLES ========== */
:root {
    --bg-primary: #0a0a0a;
    --bg-secondary: #141414;
    --bg-tertiary: #1a1a1a;
    --accent: #e50914;
    --accent-hover: #f40612;
    --purple: #8b5cf6;
    --purple-hover: #a78bfa;
    --text-primary: #fff;
    --text-secondary: #a0a0a0;
    --text-muted: #555;
    --shadow: rgba(0, 0, 0, 0.6);
    --gradient-nav: linear-gradient(to bottom, rgba(0, 0, 0, 0.9), transparent 100%);
    --transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    --radius: 6px;
    --navbar-h: 68px;
}

/* ========== RESET ========== */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    font-family: 'Inter', sans-serif; background: var(--bg-primary);
    color: var(--text-primary); overflow-x: hidden; line-height: 1.5; min-height: 100vh;
}
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--bg-primary); }
::-webkit-scrollbar-thumb { background: #333; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: #555; }

/* ========== LOADING ========== */
.loading-screen {
    position: fixed; inset: 0; background: var(--bg-primary); z-index: 9999;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    transition: opacity 0.6s ease, visibility 0.6s ease;
}
.loading-screen.hidden { opacity: 0; visibility: hidden; pointer-events: none; }
.loading-logo-anim {
    font-size: 2.8rem; font-weight: 900; letter-spacing: -1px; text-transform: uppercase;
    background: linear-gradient(135deg, var(--accent), var(--purple));
    -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
    animation: loadPulse 1.5s ease-in-out infinite;
}
@keyframes loadPulse { 0%, 100% { opacity: 0.4; transform: scale(0.96); } 50% { opacity: 1; transform: scale(1); } }
.loading-bar-c { width: 200px; height: 3px; background: #222; border-radius: 3px; margin-top: 24px; overflow: hidden; }
.loading-bar { width: 0; height: 100%; background: linear-gradient(90deg, var(--accent), var(--purple)); border-radius: 3px; transition: width 0.3s ease; }
.loading-label { color: var(--text-muted); font-size: 0.78rem; margin-top: 12px; letter-spacing: 2px; text-transform: uppercase; }

/* ========== PROFILE GATE ========== */
.profile-gate {
    position: fixed;
    inset: 0;
    z-index: 8500;
    display: none;
    align-items: center;
    justify-content: center;
    background: #000;
    padding: 24px;
}
.profile-gate::before {
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
    opacity: 0;
    background:
        radial-gradient(circle at 50% 46%, rgba(229, 9, 20, 0.26), transparent 0 18%, transparent 42%),
        radial-gradient(circle at 50% 46%, rgba(139, 92, 246, 0.22), transparent 0 26%, transparent 58%);
    transform: scale(0.65);
}
.profile-gate.open { display: flex; animation: fadeIn 0.35s ease; }
.profile-gate.hidden { opacity: 0; visibility: hidden; pointer-events: none; transition: opacity 0.35s ease, visibility 0.35s ease; }
.profile-gate.entering::before { animation: profileGateBurst 1.9s ease forwards; }
.profile-gate-inner {
    width: min(640px, 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    transform: translateY(-2vh);
    position: relative;
    z-index: 1;
}
.profile-gate-title {
    font-size: clamp(1.75rem, 4.4vw, 2.65rem);
    font-weight: 800;
    letter-spacing: 0;
    line-height: 1.15;
    text-align: center;
    margin-bottom: 44px;
}
.profile-gate-list {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    gap: clamp(28px, 6vw, 54px);
    width: 100%;
    margin-bottom: 44px;
    flex-wrap: wrap;
}
.profile-gate-card {
    width: 142px;
    border: 0;
    background: transparent;
    color: #fff;
    font-family: 'Inter', sans-serif;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    transition: opacity 0.45s ease, transform 0.45s ease, filter 0.45s ease;
}
.profile-gate-avatar {
    width: 132px;
    height: 132px;
    border-radius: 50%;
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: visible;
    color: #fff;
    font-size: 2.45rem;
    font-weight: 800;
    border: 5px solid transparent;
    box-shadow: 0 0 0 1px rgba(255,255,255,0.06);
    transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}
.profile-gate-avatar-media {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg,#e50914,#8b5cf6);
}
.profile-gate-avatar-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    display: block;
}
.profile-gate-card:hover .profile-gate-avatar {
    transform: translateY(-4px) scale(1.03);
    border-color: rgba(255,255,255,0.9);
    box-shadow: 0 14px 34px rgba(0,0,0,0.45);
}
.profile-gate-card.active .profile-gate-avatar { border-color: #f5c84b; }
.profile-gate.entering .profile-gate-title,
.profile-gate.entering .profile-manage-btn { animation: profileGateFadeAway 0.45s ease forwards; }
.profile-gate.entering .profile-gate-card:not(.active) {
    opacity: 0;
    transform: translateY(18px) scale(0.72);
    filter: blur(6px);
    pointer-events: none;
}
.profile-gate.entering .profile-gate-card.active {
    animation: profileChosenLift 1.9s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    pointer-events: none;
}
.profile-gate.entering .profile-gate-card.active .profile-gate-avatar {
    animation: profileAvatarPulse 1.9s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
.profile-gate.entering .profile-gate-card.active .profile-gate-avatar-media {
    animation: profileAvatarGlow 1.9s ease forwards;
}
.profile-gate.entering .profile-gate-card.active .profile-gate-name {
    animation: profileNameGlow 1.9s ease forwards;
}
.profile-gate-lock {
    position: absolute;
    right: -7px;
    bottom: -3px;
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: #fff;
    color: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.98rem;
    box-shadow: 0 8px 22px rgba(0,0,0,0.35);
}
.profile-gate-name {
    max-width: 142px;
    min-height: 32px;
    color: #f4f4f4;
    font-size: 1.22rem;
    line-height: 1.1;
    font-weight: 800;
    text-align: center;
    overflow-wrap: anywhere;
}
.profile-add-avatar {
    border-color: #2f2f2f;
    color: #8c8c8c;
    font-size: 3.1rem;
    font-weight: 300;
}
.profile-add-avatar .profile-gate-avatar-media {
    background: #1b1b1b;
}
.profile-gate-card:hover .profile-add-avatar {
    border-color: #555;
    color: #d6d6d6;
}
.profile-manage-btn {
    min-width: 230px;
    min-height: 56px;
    padding: 0 28px;
    border: 0;
    border-radius: 8px;
    background: #06243a;
    color: #fff;
    font-family: 'Inter', sans-serif;
    font-size: 1.15rem;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.22s ease, background 0.22s ease;
}
.profile-manage-btn:hover {
    background: #0a3353;
    transform: translateY(-2px);
}
@keyframes profileGateFadeAway {
    to { opacity: 0; transform: translateY(-10px); }
}
@keyframes profileGateBurst {
    0% { opacity: 0; transform: scale(0.55); }
    35% { opacity: 1; transform: scale(1); }
    100% { opacity: 0; transform: scale(1.55); }
}
@keyframes profileChosenLift {
    0% { transform: translateY(0) scale(1); }
    35% { transform: translateY(-20px) scale(1.14); }
    70% { transform: translateY(-16px) scale(1.08); opacity: 1; }
    100% { transform: translateY(-8px) scale(0.94); opacity: 0; }
}
@keyframes profileAvatarPulse {
    0% { box-shadow: 0 0 0 1px rgba(255,255,255,0.06); }
    35% { box-shadow: 0 0 0 8px rgba(245,200,75,0.16), 0 0 46px rgba(229,9,20,0.58), 0 0 72px rgba(139,92,246,0.36); }
    70% { box-shadow: 0 0 0 4px rgba(245,200,75,0.12), 0 0 38px rgba(229,9,20,0.42); }
    100% { box-shadow: 0 0 0 14px rgba(255,255,255,0); }
}
@keyframes profileAvatarGlow {
    0% { filter: brightness(1); }
    45% { filter: brightness(1.35) saturate(1.18); }
    100% { filter: brightness(0.85); }
}
@keyframes profileNameGlow {
    0% { color: #f4f4f4; }
    45% { color: #fff; text-shadow: 0 0 18px rgba(255,255,255,0.45); }
    100% { color: rgba(255,255,255,0); text-shadow: none; }
}

/* ========== NAVBAR ========== */
.navbar {
    position: fixed; top: 0; left: 0; width: 100%; z-index: 1000;
    padding: 0 4%; height: var(--navbar-h);
    display: flex; align-items: center; justify-content: space-between;
    background: var(--gradient-nav); transition: var(--transition);
}
.navbar.scrolled { background: rgba(10, 10, 10, 0.97); backdrop-filter: blur(10px); box-shadow: 0 2px 20px var(--shadow); }
.navbar-left { display: flex; align-items: center; gap: 40px; }
.logo {
    font-size: 1.7rem; font-weight: 900; letter-spacing: -1px; text-transform: uppercase;
    background: linear-gradient(135deg, var(--accent), var(--purple));
    -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
    cursor: pointer; user-select: none;
}
.logo em { font-style: normal; -webkit-text-fill-color: var(--text-primary); }
.nav-menu { display: flex; list-style: none; gap: 24px; }
.nav-menu a {
    color: var(--text-secondary); text-decoration: none; font-size: 0.9rem;
    font-weight: 500; transition: var(--transition); position: relative; padding-bottom: 4px; white-space: nowrap;
}
.nav-menu a::after {
    content: ''; position: absolute; bottom: 0; left: 0; width: 0; height: 2px;
    background: var(--accent); transition: var(--transition);
}
.nav-menu a:hover, .nav-menu a.active { color: var(--text-primary); }
.nav-menu a:hover::after, .nav-menu a.active::after { width: 100%; }
.navbar-right { display: flex; align-items: center; gap: 20px; }
.nav-icon { color: var(--text-secondary); font-size: 1.1rem; cursor: pointer; transition: var(--transition); }
.nav-icon:hover { color: var(--text-primary); transform: scale(1.1); }
.nav-icon.has-badge { position: relative; }
.nav-icon.has-badge::after {
    content: ''; position: absolute; top: -3px; right: -3px; width: 8px; height: 8px;
    background: var(--accent); border-radius: 50%;
    animation: pulseBadge 2s ease infinite;
}
@keyframes pulseBadge { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.3); } }

/* ========== SEARCH ========== */
.search-box { position: relative; display: flex; align-items: center; gap: 10px; }
.search-input {
    background: transparent; border: 1px solid transparent; color: var(--text-primary);
    font-family: 'Inter', sans-serif; font-size: 0.9rem; padding: 0; width: 0; height: 38px;
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94); outline: none; border-radius: var(--radius);
    order: 2;
}
.search-box.open .search-input {
    width: 260px; padding: 0 40px 0 14px; background: rgba(20, 20, 20, 0.95);
    border-color: rgba(255, 255, 255, 0.2);
}
.search-close {
    position: absolute; right: 10px; background: none; border: none; color: var(--text-secondary);
    cursor: pointer; font-size: 0.85rem; opacity: 0; pointer-events: none; transition: var(--transition);
    order: 3;
}
.search-box.open .search-close { opacity: 1; pointer-events: auto; }
.search-trigger {
    color: var(--text-secondary); font-size: 1.1rem; cursor: pointer; z-index: 2; order: 1;
    transition: color 0.3s ease, transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    display: inline-flex; align-items: center; justify-content: center;
}
.search-trigger:hover { color: var(--text-primary); transform: scale(1.2); }
@keyframes searchIconPop {
    0%   { transform: scale(1) rotate(0deg); }
    40%  { transform: scale(1.35) rotate(20deg); }
    70%  { transform: scale(1.1) rotate(-8deg); }
    100% { transform: scale(1.15) rotate(90deg); }
}
@keyframes searchIconClose {
    0%   { transform: scale(1.15) rotate(90deg); }
    40%  { transform: scale(0.85) rotate(110deg); }
    100% { transform: scale(1) rotate(0deg); }
}
.search-box.open .search-trigger { animation: searchIconPop 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) forwards; color: var(--text-primary); }
.search-box.closing .search-trigger { animation: searchIconClose 0.35s ease forwards; }
.search-results {
    position: absolute; top: calc(100% + 10px); right: 0; width: 400px; max-height: 480px;
    overflow-y: auto; background: rgba(20, 20, 20, 0.98); backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1); border-radius: 8px; display: none; z-index: 3000;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.8);
}
.search-results.open { display: block; animation: fadeIn 0.2s ease; }
.search-entry { display: flex; gap: 12px; padding: 12px 16px; cursor: pointer; transition: var(--transition); border-bottom: 1px solid rgba(255, 255, 255, 0.05); }
.search-entry:hover { background: rgba(255, 255, 255, 0.05); }
.search-entry img { width: 48px; height: 72px; object-fit: cover; border-radius: 4px; flex-shrink: 0; background: #222; }
.search-detail { display: flex; flex-direction: column; justify-content: center; gap: 4px; }
.search-entry-title { font-size: 0.9rem; font-weight: 600; }
.search-entry-meta { font-size: 0.78rem; color: var(--text-muted); }
.search-entry-meta .search-match { color: #46d369; font-weight: 600; }
.no-results { padding: 36px 16px; text-align: center; color: var(--text-muted); }

/* ========== PROFILE ========== */
.profile-pill { display: flex; align-items: center; gap: 10px; position: relative; cursor: pointer; }
.avatar-sm {
    width: 34px; height: 34px; border-radius: 6px;
    background: linear-gradient(135deg, var(--accent), var(--purple));
    display: flex; align-items: center; justify-content: center;
    font-weight: 700; font-size: 0.85rem; transition: var(--transition);
}
.profile-pill:hover .avatar-sm { box-shadow: 0 0 15px rgba(229, 9, 20, 0.5); }
.profile-label { display: none; }
.profile-dropdown {
    position: absolute; top: calc(100% + 8px); right: 0; width: 260px;
    background: rgba(20, 20, 20, 0.98); backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1); border-radius: 8px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.8); display: none; z-index: 2000; padding: 8px;
}
.profile-dropdown.open { display: block; animation: fadeIn 0.2s ease; }
.profile-option { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 6px; cursor: pointer; transition: var(--transition); color: var(--text-secondary); text-decoration: none; }
.profile-option:hover { background: rgba(255, 255, 255, 0.08); color: var(--text-primary); }
.profile-option.active { color: var(--text-primary); background: rgba(255, 255, 255, 0.05); }
.po-avatar { width: 38px; height: 38px; border-radius: 6px; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 0.9rem; flex-shrink: 0; }
.po-name { font-size: 0.92rem; font-weight: 500; }
.po-label { font-size: 0.72rem; color: var(--text-muted); margin-top: 2px; }
.profile-divider { height: 1px; background: rgba(255, 255, 255, 0.08); margin: 4px 0; }

/* ========== AVATAR PICKER ========== */
.avatar-picker-overlay {
    position: fixed; inset: 0; background: rgba(0,0,0,0.9); z-index: 9000;
    display: flex; align-items: center; justify-content: center;
    animation: fadeIn 0.3s ease; padding: 20px;
}
.avatar-picker-box {
    background:
        radial-gradient(circle at 18% 0%, rgba(34, 211, 238, 0.13), transparent 32%),
        radial-gradient(circle at 82% 8%, rgba(244, 114, 182, 0.12), transparent 34%),
        linear-gradient(145deg, rgba(20,20,20,0.98), rgba(9,12,18,0.98));
    border-radius: 16px; max-width: 980px; width: min(96vw, 980px);
    max-height: 88vh; overflow-y: auto; padding: 30px 28px 26px; position: relative;
    animation: modalSlide 0.3s ease;
    box-shadow: 0 0 70px rgba(34, 211, 238, 0.12), 0 25px 80px rgba(0,0,0,0.68);
    border: 1px solid rgba(255, 255, 255, 0.11);
}
.avatar-picker-close {
    position: absolute; top: 14px; right: 14px; background: none; border: none;
    color: var(--text-muted); font-size: 1.1rem; cursor: pointer; transition: var(--transition);
    padding: 4px;
}
.avatar-picker-close:hover { color: var(--text-primary); }
.avatar-picker-title {
    font-size: 1.3rem; font-weight: 800; margin-bottom: 16px; text-align: center;
    letter-spacing: 0;
}
.avatar-picker-preview {
    width: 78px; height: 78px; border-radius: 14px; margin: 0 auto 22px;
    background: linear-gradient(135deg,#151b24,#303445); display: flex;
    align-items: center; justify-content: center; font-size: 2.2rem; overflow: hidden;
    transition: var(--transition); box-shadow: 0 0 22px rgba(56,189,248,0.16);
    border: 1px solid rgba(255,255,255,0.12);
}
.avatar-picker-preview img { width: 100%; height: 100%; object-fit: cover; display: none; }
.avatar-picker-preview.img-mode { font-size: 0; }
.avatar-picker-preview.img-mode img { display: block; }
.avatar-picker-preview.img-mode span { display: none; }
.avatar-picker-grid {
    display: flex; flex-direction: column; gap: 18px; margin-bottom: 22px;
}
/* ========== categorized avatar rows ========== */
.avt-category {
    padding: 16px 0 18px;
    border-top: 1px solid rgba(255,255,255,0.07);
}
.avt-category:first-child { border-top: none; padding-top: 0; }
.avt-animated-category {
    margin-top: 4px; padding: 18px 14px 16px;
    border: 1px solid rgba(250,204,21,0.18); border-radius: 12px;
    background: linear-gradient(135deg, rgba(250,204,21,0.06), rgba(56,189,248,0.05));
    box-shadow: inset 0 0 24px rgba(250,204,21,0.05);
}
.avt-cat-label {
    font-size: 0.74rem; font-weight: 800; text-transform: uppercase; letter-spacing: 1.4px;
    color: var(--text-muted); margin-bottom: 12px; padding-left: 4px;
    display: flex; align-items: center; gap: 8px;
}
.avt-cat-label::after { content: ''; flex: 1; height: 1px; background: rgba(255,255,255,0.06); }
.avt-cat-label.neon-purple { color: #a78bfa; text-shadow: 0 0 8px rgba(139,92,246,0.4); }
.avt-cat-label.neon-orange { color: #fb923c; text-shadow: 0 0 8px rgba(251,146,60,0.4); }
.avt-cat-label.neon-blue   { color: #38bdf8; text-shadow: 0 0 8px rgba(56,189,248,0.4); }
.avt-cat-label.neon-cyan   { color: #22d3ee; text-shadow: 0 0 8px rgba(34,211,238,0.4); }
.avt-cat-label.neon-pink   { color: #f472b6; text-shadow: 0 0 8px rgba(244,114,182,0.4); }
.avt-cat-label.neon-green  { color: #4ade80; text-shadow: 0 0 8px rgba(74,222,128,0.4); }
.avt-cat-label.neon-gif    { color: #facc15; text-shadow: 0 0 10px rgba(250,204,21,0.5); position: relative; }
.avt-cat-label.neon-gif::after { background: linear-gradient(90deg, #facc15, #ff6b9d, #38bdf8, #facc15); background-size: 200% 100%; height: 1px; animation: gifShimmer 2s linear infinite; }
@keyframes gifShimmer { 0% { background-position: 0% 0%; } 100% { background-position: 200% 0%; } }
.static-badge {
    font-size: 0.6rem; font-weight: 600; color: #38bdf8; letter-spacing: 0.8px;
    border: 1px solid rgba(56,189,248,0.3); padding: 1px 6px; border-radius: 3px;
    text-shadow: none; margin-left: auto;
}
.avt-row {
    display: flex; align-items: center; gap: 12px; overflow-x: auto;
    padding: 4px 4px 12px; scrollbar-width: thin; scrollbar-color: rgba(255,255,255,0.18) transparent;
}
.avt-row::-webkit-scrollbar { height: 6px; }
.avt-row::-webkit-scrollbar-track { background: transparent; }
.avt-row::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.16); border-radius: 999px; }
.avt-row::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.28); }
.avt-animated-category .avt-row {
    padding-bottom: 8px;
}
.avatar-picker-item {
    flex: 0 0 auto; width: 72px; height: 72px; border-radius: 12px; cursor: pointer; transition: all 0.25s ease;
    border: 2px solid rgba(255,255,255,0.08); overflow: hidden; position: relative;
    background:
        radial-gradient(circle at 50% 18%, rgba(255,255,255,0.14), transparent 34%),
        linear-gradient(145deg, #101827, #05070c);
    box-shadow: 0 10px 22px rgba(0,0,0,0.26);
}
.avatar-picker-item img {
    width: 100%; height: 100%; object-fit: cover; object-position: top center; display: block;
    transform: scale(1.08); transform-origin: top center;
}
.avatar-picker-item:hover { transform: translateY(-3px) scale(1.06); border-color: rgba(255,255,255,0.38); z-index: 2; }
.avatar-picker-item:hover img { transform: scale(1.14); }
.avatar-picker-item.sel { border-color: var(--accent); box-shadow: 0 0 18px rgba(229,9,20,0.58), 0 10px 24px rgba(0,0,0,0.36); z-index: 3; }
.avatar-picker-item.gif-item::after {
    content: ''; position: absolute; inset: -40%; pointer-events: none;
    background: linear-gradient(115deg, transparent 35%, rgba(255,255,255,0.22), transparent 65%);
    animation: gifCardSweep 2.4s linear infinite;
}
@keyframes gifCardSweep { from { transform: translateX(-42%) rotate(12deg); } to { transform: translateX(42%) rotate(12deg); } }
.avatar-picker-item.gif-item:hover { border-color: #facc15; box-shadow: 0 0 18px rgba(250,204,21,0.45), 0 10px 24px rgba(0,0,0,0.36); }
.avatar-picker-item.gif-item.sel { border-color: #facc15; box-shadow: 0 0 18px rgba(250,204,21,0.7), 0 10px 24px rgba(0,0,0,0.4); }
.avatar-picker-item.emoji-only {
    width: 42px; height: 42px; display: flex; align-items: center; justify-content: center;
    font-size: 1.4rem; background: transparent; overflow: visible;
}
.avatar-picker-item.emoji-only img { display: none; }
.avatar-picker-name-row {
    display: flex; gap: 10px; align-items: center;
}
.avatar-picker-name-row input {
    flex: 1;
    background: linear-gradient(135deg, rgba(229, 9, 20, 0.08), rgba(139, 92, 246, 0.08));
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 8px;
    padding: 10px 14px;
    color: #fff;
    font-size: 0.95rem;
    font-family: 'Inter', sans-serif;
    outline: none;
    transition: var(--transition);
    backdrop-filter: blur(6px);
}
.avatar-picker-name-row input:focus {
    border: 1px solid rgba(200, 40, 120, 0.6);

    background: linear-gradient(
        135deg,
        rgba(229, 9, 20, 0.08),
        rgba(139, 92, 246, 0.08)
    );

    box-shadow: 0 0 0 1px rgba(200, 40, 120, 0.2);
}
.btn-ap-ok {
    background: linear-gradient(135deg, #e50914, #8b5cf6);
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 10px 20px;
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
    font-family: 'Inter', sans-serif;
    transition: var(--transition);
    white-space: nowrap;
    box-shadow: 0 0 20px rgba(139, 92, 246, 0.4),
                0 0 30px rgba(229, 9, 20, 0.3);
}

.btn-ap-ok:hover {
    filter: brightness(1.15);
    transform: scale(1.05);
}

.btn-ap-delete {
    background: rgba(229, 9, 20, 0.15);
    color: #ff4d4d;
    border: 1px solid rgba(229, 9, 20, 0.5);
    border-radius: 8px;
    padding: 10px 16px;
    font-size: 0.9rem;
    font-weight: 700;
    cursor: pointer;
    margin-left: 8px;
    transition: var(--transition);
}

.avatar-picker-name-row {
    display: flex;
    gap: 10px; /* Dá um espacinho entre o input, a lixeira e o botão ok */
    margin-top: 20px;
}

.btn-ap-delete:hover {
    background: #e50914 !important;
    color: #fff !important;
}

/* ========== NOTIFICATIONS ========== */
.notif-panel {
    position: absolute; top: calc(100% + 8px); right: 0; width: 340px; max-height: 400px;
    overflow-y: auto; background: rgba(20, 20, 20, 0.98); backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1); border-radius: 8px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.8); display: none; z-index: 2000; padding: 4px 0;
}
.notif-panel.open { display: block; animation: fadeIn 0.2s ease; }
.notif-header { padding: 12px 16px; font-weight: 600; font-size: 0.95rem; border-bottom: 1px solid rgba(255, 255, 255, 0.08); margin-bottom: 4px; }
.notif-item { padding: 12px 16px; display: flex; gap: 12px; border-bottom: 1px solid rgba(255, 255, 255, 0.04); transition: var(--transition); }
.notif-item:hover { background: rgba(255, 255, 255, 0.04); }
.notif-icon-circle { width: 36px; height: 36px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 0.85rem; flex-shrink: 0; }
.notif-text { font-size: 0.82rem; color: var(--text-secondary); line-height: 1.5; }
.notif-text strong { color: var(--text-primary); }
.notif-time { font-size: 0.72rem; color: var(--text-muted); margin-top: 4px; }

/* ========== MOBILE ========== */
.menu-toggle {
    display: none; background: none; border: none; color: var(--text-primary);
    font-size: 1.4rem; cursor: pointer; width: 40px; height: 40px; border-radius: 6px;
    transition: var(--transition); align-items: center; justify-content: center;
}
.menu-toggle:hover { background: rgba(255, 255, 255, 0.1); }

/* ========== HERO ========== */
.hero { position: relative; width: 100%; height: 90vh; min-height: 550px; overflow: hidden; }
.hero-bg { position: absolute; inset: 0; background-size: cover; background-position: center top; transition: opacity 1s ease; }
.hero::before {
    content: ''; position: absolute; inset: 0;
    background: linear-gradient(to right, rgba(10, 10, 10, 0.95), rgba(10, 10, 10, 0.4) 50%, transparent),
                linear-gradient(to top, var(--bg-primary) 0%, transparent 50%); z-index: 1;
}
.hero::after { content: ''; position: absolute; bottom: 0; left: 0; right: 0; height: 200px; background: linear-gradient(to top, var(--bg-primary), transparent 60%); z-index: 1; }
.hero-body { position: absolute; bottom: 14%; left: 4%; z-index: 2; max-width: 620px; animation: fadeUp 1s ease 0.3s both; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(40px); } to { opacity: 1; transform: translateY(0); } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes fadeInUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
.hero-tag { display: inline-flex; align-items: center; gap: 8px; background: rgba(229, 9, 20, 0.2); border: 1px solid rgba(229, 9, 20, 0.4); padding: 6px 14px; border-radius: 20px; font-size: 0.78rem; font-weight: 600; color: var(--accent); margin-bottom: 16px; letter-spacing: 0.5px; text-transform: uppercase; }
.hero-title { font-size: clamp(2rem, 5vw, 3.5rem); font-weight: 900; line-height: 1.1; margin-bottom: 12px; text-shadow: 2px 4px 20px rgba(0, 0, 0, 0.6); }
.hero-infos { display: flex; align-items: center; gap: 16px; margin-bottom: 16px; font-size: 0.9rem; color: var(--text-secondary); }
.hero-rating { color: #46d369; font-weight: 700; }
.hero-year { color: var(--text-muted); }
.hero-age-tag { border: 1px solid var(--text-muted); padding: 1px 7px; font-size: 0.75rem; border-radius: 3px; }
.hero-desc { font-size: 1rem; color: var(--text-secondary); line-height: 1.6; margin-bottom: 24px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.btn { display: inline-flex; align-items: center; gap: 10px; padding: 12px 28px; border: none; border-radius: var(--radius); font-family: 'Inter', sans-serif; font-size: 1rem; font-weight: 700; cursor: pointer; transition: var(--transition); text-decoration: none; }
.btn-play { background: var(--text-primary); color: #000; }
.btn-play:hover { background: #ddd; transform: scale(1.05); }
.btn-info { background: rgba(109, 109, 110, 0.5); color: var(--text-primary); backdrop-filter: blur(4px); }
.btn-info:hover { background: rgba(109, 109, 110, 0.7); transform: scale(1.05); }
.hero-dots { position: absolute; bottom: 5%; right: 4%; z-index: 3; display: flex; gap: 8px; }
.hero-dot { width: 32px; height: 3px; background: rgba(255, 255, 255, 0.3); border-radius: 2px; cursor: pointer; transition: var(--transition); }
.hero-dot.active { background: var(--accent); width: 48px; }

/* ========== SECTIONS ========== */
.content-section { padding: 0 4%; margin-bottom: 48px; position: relative; z-index: 2; margin-top: -40px; animation: fadeInUp 0.6s ease both; }
.content-section + .content-section { margin-top: 0; }
.section-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.section-title { font-size: 1.35rem; font-weight: 700; position: relative; padding-left: 14px; }
.section-title::before { content: ''; position: absolute; left: 0; top: 50%; transform: translateY(-50%); width: 4px; height: 70%; background: var(--accent); border-radius: 2px; }
.category-grid-page { padding: 90px 4% 60px; min-height: 100vh; }
.category-grid-page .back-link {
    display: inline-flex; align-items: center; gap: 8px; color: var(--text-secondary);
    font-size: 0.95rem; cursor: pointer; transition: var(--transition); margin-bottom: 24px;
    background: none; border: none; font-family: inherit;
}
.category-grid-page .back-link:hover { color: var(--text-primary); }
.category-grid-page .grid-title {
    font-size: 1.8rem; font-weight: 800; margin-bottom: 32px;
    position: relative; padding-left: 16px;
}
.category-grid-page .grid-title::before {
    content: ''; position: absolute; left: 0; top: 50%; transform: translateY(-50%);
    width: 5px; height: 70%; background: var(--accent); border-radius: 2px;
}
.category-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
    gap: 16px; width: 100%;
}
.category-grid .card { width: 100%; animation: fadeInUp 0.4s ease both; }
@media (max-width: 768px) {
    .category-grid { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 10px; }
    .category-grid-page .grid-title { font-size: 1.3rem; }
    .category-grid-page .back-link { font-size: 0.85rem; }
}
@media (max-width: 480px) {
    .category-grid { grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); gap: 8px; }
}
.see-all { color: var(--text-muted); font-size: 0.85rem; font-weight: 500; cursor: pointer; transition: var(--transition); text-decoration: none; display: flex; align-items: center; gap: 4px; }
.see-all:hover { color: var(--text-primary); }
.carousel-wrap { position: relative; }
.carousel { display: flex; gap: 10px; overflow-x: auto; scroll-behavior: smooth; padding: 10px 0 20px; scrollbar-width: none; -ms-overflow-style: none; }
.carousel::-webkit-scrollbar { display: none; }
.carousel-arrow { position: absolute; top: 50%; transform: translateY(-50%); width: 44px; height: 100%; border: none; background: rgba(10, 10, 10, 0.7); color: #fff; font-size: 1.5rem; cursor: pointer; z-index: 10; transition: var(--transition); display: flex; align-items: center; justify-content: center; opacity: 0; }
.carousel-wrap:hover .carousel-arrow { opacity: 1; }
.carousel-arrow:hover { background: rgba(10, 10, 10, 0.9); }
.carousel-arrow.left { left: -4px; border-radius: 0 var(--radius) var(--radius) 0; }
.carousel-arrow.right { right: -4px; border-radius: var(--radius) 0 0 var(--radius); }

/* ========== CARDS ========== */
.card { flex: 0 0 auto; width: 200px; cursor: pointer; transition: var(--transition); position: relative; border-radius: var(--radius); overflow: hidden; animation: fadeInUp 0.5s ease both; }
.card:hover { transform: scale(1.12); z-index: 5; box-shadow: 0 10px 40px rgba(0, 0, 0, 0.8); }
.card-face { position: relative; width: 100%; aspect-ratio: 2/3; overflow: hidden; border-radius: var(--radius); }
.card-poster { width: 100%; height: 100%; object-fit: cover; transition: var(--transition); }
.card:hover .card-poster { filter: brightness(0.7); }
.card-over { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: flex-end; padding: 16px; opacity: 0; transition: var(--transition); }
.card:hover .card-over { opacity: 1; }
.card-over-title { font-size: 0.9rem; font-weight: 700; margin-bottom: 6px; line-height: 1.2; }
.card-over-meta { display: flex; align-items: center; gap: 8px; font-size: 0.75rem; margin-bottom: 8px; }
.card-match { color: #46d369; font-weight: 700; }
.card-yr { color: var(--text-muted); }
.card-btns { display: flex; gap: 6px; }
.cbtn {
    width: 32px; height: 32px; border-radius: 50%; border: 1.5px solid rgba(255, 255, 255, 0.4);
    background: rgba(0, 0, 0, 0.6); color: #fff; font-size: 0.75rem; cursor: pointer;
    display: flex; align-items: center; justify-content: center; transition: var(--transition);
}
.cbtn:hover { border-color: #fff; background: rgba(255, 255, 255, 0.15); transform: scale(1.1); }
.cbtn.play { background: var(--text-primary); color: #000; border-color: var(--text-primary); }
.cbtn.play:hover { background: #ddd; }
.cbtn.saved { border-color: var(--accent); color: var(--accent); }
.card-num { position: absolute; bottom: -5px; left: -8px; font-size: 5rem; font-weight: 900; color: transparent; -webkit-text-stroke: 3px #fff; line-height: 1; z-index: 2; pointer-events: none; }

/* ========== CONTINUE WATCHING ========== */
.cw-card { position: relative; }
.cw-select-check {
    position: absolute; top: 6px; right: 6px; z-index: 3;
    display: none; background: rgba(0,0,0,0.6); border-radius: 50%;
    width: 28px; height: 28px; align-items: center; justify-content: center;
}
.cw-select-check label { display: flex; align-items: center; justify-content: center; cursor: pointer; padding: 0; margin: 0; }
.cw-select-check input { width: 16px; height: 16px; accent-color: var(--accent); cursor: pointer; }
.cw-select-mode .cw-select-check { display: flex; pointer-events: auto; }
.cw-select-mode .cw-card { cursor: pointer; }
.cw-select-mode .cw-card.selected { outline: 3px solid var(--accent); outline-offset: -3px; border-radius: var(--radius); }
.cw-actions { display: flex; align-items: center; gap: 8px; }
.cw-progress { position: absolute; bottom: 0; left: 0; right: 0; height: 3px; background: rgba(0, 0, 0, 0.5); }
.cw-bar { height: 100%; background: var(--accent); transition: width 0.3s ease; }
.card:hover .cw-bar { background: #f66; }

/* ========== EMPTY ========== */
.empty-state { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 80px 20px; text-align: center; color: var(--text-muted); }
.empty-state i { font-size: 3rem; margin-bottom: 16px; opacity: 0.3; }
.empty-state p { font-size: 1rem; margin-bottom: 4px; }
.empty-state small { font-size: 0.82rem; opacity: 0.6; }

/* ========== MODAL (v3 - Modern & Large) ========== */
.modal-overlay {
    position: fixed; inset: 0; background: rgba(0, 0, 0, 0.92); z-index: 2000;
    display: none; align-items: center; justify-content: center;
    animation: fadeIn 0.3s ease; overflow-y: auto; padding: 40px 20px;
}
.modal-overlay.open { display: flex; }

.modal-box {
    background: var(--bg-secondary); border-radius: 16px; max-width: 1000px;
    width: 100%; max-height: 90vh; position: relative; overflow-y: auto;
    animation: modalSlide 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 25px 100px rgba(0, 0, 0, 0.7), 0 0 0 1px rgba(255,255,255,0.06);
}
@keyframes modalSlide { from { opacity: 0; transform: translateY(50px) scale(0.95); } to { opacity: 1; transform: translateY(0) scale(1); } }

/* Modal close button */
.discord-modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 36px;
    height: 36px;
    background: rgba(20, 20, 20, 0.8);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    color: rgba(255, 255, 255, 0.6);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 2010;
    pointer-events: auto;
    
}
.discord-modal-close:hover {
    border-color: rgb(220, 20, 60);
    color: rgb(220, 20, 60);
    background-color: rgba(220, 20, 60, 0.1);
    transform: rotate(90deg);
    
}
.discord-modal-close i {
    transform: translate(0.5px, -0.5px);
    display: block;
    
}
.discord-modal-close:hover i {
    transform: translate(0, 0);
         text-shadow: 0 0 1px currentColor;
         
}


/* Modal header with background-image (never shows a black hole) */
.modal-header {
    position: relative; width: 100%; aspect-ratio: 16/9; overflow: hidden;
    border-radius: 16px 16px 0 0;
    background-size: cover; background-position: center;
    background-color: var(--bg-tertiary);
    animation: hdrIn 0.35s ease;
}
@keyframes hdrIn { from { opacity: 0.3; } to { opacity: 1; } }

.modal-header-grad {
    position: absolute; inset: 0;
    background: linear-gradient(to top, var(--bg-secondary) 0%, rgba(20, 20, 20, 0.35) 35%, transparent 60%);
}
.modal-header .modal-hero-actions {
    position: absolute; bottom: 30px; left: 28px; z-index: 5;
    display: flex; gap: 12px; flex-wrap: wrap;
}

/* Modal body */
.modal-inner-lg { padding: 32px 40px 48px; max-width: 860px; margin: 0 auto; }
.modal-title-lg { font-size: 2.5rem; font-weight: 800; margin-bottom: 18px; line-height: 1.1; letter-spacing: -0.5px; }
.modal-row-lg { display: flex; gap: 16px; margin-bottom: 20px; font-size: 0.92rem; color: var(--text-secondary); flex-wrap: wrap; align-items: center; }
.modal-row-lg .green { color: #46d369; font-weight: 700; }
.modal-synopsis-lg { color: var(--text-secondary); line-height: 1.75; margin-bottom: 24px; font-size: 1rem; }
.modal-cast { color: var(--text-muted); font-size: 0.88rem; margin-bottom: 20px; line-height: 1.6; }
.modal-cast strong { color: var(--text-secondary); }
.genre-pills { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; padding-top: 20px; border-top: 1px solid rgba(255,255,255,0.06); }
.genre-pill { background: rgba(255, 255, 255, 0.06); border: 1px solid rgba(255,255,255,0.1); padding: 6px 16px; border-radius: 20px; font-size: 0.82rem; color: var(--text-secondary); transition: var(--transition); }
.genre-pill:hover { background: rgba(255,255,255,0.1); border-color: rgba(255,255,255,0.2); }

/* Related titles grid */
.modal-related { margin-top: 48px; padding-top: 32px; border-top: 1px solid rgba(255, 255, 255, 0.08); }
.related-title { font-size: 1.4rem; font-weight: 700; margin-bottom: 20px; position: relative; padding-left: 14px; }
.related-title::before { content: ''; position: absolute; left: 0; top: 50%; transform: translateY(-50%); width: 4px; height: 70%; background: var(--accent); border-radius: 2px; }
.related-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px; }
.related-card { cursor: pointer; border-radius: var(--radius); overflow: hidden; transition: var(--transition); background: var(--bg-tertiary); }
.related-card:hover { transform: scale(1.06); box-shadow: 0 8px 30px rgba(0, 0, 0, 0.6); }
.related-card img { width: 100%; aspect-ratio: 2/3; object-fit: cover; display: block; background: #1a1a1a; }
.related-info { padding: 10px 8px; }
.related-name { font-size: 0.82rem; font-weight: 600; line-height: 1.3; margin-bottom: 4px; }
.related-meta { font-size: 0.74rem; color: var(--text-muted); }
.related-meta .green { color: #46d369; font-weight: 600; }

/* ========== EPISODES / SEASONS ========== */
.episodes-section { margin-top: 32px; border-top: 1px solid rgba(255, 255, 255, 0.08); padding-top: 24px; }

.season-tabs { display: flex; gap: 8px; margin-bottom: 20px; flex-wrap: wrap; }

.season-tab {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-secondary);
    padding: 8px 20px;
    border-radius: 8px;
    font-family: 'Inter', sans-serif;
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
}
.season-tab:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
}
.season-tab.active {
    background: var(--text-primary);
    color: #000;
    border-color: var(--text-primary);
}

.season-content { display: flex; flex-direction: column; gap: 16px; }
.season-content.hidden { display: none; }

.episode-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 16px 20px;
    border-radius: 10px;
    cursor: pointer;
    transition: var(--transition);
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.04);
}
.episode-card:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.1);
}

.episode-left { display: flex; align-items: flex-start; gap: 16px; flex: 1; min-width: 0; }

.episode-number {
    color: var(--text-muted);
    font-size: 0.88rem;
    font-weight: 700;
    white-space: nowrap;
    min-width: 58px;
    padding-top: 2px;
}

.episode-details { display: flex; flex-direction: column; gap: 4px; min-width: 0; }

.episode-name {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.episode-desc {
    font-size: 0.82rem;
    color: var(--text-secondary);
    line-height: 1.45;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.episode-right {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-shrink: 0;
}

.episode-duration {
    font-size: 0.82rem;
    color: var(--text-muted);
    white-space: nowrap;
}

.episode-play {
    font-size: 1.4rem;
    color: var(--text-muted);
    transition: var(--transition);
}
.episode-card:hover .episode-play {
    color: var(--text-primary);
    transform: scale(1.2);
}

/* Responsive episodes */
@media (max-width: 768px) {
    .season-tab { padding: 6px 14px; font-size: 0.82rem; }
    .episode-card { padding: 12px 14px; gap: 10px; }
    .episode-number { font-size: 0.82rem; min-width: 50px; }
    .episode-name { font-size: 0.88rem; }
    .episode-desc { -webkit-line-clamp: 1; }
    .episode-duration { font-size: 0.78rem; }
    .episode-play { font-size: 1.2rem; }
}

@media (max-width: 480px) {
    .episode-card { flex-direction: column; align-items: flex-start; gap: 8px; }
    .episode-right { align-self: flex-end; }
    .season-tabs { gap: 6px; }
    .season-tab { padding: 5px 12px; font-size: 0.78rem; }
}

/* ========== PLAYER ========== */
.player-overlay { position: fixed; inset: 0; background: #000; z-index: 5000; display: none; flex-direction: column; animation: fadeIn 0.3s ease; }
.player-overlay.open { display: flex; }
.player-top { position: absolute; top: 0; left: 0; right: 0; z-index: 10; padding: 20px 24px; display: flex; align-items: center; gap: 16px; background: linear-gradient(to bottom, rgba(0, 0, 0, 0.8), transparent); transition: var(--transition); }
.player-back { background: none; border: none; color: #fff; font-size: 1.5rem; cursor: pointer; transition: var(--transition); padding: 8px; }
.player-back:hover { transform: scale(1.15); }
.player-film-title { font-size: 1.2rem; font-weight: 600; }
.player-placeholder { width: 100%; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 20px; background: linear-gradient(135deg, #111, #0a0a0a 50%, #151515); position: absolute; inset: 0; }
.player-ph-title { font-size: 3rem; font-weight: 900; background: linear-gradient(135deg, var(--accent), var(--purple)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; opacity: 0.8; }
.player-ph-icon { font-size: 4rem; color: rgba(255, 255, 255, 0.25); }
.player-ph-sub { color: var(--text-muted); font-size: 1rem; }
.player-ctrls { position: absolute; bottom: 0; left: 0; right: 0; z-index: 10; padding: 0 24px 20px; background: linear-gradient(to top, rgba(0, 0, 0, 0.9), transparent); transition: var(--transition); }
.progress-track { width: 100%; height: 4px; background: rgba(255, 255, 255, 0.2); border-radius: 2px; cursor: pointer; margin-bottom: 12px; position: relative; transition: height 0.15s ease; }
.progress-track:hover { height: 6px; }
.progress-fill { height: 100%; background: var(--accent); border-radius: 2px; width: 0%; position: relative; transition: width 0.1s linear; }
.progress-fill::after { content: ''; position: absolute; right: -6px; top: 50%; transform: translateY(-50%) scale(0); width: 14px; height: 14px; background: var(--accent); border-radius: 50%; transition: transform 0.15s ease; }
.progress-track:hover .progress-fill::after { transform: translateY(-50%) scale(1); }
.ctrl-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.ctrl-left, .ctrl-right { display: flex; align-items: center; gap: 16px; }
.ctrl-btn { background: none; border: none; color: #fff; font-size: 1.2rem; cursor: pointer; transition: var(--transition); padding: 6px; }
.ctrl-btn:hover { transform: scale(1.2); }
.ctrl-btn.play-big { font-size: 1.6rem; }
.ctrl-btn.play-big:hover { transform: scale(1.3); }
.vol-group { display: flex; align-items: center; gap: 8px; position: relative; }
.vol-range { -webkit-appearance: none; appearance: none; width: 65px; height: 4px; background: rgba(255, 255, 255, 0.25); border-radius: 2px; outline: none; cursor: pointer; transition: width 0.2s ease; }
.vol-group:hover .vol-range { width: 80px; }
.vol-range::-webkit-slider-thumb { -webkit-appearance: none; width: 14px; height: 14px; border-radius: 50%; background: #fff; cursor: pointer; box-shadow: 0 0 4px rgba(0,0,0,0.5); transition: transform 0.15s ease; }
.vol-range::-webkit-slider-thumb:hover { transform: scale(1.3); }
.vol-range::-moz-range-thumb { width: 14px; height: 14px; border-radius: 50%; background: #fff; border: none; cursor: pointer; }
/* tooltip de porcentagem */
.vol-tip {
    position: absolute;
    bottom: calc(100% + 10px);
    left: 50%;
    transform: translateX(-50%) translateY(4px);
    background: rgba(0,0,0,0.85);
    color: #fff;
    font-size: 0.72rem;
    font-weight: 700;
    padding: 3px 7px;
    border-radius: 4px;
    white-space: nowrap;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.2s ease, transform 0.2s ease;
    letter-spacing: 0.03em;
}
.vol-tip::after {
    content: '';
    position: absolute;
    top: 100%; left: 50%;
    transform: translateX(-50%);
    border: 4px solid transparent;
    border-top-color: rgba(0,0,0,0.85);
}
.vol-tip.visible {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}
.time-label { font-size: 0.82rem; color: var(--text-secondary); font-variant: tabular-nums; white-space: nowrap; }
.player-overlay.hide-ctrls .player-ctrls,
.player-overlay.hide-ctrls .player-top { opacity: 0; pointer-events: none; }

/* ── Play/Pause feedback (estilo Netflix) ── */
.player-feedback {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.6);
    width: 80px;
    height: 80px;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    opacity: 0;
    z-index: 20;
}
.player-feedback i {
    font-size: 2.2rem;
    color: #fff;
}
.player-feedback.pop {
    animation: feedbackPop 0.65s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}
@keyframes feedbackPop {
    0%   { opacity: 1; transform: translate(-50%, -50%) scale(0.55); }
    30%  { opacity: 1; transform: translate(-50%, -50%) scale(1.1);  }
    55%  { opacity: 1; transform: translate(-50%, -50%) scale(1.0);  }
    80%  { opacity: 1; transform: translate(-50%, -50%) scale(1.0);  }
    100% { opacity: 0; transform: translate(-50%, -50%) scale(1.15); }
}

/* ── Subtitle Preview (estilo YouTube) ── */
.subtitle-preview {
    position: absolute;
    bottom: 90px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.75);
    color: #fff;
    font-size: 1.1rem;
    font-family: 'Inter', sans-serif;
    font-weight: 500;
    padding: 10px 22px;
    border-radius: 4px;
    pointer-events: none;
    white-space: nowrap;
    opacity: 0;
    transition: opacity 0.25s ease;
    z-index: 9999;
}
.subtitle-preview--show { opacity: 1; }
.subtitle-preview--hide  { opacity: 0; }
#btnSub.active { color: #e50914; }

/* ========== TOAST ========== */
.toast-box { position: fixed; bottom: 24px; right: 24px; z-index: 6000; display: flex; flex-direction: column; gap: 10px; }
.toast { background: rgba(30, 30, 30, 0.95); backdrop-filter: blur(10px); border: 1px solid rgba(255, 255, 255, 0.1); border-radius: 8px; padding: 14px 20px; display: flex; align-items: center; gap: 12px; min-width: 300px; max-width: 460px; animation: toastIn 0.4s ease; box-shadow: 0 8px 30px rgba(0, 0, 0, 0.5); }
.toast.out { animation: toastOut 0.3s ease forwards; }
.toast i { font-size: 1.1rem; color: var(--accent); flex-shrink: 0; }
.toast span { font-size: 0.88rem; font-weight: 500; }
@keyframes toastIn { from { opacity: 0; transform: translateY(20px) scale(0.95); } to { opacity: 1; transform: translateY(0) scale(1); } }
@keyframes toastOut { from { opacity: 1; transform: translateY(0) scale(1); } to { opacity: 0; transform: translateY(20px) scale(0.95); } }

/* ========== FOOTER ========== */
.site-footer { padding: 60px 4% 30px; margin-top: 40px; border-top: 1px solid #222; }
.footer-inner { max-width: 1000px; margin: 0 auto; }
.footer-soc { display: flex; gap: 20px; margin-bottom: 30px; }
.footer-soc a { color: var(--text-secondary); font-size: 1.3rem; transition: var(--transition); }
.footer-soc a:hover { color: var(--text-primary); transform: translateY(-2px); }
.footer-links { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; margin-bottom: 30px; }
.footer-links a { color: var(--text-muted); text-decoration: none; font-size: 0.82rem; transition: var(--transition); }
.footer-links a:hover { color: var(--text-secondary); text-decoration: underline; }
.footer-bottom { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 10px; font-size: 0.78rem; color: var(--text-muted); }
.footer-logo-sm { font-weight: 900; font-size: 1.1rem; background: linear-gradient(135deg, var(--accent), var(--purple)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }

/* ========== RESPONSIVE ========== */
@media (max-width: 768px) {
    .nav-menu {
        display: none; position: fixed; top: var(--navbar-h); left: 0; right: 0; bottom: 0;
        background: rgba(10, 10, 10, 0.99); flex-direction: column; padding: 30px 4%; gap: 0; z-index: 999;
    }
    .nav-menu.open { display: flex; }
    .nav-menu li { border-bottom: 1px solid rgba(255, 255, 255, 0.06); }
    .nav-menu a { display: block; padding: 16px 0; font-size: 1.05rem; }
    .nav-menu a::after { display: none; }
    .menu-toggle { display: flex; }
    .profile-label { display: none !important; }
    .search-box.open .search-input { width: 200px; }
    .search-results { width: calc(100vw - 32px); right: -60px; }
    .notif-panel { right: -60px; width: calc(100vw - 16px); }
    .hero { height: 70vh; min-height: 450px; }
    .hero-body { bottom: 10%; max-width: 90%; }
    .hero-title { font-size: 1.7rem; }
    .hero-desc { font-size: 0.88rem; -webkit-line-clamp: 2; }
    .btn { padding: 10px 20px; font-size: 0.9rem; }
    .card { width: 140px; }
    .section-title { font-size: 1.1rem; }
    .carousel-arrow { display: none; }
    .footer-links { grid-template-columns: repeat(2, 1fr); }
    .toast-box { bottom: 16px; right: 16px; left: 16px; }
    .toast { min-width: auto; max-width: none; }
    .player-ctrls { padding: 0 16px 16px; }
    .vol-range { width: 60px; }
    .related-grid { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); }
    .modal-title-lg { font-size: 1.6rem; }
    .modal-box { max-width: 100%; border-radius: 0; }
}
@media (max-width: 480px) {
    .card { width: 120px; }
    .hero-actions { gap: 8px; }
    .btn { padding: 9px 16px; font-size: 0.85rem; }
    .footer-bottom { flex-direction: column; text-align: center; }
    .search-box.open .search-input { width: 160px; font-size: 0.85rem; }
    .player-ph-title { font-size: 2rem; }
    .player-ph-icon { font-size: 3rem; }
}

/* ========== MELHORIAS MOBILE (não afeta desktop) ========== */

/* --- Navbar: mais compacta e organizada no celular --- */
@media (max-width: 768px) {
    :root { --navbar-h: 58px; }

    .navbar { padding: 0 16px; }
    .logo { font-size: 1.35rem; }
    .navbar-right { gap: 14px; }

    /* Botão de menu maior (área de toque) */
    .menu-toggle { padding: 8px; font-size: 1.15rem; }

    /* Menu mobile: melhor espaçamento e legibilidade */
    .nav-menu { padding: 20px 20px; }
    .nav-menu a { padding: 18px 0; font-size: 1.1rem; font-weight: 600; }

    /* Ícones da navbar com área de toque adequada */
    .nav-icon { padding: 8px; font-size: 1.05rem; }
    .search-trigger { padding: 8px; }
}

/* --- Hero: descrição e botões mais legíveis --- */
@media (max-width: 768px) {
    .hero-body { padding: 0 16px; left: 0; right: 0; max-width: 100%; bottom: 12%; }
    .hero-title { font-size: 1.6rem; line-height: 1.2; margin-bottom: 8px; }
    .hero-infos { font-size: 0.82rem; gap: 10px; margin-bottom: 10px; }
    .hero-desc { font-size: 0.85rem; -webkit-line-clamp: 2; margin-bottom: 16px; }
    .hero-actions { gap: 10px; }
    .hero-dots { bottom: 3%; right: 16px; }
}

/* --- Carrossel: scroll suave por toque, cards tocáveis --- */
@media (max-width: 768px) {
    .content-section { padding: 0 12px; margin-bottom: 36px; }
    .section-head { margin-bottom: 12px; }
    .carousel { gap: 8px; padding: 8px 0 16px; -webkit-overflow-scrolling: touch; scroll-snap-type: x mandatory; }
    .card { scroll-snap-align: start; border-radius: 6px; }
    /* Desativa hover scale no touch (interfere com o toque) */
    @media (hover: none) {
        .card:hover { transform: none; box-shadow: none; }
        .card:hover .card-poster { filter: none; }
    }
}

/* --- Cards: tamanho ideal para celular --- */
@media (max-width: 480px) {
    .card { width: 115px; }
    .carousel { gap: 7px; }
    .content-section { padding: 0 10px; margin-bottom: 28px; }
    .section-title { font-size: 1rem; }
}

/* --- Busca: dropdown ocupa a tela toda no celular --- */
@media (max-width: 480px) {
    .search-results {
        position: fixed;
        top: var(--navbar-h);
        left: 0;
        right: 0;
        width: 100%;
        max-height: calc(100vh - var(--navbar-h));
        border-radius: 0;
        border-left: none;
        border-right: none;
    }
    .search-box.open .search-input { width: 150px; }
}

/* --- Notificações: painel ocupa largura total no celular --- */
@media (max-width: 480px) {
    .notif-panel {
        position: fixed;
        top: var(--navbar-h);
        left: 0;
        right: 0;
        width: 100% !important;
        border-radius: 0;
        border-left: none;
        border-right: none;
        max-height: calc(100vh - var(--navbar-h));
        overflow-y: auto;
    }
}

/* --- Profile dropdown: centraliza no celular --- */
@media (max-width: 480px) {
    .profile-dropdown {
        position: fixed;
        top: var(--navbar-h);
        right: 0;
        left: 0;
        width: 100%;
        border-radius: 0;
        border-left: none;
        border-right: none;
    }
}

/* --- Modal: tela cheia e scroll melhorado no celular --- */
@media (max-width: 768px) {
    .modal-overlay { padding: 0; align-items: flex-end; }
    .modal-box {
        border-radius: 16px 16px 0 0;
        max-height: 92vh;
        width: 100%;
    }
    .modal-inner-lg { padding: 20px 18px 36px; }
    .modal-title-lg { font-size: 1.45rem; margin-bottom: 12px; }
    .modal-synopsis-lg { font-size: 0.9rem; }
    .modal-row-lg { font-size: 0.82rem; gap: 10px; }
    .modal-header .modal-hero-actions { bottom: 18px; left: 16px; gap: 8px; }
    .discord-modal-close { top: 12px; right: 12px; width: 32px; height: 32px; }
    .genre-pills { gap: 8px; }
    .genre-pill { padding: 5px 12px; font-size: 0.78rem; }
}

/* --- Player: controles tocáveis no celular --- */
@media (max-width: 768px) {
    .player-ctrls { padding: 0 12px 16px; }
    .ctrl-btn { padding: 10px; font-size: 1.1rem; }
    .ctrl-btn.play-big { font-size: 1.5rem; }
    .ctrl-left { gap: 10px; }
    .ctrl-right { gap: 10px; }
    .vol-range { width: 55px; }
    .time-label { font-size: 0.75rem; }
    .player-film-title { font-size: 1rem; }
    .player-ph-title { font-size: 2.2rem; }
}

/* --- Perfil gate: cards menores e melhor encaixe --- */
@media (max-width: 480px) {
    .profile-gate-inner { transform: none; }
    .profile-gate-title { font-size: 1.45rem; margin-bottom: 28px; }
    .profile-gate-list { gap: 18px; margin-bottom: 28px; }
    .profile-gate-card { width: 100px; gap: 10px; }
    .profile-gate-avatar { width: 90px; height: 90px; font-size: 1.9rem; }
    .profile-gate-name { font-size: 1rem; max-width: 100px; }
    .profile-manage-btn { min-width: 180px; min-height: 48px; font-size: 1rem; }
}

/* --- Avatar picker: boa rolagem horizontal no celular --- */
@media (max-width: 480px) {
    .avatar-picker-box { padding: 20px 14px 20px; border-radius: 12px; }
    .avatar-picker-item { width: 60px; height: 60px; border-radius: 10px; }
    .avt-row { gap: 8px; padding-bottom: 10px; }
}

/* --- Footer: legível e compacto --- */
@media (max-width: 480px) {
    .site-footer { padding: 36px 16px 24px; margin-top: 24px; }
    .footer-links { grid-template-columns: repeat(2, 1fr); gap: 10px; }
    .footer-links a { font-size: 0.78rem; }
    .footer-soc { gap: 16px; margin-bottom: 22px; }
    .footer-soc a { font-size: 1.2rem; }
    .footer-bottom { flex-direction: column; text-align: center; gap: 6px; }
}

/* --- Toast: bem visível na parte inferior --- */
@media (max-width: 480px) {
    .toast-box { bottom: 12px; right: 10px; left: 10px; }
    .toast { padding: 12px 14px; font-size: 0.82rem; gap: 10px; border-radius: 10px; }
}

/* --- Previne zoom indesejado em inputs no iOS --- */
@media (max-width: 768px) {
    input, select, textarea { font-size: 16px !important; }
}