* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "Segoe UI", sans-serif;
}

:root {
    /* Glassmorphism dark theme - complements the red/pink/purple background */
    --bg-primary: rgba(15, 15, 20, 0.6);
    --bg-secondary: rgba(30, 30, 40, 0.65);
    --bg-hover: rgba(45, 45, 60, 0.75);
    --text-primary: #ffffff;
    --text-secondary: rgba(255, 255, 255, 0.7);
    /* Accent color - white with black text */
    --accent: #ffffff;
    --accent-dim: rgba(255, 255, 255, 0.25);
    --border: rgba(255, 255, 255, 0.12);
    --success: #4ade80;
    --error: #ff1818;
    --glass-border: rgba(255, 255, 255, 0.08);
    --glass-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    --accent-glow: 0 4px 20px rgba(255, 255, 255, 0.2);
    /* https://codepen.io/whosajid/pen/LEGRBzp */
    --shadow-s: inset 0 1px 1px rgba(255, 255, 255, 0.1), 0 1px 2px rgba(0, 0, 0, 0.3),
    0 2px 4px rgba(0, 0, 0, 0.2);
    --shadow-m: inset 0 1px 1px rgba(255, 255, 255, 0.15), 0 4px 8px rgba(0, 0, 0, 0.4),
    0 8px 16px rgba(0, 0, 0, 0.2);
    --shadow-l: inset 0 1px 2px rgba(255, 255, 255, 0.2), 0 8px 16px rgba(0, 0, 0, 0.4),
    0 16px 32px rgba(0, 0, 0, 0.2);
}

.shadow-s {
    box-shadow: var(--shadow-s);
}
.shadow-m {
    box-shadow: var(--shadow-m);
}
.shadow-l {
    box-shadow: var(--shadow-l);
}

a {
    text-decoration: none;
    color: unset;
}

body {
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    min-height: 100vh;

    background-color: #0f0f14;
    background-image: url("/static/img/a.jpg");
    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;
    background-attachment: fixed;
}

@media (max-width: 768px), (pointer: coarse) {
    body {
        background-attachment: scroll;
        background-position: top center;
        background-size: 100vw auto;
    }
}

#modalNotes {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

#feedbackMessage {
    min-height: 150px;
}

.auth-action-btn,
.feedback-trigger {
    min-width: 108px;
    height: 40px;
    min-height: 40px;
    padding: 0 1rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    box-sizing: border-box;
}
#changelogLink {
    font-family: monospace;
}

.container {
    max-width: 1720px;
    margin: 0 auto;
    padding: 1.35rem;
}

h1 {
    font-size: 2.5rem;
    font-weight: 400;
    margin-bottom: 0.35rem;
    color: #ffffff;
    text-shadow: 0 2px 20px rgba(0, 0, 0, 0.5);
}

.site-brand {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.1rem;
    font-size: 32px;
    text-align: center;
}

.site-brand-name {
    font-size: 40px;
    font-weight: 600;
    line-height: 1.1;
}

.site-brand-subtitle {
    font-size: 18px;
    font-weight: 400;
    line-height: 1.25;
}

.site-logo {
    width: 50px;
    height: 50px;
    object-fit: contain;
    flex: 0 0 auto;
    filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.35));
}

header h2 {
    font-size: 1.2rem;
    font-weight: 400;
}

@media (max-width: 1300px) {
    body {
        line-height: unset;
    }

    h1 {
        line-height: 1.2;
        font-size: 2.2rem;
    }

    .site-brand {
        gap: 0.1rem;
    }

    .site-brand-name {
        font-size: 34px;
    }

    .site-brand-subtitle {
        font-size: 21px;
    }

    .site-logo {
        width: 46px;
        height: 46px;
    }

    header h2 {
        font-size: 1.0rem;
        font-weight: 400;
    }

    .container {
        padding: 5px;
    }

    .navbar {
        position: relative;
    }

    table thead {
        top: 0 !important;
    }
}

header {
    text-align: center;
    margin-bottom: 1rem;
    position: relative;
}

.index-contribution-cta {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 0.2rem;
    margin-top: 0.45rem;
    padding: 0.42rem 0.75rem;
    background: rgb(58 58 80 / 51%);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 999px;
    color: white;
    font-size: 0.92rem;
    line-height: 1.35;
    backdrop-filter: blur(12px);
}

.index-contribution-link {
    width: auto;
    height: auto;
    min-height: 0;
    padding: 0;
    background: transparent;
    border: none;
    border-radius: 0;
    color: var(--text-primary);
    font-size: inherit;
    line-height: inherit;
    text-decoration: underline;
    text-decoration-color: rgba(255, 255, 255, 0.38);
    text-underline-offset: 0.18em;
    box-shadow: none;
}

.index-contribution-link:hover {
    color: var(--accent);
    text-decoration-color: currentColor;
    transform: none;
    box-shadow: none;
}



.subtitle {
    color: var(--text-secondary);
    font-size: 1.1rem;
    font-weight: 400;
}


.search-container {
    position: relative;
}

input[type="text"] {
    width: 100%;
    padding: 0.82rem 0.95rem 0.82rem 2.8rem;
    background: rgba(20, 20, 30, 0.7);
    border: 1px solid var(--border);
    border-radius: 12px;
    color: var(--text-primary);
    font-size: 0.96rem;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

input[type="text"]:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-dim), 0 4px 20px rgba(255, 107, 122, 0.15);
    background: rgba(25, 25, 35, 0.85);
}

.search-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-secondary);
}

select {
    padding: 0.82rem 2.35rem 0.82rem 1rem;
    background: rgba(20, 20, 30, 0.7);
    border: 1px solid var(--border);
    border-radius: 12px;
    color: var(--text-primary);
    font-size: 0.96rem;
    cursor: pointer;
    transition: all 0.3s ease;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23ffffff' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    backdrop-filter: blur(10px);
}

select:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-dim);
}

button {
    padding: 0.65rem 1.35rem;
    background: var(--accent);
    border-radius: 10px;
    color: #000;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    border: none;
    /*box-shadow: 0 4px 15px rgba(92, 124, 250, 0.3);*/
}

button:hover {
    transition: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(255, 255, 255, 0.25);
}

button:active {
    transform: translateY(0);
}

.btn-secondary {
    background: rgba(30, 30, 40, 0.6);
    border: 1px solid var(--border);
    color: var(--text-secondary);
    box-shadow: none;
}

.btn-secondary:hover {
    background: rgba(45, 45, 60, 0.8);
    border-color: rgba(255, 255, 255, 0.2);
    color: var(--text-primary);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

table button {
    padding: 0.35rem 0.0rem;
    width: 75px;
}

.table-sort-btn {
    width: auto;
    padding: 0;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    background: none;
    border: none;
    box-shadow: none;
    color: inherit;
    font: inherit;
    letter-spacing: inherit;
    text-transform: inherit;
}

.table-sort-btn:hover {
    transform: none;
    box-shadow: none;
    color: var(--text-primary);
}

.table-sort-btn[data-active="true"] {
    color: var(--text-primary);
}

.table-sort-indicator {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 0.95rem;
    height: 0.95rem;
    flex: 0 0 0.95rem;
    color: var(--accent);
}

.table-sort-icon {
    display: none;
    width: 100%;
    height: 100%;
    fill: none;
    stroke: currentColor;
    stroke-width: 2.25;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.table-sort-indicator[data-direction="asc"] .table-sort-icon-single,
.table-sort-indicator[data-direction="desc"] .table-sort-icon-single,
.table-sort-indicator[data-direction="none"] .table-sort-icon-both {
    display: block;
}

.table-sort-indicator[data-direction="desc"] .table-sort-icon-single {
    transform: rotate(180deg);
}

button:disabled {
    color: rgba(255, 255, 255, 0.4);
    background: rgba(100, 100, 120, 0.3);
    cursor: not-allowed;
    box-shadow: none;
}

button:disabled:hover {
    transform: none;
    box-shadow: none;
    color: rgba(255, 255, 255, 0.4);
}



#newsletterBtn {
    background: linear-gradient(135deg, #60a5fa 0%, #3b82f6 100%);
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
}

.table-container {
    border-radius: 20px;
    border: 1px solid var(--glass-border);
    box-shadow: var(--glass-shadow);
    background: rgba(24, 24, 33, 1.0);
}

#gamesTableBody {
    background: rgba(30, 30, 40, 0.1);
    overflow-anchor: none;
}

#gamesTableBody tr:last-child td:first-child {
    border-bottom-left-radius: 20px;
}

.table-virtual-spacer {
    pointer-events: none;
}

.table-virtual-spacer td {
    padding: 0 !important;
    border: 0 !important;
    line-height: 0;
}

table {
    width: 100%;
    border-collapse: collapse;
}

thead {
    position: sticky;
    top: 0;
    background: rgba(30, 30, 40, 0.9);
    z-index: 100;
}

.game-title {
    position: sticky;
    left: 0;
    z-index: 1;
    background: rgba(30, 30, 40, 0.9);
    word-break: break-word;
}

th {
    background: rgba(30, 30, 40, 0.7);
    padding: 0.68rem 0.85rem;
    font-weight: 500;
    color: var(--text-secondary);
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 0.08em;
    position: sticky;
    top: 0;
    z-index: 10;
}

#mainHeader th:first-child {
    border-top-left-radius: 20px;
    width: 250px;
}
#mainHeader th:last-child {
    border-top-right-radius: 20px;
}

#mainHeader th {
    color: var(--text-primary);
}
#subHeader th {
    padding-top: 0;
}

td {
    padding: 0.72rem 0.7rem;
    border-top: 1px solid var(--border);
}
#dateAddedHeader {
    width: 130px;
    white-space: nowrap;
}
.date-added-cell {
    min-width: 7.5rem;
    white-space: nowrap;
}
#versionNumberHeader {
    width: 112px;
    white-space: nowrap;
}
.version-number-cell {
    min-width: 7rem;
    color: var(--text-secondary);
    font-family: monospace;
    white-space: nowrap;
}
.table-empty-value {
    color: rgba(255, 255, 255, 0.35);
    font-family: inherit;
}
#communitySentimentHeader {
    min-width: 248px;
}
.suggestChangeHeader {
    padding-left: 0;
    padding-right: 0;
}

tr {
    transition: background 0.2s ease;
}

tr.game-row {
    cursor: pointer;
}

tr.game-row:hover {
    background: rgb(255 255 255 / 6%);
    transition: background 0.05s ease;
}

tr td:nth-child(2),
tr td:nth-child(3),
tr td:nth-child(4),
tr td:nth-child(5),
tr td:nth-child(6),
tr td:nth-child(7),
tr td:nth-child(8),
tr td:nth-child(9) {
    text-align: center;
}

tr button {
    width: 36px;
    height: 36px;
    padding: 0;
    background: rgba(30, 30, 40, 0.5);
    border: 1px solid var(--border);
    color: var(--text-secondary);
    border-radius: 10px;
    box-shadow: none;
}
tr button:hover {
    border-color: var(--accent);
    color: var(--accent);
    background: rgba(92, 124, 250, 0.1);
}

.game-title {
    font-weight: 500;
    color: var(--text-primary);
    transition: background 0.05s ease, transform 0.05s ease;
}

.performance-badge {
    box-shadow: var(--shadow-s);
}

.res-badge, .fps-badge, .upgrade-badge {
    width: 108px;
    font-size: 0.9rem;
    display: inline-block;
    padding: 0.32rem 0.45rem;
    border-radius: 9px;
    font-weight: 600;
    letter-spacing: 0.02em;
}
.res-badge {
    font-family: monospace;
}
.fps-badge {

    font-family: monospace;
}
.upgrade-badge {
    border-radius: 10px;
}

.fps-high, .res-improved, .upgrade-free {
    background: linear-gradient(135deg, #2b8e4f91 0%, #22c55e8a 100%);
    color: white;
}

.fps-medium, .upgrade-paid {
    background: linear-gradient(135deg, #8e762ba8 0%, #c57f229c 100%);
    color: #fff2c7 !important;
}

.fps-low {
    background: linear-gradient(135deg, #8e2b2b96 0%, #c5222296 100%);
    color: #ff1c1c;
    position: relative;
    cursor: help;
}

.fps-low::after {
    content: "Contribute and submit missing data!";
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(-8px);
    background: rgba(25, 25, 35, 0.95);
    color: var(--text-primary);
    padding: 0.5rem 1rem;
    border-radius: 10px;
    font-size: 0.85rem;
    white-space: nowrap;
    border: 1px solid var(--accent);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4), 0 0 20px rgba(92, 124, 250, 0.2);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
    z-index: 1000;
    backdrop-filter: blur(10px);
}

.fps-low:hover::after {
    opacity: 1;
    transform: translateX(-50%) translateY(-4px);
}

.res-ok, .upgrade-none {
    background: linear-gradient(135deg, #8b8b8b8a 0%, #c4c4c48c 100%);
    color: black;
}

.upgrade-exclusive {
    background: linear-gradient(135deg, rgb(92 124 250 / 59%) 0%, rgb(116 143 252 / 79%) 100%);
    color: white;
    box-shadow: inset 0 0 20px rgba(92, 124, 250, 0.2), 0 2px 8px rgba(92, 124, 250, 0.15);
    position: relative;
    border: 1px solid rgba(92, 124, 250, 0.3);
}

.upgrade-exclusive::after {
    content: "Switch 2 Exclusive Title";
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(-8px);
    background: rgba(25, 25, 35, 0.95);
    color: var(--text-primary);
    padding: 0.5rem 1rem;
    border-radius: 10px;
    font-size: 0.85rem;
    white-space: nowrap;
    border: 1px solid var(--accent);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4), 0 0 20px rgba(92, 124, 250, 0.2);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
    z-index: 1000;
    backdrop-filter: blur(10px);
}

.upgrade-exclusive:hover::after {
    opacity: 1;
    transform: translateX(-50%) translateY(-8px);
}

.missing-data-badge {
    width: auto;
    min-width: 108px;
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-secondary);
    border: 1px dashed rgba(255, 255, 255, 0.18);
    font-family: inherit;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    line-height: 1.2;
}

.performance-mode-stack {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.45rem;
}

.performance-mode-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.45rem;
}

.performance-mode-chip {
    width: auto;
    max-width: 100%;
    display: inline-flex;
    align-items: stretch;
    justify-content: stretch;
    position: relative;
    padding: 0;
    border-radius: 999px;
    vertical-align: middle;
    overflow: hidden;
    white-space: nowrap;
    background: linear-gradient(180deg, rgba(20, 24, 36, 0.82) 0%, rgba(10, 14, 22, 0.72) 100%);
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.14), inset 0 -1px 0 rgba(6, 10, 18, 0.28), 0 8px 22px rgba(0, 0, 0, 0.22), var(--shadow-s);
    backdrop-filter: blur(12px);
}

.performance-mode-chip::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.06) 0%, transparent 42%, rgba(0, 0, 0, 0.08) 100%);
    pointer-events: none;
}

.performance-mode-chip-segment {
    min-width: 68px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.34rem 0.62rem;
    font-family: monospace;
    font-size: 0.95rem;
    letter-spacing: 0.02em;
    line-height: 1.15;
    position: relative;
    z-index: 1;
    text-shadow: 0 1px 0 rgba(6, 10, 18, 0.38);
}

.performance-mode-chip-segment + .performance-mode-chip-segment {
    border-left: 1px solid rgba(255, 255, 255, 0.12);
}

.performance-mode-chip-segment.res-improved,
.performance-mode-chip-segment.fps-high {
    background: linear-gradient(135deg, rgba(43, 142, 79, 0.72) 0%, rgba(34, 197, 94, 0.6) 100%) !important;
    color: rgb(203 255 225) !important;
    box-shadow: inset 0 0 18px rgba(34, 197, 94, 0.12);
}

.performance-mode-chip-segment.res-ok {
    background: linear-gradient(135deg, rgba(139, 139, 139, 0.62) 0%, rgba(196, 196, 196, 0.52) 100%) !important;
    color: #f3f4f6 !important;
    box-shadow: inset 0 0 18px rgba(255, 255, 255, 0.05);
}

.performance-mode-chip-segment.res-unknown,
.performance-mode-chip-segment.fps-low {
    background: linear-gradient(135deg, rgba(142, 43, 43, 0.76) 0%, rgba(197, 34, 34, 0.62) 100%) !important;
    color: #ffbebe !important;
    box-shadow: inset 0 0 18px rgba(197, 34, 34, 0.12);
}

.performance-mode-chip-segment.fps-medium {
    background: linear-gradient(135deg, rgba(142, 118, 43, 0.76) 0%, rgba(197, 127, 34, 0.62) 100%) !important;
    color: #fff2c7 !important;
    box-shadow: inset 0 0 18px rgba(197, 127, 34, 0.12);
}

.performance-mode-chip-segment.fps-low {
    cursor: default;
    position: static;
}

.performance-mode-chip-segment.fps-low::after {
    display: none;
}

/* The main/admin tables render many chips at once. Avoid per-chip backdrop
   blurs and large shadows there; they repaint poorly while scrolling in
   Firefox and on mobile GPUs. */
#gamesTableBody .performance-mode-chip {
    background: rgba(16, 20, 30, 0.94);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}

#gamesTableBody .performance-mode-chip::before {
    display: none;
}

#gamesTableBody .performance-mode-chip-segment {
    box-shadow: none;
    text-shadow: none;
}

#gamesTableBody .performance-mode-tooltip::before {
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}

.performance-mode-name {
    color: var(--text-secondary);
    font-size: 0.86rem;
    line-height: 1.4;
}

.performance-mode-tooltip {
    display: inline-flex;
    max-width: 100%;
}

.performance-mode-empty {
    display: inline-flex;
    align-items: center;
}

.community-sentiment-cell {
    min-width: 248px;
    vertical-align: middle;
}

.community-sentiment-compact {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.5rem;
    align-items: stretch;
}

.community-sentiment-mini-card,
.community-sentiment-empty-state {
    min-height: 4.5rem;
    border-radius: 16px;
}

.community-sentiment-mini-card {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
    padding: 0.3rem 0.6rem;
    text-align: left;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.02));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
    overflow: hidden;
    backdrop-filter: blur(10px);
}

.community-sentiment-mini-card.not_enough_data,
.community-sentiment-mini-card.mixed {
    background: linear-gradient(180deg, rgba(100, 100, 100, 0.3), rgba(255, 255, 255, 0.03));
    border-color: rgba(255, 255, 255, 0.08);
}

.community-sentiment-mini-card.mostly_good {
    border-color: rgba(74, 222, 128, 0.22);
    background: linear-gradient(180deg, rgba(21, 77, 48, 0.9), rgba(255, 255, 255, 0.03));
}

.community-sentiment-mini-card.mostly_bad {
    border-color: rgba(248, 113, 113, 0.22);
    background: linear-gradient(180deg, rgba(107, 30, 36, 0.9), rgba(255, 255, 255, 0.03));
}

.community-sentiment-mini-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.4rem;
}

.community-sentiment-mini-mode {
    color: var(--text-secondary);
    font-size: 0.63rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.community-sentiment-mini-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.8rem;
    padding: 0.12rem 0.35rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-secondary);
    font-family: 'SF Mono', Monaco, 'Cascadia Code', monospace;
    font-size: 0.68rem;
    font-weight: 700;
    display: none;
}

.community-sentiment-mini-verdict {
    color: var(--text-primary);
    font-weight: 500;
    line-height: 1.1;
}

.community-sentiment-mini-card.mostly_good .community-sentiment-mini-verdict {
    color: #c4ffd9;
}

.community-sentiment-mini-card.mostly_bad .community-sentiment-mini-verdict {
    color: #ffbbbb;
}

.community-sentiment-mini-meter {
    display: flex;
    height: 0.4rem;
    border-radius: 999px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.08);
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.35);
}

.community-sentiment-mini-meter-fill {
    height: 100%;
    min-width: 0;
}

.community-sentiment-mini-meter-fill.is-visible-start {
    border-radius: 999px 0 0 999px;
}

.community-sentiment-mini-meter-fill.is-visible-end {
    border-radius: 0 999px 999px 0;
}

.community-sentiment-mini-meter-fill.is-visible-start.is-visible-end {
    border-radius: 999px;
}

.community-sentiment-mini-meter-fill.is-good {
    background: linear-gradient(90deg, rgba(74, 222, 128, 0.85), rgba(34, 197, 94, 0.95));
}

.community-sentiment-mini-meter-fill.is-acceptable {
    background: rgba(255, 255, 255, 0.1);
}

.community-sentiment-mini-meter-fill.is-poor {
    background: linear-gradient(90deg, rgba(248, 113, 113, 0.9), rgba(239, 68, 68, 0.95));
}

.community-sentiment-empty-state {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.65rem;
    border: 1px dashed rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.03);
}

.table-sentiment-empty {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.25rem 0.65rem;
    border-radius: 999px;
    color: var(--text-secondary);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.notes {
    color: var(--text-secondary);
    font-size: 0.9rem;
    max-width: 300px;
    line-height: 1.5;
    text-align: center;
}

.notes-trigger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    padding: 0;
    border-radius: 10px;
    border: 1px solid var(--border);
    color: var(--text-secondary);
    cursor: pointer;
    appearance: none;
}

.notes-trigger svg {
    width: 16px;
    height: 16px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.notes-trigger:focus-visible {
    outline: 2px solid rgba(92, 124, 250, 0.65);
    outline-offset: 2px;
    background: rgba(92, 124, 250, 0.14);
    color: var(--text-primary);
    border-color: rgba(92, 124, 250, 0.5);
}

.notes-empty {
    color: rgba(255, 255, 255, 0.35);
    font-size: 0.95rem;
}

.stats {
    display: flex;
    gap: 1.25rem;
    margin-bottom: 1.25rem;
    justify-content: center;
}

.stat-card {
    background: rgba(30, 30, 40, 0.6);
    padding: 1.2rem 1.6rem;
    border-radius: 16px;
    text-align: center;
    border: 1px solid var(--glass-border);
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.stat-card:hover {
    background: rgba(45, 45, 60, 0.7);
    transform: translateY(-2px);
    box-shadow: var(--glass-shadow);
}

.stat-number {
    font-size: 2rem;
    font-weight: 300;
    color: var(--accent);
}

.stat-label {
    color: var(--text-secondary);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.modal {
    display: none;
    position: fixed;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    opacity: 0;
    transition: opacity 0.15s ease;
}

.modal.show {
    opacity: 1;
}

#modalBasicsSection {
    margin-bottom: 0.5rem !important;
}

#modalBasicsSection h4 {
    margin-bottom: 0.32rem !important;
}

#contributionTypeSection input[type="radio"] {
position: fixed;
    opacity: 0;
    pointer-events: none;
}

.modal-content {
    position: absolute;
    left: 50%;
    top: 8%;
    transform: translate(-50%, 0) scale(0.95);
    background: rgba(25, 25, 35, 1.0);
    padding: 1rem;
    border-radius: 20px;
    width: 90%;
    max-width: 500px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    max-height: 90%;
    overflow-y: auto;
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(20px);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5);
}

.modal.show .modal-content {
    transform: translate(-50%, 0) scale(1.0);
}

.notes-modal-content {
    max-width: 560px;
}

.notes-modal-text {
    margin: 0;
    color: var(--text-primary);
    line-height: 1.6;
    white-space: pre-wrap;
    word-break: break-word;
}

.modal h2 {
    margin-bottom: 0.75rem;
    font-size: 1.75rem;
    font-weight: 700;
}

.modal h3 {
    margin-bottom: 1.5rem;
    font-weight: 400;
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.form-group:not(:last-child) {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.label-optional {
    text-transform: none;
    font-weight: 400;
    color: var(--text-secondary);
    font-size: 0.85rem;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.72rem 0.9rem;
    background: rgba(20, 20, 30, 0.6);
    border: 1px solid var(--border);
    border-radius: 10px;
    color: var(--text-primary);
    font-size: 1rem;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-dim);
    background: rgba(25, 25, 35, 0.8);
}

.form-group textarea {
    resize: vertical;
    min-height: 88px;
    font-family: inherit;
}

.form-section {
    background: rgba(20, 20, 30, 0.5);
    border: 1px solid var(--glass-border);
    border-radius: 14px;
    padding: 1rem;
    margin-bottom: 0.85rem;
    backdrop-filter: blur(10px);
}

.form-section-title {
    margin: 0 0 0.85rem 0;
    color: var(--accent);
    font-size: 1rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 1px solid var(--border);
    padding-bottom: 0.6rem;
}

.select-group {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
}

.select-wrapper select {
    width: 100%;
}

.custom-resolution-input {
    margin-top: 0.75rem !important;
}

.form-hint {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.5;
}

.contribution-type-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.contribution-type-option {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    padding: 0.85rem;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: rgba(15, 15, 25, 0.65);
    cursor: pointer;
    transition: border-color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.contribution-type-option:hover {
    border-color: var(--accent);
    background: rgba(25, 25, 35, 0.8);
    transform: translateY(-1px);
}

.contribution-type-option input {
    width: auto;
    margin: 0;
}

.contribution-type-option:has(input:checked) {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-dim);
    background: rgba(28, 36, 72, 0.7);
}

.contribution-type-title {
    font-weight: 700;
    color: var(--text-primary);
}

.contribution-type-copy {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.4;
}

.sentiment-form-mode-card {
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    background: rgba(15, 15, 25, 0.55);
    padding: 0.85rem;
}

.sentiment-form-mode-card:not(:last-child) {
    margin-bottom: 0.75rem;
}

.sentiment-form-mode-card h5 {
    color: var(--text-primary);
    margin-bottom: 0.75rem;
    font-size: 1rem;
    font-weight: 600;
}

.sentiment-form-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.5rem;
    padding: 0.65rem 0;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.sentiment-form-row:first-of-type {
    border-top: none;
    padding-top: 0;
}

.sentiment-form-label {
    color: var(--text-primary);
    font-size: 0.95rem;
    line-height: 1.4;
}

.sentiment-form-votes {
    display: flex;
    gap: 0.5rem;
    justify-content: flex-start;
}

.sentiment-vote-btn {
    min-width: 85px;
}

.sentiment-vote-btn.selected,
.community-sentiment-vote-btn.active {
    border-color: var(--accent);
    color: var(--text-primary);
    background: rgba(92, 124, 250, 0.22);
    box-shadow: inset 0 0 0 1px rgba(92, 124, 250, 0.25);
}

@media (max-width: 600px) {
    .select-group {
        grid-template-columns: 1fr;
    }

    .contribution-type-grid {
        grid-template-columns: 1fr;
    }

    .sentiment-form-row {
        grid-template-columns: 1fr;
    }

    .sentiment-form-votes {
        justify-content: flex-start;
    }
}

.modal-buttons {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
}

.modal-buttons button[type="submit"]:disabled,
.btn-cancel:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.modal-buttons button[type="submit"]:disabled:hover,
.btn-cancel:disabled:hover {
    background: var(--accent);
    color: #000;
    box-shadow: none;
}

#addGameModal .add-game-modal-content {
    width: min(92vw, 760px);
    max-width: 760px;
    padding: 1.35rem;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

#addGameModal h2 {
    margin: 0;
    font-size: 2rem;
}

#addGameModal .add-game-modal-header {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: flex-start;
    margin-bottom: 1.25rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

#addGameModal .add-game-modal-heading {
    max-width: 680px;
}

#addGameModal .modal-eyebrow {
    margin: 0 0 0.45rem;
    color: var(--text-secondary);
    font-size: 0.76rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

#addGameModal .modal-intro {
    margin: 0.45rem 0 0;
    color: var(--text-secondary);
    font-size: 0.96rem;
    line-height: 1.55;
}

#addGameModal .modal-close {
    width: 44px;
    height: 44px;
    min-width: 44px;
    padding: 0;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.45rem;
    line-height: 1;
}

#addGameModal .wizard-progress {
    display: flex;
    gap: 0.65rem;
    overflow-x: auto;
    margin-bottom: 1rem;
    padding-bottom: 0.2rem;
    scrollbar-width: none;
}

#addGameModal .wizard-progress::-webkit-scrollbar {
    display: none;
}

#addGameModal .wizard-step-pill {
    flex: 1 0 132px;
    display: inline-flex;
    align-items: center;
    justify-content: flex-start;
    gap: 0.65rem;
    padding: 0.75rem 0.85rem;
    background: rgba(18, 20, 30, 0.78);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: var(--text-secondary);
    box-shadow: none;
    transform: none;
}

#addGameModal .wizard-step-pill:hover:not(:disabled) {
    transform: none;
    box-shadow: none;
    border-color: rgba(92, 124, 250, 0.35);
    background: rgba(24, 28, 42, 0.92);
    color: var(--text-primary);
}

#addGameModal .wizard-step-pill:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

#addGameModal .wizard-step-pill-number {
    width: 28px;
    height: 28px;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-primary);
    font-size: 0.82rem;
    font-weight: 700;
}

#addGameModal .wizard-step-pill-label {
    white-space: nowrap;
    font-size: 0.9rem;
}

#addGameModal .wizard-step-pill.is-active {
    border-color: var(--accent);
    background: rgba(24, 32, 58, 0.9);
    color: var(--text-primary);
}

#addGameModal .wizard-step-pill.is-active .wizard-step-pill-number,
#addGameModal .wizard-step-pill.is-complete .wizard-step-pill-number {
    background: var(--accent);
    color: #000;
}

#addGameModal .wizard-step-pill.is-complete {
    border-color: rgba(255, 255, 255, 0.22);
    color: var(--text-primary);
}

#addGameModal .wizard-page-copy {
    margin-bottom: 0.35rem;
    padding: 0 0 0.85rem;
}

#addGameModal .wizard-step-eyebrow {
    margin: 0 0 0.45rem;
    color: var(--text-secondary);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

#addGameModal .wizard-page-copy h3 {
    margin: 0;
    color: var(--text-primary);
    font-size: 1.25rem;
}

#addGameModal .wizard-step-description {
    margin: 0.42rem 0 0;
    color: var(--text-secondary);
    font-size: 0.94rem;
    line-height: 1.5;
}

#addGameModal .add-game-form {
    display: grid;
    gap: 0.5rem;
}

#addGameModal .add-game-form > * {
    min-width: 0;
}

#addGameModal .add-game-form .form-group:not(:last-child) {
    margin-bottom: 0;
}

#addGameModal .wizard-section,
#addGameModal .add-game-title-group {
    margin-bottom: 0;
}

#addGameModal .add-game-title-group, #addGameModal .form-section {
    background: rgba(255, 255, 255, 0.015);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 14px;
    padding: 1rem 1.05rem;
}

#addGameModal .add-game-title-group input {
    padding: 0.9rem 1rem;
    font-size: 1.05rem;
}

#addGameModal .form-section-header {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    margin-bottom: 0.85rem;
}

#addGameModal .form-section-title {
    margin: 0;
    padding: 0;
    border: none;
    color: var(--text-primary);
    font-size: 1.08rem;
    font-weight: 700;
    letter-spacing: 0;
    text-transform: none;
}

#addGameModal .form-section-copy {
    margin: 0.32rem 0 0;
    color: var(--text-secondary);
    font-size: 0.92rem;
    line-height: 1.5;
}

#addGameModal .form-group label {
    margin-bottom: 0.45rem;
    font-size: 0.88rem;
    letter-spacing: 0.01em;
    text-transform: none;
}

.performance-card .form-grid {
    display: flex !important;
    flex-direction: column !important;
    gap: 10px !important;
}

#addGameModal .form-grid {
    display: grid;
    gap: 0.85rem;
}

#addGameModal .form-grid-two {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

#addGameModal .form-grid-span-2 {
    grid-column: 1 / -1;
}

#addGameModal .form-hint {
    margin: 0;
}

#addGameModal .performance-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.9rem;
}

#addGameModal .performance-card {
    padding: 0.85rem;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    background: rgba(255, 255, 255, 0.02);
}

#addGameModal .performance-card input[type="text"] {
    padding: 0.72rem 0.9rem !important;
}

#addGameModal .performance-card-header {
    margin-bottom: 0.85rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}

#addGameModal .performance-card-header h5 {
    margin: 0;
    color: var(--text-primary);
    font-size: 1rem;
    font-weight: 700;
}

#addGameModal .performance-card-header p {
    margin: 0.28rem 0 0;
    color: var(--text-secondary);
    font-size: 0.86rem;
}

#addGameModal .performance-card-add-btn {
    white-space: nowrap;
    padding: 0.55rem 0.8rem;
}

.graphics-mode-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

#addGameModal .graphics-mode-entry {
    padding: 0.9rem 0 0;
    border: none;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 0;
    background: transparent;
}

#addGameModal .graphics-mode-entry:first-child {
    padding-top: 0;
    border-top: none;
}

.graphics-mode-entry-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.7rem;
}

.graphics-mode-entry-title {
    color: var(--text-primary);
    font-size: 0.88rem;
    font-weight: 600;
}

.graphics-mode-remove-btn {
    white-space: nowrap;
    padding: 0.45rem 0.75rem;
    margin-bottom: 10px;
}

#addGameModal .custom-resolution-input {
    margin-top: 0.75rem !important;
}

#addGameModal .contribution-type-grid {
    margin-bottom: 0.85rem;
}

#addGameModal .contribution-type-option {
    min-height: 100%;
    padding: 1rem;
    gap: 0.45rem;
    border-color: rgba(255, 255, 255, 0.06);
    background: rgba(255, 255, 255, 0.03);
}

#addGameModal .contribution-type-option input {
    accent-color: var(--accent);
}

#addGameModal .sentiment-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
}

#addGameModal .sentiment-form-mode-card {
    height: 100%;
    border: 1px solid rgba(255, 255, 255, 0.06);
    background: rgba(255, 255, 255, 0.03);
}

#addGameModal .sentiment-form-mode-card:not(:last-child) {
    margin-bottom: 0;
}

#addGameModal .add-game-support-grid {
    align-items: start;
}

#addGameModal #linksContainer {
    display: grid;
    gap: 0.35rem;
}

#addGameModal .link-input-group {
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.35fr) auto;
    gap: 0.65rem;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    background: rgba(255, 255, 255, 0.03);
}

#addGameModal .btn-add-link {
    margin-top: 0.75rem;
}

#addGameModal .verification-section altcha-widget {
    display: block;
    width: 100%;
}

#addGameModal .add-game-modal-buttons {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
    padding-top: 0.5rem;
}

#addGameModal .wizard-nav-cluster {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

#addGameModal .add-game-modal-buttons button {
    min-width: 140px;
}

#addGameModal #addGameBtnHidden {
    display: none;
}

@media (max-width: 900px) {
    #addGameModal .add-game-modal-content {
        width: 94vw;
    }

    #addGameModal .form-grid-two,
    #addGameModal .performance-grid,
    #addGameModal .sentiment-form-grid {
        grid-template-columns: 1fr;
    }

    #addGameModal .form-grid-span-2 {
        grid-column: auto;
    }
}

@media (max-width: 600px) {
    #addGameModal .add-game-modal-content {
        padding: 1rem;
    }

    #addGameModal .add-game-modal-header {
        flex-direction: column;
    }

    #addGameModal .modal-close {
        align-self: flex-end;
    }

    #addGameModal .link-input-group {
        grid-template-columns: 1fr;
    }

    #addGameModal .add-game-modal-buttons {
        flex-direction: column;
        align-items: stretch;
    }

    #addGameModal .wizard-nav-cluster {
        flex-direction: column;
        align-items: stretch;
    }

    #addGameModal .add-game-modal-buttons button {
        width: 100%;
        min-width: 0;
    }
}

.notification {
    position: fixed;
    top: 1.25rem;
    right: 1.25rem;
    padding: 0.85rem 1.2rem;
    border-radius: 14px;
    font-weight: 500;
    transform: translateY(calc(-100% - 2rem));
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 2000;
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(10px);
    box-shadow: var(--glass-shadow);
}

.notification.show {
    transform: translateY(0);
}

.notification.success {
    background: rgba(74, 222, 128, 0.9);
    color: #064e3b;
}

.notification.error {
    background: rgba(248, 113, 113, 0.9);
    color: #7f1d1d;
}

.loading {
    text-align: center;
    padding: 2rem;
    color: var(--text-secondary);
}

.spinner {
    display: inline-block;
    width: 40px;
    height: 40px;
    border: 3px solid var(--border);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* ALTCHA widget styling to match the site theme */
altcha-widget {
    display: block;
    width: 100%;
    --altcha-max-width: 100%;
    --altcha-border-width: 1px;
    --altcha-border-radius: 16px;
    --altcha-color-base: rgba(16, 18, 28, 0.92);
    --altcha-color-text: var(--text-primary);
    --altcha-color-border: rgba(255, 255, 255, 0.1);
    --altcha-color-border-focus: rgba(92, 124, 250, 0.5);
    --altcha-color-active: var(--accent);
    --altcha-color-error-text: #ffb4b4;
    --altcha-color-footer-bg: rgba(255, 255, 255, 0.03);
}

#addGameModal .verification-section altcha-widget,
[data-auth-altcha-group="true"] altcha-widget {
    --altcha-max-width: 100%;
}

[data-auth-altcha-group="true"] {
    margin-top: 0.2rem;
}

[data-auth-altcha-group="true"] small {
    margin-bottom: 0.55rem;
    color: var(--text-secondary);
    font-size: 0.82rem;
    line-height: 1.45;
}

.altcha[data-floating] {
    position: unset !important;
    width: 100%;
    max-width: none;
    filter: none !important;
}

.altcha {
    position: relative;
    width: 100%;
    max-width: none;
    overflow: hidden;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0.01) 100%),
        rgba(16, 18, 28, 0.92) !important;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), var(--shadow-s);
    backdrop-filter: blur(18px);
}

.altcha:focus-within {
    border-color: rgba(92, 124, 250, 0.5);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 0 0 3px rgba(92, 124, 250, 0.14), var(--shadow-s);
}

.altcha[data-state="verified"] {
    border-color: rgba(74, 222, 128, 0.28);
}

.altcha[data-state="verifying"] {
    border-color: rgba(92, 124, 250, 0.38);
}

.altcha[data-state="error"],
.altcha[data-state="expired"] {
    border-color: rgba(248, 113, 113, 0.34);
}

.altcha-main {
    gap: 0.75rem;
    min-height: 64px;
    padding: 0.95rem 1rem;
}

.altcha-label {
    color: var(--text-primary);
    font-size: 0.94rem;
    font-weight: 600;
    line-height: 1.4;
}

.altcha-checkbox {
    width: 28px;
    height: 28px;
    flex: 0 0 28px;
}

.altcha-checkbox input {
    width: 18px;
    height: 18px;
    margin: 0;
    accent-color: var(--accent);
    cursor: pointer;
}

.altcha-spinner {
    color: var(--accent);
}

.altcha-anchor-arrow {
    left: 18px;
}

.altcha-error {
    padding: 0 1rem 1rem;
    color: #ffb4b4;
    line-height: 1.45;
}

.altcha-footer {
    padding: 0.45rem 1rem 0.65rem;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    color: var(--text-secondary);
}

.altcha-footer a,
.altcha-logo {
    color: var(--text-secondary) !important;
}

.altcha-code-challenge {
    top: calc(100% - 0.35rem);
    left: 0.9rem;
    width: calc(100% - 1.8rem);
    max-width: 320px;
    padding: 0.8rem;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0.01) 100%),
        rgba(16, 18, 28, 0.96);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 14px;
    box-shadow: var(--shadow-m);
    filter: none;
}

.altcha[data-floating="top"] .altcha-code-challenge {
    top: auto;
    bottom: calc(100% - 0.35rem);
}

.altcha-code-challenge-input {
    width: 100%;
    padding: 0.72rem 0.9rem;
    background: rgba(20, 20, 30, 0.78);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 10px;
    color: var(--text-primary);
}

.altcha-code-challenge-input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(92, 124, 250, 0.16);
}

.altcha-code-challenge-image {
    width: 100%;
    height: 58px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.98);
}

.altcha-code-challenge-audio,
.altcha-code-challenge-reload {
    padding: 0.5rem;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    color: var(--text-primary);
    transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.altcha-code-challenge-audio:hover:not(:disabled),
.altcha-code-challenge-reload:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.14);
    transform: translateY(-1px);
}

.altcha-code-challenge-verify {
    padding: 0.55rem 1rem;
    background: var(--accent);
    border-radius: 10px;
    font-weight: 600;
    color: #000;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.14), 0 8px 18px rgba(255, 255, 255, 0.15);
}

@media (max-width: 600px) {
    .altcha-main {
        padding: 0.85rem 0.9rem;
    }

    .altcha-code-challenge {
        left: 0.75rem;
        width: calc(100% - 1.5rem);
    }
}

.hidden {
    display: none;
}

@media (max-width: 1300px) {
    .navbar-controls {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .stats {
        flex-direction: column;
        gap: 1rem;
    }

    .table-container {
        overflow-x: auto;
        overflow-y: hidden;
    }

    table {
        min-width: 920px;
    }
}

@media (max-width: 900px) {
    .navbar {
        position: static;
        top: auto;
        padding: 0.9rem;
        gap: 0.75rem;
        border-radius: 18px;
    }

    .navbar-left, .navbar-right {
        width: 100%;
        justify-content: flex-start;
    }

    .navbar-left {
        order: 1;
        gap: 0.5rem;
    }

    .navbar-right {
        order: 2;
        flex-direction: column;
        align-items: stretch;
        gap: 0.75rem;
    }

    #authContainer {
        width: 100%;
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0.5rem;
    }

    #authContainer > button,
    #authContainer > a,
    #authContainer > a > button {
        width: 100%;
    }

    .navbar-controls {
        grid-template-columns: 1fr auto !important;
        gap: 0.75rem;
    }

    .navbar-controls .search-container {
        grid-column: 1 / -1;
        width: 100%;
    }

    .navbar-controls select,
    .navbar-controls input[type="text"] {
        width: 100%;
        min-width: 0;
    }

}

@media (max-width: 600px) {
    .navbar-top {
        flex-direction: column;
        align-items: stretch;
        gap: 0.75rem;
    }

    .site-brand {
        gap: 0.15rem;
    }

    .site-brand-name {
        font-size: 30px;
    }

    .site-brand-subtitle {
        font-size: 18px;
    }

    .site-logo {
        width: 40px;
        height: 40px;
    }

    .index-contribution-cta {
        display: none;
        max-width: calc(100vw - 1.5rem);
        border-radius: 14px;
    }

    .navbar {
        padding: 0.75rem;
        border-radius: 14px;
        margin-bottom: 1.25rem;
    }

    .navbar-left {
        display: grid;
        grid-template-columns: 1fr;
        width: 100%;
        gap: 0.5rem;
    }

    .navbar-left button,
    .navbar-left a,
    .navbar-left a button {
        width: 100%;
    }

    #authContainer {
        grid-template-columns: 1fr;
    }

    .navbar-right {
        flex-direction: row;
        align-items: center;
        justify-content: flex-start;
        flex-wrap: wrap;
        gap: 0.5rem;
    }

    #authContainer {
        width: 100%;
        display: flex;
        align-items: stretch;
        gap: 0.5rem;
    }

    #authContainer > button,
    #authContainer > a {
        flex: 1 1 0;
        min-width: 0;
    }

    #authContainer > a > button {
        width: 100%;
        min-width: 0;
    }

    .username {
        display: none;
    }

    .auth-action-btn,
    .feedback-trigger {
        width: 100%;
        min-width: 0;
    }

    #addGameBtn, #newsletterBtn, #pendingBtn {
        width: 100%;
    }
}


.modal2 {
    position: absolute;
    left: 50%;
    top: 0;
    transform: translate(-50%, 0);
    background: var(--bg-secondary);
    z-index: 9999;
    max-height: 100%;
    overflow-y: auto;
}
#modal2Wrap {
    position: absolute;
    backdrop-filter: blur(10px);
    width: 100%;
    height: 100%;
    top: 0;
    z-index: 9999;
}

#footer {
    text-align: center;
    padding: 1.5rem;
    color: var(--text-secondary);
}
#footer a {
    display: inline-block;
    text-decoration: none;
    color: white;
    margin: 0 1rem;
    transition: color 0.2s ease;
}
#footer a:hover {
    color: var(--accent);
}

.seo-fallback {
    margin: 2rem 0;
    padding: 1.5rem;
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    background: rgba(30, 30, 40, 0.6);
    color: var(--text-primary);
}

.seo-fallback h2,
.seo-fallback h3 {
    margin: 0 0 1rem;
    color: var(--text-primary);
}

.seo-fallback h3 {
    margin-top: 1.5rem;
    font-size: 1.1rem;
}

.seo-fallback p {
    color: var(--text-secondary);
    line-height: 1.6;
}

.seo-fallback ul {
    display: grid;
    gap: 0.75rem;
    margin: 1rem 0 0;
    padding-left: 1.25rem;
}

.seo-fallback li {
    color: var(--text-secondary);
    line-height: 1.5;
}

.seo-fallback a {
    color: var(--accent);
    font-weight: 600;
}

#messageModalText {
    margin-bottom: 20px;
}

/* Unified Navbar with Controls */
.navbar {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    padding: 0.85rem;
    margin-bottom: 1.25rem;
    background: rgba(25, 25, 35, 0.7);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    backdrop-filter: blur(20px);
    box-shadow: var(--glass-shadow), inset 0 1px 1px rgba(255, 255, 255, 0.05);
    transition: all 0.3s ease;
    top: 10px;
    z-index: 999;
}

.navbar-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.navbar-left, .navbar-right {
    display: flex;
    align-items: center;
    gap: 10px;
}

.navbar-left {
    flex-wrap: wrap;
}

.navbar-right {
    flex-wrap: wrap;
    justify-content: flex-end;
}

.navbar button {
    font-weight: 600;
    white-space: nowrap;
}

#addGameBtn {
    min-width: 140px;
}

#newsletterBtn {
    min-width: 240px;
}

#newsletterBtn:hover {
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.4) !important;
}

.navbar-controls {
    display: grid;
    grid-template-columns: 1fr auto auto;
    gap: 0.75rem;
    align-items: center;
}

.navbar-controls .search-container,
.navbar-controls select {
    transition: all 0.3s ease;
}

/* Links input styling */
.link-input-group {
    display: grid;
    grid-template-columns: 1fr 2fr auto;
    gap: 0.5rem;
    align-items: center;
    padding: 0.6rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 8px;
}

.link-input-group input {
    padding: 0.65rem 0.75rem;
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 0.9rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.link-input-group input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(0, 255, 136, 0.1);
}

.btn-add-link {
    margin-top: 0.5rem;
    padding: 0.65rem 1.2rem;
    width: 100%;
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-secondary);
}

.btn-remove-link {
    padding: 0.6rem 0.9rem;
    background: transparent;
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text-secondary);
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.btn-remove-link:hover {
    border-color: var(--error);
    background: rgba(255, 0, 0, 0.05);
    color: var(--error);
    box-shadow: none;
    transform: none;
}

/* Links display on game detail page */
.game-links-list {
    list-style: none;
    padding: 0;
    margin: 0.5rem 0;
}

.game-links-list li {
    margin-bottom: 0.5rem;
}

.game-links-list a {
    color: var(--accent);
    text-decoration: none;
    transition: color 0.2s ease;
    display: inline-flex;
    align-items: center;
}

.game-links-list a:hover {
    color: var(--text-primary);
    text-decoration: underline;
}

.game-links-list a::before {
    content: "→";
    margin-right: 0.5rem;
}

/* Authentication UI Styles */
#authContainer {
    display: flex;
    align-items: center;
    gap: 10px;
}

.username {
    color: var(--text-primary);
    font-weight: 500;
}

.btn-profile {
    background-color: #00c4ff;
}

.btn-profile.auth-action-btn {
    border: 1px solid transparent;
}

/* Auth Modal Styles */
#loginModal .modal-content,
#registerModal .modal-content,
#forgotPasswordModal .modal-content {
    max-width: 400px;
}

.modal-footer-text {
    text-align: center;
    margin-top: 15px;
    color: var(--text-secondary);
    margin-bottom: 15px;
}

.modal-footer-text a {
    color: #2196F3;
    text-decoration: none;
}

.modal-footer-text a:hover {
    text-decoration: underline;
}

.form-group small {
    display: block;
    margin-top: 4px;
    color: var(--text-secondary);
    font-size: 12px;
}

/* Reusable Tooltip System
 *
 * Usage:
 * Add the "tooltip" class and "data-tooltip" attribute to any element:
 *
 * <button class="tooltip" data-tooltip="Your tooltip text here">Click me</button>
 *
 * The tooltip will appear on hover above the element with a small arrow.
 * Works with any element type (button, span, div, etc.)
 */
.tooltip {
    position: relative;
}

.tooltip::before {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(-8px);
    background: rgba(25, 25, 35, 0.95);
    color: var(--text-primary);
    padding: 0.5rem 1rem;
    border-radius: 10px;
    font-size: 0.85rem;
    white-space: nowrap;
    border: 1px solid var(--accent);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4), 0 0 20px rgba(92, 124, 250, 0.2);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
    z-index: 1000;
    backdrop-filter: blur(10px);
}

.tooltip:hover::before {
    opacity: 1;
    transform: translateX(-50%) translateY(-8px);
}

/* Game Search Modal Styles */
#gameSearchContainer {
    z-index: 2000;
}

.search-modal-content {
    width: min(90vw, 600px);
    max-width: 600px;
    padding: 1.5rem;
}

.search-modal-copy,
.search-modal-status {
    margin: 0;
    color: var(--text-secondary);
    line-height: 1.5;
}

.search-modal-status {
    margin-top: 0.75rem;
}

.search-box {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.75rem;
}

#gameSearchInput {
    flex: 1;
    padding: 12px 16px;
    background: rgba(20, 20, 30, 0.7);
    border: 1px solid var(--border);
    border-radius: 12px;
    color: var(--text-primary);
    font-size: 16px;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

#gameSearchInput:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-dim);
}

.autocomplete-dropdown {
    max-height: 400px;
    overflow-y: auto;
    background: rgba(20, 20, 30, 0.95);
    border: 1px solid var(--border);
    border-top: none;
    border-radius: 0 0 14px 14px;
    width: 100%;
    margin-top: 0.35rem;
    backdrop-filter: blur(10px);
}

.autocomplete-dropdown:empty {
    display: none;
}

.autocomplete-item {
    padding: 10px 14px;
    cursor: pointer;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background 0.2s;
}

.autocomplete-item:last-child {
    border-bottom: none;
}

.autocomplete-item:hover,
.autocomplete-item.selected {
    background: rgba(92, 124, 250, 0.1);
}

.autocomplete-item-title {
    flex: 1;
    color: var(--text-primary);
}

.game-status-badge {
    font-size: 0.75rem;
    padding: 4px 8px;
    border-radius: 4px;
    font-weight: 600;
    text-transform: uppercase;
}

.game-status-approved {
    display: none;
    background: rgba(74, 222, 128, 0.2);
    color: #4ade80;
    border: 1px solid #4ade80;
}

.game-status-pending {
    background: rgba(251, 191, 36, 0.2);
    color: #fbbf24;
    border: 1px solid #fbbf24;
}

.autocomplete-add-new {
    padding: 10px 14px;
    cursor: pointer;
    border-bottom: 2px solid var(--border);
    display: flex;
    align-items: center;
    gap: 8px;
    transition: background 0.2s;
    background: var(--bg-secondary);
    color: var(--accent);
    font-weight: 500;
}

.autocomplete-add-new:hover {
    background: var(--bg-hover);
}

.autocomplete-add-new-icon {
    font-size: 1.2rem;
    font-weight: bold;
}

.autocomplete-no-results {
    padding: 16px;
    text-align: center;
    color: var(--text-secondary);
}

.autocomplete-no-results-title {
    font-size: 16px;
    margin-bottom: 8px;
}

.autocomplete-no-results-hint {
    font-size: 14px;
    color: var(--text-secondary);
}

.search-loading {
    padding: 16px;
    text-align: center;
    color: var(--text-secondary);
}

.search-loading .spinner {
    margin: 0 auto 10px;
}

/* Mobile responsive adjustments */
@media (max-width: 768px) {
    .search-modal-content {
        top: 10%;
        width: 95vw;
        padding: 1rem;
    }

    .autocomplete-dropdown {
        max-height: 300px;
    }

    .autocomplete-item {
        padding: 10px 12px;
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
    }

    .autocomplete-add-new {
        padding: 10px 12px;
    }

    .game-status-badge {
        font-size: 0.7rem;
        padding: 3px 6px;
    }

    .modal-content {
        padding: 1.5rem;
        max-width: 95%;
    }

    .form-section {
        padding: 1rem;
    }

    .modal-buttons {
        flex-direction: column;
    }

    .modal-buttons button {
        width: 100%;
    }

    .link-input-group {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }

    .btn-remove-link {
        width: 100%;
    }

    .game-title {
        word-break: unset;
    }

    #mainHeader th:first-child {
        width: 200px !important;
    }
}

#status-pending-info-text {
    margin: 5px 0 10px 10px;
    border-radius: 10px;
    font-style: italic;
}

#additionalInfoSection {
    margin-bottom: 0.5rem !important;
}
