:root {
    --bg: #0e0e12;
    --surface: #17171f;
    --surface-2: #1f1f2b;
    --text: #ece9f1;
    --muted: #9b97ad;
    --accent: #ff5470;
    --accent-2: #ffd166;
    --line: #2a2a38;
    --radius: 12px;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font: 16px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
}

.wrap { width: 100%; max-width: 720px; margin: 0 auto; padding: 0 16px; }

/* Header */
.site-header {
    border-bottom: 1px solid var(--line);
    background: linear-gradient(180deg, #14141c, var(--bg));
    padding: 28px 0 20px;
}
.site-header .wrap { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.brand {
    display: inline-flex; align-items: center; gap: 7px; line-height: 1;
    font-size: 1.7rem; font-weight: 800; letter-spacing: -0.02em;
    color: var(--text); text-decoration: none;
}
.brand-mark { width: 0.8em; height: 0.8em; fill: var(--accent); flex: none; display: block; }
.brand-accent { color: var(--accent); }
.avatar-sm.avatar-initials { font-size: 0.8rem; }

/* Hamburger + drawer */
.hamburger-btn {
    margin-left: auto; width: 40px; height: 40px; padding: 9px 8px;
    display: flex; flex-direction: column; justify-content: space-between;
    background: none; border: none; cursor: pointer;
}
.hamburger-btn span { display: block; height: 2px; border-radius: 2px;
    background: var(--text); transition: background .15s; }
.hamburger-btn:hover span { background: var(--accent); }
.drawer-backdrop { position: fixed; inset: 0; background: rgba(0,0,0,0.5);
    opacity: 0; transition: opacity .2s ease; z-index: 40; }
.drawer-backdrop.show { opacity: 1; }
.drawer {
    position: fixed; top: 0; right: 0; bottom: 0; width: 280px; max-width: 84vw;
    background: var(--surface); border-left: 1px solid var(--line);
    transform: translateX(100%); transition: transform .2s ease; z-index: 50;
    padding: 18px; display: flex; flex-direction: column; gap: 6px;
}
.drawer.open { transform: translateX(0); }
.drawer-close { align-self: flex-end; background: none; border: none;
    color: var(--muted); font-size: 1.7rem; line-height: 1; cursor: pointer; padding: 0 4px; }
.drawer-close:hover { color: var(--text); }
.drawer-account { display: flex; align-items: center; gap: 12px;
    padding: 8px 6px 16px; border-bottom: 1px solid var(--line); color: var(--text); }
.drawer-account-avatar { display: flex; flex: none; }
.drawer-account-meta { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.drawer-username { font-weight: 700; color: var(--text); text-decoration: none; }
.drawer-account-link { color: var(--muted); font-size: 0.85rem; text-decoration: none; }
.drawer-username:hover, .drawer-account-link:hover { color: var(--accent); }
.drawer-nav { display: flex; flex-direction: column; padding: 8px 0; }
.drawer-nav a { color: var(--text); text-decoration: none; padding: 11px 6px;
    border-radius: 8px; font-weight: 600; }
.drawer-nav a:hover { background: var(--surface-2); color: var(--accent); }
.drawer-logout { margin-top: auto; }
.drawer-logout .btn { width: 100%; }
.tagline { flex-basis: 100%; margin: 2px 0 0; color: var(--muted); font-size: 0.95rem; }

/* Buttons */
.btn {
    display: inline-block; padding: 8px 14px; border-radius: 8px;
    border: 1px solid var(--line); background: var(--surface-2);
    color: var(--text); font: inherit; font-weight: 600; font-size: 0.9rem;
    cursor: pointer; text-decoration: none; line-height: 1.2;
}
.btn:hover { border-color: var(--muted); }
.btn-sm { padding: 5px 11px; font-size: 0.85rem; }
.btn-primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn-primary:hover { filter: brightness(1.08); border-color: var(--accent); }

/* Auth + forms */
.auth-card { max-width: 380px; margin: 40px auto; background: var(--surface);
    border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.auth-card h1 { margin: 0 0 12px; font-size: 1.4rem; }
.auth-card form { display: grid; gap: 14px; margin-top: 16px; }
.auth-card label { display: grid; gap: 5px; font-size: 0.85rem; color: var(--muted); }
.auth-card input {
    padding: 10px 12px; border-radius: 8px; border: 1px solid var(--line);
    background: var(--bg); color: var(--text); font: inherit;
}
.auth-card textarea {
    padding: 10px 12px; border-radius: 8px; border: 1px solid var(--line);
    background: var(--bg); color: var(--text); font: inherit; resize: vertical;
}
.auth-card input:focus, .auth-card textarea:focus { outline: none; border-color: var(--accent); }

/* Avatars */
.avatar { border-radius: 50%; object-fit: cover; background: var(--surface-2); flex: none; }
.avatar-lg { width: 72px; height: 72px; }
.avatar-sm { width: 28px; height: 28px; }
.avatar-xl { width: 124px; height: 124px; }
.avatar-initials { display: inline-flex; align-items: center; justify-content: center;
    font-weight: 700; color: #fff; background: var(--accent); }
.avatar-lg.avatar-initials { font-size: 1.6rem; }
.avatar-xl.avatar-initials { font-size: 2.9rem; }
.avatar-field { display: flex; align-items: center; gap: 14px; }
.avatar-upload { flex: 1; gap: 5px; }
.avatar-upload input[type=file] { font-size: 0.82rem; color: var(--muted); }
.check-row { display: flex; flex-direction: row; align-items: flex-start; gap: 9px;
    color: var(--text); font-size: 0.9rem; }
.check-row input { width: auto; margin-top: 3px; }
.btn-danger { background: transparent; border-color: var(--accent); color: var(--accent); }
.btn-danger:hover { background: var(--accent); color: #fff; }
.danger-zone { margin-top: 28px; padding-top: 18px; border-top: 1px solid var(--line); }
.danger-zone h2 { font-size: 1rem; margin: 0 0 4px; }
.danger-zone p { margin: 0 0 12px; font-size: 0.85rem; }

/* Profile */
.profile-card { text-align: center; }
.profile-card .avatar-lg { margin: 0 auto 6px; }
.profile-card h1 { margin: 6px 0 2px; font-size: 1.4rem; }

.profile-header { display: flex; align-items: center; gap: 24px; margin: 10px 0 0; }
.profile-info { min-width: 0; }
.profile-name { margin: 0; font-size: 1.8rem; line-height: 1.1; }
.profile-fullname { margin: 3px 0 0; color: var(--muted); }
.profile-social { display: flex; align-items: center; gap: 7px; margin-top: 9px; width: fit-content;
    color: var(--muted); text-decoration: none; font-size: 0.92rem; }
.profile-social:hover { color: var(--text); }
.profile-bio { margin: 12px 0 0; line-height: 1.5; }
.profile-action { margin-top: 14px; min-width: 130px; }

.profile-stats { display: flex; align-items: center; gap: 10px; margin: 16px 0 0;
    font-size: 0.9rem; }
.profile-stats a { color: var(--muted); text-decoration: none; }
.profile-stats a:hover { color: var(--text); }
.profile-stats strong { color: var(--text); }
.stat-peek { display: inline-flex; margin-right: 4px; }
.stat-peek .avatar { width: 26px; height: 26px; margin-right: -8px; border: 2px solid var(--bg); }
.stat-peek .avatar-xs.avatar-initials { font-size: 0.72rem; }

.profile-tabs { display: flex; gap: 4px; background: var(--surface); border: 1px solid var(--line);
    border-radius: 10px; padding: 4px; margin: 22px 0 16px; }
.ptab { flex: 1; padding: 9px; border: none; background: none; color: var(--muted);
    font: inherit; font-weight: 600; border-radius: 7px; cursor: pointer; }
.ptab:hover:not(.is-active) { color: var(--text); }
.ptab.is-active { background: var(--surface-2); color: var(--text); }

.follow-btn { min-width: 92px; }
.follow-btn.following { background: var(--surface-2); border-color: var(--accent); color: var(--accent); }

/* User list (followers / following) */
.user-list { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 8px; }
.user-row { display: flex; align-items: center; gap: 8px; }
.user-row-link { flex: 1; min-width: 0; display: flex; align-items: center; gap: 12px; padding: 10px 12px;
    background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
    text-decoration: none; color: var(--text); }
.user-row-link:hover { border-color: var(--muted); }
.user-row-meta { display: flex; flex-direction: column; line-height: 1.25; }
.user-row-meta .muted { font-size: 0.83rem; }

/* Past-films poster grid */
.poster-grid { list-style: none; margin: 0; padding: 0;
    display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 12px; }
.poster-cell { display: flex; flex-direction: column; gap: 6px; }
.poster-cell img { width: 100%; aspect-ratio: 2/3; object-fit: cover;
    border-radius: 8px; background: var(--surface-2); }
.poster-cell-blank { display: flex; align-items: center; justify-content: center;
    aspect-ratio: 2/3; border-radius: 8px; background: var(--surface-2);
    color: var(--line); font-size: 1.6rem; }
.poster-cell-title { font-size: 0.78rem; color: var(--muted); line-height: 1.3;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.auth-card .btn { width: 100%; padding: 11px; }
.field-hint { color: var(--muted); font-size: 0.78rem; }
.form-error { background: rgba(255,84,112,0.12); border: 1px solid var(--accent);
    color: #ffb3c0; padding: 9px 12px; border-radius: 8px; font-size: 0.85rem; margin: 0; }
.auth-alt { margin: 18px 0 0; font-size: 0.9rem; color: var(--text); text-align: center; }
.auth-alt a { color: var(--accent); }
.badge-admin { display: inline-block; padding: 1px 7px; border-radius: 999px;
    background: var(--accent-2); color: #1a1300; font-size: 0.72rem; font-weight: 700;
    text-transform: uppercase; letter-spacing: 0.04em; }
.logout-form { margin-top: 16px; }

/* Flash messages */
.flashes { max-width: 420px; margin: 18px auto 0; display: grid; gap: 8px; }
.flash { margin: 0; padding: 9px 12px; border-radius: 8px; font-size: 0.85rem;
    border: 1px solid var(--line); }
.flash-ok { background: rgba(101,209,138,0.12); border-color: #65d18a; color: #b6f0c8; }
.flash-err { background: rgba(255,84,112,0.12); border-color: var(--accent); color: #ffb3c0; }

[hidden] { display: none !important; }

/* New-follower notification */
.notif { display: flex; align-items: center; gap: 12px; margin: 18px 0 0;
    padding: 10px 14px; border-radius: var(--radius); text-decoration: none;
    background: var(--surface); border: 1px solid var(--accent); color: var(--text); }
.notif:hover { background: var(--surface-2); }
.notif-avatars { display: inline-flex; flex: none; }
.notif-avatars .avatar { margin-right: -10px; border: 2px solid var(--surface); }
.notif-text { flex: 1; min-width: 0; font-size: 0.9rem; }
.notif-arrow { color: var(--accent); font-weight: 700; flex: none; }

/* "People you may know" rail */
.find-people { margin: 24px 0 0; }
.find-people-head { display: flex; align-items: baseline; gap: 10px;
    padding-bottom: 8px; border-bottom: 1px solid var(--line); }
.section-head { margin: 0; font-size: 0.72rem; font-weight: 600; color: var(--muted);
    text-transform: uppercase; letter-spacing: 0.14em; }
.find-people-close { margin-left: auto; background: none; border: none; color: var(--muted);
    font-size: 1.3rem; line-height: 1; cursor: pointer; padding: 0 2px; align-self: center; }
.find-people-close:hover { color: var(--text); }
.pymk-list { list-style: none; display: flex; gap: 12px; overflow-x: auto;
    margin: 14px 0 2px; padding: 2px 2px 8px; -webkit-overflow-scrolling: touch; }
.pymk-card { flex: 0 0 auto; width: 150px; display: flex; flex-direction: column;
    align-items: center; gap: 10px; text-align: center;
    background: var(--surface); border: 1px solid var(--line);
    border-radius: var(--radius); padding: 16px 14px; }
.pymk-link { display: flex; flex-direction: column; align-items: center; gap: 8px;
    text-decoration: none; color: var(--text); width: 100%; }
.pymk-username { font-weight: 700; font-size: 0.95rem; max-width: 100%;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pymk-name { font-size: 0.82rem; color: var(--muted); line-height: 1.25; max-width: 100%;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.pymk-card .follow-btn { width: 100%; margin-top: auto; }
.page-sub { margin: 0 0 14px; }

/* Followers hub */
.find-form { margin: 8px 0 0; }
.find-form .section-head { display: block; margin-bottom: 8px; }
.find-input-row { display: flex; gap: 8px; }
.find-input-row input { flex: 1; min-width: 0; padding: 9px 12px; border-radius: 8px;
    border: 1px solid var(--line); background: var(--bg); color: var(--text); font: inherit; }
.find-input-row input:focus { outline: none; border-color: var(--accent); }
.list-head { margin: 28px 0 0; padding-bottom: 8px; border-bottom: 1px solid var(--line); }
.row-ig { color: var(--muted); display: inline-flex; }
.row-ig:hover { color: var(--accent); }
.row-badge { font-size: 0.72rem; font-weight: 700; text-transform: uppercase;
    letter-spacing: 0.06em; color: var(--muted); border: 1px solid var(--line);
    border-radius: 999px; padding: 3px 9px; }

/* Homepage filters */
.filters { margin: 18px 0 4px; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.tabs { display: flex; gap: 6px; flex-wrap: wrap; }
.tab { background: var(--surface); border: 1px solid var(--line); color: var(--muted);
    border-radius: 999px; padding: 6px 14px; font: inherit; font-size: 0.85rem;
    font-weight: 600; cursor: pointer; }
.tab:hover { color: var(--text); }
.tab.is-active { background: var(--accent); border-color: var(--accent); color: #fff; }
.filter-row { display: flex; gap: 8px; }
#theater-filter {
    padding: 8px 12px; border-radius: 8px; border: 1px solid var(--line);
    background: var(--bg); color: var(--text); font: inherit; font-size: 0.9rem;
}
#theater-filter:focus { outline: none; border-color: var(--accent); }

/* Summary */
.summary { color: var(--muted); font-size: 0.85rem; text-transform: uppercase;
    letter-spacing: 0.06em; margin: 22px 0 4px; }
.empty { color: var(--muted); padding: 48px 0; text-align: center; }

/* Day sections */
.day { margin: 26px 0; }
.day-heading {
    font-size: 1.05rem; margin: 0 0 12px; padding-bottom: 8px;
    border-bottom: 1px solid var(--line); color: var(--accent-2);
    position: sticky; top: 0; background: var(--bg); z-index: 1;
}
.film-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }

/* Film card */
.film-card {
    position: relative;
    display: flex; gap: 14px; background: var(--surface);
    border: 1px solid var(--line); border-radius: var(--radius); padding: 12px;
}
.star {
    position: absolute; top: 7px; right: 7px; z-index: 2;
    background: none; border: none; cursor: pointer; padding: 4px;
    font-size: 1.3rem; line-height: 1; color: var(--line);
    transition: color .12s ease, transform .1s ease;
}
.star:hover { color: var(--muted); }
.star.active { color: var(--accent-2); }
.star:active { transform: scale(1.25); }
.poster { width: 80px; height: 120px; object-fit: cover; border-radius: 8px;
    flex: none; background: var(--surface-2); }
.film-body { min-width: 0; padding-right: 22px; }
.page-title { font-size: 1.5rem; margin: 24px 0 6px; }
.shows { margin: 10px 0 0; display: grid; gap: 5px; }
.show-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; font-size: 0.85rem; }
.show-when { font-variant-numeric: tabular-nums; color: var(--text); }
.film-title { margin: 2px 0 6px; font-size: 1.1rem; line-height: 1.25; }
.starred-by { display: inline-flex; vertical-align: middle; margin-left: 6px; }
.starred-by a { display: inline-flex; }
.starred-by .avatar-xs { width: 26px; height: 26px; margin-right: -7px;
    border: 2px solid var(--surface); }
.starred-by .avatar-xs.avatar-initials { font-size: 0.78rem; }
.film-title a { color: var(--text); text-decoration: none; }
.film-title a:hover { color: var(--accent); }
.film-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px;
    color: var(--muted); font-size: 0.85rem; }
.dot { color: var(--line); }
.rating { color: var(--accent-2); }
.theater { font-weight: 600; color: var(--text); }
.theater-hi-pointe { color: #6ec1ff; }
.theater-arkadin { color: #ff9e6e; }

.times { display: flex; flex-wrap: wrap; gap: 6px; margin: 9px 0 0; }
.time {
    font-variant-numeric: tabular-nums; font-size: 0.85rem; font-weight: 600;
    background: var(--surface-2); border: 1px solid var(--line);
    border-radius: 999px; padding: 3px 10px;
}
.overview {
    margin: 9px 0 0; color: var(--muted); font-size: 0.86rem; line-height: 1.45;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}

/* Footer */
.site-footer { border-top: 1px solid var(--line); margin-top: 40px; padding: 20px 0 40px; text-align: center; }
.site-footer p { margin: 4px 0; font-size: 0.85rem; }
.muted { color: var(--muted); }
