/* Voryli theme — mobile first, built on Bulma 1.0 CSS variables */
:root,
[data-theme="dark"] {
  --v-bg: #10131C;
  --v-panel: #1A2030;
  --v-panel-2: #222a3d;
  --v-border: #2c3550;
  --v-brand: #7C5CFC;
  --v-brand-soft: rgba(124, 92, 252, .16);
  --v-accent: #27D9C4;
  --v-text: #F4F5F7;
  --v-text-2: #A9B2C7;
  --v-danger: #F0616D;
  --v-warning: #F5A623;
  --v-radius: 18px;

  --bulma-scheme-h: 224;
  --bulma-scheme-s: 27%;
  --bulma-primary-h: 252deg;
  --bulma-primary-s: 96%;
  --bulma-primary-l: 67%;
  --bulma-link-h: 252deg;
  --bulma-link-s: 96%;
  --bulma-link-l: 74%;
  --bulma-success-h: 173deg;
  --bulma-success-s: 70%;
  --bulma-success-l: 50%;
  --bulma-danger-h: 355deg;
  --bulma-danger-s: 83%;
  --bulma-danger-l: 66%;
  --bulma-info-h: 214deg;
  --bulma-warning-h: 37deg;
  --bulma-radius: 12px;
  --bulma-radius-large: 18px;
  --bulma-body-background-color: var(--v-bg);
  --bulma-body-color: var(--v-text);
  --bulma-text: var(--v-text);
  --bulma-text-strong: #ffffff;
  --bulma-text-weak: var(--v-text-2);
  --bulma-family-primary: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --bulma-card-background-color: var(--v-panel);
  --bulma-box-background-color: var(--v-panel);
  --bulma-input-background-color: #141a27;
  --bulma-input-border-color: var(--v-border);
  --bulma-input-color: var(--v-text);
  --bulma-border: var(--v-border);
  --bulma-table-background-color: transparent;
  --bulma-table-color: var(--v-text);
  --bulma-table-cell-border-color: var(--v-border);
  --bulma-table-row-hover-background-color: var(--v-panel-2);
  --bulma-navbar-background-color: rgba(16, 19, 28, .92);
  --bulma-footer-background-color: #0c0f16;
}

html { background: var(--v-bg); scroll-behavior: smooth; }
body { background: var(--v-bg); color: var(--v-text); min-height: 100vh; display: flex; flex-direction: column; -webkit-font-smoothing: antialiased; }
main { flex: 1 0 auto; padding-bottom: 5.5rem; }
@media (min-width: 1024px) { main { padding-bottom: 2rem; } }
a { color: #b3a1ff; }
a:hover { color: #d4c9ff; }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, .button:focus-visible {
  outline: 3px solid var(--v-accent); outline-offset: 2px;
}
.title, .subtitle { color: var(--v-text); }
.subtitle, .has-text-weak, .help { color: var(--v-text-2) !important; }
.help.is-danger { color: #ffb3b9 !important; font-weight: 600; }
.field:has(.help.is-danger) :is(.input, .textarea, .select select) { border-color: var(--v-danger); }
.skip-link { position: absolute; left: -999px; top: 0; z-index: 1000; background: var(--v-brand); color: #fff; padding: .5rem 1rem; }
.skip-link:focus { left: .5rem; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.h-100 { height: 100%; }
[hidden] { display: none !important; }

/* Navbar */
.navbar { backdrop-filter: blur(10px); border-bottom: 1px solid var(--v-border); }
.navbar-item, .navbar-link { color: var(--v-text); }
.navbar-item.is-active, .navbar-item:hover { color: #fff; background: var(--v-brand-soft) !important; }
.navbar-menu { background: var(--v-bg); }
.brand { display: inline-flex; align-items: center; gap: .55rem; font-weight: 800; font-size: 1.3rem; letter-spacing: .02em; color: #fff !important; }
.brand img { width: 34px; height: 34px; }
.brand span { font-family: "Nunito", "Varela Round", "Trebuchet MS", system-ui, sans-serif; }
.notif-dot { display: inline-flex; min-width: 1.25rem; height: 1.25rem; padding: 0 .3rem; border-radius: 999px; background: var(--v-brand); color: #fff; font-size: .72rem; font-weight: 700; align-items: center; justify-content: center; margin-left: .25rem; }

/* Mobile bottom navigation */
.bottom-nav { position: fixed; bottom: 0; left: 0; right: 0; z-index: 40; display: flex; justify-content: space-around; background: rgba(16,19,28,.97); border-top: 1px solid var(--v-border); padding: .35rem .25rem calc(.35rem + env(safe-area-inset-bottom)); }
.bottom-nav a { flex: 1; display: flex; flex-direction: column; align-items: center; gap: .15rem; color: var(--v-text-2); font-size: .72rem; padding: .35rem 0; min-height: 48px; border-radius: 12px; }
.bottom-nav a.is-active { color: #fff; background: var(--v-brand-soft); }
.bottom-nav svg { width: 22px; height: 22px; }
@media (min-width: 1024px) { .bottom-nav { display: none; } }

.icon-svg { width: 1.15em; height: 1.15em; vertical-align: -0.18em; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* Cards & panels */
.card, .box { background: var(--v-panel); border-radius: var(--v-radius); box-shadow: 0 6px 24px rgba(0,0,0,.25); color: var(--v-text); border: 1px solid rgba(255,255,255,.04); }
.card-image img { border-radius: var(--v-radius) var(--v-radius) 0 0; }
.card .card-content { padding: 1rem 1.1rem; }
.panel-title { font-weight: 700; font-size: 1.1rem; margin-bottom: .75rem; }
.section { padding: 1.5rem 1rem; }
@media (min-width: 769px) { .section { padding: 2.5rem 1.5rem; } }

/* Buttons: large touch targets */
.button { min-height: 44px; border-radius: 12px; font-weight: 600; }
.button.is-large-touch { min-height: 56px; font-size: 1.1rem; padding-inline: 1.5rem; }
.button.is-primary { background: var(--v-brand); color: #fff; }
.button.is-primary:hover { background: #6b49f5; }
.button.is-accent { background: var(--v-accent); color: #062521; border: none; }
.button.is-accent:hover { background: #1fc4b0; color: #062521; }
.button.is-refuse { background: transparent; color: var(--v-danger); border: 2px solid var(--v-danger); }
.button.is-refuse:hover { background: rgba(240,97,109,.12); color: #ff8a93; }
.button.is-ghost-light { background: var(--v-panel-2); color: var(--v-text); border: 1px solid var(--v-border); }

.input, .textarea, .select select { background: #141a27; color: var(--v-text); border-color: var(--v-border); min-height: 44px; }
.input::placeholder, .textarea::placeholder { color: #7883a0; }
.label { color: var(--v-text); }
.checkbox:hover, .radio:hover { color: #fff; }
.checkbox input, .radio input { width: 1.1rem; height: 1.1rem; vertical-align: -0.15rem; margin-right: .35rem; accent-color: var(--v-brand); }

/* Hero */
.hero.is-voryli { background: radial-gradient(1200px 400px at 10% 0%, rgba(124,92,252,.35), transparent 60%), radial-gradient(800px 400px at 100% 100%, rgba(39,217,196,.18), transparent 60%), var(--v-bg); }
.hero .title { font-size: 2rem; line-height: 1.15; }
@media (min-width: 769px) { .hero .title { font-size: 3rem; } }
.stat { text-align: center; }
.stat strong { display: block; font-size: 1.6rem; color: #fff; }
.stat span { color: var(--v-text-2); font-size: .85rem; }

/* Rarity badges: colour + text label (colour is never the only cue) */
.rarity { display: inline-flex; align-items: center; gap: .35rem; padding: .2rem .6rem; border-radius: 999px; font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; border: 1px solid currentColor; background: rgba(0,0,0,.35); }
.rarity::before { content: ""; width: .55rem; height: .55rem; border-radius: 50%; background: currentColor; }
.rarity-epic, .rarity-legendary { box-shadow: 0 0 12px -2px currentColor; }
.vory-card.rarity-glow-epic { box-shadow: 0 0 0 1px rgba(155,107,255,.45), 0 8px 28px rgba(155,107,255,.18); }
.vory-card.rarity-glow-legendary { box-shadow: 0 0 0 1px rgba(245,166,35,.5), 0 8px 28px rgba(245,166,35,.2); }

/* Vory cards */
.vory-card { height: 100%; display: flex; flex-direction: column; overflow: hidden; transition: transform .15s ease; }
.vory-card:hover { transform: translateY(-2px); }
.vory-visual { position: relative; aspect-ratio: 4 / 3; display: flex; align-items: center; justify-content: center; background: linear-gradient(135deg, var(--rc, #7C5CFC) 0%, #1A2030 85%); }
.vory-visual img { width: 100%; height: 100%; object-fit: cover; }
.vory-visual .icon-svg { width: 34%; height: 34%; color: rgba(255,255,255,.85); stroke-width: 1.5; }
.vory-visual .rarity { position: absolute; top: .6rem; left: .6rem; }
.vory-visual .points { position: absolute; bottom: .6rem; right: .6rem; background: rgba(0,0,0,.55); color: #fff; padding: .15rem .55rem; border-radius: 999px; font-weight: 700; font-size: .8rem; }
.vory-card .card-content { flex: 1; display: flex; flex-direction: column; gap: .4rem; }
.vory-title { font-weight: 700; font-size: 1rem; color: #fff; line-height: 1.3; }
.status-tag { display: inline-flex; align-items: center; gap: .3rem; font-size: .75rem; font-weight: 600; padding: .2rem .55rem; border-radius: 8px; width: fit-content; }
.status-never { background: var(--v-panel-2); color: var(--v-text-2); }
.status-pending { background: rgba(245,166,35,.15); color: #ffc46b; }
.status-success { background: rgba(39,217,196,.15); color: var(--v-accent); }
.status-failed { background: rgba(240,97,109,.15); color: #ff8a93; }

/* Capture grid */
.capture-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: .6rem; }
@media (min-width: 769px) { .capture-grid { grid-template-columns: repeat(4, 1fr); gap: 1rem; } }
@media (min-width: 1216px) { .capture-grid { grid-template-columns: repeat(5, 1fr); } }
.capture-tile { position: relative; display: block; border-radius: 14px; overflow: hidden; background: var(--v-panel); aspect-ratio: 1; }
.capture-tile img { width: 100%; height: 100%; object-fit: cover; display: block; }
.capture-tile .overlay { position: absolute; inset: auto 0 0 0; padding: .5rem .6rem; background: linear-gradient(transparent, rgba(0,0,0,.85)); color: #fff; font-size: .8rem; }
.capture-tile .overlay strong { display: block; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.capture-tile .rarity { position: absolute; top: .45rem; left: .45rem; font-size: .65rem; }

/* Profile */
.profile-cover { height: 160px; background: linear-gradient(120deg, #2a1f63, #10131C 60%, #0f3d3a); background-size: cover; background-position: center; border-radius: 0 0 24px 24px; }
@media (min-width: 769px) { .profile-cover { height: 260px; } }
.profile-head { margin-top: -56px; display: flex; flex-direction: column; align-items: center; text-align: center; gap: .5rem; }
@media (min-width: 769px) { .profile-head { flex-direction: row; align-items: flex-end; text-align: left; gap: 1.25rem; } }
.avatar { border-radius: 50%; object-fit: cover; background: var(--v-panel-2); border: 3px solid var(--v-bg); }
.avatar-xl { width: 112px; height: 112px; }
.avatar-sm { width: 36px; height: 36px; border-width: 2px; }
.avatar-md { width: 48px; height: 48px; border-width: 2px; }
.score-big { font-size: 2.4rem; font-weight: 800; color: #fff; line-height: 1; }
.score-big small { font-size: .9rem; color: var(--v-text-2); font-weight: 600; }
.showcase { display: grid; grid-template-columns: repeat(2, 1fr); gap: .75rem; }
@media (min-width: 769px) { .showcase { grid-template-columns: repeat(5, 1fr); } }
.showcase .capture-tile { aspect-ratio: 3 / 4; border: 1px solid rgba(255,255,255,.08); box-shadow: 0 10px 30px rgba(0,0,0,.35); }
.showcase .capture-tile:first-child { grid-column: span 2; aspect-ratio: 4 / 3; }
@media (min-width: 769px) { .showcase .capture-tile:first-child { grid-column: auto; aspect-ratio: 3 / 4; } }
.breakdown { display: grid; grid-template-columns: repeat(2, 1fr); gap: .5rem; }
@media (min-width: 769px) { .breakdown { grid-template-columns: repeat(5, 1fr); } }
.breakdown div { background: var(--v-panel-2); border-radius: 12px; padding: .6rem .75rem; }
.breakdown strong { display: block; font-size: 1.15rem; color: #fff; }
.breakdown span { font-size: .78rem; color: var(--v-text-2); }

/* Discover */
.discover-wrap { max-width: 640px; margin: 0 auto; }
.discover-card { overflow: hidden; }
.discover-photo { background: #000; display: flex; align-items: center; justify-content: center; max-height: 62vh; min-height: 40vh; }
.discover-photo img { max-height: 62vh; width: 100%; object-fit: contain; }
.discover-actions { display: grid; grid-template-columns: 1fr 1fr; gap: .75rem; }
.art-panel { display: none; animation: rise .2s ease-out; }
.art-panel.is-open { display: block; }
.art-value { font-size: 2rem; font-weight: 800; color: var(--v-accent); text-align: center; }
input[type="range"].art-range { width: 100%; height: 44px; accent-color: var(--v-accent); }
.art-scale { display: flex; justify-content: space-between; font-size: .75rem; color: var(--v-text-2); }
.vote-feedback { animation: pop .35s ease-out; }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes pop { 0% { transform: scale(.95); opacity: .4; } 100% { transform: scale(1); opacity: 1; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

/* Upload */
.upload-drop { border: 2px dashed var(--v-border); border-radius: var(--v-radius); padding: 1.25rem; text-align: center; cursor: pointer; display: block; }
.upload-drop:hover, .upload-drop:focus-within { border-color: var(--v-brand); }
.upload-preview { max-height: 360px; margin: 0 auto; border-radius: 14px; display: none; }
.upload-preview.is-visible { display: block; }
.progress.is-brand::-webkit-progress-value { background: var(--v-brand); }
.progress.is-brand::-moz-progress-bar { background: var(--v-brand); }
.notice-final { border-left: 4px solid var(--v-warning); background: rgba(245,166,35,.1); padding: .75rem 1rem; border-radius: 10px; color: #ffd79a; }

/* Leaderboard */
.rank { width: 2.2rem; height: 2.2rem; display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; background: var(--v-panel-2); font-weight: 800; }
.rank-1 { background: #F5A623; color: #1b1300; }
.rank-2 { background: #C9D1E0; color: #111; }
.rank-3 { background: #C27A43; color: #1b0f00; }
.is-me { background: var(--v-brand-soft) !important; }

/* Tabs */
.tabs a { color: var(--v-text-2); border-bottom-color: var(--v-border); }
.tabs li.is-active a { color: #fff; border-bottom-color: var(--v-brand); }
.tabs ul { border-bottom-color: var(--v-border); }

/* Notifications */
.notif { display: flex; gap: .75rem; padding: .85rem 1rem; border-radius: 14px; background: var(--v-panel); margin-bottom: .5rem; border: 1px solid transparent; }
.notif.is-unread { border-color: var(--v-brand); }
.notif .dot { width: .6rem; height: .6rem; border-radius: 50%; background: var(--v-brand); margin-top: .45rem; flex: none; }

/* Cookie banner */
.cookie-banner { position: fixed; z-index: 60; left: .75rem; right: .75rem; bottom: calc(4.75rem + env(safe-area-inset-bottom)); max-width: 720px; margin: 0 auto; background: var(--v-panel); border: 1px solid var(--v-border); border-radius: var(--v-radius); padding: 1rem 1.1rem; box-shadow: 0 16px 40px rgba(0,0,0,.5); }
@media (min-width: 1024px) { .cookie-banner { bottom: 1rem; } }
.cookie-banner .buttons .button { flex: 1 1 30%; }
.cookie-banner[hidden] { display: none; }

/* Notifications (flash) */
.notification { border-radius: 12px; }
.notification.is-success { background: rgba(39,217,196,.14); color: #8ff3e6; }
.notification.is-danger { background: rgba(240,97,109,.14); color: #ffb3b9; }
.notification.is-warning { background: rgba(245,166,35,.14); color: #ffd79a; }
.notification.is-info { background: rgba(61,139,253,.14); color: #b8d4ff; }

/* Footer */
.footer { padding: 2rem 1rem 6rem; border-top: 1px solid var(--v-border); color: var(--v-text-2); }
@media (min-width: 1024px) { .footer { padding-bottom: 2rem; } }
.footer a { color: var(--v-text-2); }
.footer a:hover { color: #fff; }
.footer-links { display: flex; flex-wrap: wrap; gap: .4rem 1.1rem; justify-content: center; }
.link-button { background: none; border: none; color: var(--v-text-2); cursor: pointer; padding: 0; font: inherit; text-decoration: underline; }

/* Legal content */
.legal-content h2 { font-size: 1.35rem; margin: 1.5rem 0 .5rem; color: #fff; font-weight: 700; }
.legal-content h3 { font-size: 1.1rem; margin: 1.1rem 0 .4rem; color: #fff; font-weight: 700; }
.legal-content p, .legal-content li { color: var(--v-text); line-height: 1.65; }
.legal-content ul { list-style: disc; padding-left: 1.4rem; margin-bottom: 1rem; }

/* Admin */
.admin-layout { display: flex; min-height: 100vh; }
.admin-sidebar { width: 240px; background: #0c0f16; border-right: 1px solid var(--v-border); padding: 1rem .75rem; display: none; }
@media (min-width: 1024px) { .admin-sidebar { display: block; } }
.admin-sidebar .menu-list a { color: var(--v-text-2); border-radius: 10px; }
.admin-sidebar .menu-list a.is-active, .admin-sidebar .menu-list a:hover { background: var(--v-brand-soft); color: #fff; }
.admin-sidebar .menu-label { color: #7883a0; }
.admin-main { flex: 1; min-width: 0; padding: 1rem; }
@media (min-width: 1024px) { .admin-main { padding: 2rem; } }
.admin-mobile-nav { display: flex; gap: .4rem; overflow-x: auto; padding-bottom: .5rem; margin-bottom: 1rem; }
.admin-mobile-nav a { white-space: nowrap; }
@media (min-width: 1024px) { .admin-mobile-nav { display: none; } }
.kpi { background: var(--v-panel); border-radius: 14px; padding: 1rem; }
.kpi strong { display: block; font-size: 1.6rem; color: #fff; }
.kpi span { color: var(--v-text-2); font-size: .85rem; }
.table-wrap { overflow-x: auto; }
.table { font-size: .9rem; }
.table th { color: var(--v-text-2) !important; }
.thumb-sm { width: 56px; height: 56px; object-fit: cover; border-radius: 8px; }
.tag.is-status { font-weight: 600; }
pre.details { white-space: pre-wrap; word-break: break-word; background: transparent; color: var(--v-text-2); padding: 0; font-size: .8rem; }
