/* styles.css */

/* ═══════════════════════════════════════════════════════════════
   THEMES
   ═══════════════════════════════════════════════════════════════ */

:root {
    --bg:          #D2D3DD;
    --card-bg:     #AEB0C0;
    --nav-bg:      #282A31;
    --panel-bg:    #373b46;   /* slightly lighter than nav-bg for layered depth */
    --border:      rgba(255, 255, 255, 0.08);
    --border-mid:  rgba(255, 255, 255, 0.14);
    --text:        #ffffff;
    --text-sub:    rgba(255, 255, 255, 0.45);
    --text-dim:    rgba(255, 255, 255, 0.25);
    --primary:     #FFFF00;
    --primary-dim: rgba(245, 230, 66, 0.12);
    --primary-mid: rgba(245, 230, 66, 0.4);
    --danger:      #e05252;
}

[data-theme="dark"] {
    --bg:       #13141a;
    --card-bg:  #191b22;
    --nav-bg:   #0d0e13;
    --panel-bg: #13141a;
}

[data-theme="midnight"] {
    --bg:       #000000;
    --card-bg:  #080808;
    --nav-bg:   #080808;
}

[data-theme="web-warriors"] {
    --bg:       #161616;
    --card-bg:  #1e1e1e;
    --nav-bg:   #101010;
    --panel-bg: #151515;
}

[data-theme="web-warriors"]::before {
    content: '';
    position: fixed;
    inset: 0;
    background: url('../assets/backgrounds/gallery-cards/img_gallery_card_horizontal_01.png') center / cover no-repeat;
    opacity: 0.25;
    pointer-events: none;
    z-index: 0;
}

[data-theme="star-turn"] {
    --bg:       #161616;
    --card-bg:  #1e1e1e;
    --nav-bg:   #101010;
    --panel-bg: #151515;
}

[data-theme="star-turn"]::before {
    content: '';
    position: fixed;
    inset: 0;
    background: url('../assets/backgrounds/gallery-cards/img_gallerys1_card_horizontal_06.png') center / cover no-repeat;
    opacity: 0.2;
    pointer-events: none;
    z-index: 0;
}

[data-theme="plans-within-plans"] {
    --bg:       #161616;
    --card-bg:  #1e1e1e;
    --nav-bg:   #101010;
    --panel-bg: #151515;
}

[data-theme="plans-within-plans"]::before {
    content: '';
    position: fixed;
    inset: 0;
    background: url('../assets/backgrounds/gallery-cards/img_gallerys1_card_horizontal_07.png') center / cover no-repeat;
    opacity: 0.25;
    pointer-events: none;
    z-index: 0;
}

[data-theme="regenesis"] {
    --bg:       #161616;
    --card-bg:  #1e1e1e;
    --nav-bg:   #101010;
    --panel-bg: #151515;
}

[data-theme="regenesis"]::before {
    content: '';
    position: fixed;
    inset: 0;
    background: url('../assets/backgrounds/gallery-cards/img_gallerys2_card_horizontal_03.png') center / cover no-repeat;
    opacity: 0.25;
    pointer-events: none;
    z-index: 0;
}

[data-theme="inner-devil"] {
    --bg:       #161616;
    --card-bg:  #1e1e1e;
    --nav-bg:   #101010;
    --panel-bg: #151515;
}

[data-theme="inner-devil"]::before {
    content: '';
    position: fixed;
    inset: 0;
    background: url('../assets/backgrounds/gallery-cards/img_gallerys4_card_horizontal_04.png') center / cover no-repeat;
    opacity: 0.25;
    pointer-events: none;
    z-index: 0;
}

[data-theme="the-worst-of-times"] {
    --bg:       #161616;
    --card-bg:  #1e1e1e;
    --nav-bg:   #101010;
    --panel-bg: #151515;
}

[data-theme="the-worst-of-times"]::before {
    content: '';
    position: fixed;
    inset: 0;
    background: url('../assets/backgrounds/gallery-cards/Gallery_Card_-_The_Worst_Of_Times.webp') center / cover no-repeat;
    opacity: 0.25;
    pointer-events: none;
    z-index: 0;
}

[data-theme="frenzied-fighter"] {
    --bg:       #161616;
    --card-bg:  #1e1e1e;
    --nav-bg:   #101010;
    --panel-bg: #151515;
}

[data-theme="frenzied-fighter"]::before {
    content: '';
    position: fixed;
    inset: 0;
    background: url('../assets/backgrounds/mvps/mvp_2742.png') center / cover no-repeat;
    opacity: 0.4;
    pointer-events: none;
    z-index: 0;
}

[data-theme="dancefloor-duel"] {
    --bg:       #161616;
    --card-bg:  #1e1e1e;
    --nav-bg:   #101010;
    --panel-bg: #151515;
}

[data-theme="dancefloor-duel"]::before {
    content: '';
    position: fixed;
    inset: 0;
    background: url('../assets/backgrounds/mvps/mvp_2940.png') center / cover no-repeat;
    opacity: 0.3;
    pointer-events: none;
    z-index: 0;
}

/* ═══════════════════════════════════════════════════════════════
   BASE
   ═══════════════════════════════════════════════════════════════ */

*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    background: var(--bg);
    scrollbar-gutter: stable;
    scrollbar-width: thin;
    scrollbar-color: rgba(0, 0, 0, 0.22) transparent;
}

html::-webkit-scrollbar       { width: 5px; }
html::-webkit-scrollbar-track { background: transparent; }
html::-webkit-scrollbar-thumb { background: rgba(0,0,0,0.22); border-radius: 0; }
html::-webkit-scrollbar-thumb:hover { background: rgba(0,0,0,0.38); }

[data-theme="dark"] {
    scrollbar-color: rgba(255,255,255,0.15) transparent;
}

body {
    font-family: 'Onest', sans-serif;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

main {
    flex: 1;
    padding: 24px;
}

/* ═══════════════════════════════════════════════════════════════
   NAV
   ═══════════════════════════════════════════════════════════════ */

header {
    background: var(--nav-bg);
    position: sticky;
    top: 0;
    z-index: 50;
    /* Thin primary line along the very bottom of the header */
    border-bottom: 1px solid rgba(245, 230, 66, 0.18);
}

nav {
    display: flex;
    align-items: center;
    gap: 24px;
    padding: 0 20px;
    height: 52px;
    overflow-x: auto;
    scrollbar-width: none;
}

nav::-webkit-scrollbar { display: none; }

nav h1 {
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    white-space: nowrap;
    color: var(--primary);
    flex-shrink: 0;
    opacity: 0.9;
}

nav ul {
    display: flex;
    flex: 1;
    list-style: none;
    height: 100%;
    align-items: stretch;
    flex-shrink: 0;
}

nav ul li        { display: flex; }
nav ul li.nav-end { margin-left: auto; }

nav ul a {
    display: flex;
    align-items: center;
    padding: 0 16px;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    text-decoration: none;
    color: var(--text);
    opacity: 0.4;
    position: relative;
    transition: opacity 0.15s;
    cursor: pointer;
    white-space: nowrap;
}

/* Active underline indicator */
nav ul a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 16px;
    right: 16px;
    height: 2px;
    background: var(--primary);
    transform: scaleX(0);
    transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    transform-origin: left;
}

nav ul a:hover         { opacity: 0.8; }
nav ul a.active        { opacity: 1; color: var(--primary); }
nav ul a.active::after { transform: scaleX(1); }

nav ul a:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: -2px;
    opacity: 1;
}

/* ═══════════════════════════════════════════════════════════════
   CONTROL BAR
   ═══════════════════════════════════════════════════════════════ */

#hero-controls {
    display: inline-flex;
    align-items: center;
    height: 36px;
    margin-bottom: 20px;
    background: var(--nav-bg);
    clip-path: polygon(16px 0%, 100% 0%, calc(100% - 16px) 100%, 0% 100%);
    padding: 0 32px;
    max-width: 100%;
    overflow-x: auto;
    scrollbar-width: none;
    border: 1px solid var(--border-mid);
}

#hero-controls::-webkit-scrollbar { display: none; }

#hero-controls label {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0 16px;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--text-sub);
    height: 100%;
    white-space: nowrap;
    flex-shrink: 0;
    border-right: 1px solid var(--border);
}

#hero-controls label:last-child { border-right: none; }

#hero-controls select {
    background: transparent;
    border: none;
    color: var(--text);
    font-family: 'Onest', sans-serif;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    cursor: pointer;
    outline: none;
}

#hero-controls select option {
    background: var(--nav-bg);
    text-transform: none;
}

/* ═══════════════════════════════════════════════════════════════
   HERO GRID
   ═══════════════════════════════════════════════════════════════ */

#heroes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(var(--hero-card-min-size, 120px), 1fr));
    column-gap: 12px;
    row-gap: 8px;
}

/*
 * .hero-card-outer — the actual grid item.
 * position: relative so rank icon and level badge can be absolutely positioned.
 * NO clip-path here — clip-path would hide the absolutely-positioned children.
 */
.hero-card-outer {
    position: relative;
    margin-top: -10px;
    cursor: pointer;
}

/*
 * .hero-card-wrap — handles the yellow hover border via background reveal.
 * clip-path gives the parallelogram shape.
 * The 2px margin on .hero-card exposes this background as a shaped border.
 */
.hero-card-wrap {
    clip-path: polygon(0% 16px, 100% 0%, 100% calc(100% - 16px), 0% 100%);
    background: transparent;
    transition: background 0.15s;
}

.hero-card-outer:hover .hero-card-wrap,
.hero-card-outer:focus-visible .hero-card-wrap {
    background: var(--primary);
}

.hero-card-outer:focus-visible { outline: none; }

.hero-card {
    position: relative;
    background: var(--card-bg);
    aspect-ratio: 1 / 2;
    clip-path: polygon(0% 16px, 100% 0%, 100% calc(100% - 16px), 0% 100%);
    overflow: hidden;
    margin: 2px;
    transition: filter 0.15s;
}

.hero-card-outer:hover .hero-card,
.hero-card-outer:focus-visible .hero-card {
    filter: brightness(1.08);
}

.hero-card-portrait {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top;
}

/* ── Hero name overlay ───────────────────────────────────────── */

.hero-card-name {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 56px;
    background: linear-gradient(to bottom, transparent, rgba(0,0,0,0.88));
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0px 8px 0;
    pointer-events: none;
}

.hero-card-name span {
    display: block;
    max-width: 100%;
    font-weight: 700;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    color: #fff;
    text-shadow: 0 1px 4px rgba(0,0,0,1);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-align: center;

    /* Default size — overridden per card size below */
    font-size: 0.54rem;
}

/* Scale hero name text with card size */
[data-card-size="sm"] .hero-card-name span { font-size: 0.44rem; }
[data-card-size="md"] .hero-card-name span { font-size: 0.54rem; }
[data-card-size="lg"] .hero-card-name span { font-size: 0.68rem; }

/* ── Rank icon (bottom-left) ─────────────────────────────────── */

/*
 * Positioned on .hero-card-outer, outside any clip-path, so it is never clipped.
 */
.hero-card-rank-icon {
    position: absolute;
    bottom: -15px;
    left: -15px;
    width: 55px;
    height: 55px;
    object-fit: contain;
    pointer-events: none;
    z-index: 10;
    filter: drop-shadow(0 2px 6px rgba(0,0,0,0.9));
}

/* ── Level badge (bottom-right) ──────────────────────────────── */

/*
 * Positioned on .hero-card-outer, outside any clip-path.
 * Angular clip-path to match the Marvel Rivals aesthetic.
 * Scales slightly with card size.
 */
.hero-card-level {
    position: absolute;
    bottom: 36px;   /* sits above the rank icon which is at bottom: -15px */
    left: 5px;
    pointer-events: none;
    z-index: 10;
    color: var(--primary);
    font-family: 'Onest', sans-serif;
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    line-height: 1;
    text-shadow:
        0 0 6px rgba(0,0,0,1),
        0 1px 3px rgba(0,0,0,1),
        0 0 2px rgba(0,0,0,1);
}

[data-card-size="lg"] .hero-card-level {
    font-size: 0.78rem;
    bottom: 42px;
}

[data-card-size="sm"] .hero-card-level {
    font-size: 0.54rem;
    bottom: 30px;
}

/* ═══════════════════════════════════════════════════════════════
   CORNER ACCENT MARKS
   Used inside modals for the Marvel Rivals panel look.
   ═══════════════════════════════════════════════════════════════ */

.corner {
    position: absolute;
    width: 12px;
    height: 12px;
    pointer-events: none;
    z-index: 1;
}

.corner-tl {
    top: 8px;
    left: 8px;
    border-top: 2px solid var(--primary);
    border-left: 2px solid var(--primary);
    opacity: 0.7;
}

.corner-br {
    bottom: 8px;
    right: 8px;
    border-bottom: 2px solid var(--primary);
    border-right: 2px solid var(--primary);
    opacity: 0.7;
}

/* ═══════════════════════════════════════════════════════════════
   HERO PROFICIENCY MODAL (scoped to the heroes view)
   ═══════════════════════════════════════════════════════════════ */

#hero-modal {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
    padding: 16px;
}

#hero-modal-overlay {
    position: absolute;
    inset: 0;
    background: rgba(10, 11, 15, 0.82);
    backdrop-filter: blur(2px);
}

#hero-modal-inner {
    position: relative;
    background: var(--nav-bg);
    border: 1px solid var(--border-mid);
    /* Thin primary left edge accent */
    border-left: 3px solid rgba(245, 230, 66, 0.55);
    padding: 28px 28px 24px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    width: 100%;
    max-width: 300px;
}

/* Header row: tag + name */
#hero-modal-header {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.modal-tag {
    font-size: 0.6rem;
    font-weight: 700;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--primary);
    opacity: 0.8;
}

#modal-hero-name {
    font-size: 1.05rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--text);
    line-height: 1.2;
}

/* Rank + level selects */
#hero-modal-selects {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

#hero-modal-selects label {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

#hero-modal-selects label > span {
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--text-sub);
}

#modal-rank-select,
#modal-level-select {
    background: transparent;
    border: none;
    border-bottom: 1px solid rgba(255,255,255,0.2);
    border-radius: 0;
    color: var(--text);
    font-family: 'Onest', sans-serif;
    font-size: 0.9rem;
    font-weight: 600;
    padding: 8px 4px;
    cursor: pointer;
    outline: none;
    width: 100%;
    transition: border-color 0.15s;
}

#modal-rank-select:focus-visible,
#modal-level-select:focus-visible {
    border-bottom: 2px solid var(--primary);
}

#modal-rank-select option,
#modal-level-select option {
    background: var(--nav-bg);
    color: var(--text);
}

#modal-close {
    align-self: flex-start;
    background: transparent;
    border: 1px solid var(--border-mid);
    border-radius: 0;
    color: var(--text);
    font-family: 'Onest', sans-serif;
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    padding: 7px 18px;
    cursor: pointer;
    opacity: 0.55;
    transition: opacity 0.15s, color 0.15s, border-color 0.15s;
    clip-path: polygon(6px 0%, 100% 0%, calc(100% - 6px) 100%, 0% 100%);
}

#modal-close:hover,
#modal-close:focus-visible {
    opacity: 1;
    color: var(--primary);
    border-color: var(--primary-mid);
    outline: none;
}

/* ═══════════════════════════════════════════════════════════════
   GLOBAL APP MODAL (#app-modal)
   Used for announcements, profile, credits — all full-screen overlays.
   ═══════════════════════════════════════════════════════════════ */

#app-modal {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 200;
    padding: 20px;
}

#app-modal-overlay {
    position: absolute;
    inset: 0;
    background: rgba(8, 9, 13, 0.88);
    backdrop-filter: blur(3px);
}

#app-modal-panel {
    position: relative;
    background: var(--nav-bg);
    border: 1px solid var(--border-mid);
    border-left: 3px solid var(--primary);
    width: 100%;
    max-width: 420px;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* Top-left and bottom-right corner accents on the panel */
#app-modal-panel::before,
#app-modal-panel::after {
    content: '';
    position: absolute;
    width: 12px;
    height: 12px;
    pointer-events: none;
    z-index: 1;
}

#app-modal-panel::before {
    top: 8px;
    right: 8px;
    border-top: 2px solid var(--primary);
    border-right: 2px solid var(--primary);
    opacity: 0.5;
}

#app-modal-panel::after {
    bottom: 8px;
    left: 12px;  /* offset for the left border */
    border-bottom: 2px solid var(--primary);
    border-left: 2px solid rgba(245, 230, 66, 0.3);
    opacity: 0.5;
}

/* Header */
#app-modal-header {
    padding: 24px 28px 18px;
    border-bottom: 1px solid var(--border);
    flex-shrink: 0;
}

#app-modal-tag {
    display: block;
    font-size: 0.58rem;
    font-weight: 700;
    letter-spacing: 0.24em;
    text-transform: uppercase;
    color: var(--primary);
    opacity: 0.85;
    margin-bottom: 4px;
}

#app-modal-title {
    font-size: 1.1rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text);
    line-height: 1.2;
}

/* Optional image */
#app-modal-image-wrap {
    flex-shrink: 0;
    border-bottom: 1px solid var(--border);
    max-height: 180px;
    overflow: hidden;
}

#app-modal-image {
    display: block;
    width: 100%;
    height: 180px;
    object-fit: cover;
    object-position: top;
    opacity: 0.9;
}

/* Scrollable body */
#app-modal-body {
    flex: 1;
    overflow-y: auto;
    padding: 20px 28px;
    scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,0.1) transparent;
}

#app-modal-body::-webkit-scrollbar       { width: 4px; }
#app-modal-body::-webkit-scrollbar-track { background: transparent; }
#app-modal-body::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.12); }

/* Footer */
#app-modal-footer {
    padding: 16px 28px;
    border-top: 1px solid var(--border);
    flex-shrink: 0;
    display: flex;
    justify-content: flex-end;
}

/* ── Modal shared text content ───────────────────────────────── */

.modal-text p {
    font-size: 0.85rem;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.75);
}

.modal-text p + p { margin-top: 10px; }

.modal-section-label {
    font-size: 0.6rem;
    font-weight: 700;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--text-sub);
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border);
    margin-bottom: 10px;
}

.modal-empty {
    font-size: 0.8rem;
    color: var(--text-sub);
    line-height: 1.5;
}

/* ═══════════════════════════════════════════════════════════════
   PROFILE MODAL CONTENT
   ═══════════════════════════════════════════════════════════════ */

.profile-content { display: flex; flex-direction: column; }

.profile-rank-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 5px 0;
}

.profile-rank-icon {
    width: 28px;
    height: 28px;
    object-fit: contain;
    flex-shrink: 0;
    filter: drop-shadow(0 1px 3px rgba(0,0,0,0.7));
}

.profile-rank-label {
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-sub);
    width: 72px;
    flex-shrink: 0;
}

.profile-rank-bar-wrap {
    flex: 1;
    height: 4px;
    background: rgba(255,255,255,0.08);
    overflow: hidden;
    clip-path: polygon(2px 0%, 100% 0%, calc(100% - 2px) 100%, 0% 100%);
}

.profile-rank-bar {
    height: 100%;
    background: var(--primary);
    opacity: 0.8;
    transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.profile-rank-count {
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--primary);
    width: 20px;
    text-align: right;
    flex-shrink: 0;
}

/* ═══════════════════════════════════════════════════════════════
   CREDITS MODAL CONTENT
   ═══════════════════════════════════════════════════════════════ */

.credits-content {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.credit-item {
    display: flex;
    flex-direction: column;
    gap: 3px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border);
}

.credit-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.credit-title {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--primary);
    text-decoration: none;
    transition: opacity 0.15s;
}

.credit-title:hover { opacity: 0.7; text-decoration: underline; }

.credit-author {
    font-size: 0.68rem;
    color: var(--text-sub);
    font-weight: 500;
}

.credit-uses {
    font-size: 0.6rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-dim);
}

/* ═══════════════════════════════════════════════════════════════
   SETTINGS / CUSTOMIZE SHARED LAYOUT
   ═══════════════════════════════════════════════════════════════ */

.view-settings {
    display: flex;
    flex-direction: column;
    gap: 28px;
    max-width: 500px;
    background: var(--nav-bg);
    border: 1px solid var(--border);
    border-left: 3px solid rgba(245, 230, 66, 0.35);
    padding: 28px 32px;
}

.settings-section {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.settings-section-title {
    font-size: 0.6rem;
    font-weight: 700;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--text-sub);
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border);
    margin-bottom: 4px;
}

/* Sub-label within a settings section (e.g. "Color" / "Image" under Theme) */
.settings-group-label {
    font-size: 0.56rem;
    font-weight: 700;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--text-dim);
    margin-top: 8px;
    margin-bottom: 2px;
}

.setting-row {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 0;
    flex-wrap: wrap;
}

/* ═══════════════════════════════════════════════════════════════
   BUTTONS
   ═══════════════════════════════════════════════════════════════ */

.btn {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--border-mid);
    border-radius: 0;
    color: rgba(255, 255, 255, 0.75);
    font-family: 'Onest', sans-serif;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    padding: 9px 20px;
    cursor: pointer;
    clip-path: polygon(8px 0%, 100% 0%, calc(100% - 8px) 100%, 0% 100%);
    transition: background 0.15s, border-color 0.15s, color 0.15s, opacity 0.15s;
}

.btn:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.25);
    color: #fff;
}

.btn:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 3px;
}

.btn.active {
    background: var(--primary-dim);
    border-color: var(--primary-mid);
    color: var(--primary);
}

.btn.active:hover {
    background: rgba(245, 230, 66, 0.18);
}

.btn.danger {
    border-color: rgba(224, 82, 82, 0.25);
    color: rgba(255, 255, 255, 0.55);
}

.btn.danger:hover {
    background: rgba(224, 82, 82, 0.12);
    border-color: rgba(224, 82, 82, 0.55);
    color: var(--danger);
}

/* ═══════════════════════════════════════════════════════════════
   META / ABOUT SECTION
   ═══════════════════════════════════════════════════════════════ */

.meta-row {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 5px 0;
}

.meta-label {
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--text-dim);
    min-width: 90px;
}

.meta-value {
    color: rgba(255, 255, 255, 0.75);
    font-size: 0.8rem;
    font-weight: 500;
}

.meta-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0;
    padding: 4px 0;
}

.meta-link {
    color: var(--primary);
    text-decoration: none;
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    padding: 6px 16px 6px 0;
    opacity: 0.65;
    transition: opacity 0.15s;
}

.meta-link:hover,
.meta-link:focus-visible {
    opacity: 1;
    outline: none;
    text-decoration: underline;
}

/* ═══════════════════════════════════════════════════════════════
   FOOTER
   ═══════════════════════════════════════════════════════════════ */

footer {
    background: var(--nav-bg);
    border-top: 1px solid var(--border);
    padding: 14px 24px;
    font-size: 0.62rem;
    color: var(--text-dim);
    text-align: center;
    letter-spacing: 0.04em;
}

/* ═══════════════════════════════════════════════════════════════
   MOBILE
   ═══════════════════════════════════════════════════════════════ */

@media (max-width: 480px) {
    main { padding: 16px; }

    #hero-controls { padding: 0 20px; }
    #hero-controls label { padding: 0 10px; }

    #heroes-grid { column-gap: 8px; }

    #hero-modal-inner { padding: 22px 20px; }

    #app-modal-header  { padding: 20px 20px 14px; }
    #app-modal-body    { padding: 16px 20px; }
    #app-modal-footer  { padding: 14px 20px; }

    .view-settings { padding: 20px; }
}