@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700;800&family=Space+Grotesk:wght@500;600;700&display=swap');

:root {
    --bg: #10101d;
    --surface: #191927;
    --surface-2: #202034;
    --line: rgba(255,255,255,.09);
    --text: #f7f5ff;
    --muted: #aaa9bf;
    --pink: #ff4fb8;
    --purple: #8b63ff;
    --lime: #c6ff5e;
}
* { box-sizing: border-box; }
body { background: radial-gradient(ellipse at top right, rgba(119,70,208,.16), transparent 36rem), var(--bg); color: var(--text); font-family: 'DM Sans', sans-serif; min-height: 100vh; padding-bottom: 2rem; }
a { color: #d6c5ff; text-decoration: none; }
a:hover { color: #fff; }
h1, h2, h3, .navbar-brand { font-family: 'Space Grotesk', sans-serif; }
.party-nav { background: rgba(16,16,29,.92); border-bottom: 1px solid var(--line); backdrop-filter: blur(15px); }
.navbar-brand { letter-spacing: -.04em; }
.brand-mark { color: var(--lime); margin-right: .3rem; }
.page-wrap { min-height: calc(100vh - 130px); padding-top: 1.5rem; padding-bottom: 3.5rem; }
.btn-party { background: linear-gradient(110deg, var(--pink), #9a5dff); border: 0; color: white; font-weight: 700; box-shadow: 0 8px 24px rgba(204,69,188,.19); }
.btn-party:hover, .btn-party:focus { color: white; transform: translateY(-1px); filter: brightness(1.08); }
.is-disabled-loading { pointer-events: none; opacity: .65; cursor: progress; }
.is-loading { opacity: 1; }
.btn-spinner { display: inline-block; width: 1em; height: 1em; margin-right: .5em; vertical-align: -.15em; border: .15em solid currentColor; border-right-color: transparent; border-radius: 50%; animation: btn-spin .7s linear infinite; }
@keyframes btn-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .btn-spinner { animation-duration: 1.6s; } }
.btn-outline-light { border-color: rgba(255,255,255,.26); }
.hero-panel { position: relative; overflow: hidden; border-radius: 1.5rem; padding: 2rem 1.4rem; background: linear-gradient(115deg, #252040, #24223b 54%, #422756); border: 1px solid var(--line); }
.hero-panel h1 { font-size: clamp(2.2rem, 7vw, 4.1rem); font-weight: 700; letter-spacing: -.06em; max-width: 650px; }
.hero-panel h1 span { color: var(--lime); }
.hero-panel p { color: var(--muted); }
.eyebrow { color: var(--pink); font-size: .72rem; font-weight: 800; letter-spacing: .17em; margin-bottom: .5rem; }
.hero-spark { position: absolute; font-size: 9rem; line-height: 1; right: 7%; top: 7%; color: rgba(198,255,94,.75); transform: rotate(12deg); }
.section-title { font-size: 1.35rem; font-weight: 700; }
.event-card-link { display: block; height: 100%; color: var(--text); }
.event-card { overflow: hidden; height: 100%; border: 1px solid var(--line); border-radius: 1.2rem; background: var(--surface); transition: transform .2s, border-color .2s; }
.event-card-link:hover { color: var(--text); }
.event-card-link:hover .event-card { transform: translateY(-3px); border-color: rgba(255,79,184,.5); }
.event-cover { height: 170px; background: linear-gradient(135deg,#46255d,#24213c); background-size: cover; background-position: center; }
.event-content { padding: 1rem; }
.event-content h3 { font-size: 1.2rem; margin: 0; }
.event-content p { color: var(--muted); font-size: .9rem; margin: .75rem 0; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.event-date { color: #c9c5dc; font-size: .82rem; }
.status-badge { display: inline-flex; border-radius: 100px; padding: .35rem .65rem; font-size: .72rem; font-weight: 800; white-space: nowrap; }
.status-upcoming { color: #ded7ff; background: rgba(155,142,190,.2); }
.status-live { color: #d7ff91; background: rgba(137,206,70,.17); }
.status-finished { color: #ffb0bd; background: rgba(255,83,116,.17); }
.empty-state { padding: 2.5rem 1rem; text-align: center; background: var(--surface); border: 1px dashed rgba(255,255,255,.17); border-radius: 1rem; color: var(--muted); }
.empty-state h3 { color: var(--text); font-size: 1.25rem; }
.empty-state.compact { padding: 1.2rem; }
.empty-icon { font-size: 2.5rem; margin-bottom: .5rem; }
.event-hero { background-size: cover; background-position: center; border: 1px solid var(--line); border-radius: 1.4rem; min-height: 280px; display: flex; align-items: end; padding: 1.4rem; }
.event-hero-copy { max-width: 760px; }
.event-hero h1 { font-size: clamp(2rem, 6vw, 3.5rem); letter-spacing: -.05em; }
.event-hero p { color: #d2cfe0; }
.countdown { display: inline-block; border-radius: 100px; padding: .5rem .8rem; color: var(--lime); background: rgba(198,255,94,.1); font-weight: 700; font-variant-numeric: tabular-nums; }
.quest-list { display: grid; gap: .65rem; margin: 0; padding: 0; }
.quest-list-item { display: grid; grid-template-columns: 78px minmax(0,1fr); gap: .85rem; align-items: center; padding: .75rem; border: 1px solid var(--line); border-radius: .95rem; background: var(--surface); }
.quest-list-item.is-completable { cursor: pointer; }
.quest-list-item.is-completable:hover { border-color: rgba(255,79,184,.58); }
.quest-list-item.is-completable:focus-visible { outline: 3px solid var(--lime); outline-offset: 3px; }
.quest-list-item.quest-done { border-color: rgba(148,236,102,.58); box-shadow: inset 3px 0 #94ec66; }
.quest-photo { width: 78px; height: 78px; border-radius: .7rem; background: linear-gradient(130deg,#41295d,#29273e); background-position: center; background-size: cover; }
.quest-body { min-width: 0; }
.quest-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: .5rem; }
.quest-body h3 { flex: 1; min-width: 0; margin: 0; font-size: 1.05rem; font-weight: 700; overflow-wrap: anywhere; }
.quest-description { color: var(--muted); font-size: .86rem; margin: .35rem 0 .6rem; }
.quest-list-footer { display: flex; justify-content: space-between; align-items: center; gap: .65rem; flex-wrap: wrap; }
.quest-social { display: flex; align-items: center; gap: .8rem; }
.quest-action { margin-left: auto; }
.quest-complete-button { min-width: 170px; min-height: 54px; padding: .75rem 1.2rem; font-size: 1.02rem; font-weight: 800; }
.points-pill { display: inline-flex; flex: 0 0 auto; align-items: center; justify-content: center; width: auto; height: auto; min-height: 0; aspect-ratio: auto; color: #e7ffb5; background: rgba(125,169,35,.19); border: 1px solid rgba(198,255,94,.2); border-radius: 999px; padding: .32rem .62rem; white-space: nowrap; font-weight: 800; font-size: .78rem; line-height: 1.2; }
.quest-completers { display: inline-flex; align-items: center; }
.quest-completer-avatar { width: 27px; height: 27px; margin-right: -7px; border-color: var(--surface); }
.quest-completers > span { margin-left: 12px; }
.done-label { color: #b9ff8c; font-weight: 800; }
.proposal-section { max-width: 760px; }
.proposal-list { display: grid; gap: .6rem; }
.proposal-row { display: flex; align-items: center; justify-content: space-between; gap: .8rem; padding: .85rem 1rem; border: 1px solid var(--line); border-radius: .8rem; background: var(--surface); }
.proposal-status { display: inline-flex; flex: 0 0 auto; align-items: center; border-radius: 999px; padding: .35rem .65rem; font-size: .78rem; font-weight: 800; }
.proposal-pending { color: #ffe6a3; background: rgba(225,170,48,.18); }
.proposal-accepted { color: #c5ff9c; background: rgba(117,201,72,.18); }
.proposal-rejected { color: #ffb3c0; background: rgba(244,89,118,.18); }
.proposal-filters { display: flex; flex-wrap: wrap; gap: .5rem; }
.proposal-vote-row { align-items: center; }
.proposal-vote-info { min-width: 0; }
.vote-button { min-height: 44px; padding-inline: 1rem; font-weight: 700; white-space: nowrap; }
.vote-count { font-weight: 800; white-space: nowrap; }
.proposal-admin-list { display: grid; gap: 1rem; }
.proposal-admin-card { display: flex; gap: 1rem; padding: 1rem; border: 1px solid var(--line); border-radius: 1rem; background: var(--surface); }
.proposal-admin-photo { width: 112px; height: 112px; flex: 0 0 auto; object-fit: cover; border-radius: .75rem; }
.proposal-admin-content { min-width: 0; flex: 1; }
.proposal-description { color: #e2dfef; white-space: normal; }
.proof-link { display: flex; align-items: center; justify-content: center; width: 100%; min-height: 52px; margin-top: .7rem; padding: .65rem .9rem; border: 1px solid rgba(196,165,255,.6); border-radius: .7rem; color: #f0e8ff; background: rgba(139,99,255,.2); font-size: .98rem; font-weight: 800; text-align: center; }
.proof-link:hover, .proof-link:focus-visible { color: #fff; border-color: #d4bcff; background: rgba(139,99,255,.34); }
.leaderboard-list { display: grid; gap: .65rem; }
.leader-row { display: flex; align-items: center; gap: .8rem; padding: .8rem; background: var(--surface); border: 1px solid var(--line); border-radius: .9rem; }
.leader-row.rank-1 { border-color: #ffd43b; background: linear-gradient(100deg,#604508,#332914 76%); box-shadow: inset 4px 0 #ffd43b, 0 0 18px rgba(255,196,52,.18); }
.leader-row.rank-2 { border-color: #c7d0df; background: linear-gradient(100deg,#424d60,#292b3a 76%); box-shadow: inset 4px 0 #d7e0ee; }
.leader-row.rank-3 { border-color: #e99a62; background: linear-gradient(100deg,#673817,#34251e 76%); box-shadow: inset 4px 0 #f39a5c; }
.leader-row.rank-1 .leader-points { color: #ffe478; }
.leader-row.rank-2 .leader-points { color: #ecf1fb; }
.leader-row.rank-3 .leader-points { color: #ffc095; }
.rank-number { min-width: 2.1rem; font-size: 1.1rem; text-align: center; font-weight: 800; }
.avatar { width: 42px; height: 42px; object-fit: cover; border-radius: 50%; border: 2px solid rgba(255,255,255,.12); }
.avatar-sm { width: 30px; height: 30px; }
.leader-user { display: grid; flex: 1; }
.leader-user span { color: var(--muted); font-size: .77rem; }
.leader-points { color: var(--lime); font-size: 1.1rem; font-weight: 800; white-space: nowrap; }
.leader-points small { font-size: .7rem; }
.auth-shell { display: flex; justify-content: center; padding: 1rem 0 2rem; }
.auth-card { width: 100%; max-width: 500px; padding: 1.5rem; background: var(--surface); border: 1px solid var(--line); border-radius: 1.25rem; box-shadow: 0 20px 70px rgba(0,0,0,.2); }
.auth-card h1 { font-size: 2rem; letter-spacing: -.04em; }
.auth-icon { text-align: center; font-size: 2.4rem; }
.form-control, .form-select { color: var(--text); background-color: #11111e; border-color: rgba(255,255,255,.13); }
.form-control:focus, .form-select:focus { color: var(--text); background-color: #11111e; border-color: var(--purple); box-shadow: 0 0 0 .2rem rgba(139,99,255,.17); }
.form-control::placeholder { color: #7e7c92; }
.form-label { color: #e5e2ef; font-size: .9rem; font-weight: 600; }
.form-text { color: var(--muted); }
.form-page { max-width: 780px; margin: auto; }
.form-panel { margin-top: 1.3rem; padding: 1.3rem; border-radius: 1rem; border: 1px solid var(--line); background: var(--surface); }
.page-heading { margin: .5rem 0 1.5rem; }
.page-heading h1 { font-size: clamp(2rem, 6vw, 3rem); letter-spacing: -.05em; }
.back-link { color: #c7bbdf; font-size: .9rem; }
.detail-card { overflow: hidden; border: 1px solid var(--line); background: var(--surface); border-radius: 1.2rem; }
.detail-cover { width: 100%; height: 240px; object-fit: cover; background: var(--surface-2); }
.quest-detail-heading { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; }
.quest-detail-heading h1 { margin: 0 0 .4rem; }
.quest-detail-points { display: inline-flex; flex: 0 0 auto; align-items: baseline; gap: .35rem; padding: .45rem .75rem; border: 1px solid rgba(198,255,94,.32); border-radius: .7rem; color: #e7ffb5; background: rgba(125,169,35,.16); white-space: nowrap; }
.quest-detail-points strong { font-family: 'Space Grotesk',sans-serif; font-size: 1.2rem; }
.quest-detail-points span { font-size: .78rem; font-weight: 700; }
.proof-grid { display: grid; grid-template-columns: repeat(auto-fill,minmax(min(100%,250px),1fr)); gap: 1rem; }
.proof-card { overflow: hidden; border: 1px solid var(--line); background: #141421; border-radius: .9rem; }
.proof-media { display: block; width: 100%; height: 220px; object-fit: cover; background: #080810; }
.proof-card > a .proof-media { cursor: zoom-in; }
.proof-points { display: inline-block; border-radius: .45rem; padding: .18rem .45rem; color: #e7ffb5; background: rgba(125,169,35,.18); font-size: .76rem; font-weight: 800; white-space: nowrap; }
.proof-no-photo { height: 130px; display: grid; place-items: center; font-size: 2.2rem; background: linear-gradient(140deg,#2d2348,#2c2636); }
.profile-avatar { width: 100px; height: 100px; object-fit: cover; border-radius: 50%; border: 3px solid var(--pink); }
.stat-card { display: grid; gap: .1rem; background: var(--surface); border: 1px solid var(--line); border-radius: 1rem; padding: 1rem; }
.stat-card > span { font-size: 1.3rem; }
.stat-card strong { font-size: 1.8rem; font-family: 'Space Grotesk',sans-serif; }
.stat-card small { color: var(--muted); }
.admin-link-card { display: grid; gap: .35rem; padding: 1.1rem; min-height: 130px; border: 1px solid var(--line); border-radius: 1rem; background: var(--surface); font-size: 1.4rem; }
.admin-link-card strong { color: var(--text); font-size: 1rem; }
.admin-link-card span { color: var(--muted); font-size: .8rem; }
.admin-event-card { background: var(--surface); border: 1px solid var(--line); border-radius: 1rem; padding: 1rem; }
.completion-tabs { display: flex; gap: .5rem; border-bottom: 1px solid var(--line); }
.completion-tabs a { display: inline-flex; align-items: center; gap: .45rem; padding: .65rem .85rem; color: var(--muted); border-bottom: 2px solid transparent; }
.completion-tabs a.is-active { color: #fff; border-color: var(--pink); }
.completion-tabs a span { min-width: 1.35rem; padding: .08rem .35rem; border-radius: 100px; color: #ded7ff; background: rgba(155,142,190,.2); font-size: .75rem; text-align: center; }
.completion-filters { display: flex; align-items: end; gap: .8rem; padding: 1rem; border: 1px solid var(--line); border-radius: .9rem; background: var(--surface); }
.completion-filter-field { flex: 1 1 240px; min-width: 0; }
.completion-filter-field .form-label { margin-bottom: .35rem; }
.completion-filter-actions { display: flex; gap: .5rem; }
.party-table { --bs-table-bg: transparent; --bs-table-color: var(--text); --bs-table-border-color: var(--line); min-width: 640px; }
.party-table th { color: var(--muted); font-size: .76rem; text-transform: uppercase; letter-spacing: .08em; }
.role-tag { background: rgba(139,99,255,.16); color: #d7caff; padding: .25rem .55rem; border-radius: 100px; font-size: .78rem; }
.alert { border: 0; }
.alert-success { background: #163624; color: #ccffd5; }
.alert-danger { background: #401e2a; color: #ffd0d7; }
.party-modal, .party-modal .modal-header, .party-modal .modal-body, .party-modal .modal-footer {
    color: #f7f5ff !important;
    background-color: #191927 !important;
}
.party-modal { border: 1px solid rgba(255,255,255,.18) !important; }
.party-modal .modal-title, .party-modal .modal-body strong { color: #fff !important; }
.party-modal .modal-header, .party-modal .modal-footer { border-color: rgba(255,255,255,.14) !important; }
.party-modal .btn-close { filter: none; opacity: .8; }
.party-modal .btn-outline-light { color: #fff !important; }
.mobile-dock { position: fixed; z-index: 1030; bottom: 0; left: 0; right: 0; padding: .5rem max(1rem,env(safe-area-inset-left)) calc(.5rem + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); background: rgba(21,21,35,.97); backdrop-filter: blur(12px); display: flex; justify-content: space-around; }
.mobile-dock a { display: grid; justify-items: center; gap: .1rem; color: #d9d2eb; font-size: 1.15rem; }
.mobile-dock span { font-size: .65rem; }
@media (min-width: 768px) { .hero-panel { padding: 3rem; } .event-hero { padding: 2.2rem; min-height: 360px; } .auth-card { padding: 2rem; } .form-panel { padding: 2rem; } }
@media (min-width: 768px) { .quest-list-item { grid-template-columns: 104px minmax(0,1fr); gap: 1.15rem; padding: .85rem 1rem; } .quest-photo { width: 104px; height: 88px; } .quest-body h3 { font-size: 1.15rem; } .quest-description { margin-bottom: .4rem; } }
@media (max-width: 575.98px) { .hero-spark { right: -1rem; top: 2rem; opacity: .35; } .hero-panel h1 { max-width: 300px; } .event-hero { min-height: 310px; } .page-wrap { padding-top: 1rem; } body { padding-bottom: 4.5rem; } }
@media (max-width: 575.98px) { .proposal-admin-card { flex-direction: column; } .proposal-admin-photo { width: 100%; max-width: 280px; height: auto; aspect-ratio: 4 / 3; } .proposal-row { align-items: flex-start; flex-direction: column; } }
@media (max-width: 380px) { .quest-list-item { grid-template-columns: 62px minmax(0,1fr); gap: .6rem; padding: .6rem; } .quest-photo { width: 62px; height: 68px; } .quest-list-footer { align-items: flex-start; flex-direction: column; gap: .45rem; } .quest-action { margin-left: 0; } }
@media (max-width: 380px) { .quest-detail-heading { gap: .5rem; } .quest-detail-points { align-items: center; gap: .25rem; padding: .35rem .5rem; } .quest-detail-points strong { font-size: 1rem; } .quest-detail-points span { font-size: .7rem; } }
@media (max-width: 575.98px) { .quest-action { width: 100%; } .quest-complete-button { width: 100%; } .completion-filters { align-items: stretch; flex-direction: column; } .completion-filter-field { flex-basis: auto; width: 100%; } .completion-filter-actions { width: 100%; } .completion-filter-actions .btn { flex: 1; } }
