* {
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    margin: 0;
    padding: 20px;
    background: #1b2838;
    color: #c7d5e0;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
}

.site-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 20px;
}

.site-header-main {
    flex: 1;
    min-width: 0;
    display: flex;
    align-items: flex-start;
    gap: 18px;
}

.site-header.landing-mode {
    justify-content: center;
}

.site-header.landing-mode .site-header-main {
    justify-content: center;
}

.site-header.landing-mode .site-title {
    text-align: center;
}

h1 {
    color: #66c0f4;
    margin-bottom: 20px;
}

h1.site-title {
    margin: 0;
    flex: 0 1 auto;
}

h1.site-title a {
    color: inherit;
    text-decoration: none;
}

.app-header-search {
    display: flex;
    align-items: center;
    flex: 1;
    min-width: 320px;
}

.app-shell {
    display: none;
}

.app-shell.visible {
    display: block;
}

.landing-page {
    margin-bottom: 22px;
}

.landing-card {
    max-width: 920px;
    margin: 0 auto;
    padding: 26px;
    background: linear-gradient(145deg, #23384a 0%, #1e3040 45%, #162330 100%);
    border: 1px solid #3a5f79;
    border-radius: 10px;
    box-shadow: 0 14px 30px rgba(0, 0, 0, 0.28);
}

.landing-kicker {
    margin: 0 0 10px;
    color: #8b9cae;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 700;
    font-size: 11px;
}

.landing-card h2 {
    margin: 0;
    font-size: 32px;
    color: #66c0f4;
    line-height: 1.15;
}

.landing-description {
    margin: 12px 0 0;
    color: #c7d5e0;
    max-width: 72ch;
    line-height: 1.45;
}

.landing-load-form {
    margin-top: 18px;
}

.landing-load-form label {
    display: block;
    color: #8b9cae;
    font-size: 12px;
    font-weight: 600;
}

.landing-load-row {
    margin-top: 8px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: stretch;
    gap: 10px;
}

#landingSteamIdInput {
    grid-column: 1;
    grid-row: 1;
    width: 100%;
    padding: 13px 14px;
    background: #152332;
    color: #e3edf5;
    border: 1px solid #66c0f4;
    border-radius: 6px;
    font-size: 18px;
}

#landingSteamIdInput:focus {
    outline: 2px solid rgba(102, 192, 244, 0.35);
    outline-offset: 1px;
}

.landing-load-row .landing-load-btn {
    grid-area: auto;
    grid-column: 2;
    grid-row: 1;
    border-radius: 6px;
    padding: 0 18px;
    font-size: 14px;
}

.last-profile-section {
    margin-top: 16px;
    padding: 12px;
    border: 1px solid #3a5f79;
    border-radius: 8px;
    background: rgba(12, 22, 31, 0.55);
}

.last-profile-label {
    display: block;
    font-size: 13px;
    color: #9fb2c5;
}

.last-profile-actions {
    margin-top: 8px;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.last-profile-list {
    margin-top: 10px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.last-profile-item {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 12px;
    flex-wrap: wrap;
    padding: 10px 12px;
    border: 1px solid #34536b;
    border-radius: 6px;
    background: rgba(10, 18, 26, 0.4);
    color: #c7d5e0;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    transition: background 0.18s ease, border-color 0.18s ease, color 0.18s ease, transform 0.18s ease;
}

.last-profile-item:hover,
.last-profile-item:focus-visible {
    background: rgba(24, 44, 60, 0.78);
    border-color: #66c0f4;
    color: #66c0f4;
    transform: translateY(-1px);
}

.last-profile-item:focus-visible {
    outline: 2px solid rgba(102, 192, 244, 0.35);
    outline-offset: 2px;
}

.landing-feature-grid {
    margin-top: 22px;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.landing-feature-item {
    padding: 12px;
    border-radius: 6px;
    border: 1px solid #34536b;
    background: rgba(10, 18, 26, 0.35);
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.landing-feature-item strong {
    color: #b5ddf5;
    font-size: 13px;
}

.landing-feature-item span {
    color: #9db0c2;
    font-size: 12px;
    line-height: 1.4;
}

.steam-control-panel {
    margin-bottom: 20px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: stretch;
}

.player-info,
.api-status {
    flex: 1 1 280px;
    min-width: 0;
    margin: 0;
    padding: 12px 14px;
    background: #2a475e;
    border-radius: 5px;
    border: 1px solid #375a74;
}

.player-info {
    flex: 1 1 280px;
    display: none;
    align-items: center;
    gap: 12px;
    min-height: 74px;
}

.player-info.visible {
    display: flex;
}

.player-info.player-info-clickable {
    cursor: pointer;
    transition: border-color 0.18s ease, background 0.18s ease;
}

.player-info.player-info-clickable:hover {
    border-color: #66c0f4;
    background: #2f5470;
}

.player-avatar {
    width: 52px;
    height: 52px;
    border-radius: 5px;
    border: 2px solid #66c0f4;
}

.player-details {
    flex: 1;
}

.player-name {
    font-size: 17px;
    font-weight: 600;
    color: #fff;
    margin-bottom: 2px;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
}

.player-name a {
    color: #66c0f4;
    text-decoration: none;
}

.player-name a:hover {
    text-decoration: underline;
}

.player-private-badge {
    font-size: 14px;
    line-height: 1;
    color: #d8b35a;
}

.player-you-badge {
    display: inline-block;
    font-size: 11px;
    font-weight: 600;
    padding: 2px 7px;
    border-radius: 10px;
    background: rgba(102, 192, 244, 0.15);
    color: #66c0f4;
    border: 1px solid rgba(102, 192, 244, 0.35);
    vertical-align: middle;
}

.player-real-name {
    color: #8b9cae;
    font-size: 14px;
    font-weight: 400;
}

.player-meta {
    font-size: 12px;
    color: #8b9cae;
    line-height: 1.4;
}

.player-meta .label {
    color: #66c0f4;
    font-weight: 500;
}

.copy-steam-id-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-left: 5px;
    padding: 2px 4px;
    background: transparent;
    border: none;
    border-radius: 3px;
    color: #8b9cae;
    cursor: pointer;
    vertical-align: middle;
    transition: color 0.15s ease, background 0.15s ease;
}

.copy-steam-id-btn:hover {
    color: #66c0f4;
    background: rgba(102, 192, 244, 0.12);
}

.copy-steam-id-btn--copied {
    color: #5ba85b !important;
}

.file-input-wrapper {
    margin: 0;
    padding: 0;
    background: transparent;
    border-radius: 0;
}

input[type="file"] {
    padding: 10px;
    background: #1b2838;
    color: #c7d5e0;
    border: 1px solid #66c0f4;
    border-radius: 3px;
    cursor: pointer;
}

.controls {
    margin-bottom: 20px;
    padding: 12px;
    background: #2a475e;
    border-radius: 5px;
    border: 1px solid #375a74;
}

.settings-header {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 10px;
    margin-bottom: 0;
    cursor: pointer;
    border-radius: 4px;
    transition: background 0.15s;
}

.settings-header:hover {
    background: rgba(102, 192, 244, 0.07);
}

.settings-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.8fr) minmax(0, 1fr);
    gap: 10px;
}

.settings-group {
    padding: 10px 12px;
    background: #1b2838;
    border-radius: 4px;
    border: 1px solid #3a5f79;
}

.settings-group h4 {
    margin: 0 0 8px;
    font-size: 12px;
    color: #66c0f4;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.settings-group-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 8px;
}

.settings-hint {
    font-size: 11px;
    color: #8b9cae;
}

.settings-group-compact {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.setting-checkbox {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-size: 12px;
    color: #c7d5e0;
    cursor: pointer;
    line-height: 1.35;
}

.setting-checkbox input[type="checkbox"] {
    margin-top: 1px;
    cursor: pointer;
}

.setting-row {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.setting-row label {
    font-size: 12px;
    color: #8b9cae;
    font-weight: 500;
}

.settings-select {
    width: 100%;
    padding: 6px 10px;
    background: #1b2838;
    color: #c7d5e0;
    border: 1px solid #66c0f4;
    border-radius: 3px;
    font-size: 13px;
    cursor: pointer;
}

.filters {
    margin-bottom: 20px;
    padding: 15px;
    background: #2a475e;
    border-radius: 5px;
}

.filter-header {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 8px;
    margin-bottom: 0;
    cursor: pointer;
    border-radius: 4px;
    transition: background 0.15s;
}

.filter-header:hover {
    background: rgba(102, 192, 244, 0.07);
}

.section-toggle {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: transparent;
    border: none;
    color: #66c0f4;
    cursor: pointer;
    padding: 0;
    font: inherit;
}

.section-title {
    font-size: 20px;
    font-weight: 600;
    line-height: 1.2;
}

.section-toggle-icon {
    color: #8b9cae;
    font-size: 14px;
    line-height: 1;
    transition: transform 0.2s ease;
}

.section-toggle[aria-expanded="false"] .section-toggle-icon {
    transform: rotate(-90deg);
}

.section-toggle:focus-visible {
    outline: 2px solid #66c0f4;
    outline-offset: 3px;
    border-radius: 3px;
}

.section-content {
    margin-top: 10px;
}

.section-content.is-collapsed {
    display: none;
}

.filter-row {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 15px;
    align-items: flex-start;
}

.filters .filter-row:last-of-type {
    margin-bottom: 0;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
    min-width: 0;
}

.filter-group label {
    font-size: 12px;
    color: #8b9cae;
    font-weight: 500;
}

.filter-group input[type="text"],
.filter-group input[type="number"],
.filter-group select {
    padding: 6px 10px;
    background: #1b2838;
    color: #c7d5e0;
    border: 1px solid #66c0f4;
    border-radius: 3px;
    font-size: 13px;
    min-width: 150px;
}

.filter-group input[type="number"] {
    min-width: 80px;
}

.range-inputs {
    display: flex;
    gap: 5px;
    align-items: center;
    width: 100%;
    min-width: 0;
}

.range-inputs input[type="number"] {
    flex: 1 1 0;
    min-width: 0;
    width: 100%;
}

.range-inputs span {
    color: #8b9cae;
    flex: 0 0 auto;
}

.filter-checkboxes {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 220px;
}

.filter-checkboxes .checkbox-item {
    color: #c7d5e0;
    font-weight: 400;
}

.bucket-checkboxes {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 5px 12px;
    min-width: 0;
}

.checkbox-item {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 12px;
    min-width: 0;
}

.checkbox-item input[type="checkbox"] {
    cursor: pointer;
}

.filter-btn {
    padding: 8px 16px;
    background: #66c0f4;
    color: #1b2838;
    border: none;
    border-radius: 3px;
    cursor: pointer;
    font-weight: 600;
    font-size: 13px;
    transition: all 0.2s;
}

.filter-btn:hover {
    background: #7dd5ff;
}

.filter-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.filter-btn.secondary {
    background: #1b2838;
    color: #66c0f4;
    border: 1px solid #66c0f4;
}

.filter-btn.secondary:hover {
    background: #2a3a4a;
}

.filter-reset-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 10px;
    font-size: 12px;
    line-height: 1;
    white-space: nowrap;
}

.export-btn {
    padding: 8px 16px;
    background: #5cb85c;
    color: #fff;
    border: none;
    border-radius: 3px;
    cursor: pointer;
    font-weight: 600;
    font-size: 13px;
    transition: all 0.2s;
}

.export-btn:hover {
    background: #6cc76c;
}

.column-toggles {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.column-toggle-group {
    display: inline-flex;
    align-items: center;
}

.column-toggle-group .column-toggle {
    border-radius: 999px 0 0 999px;
    border-right: none;
}

.column-toggle-group .column-toggle:only-child {
    border-radius: 999px;
    border-right: 1px solid #66c0f4;
}

.column-toggle-group .column-toggle.hidden {
    border-right: none;
}

.column-sort-btn {
    padding: 4px 6px;
    background: #1b2838;
    color: #8b9cae;
    border: 1px solid #66c0f4;
    border-radius: 0 999px 999px 0;
    cursor: pointer;
    font-size: 11px;
    line-height: 1.2;
    transition: all 0.2s;
    min-width: 22px;
    text-align: center;
}

.column-sort-btn:hover {
    background: #2a475e;
    color: #c6e3f5;
}

.column-sort-btn.sort-asc,
.column-sort-btn.sort-desc {
    background: #1a3a52;
    color: #66c0f4;
    border-color: #66c0f4;
}

.column-toggle.hidden + .column-sort-btn {
    border-color: #4a667c;
    background: #162433;
    color: #8b9cae;
}

.column-toggle.hidden + .column-sort-btn.sort-asc,
.column-toggle.hidden + .column-sort-btn.sort-desc {
    border-color: #f6d06f;
    color: #f6d06f;
    background: #3a2f10;
}

.column-toggle {
    padding: 4px 9px;
    background: #1b2838;
    color: #fff;
    border: 1px solid #66c0f4;
    border-radius: 999px;
    cursor: pointer;
    font-size: 11.5px;
    line-height: 1.2;
    transition: all 0.2s;
}

.column-toggle:hover {
    background: #66c0f4;
    color: #1b2838;
}

.column-toggle.hidden {
    opacity: 0.6;
    color: #8b9cae;
    border-color: #4a667c;
    background: #162433;
}

.table-wrapper {
    overflow-x: auto;
    overflow-y: visible;
    position: relative;
    background: #2a475e;
    border-radius: 5px;
    padding: 10px;
}

.floating-table-header {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1200;
    overflow: hidden;
    background: transparent;
    pointer-events: auto;
}

.floating-table-header table {
    margin: 0;
}

.hidden-sort-stack {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin: 0 0 10px;
    padding: 8px 10px;
    border: 1px solid #3f617c;
    border-radius: 6px;
    background: #203447;
}

.hidden-sort-label {
    color: #a8c8de;
    font-size: 12px;
    font-weight: 600;
}

.hidden-sort-chips {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.hidden-sort-chip {
    display: inline-flex;
    align-items: center;
    padding: 3px 8px;
    border-radius: 999px;
    border: 1px solid #4f7696;
    background: #2f4a63;
    color: #e6f4ff;
    font-size: 11.5px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s;
}

.hidden-sort-chip:hover {
    background: #3d6080;
    border-color: #66c0f4;
}

.hidden-sort-chip.is-hidden {
    border-color: #f6d06f;
    color: #fff3c4;
    background: #5a4a21;
}

.hidden-sort-chip.is-hidden:hover {
    background: #6e5a25;
}

table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    background: #1b2838;
}

th {
    background: #2a475e;
    padding: 12px 8px;
    text-align: left;
    font-weight: 600;
    color: #66c0f4;
    cursor: pointer;
    user-select: none;
    position: sticky;
    top: 0;
    z-index: 20;
    white-space: nowrap;
}

th:hover {
    background: #3d5a73;
}

th:focus-visible {
    outline: 2px solid #f6d06f;
    outline-offset: -2px;
}

th.sorted-asc::after {
    content: ' ' attr(data-sort-indicator);
    font-size: 11px;
    font-weight: 700;
    color: #f6d06f;
    letter-spacing: 0.02em;
}

th.sorted-desc::after {
    content: ' ' attr(data-sort-indicator);
    font-size: 11px;
    font-weight: 700;
    color: #f6d06f;
    letter-spacing: 0.02em;
}

td {
    padding: 10px 8px;
    border-bottom: 1px solid #2a475e;
}

tr:hover td {
    background: #2a3a4a;
}

.game-link {
    color: #66c0f4;
    text-decoration: none;
    cursor: pointer;
}

.game-link:hover {
    text-decoration: underline;
    color: #fff;
}

.hidden-column {
    display: none;
}

.action-icon {
    display: inline-block;
    width: 24px;
    height: 24px;
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.2s;
}

.action-icon:hover {
    opacity: 1;
}

.game-cover {
    width: 80px;
    height: auto;
    margin-right: 10px;
    border-radius: 3px;
    vertical-align: middle;
}

.game-cover-placeholder {
    width: 80px;
    height: 37px;
    background-color: var(--bg-secondary, #2a2a2a);
    border: 1px solid var(--border-color, #444);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.game-title-cell {
    display: flex;
    align-items: center;
    gap: 10px;
}

.game-title-links {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.game-title-text {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.game-title-main {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    flex-wrap: wrap;
}

.game-title-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    color: #8b9cae;
    font-size: 12px;
}

.game-title-meta-separator {
    color: #536879;
}

.game-price-meta {
    color: #c7d5e0;
    font-weight: 600;
}

.price-unavailable-icon {
    color: #666;
    font-size: 13px;
    cursor: default;
}

.steam-price-cell {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
}

.steam-price-cell--column {
    flex-direction: column;
    align-items: flex-start;
    gap: 3px;
}

.game-sale-badge {
    display: inline-flex;
    align-items: center;
    padding: 1px 6px;
    border-radius: 3px;
    background: #4c7f23;
    color: #d9ffb7;
    font-size: 11px;
    font-weight: 700;
    line-height: 1.4;
}

.game-source-badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 7px;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.game-source-badge.wishlist {
    background: rgba(111, 192, 102, 0.18);
    border: 1px solid rgba(111, 192, 102, 0.45);
    color: #b7f0a7;
}

.wishlist-row td {
    background: rgba(111, 192, 102, 0.05);
}

.wishlist-row:hover td {
    background: rgba(111, 192, 102, 0.09);
}

.steam-client-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    width: 22px;
    height: 22px;
    flex: 0 0 22px;
    border-radius: 999px;
    border: 1px solid #35556f;
    background: #1b2838;
    color: #9fc3da;
    font-size: 11px;
    font-weight: 700;
    line-height: 1;
    opacity: 1;
    transition: border-color 0.2s, background-color 0.2s, color 0.2s;
}

.steam-client-link:hover {
    border-color: #66c0f4;
    background: #22394c;
    color: #ffffff;
}

.warning-icon {
    color: #ffa500;
    cursor: help;
    font-size: 16px;
}

.completion-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 3px;
    font-size: 11px;
    font-weight: 600;
}

.completion-done {
    background: #4a9;
    color: #fff;
}

.completion-partial {
    background: #f90;
    color: #1b2838;
}

.completion-not-started {
    background: #888;
    color: #fff;
}

.wishlist-status {
    color: #fff;
}

.wishlist-released {
    background: #5b8cda;
}

.wishlist-upcoming {
    background: #7cc36d;
    color: #17301a;
}

.pending-data-indicator {
    display: inline-block;
    min-width: 22px;
    color: #66c0f4;
    font-weight: 700;
    letter-spacing: 0.18em;
    animation: pendingPulse 1.1s ease-in-out infinite;
}

@keyframes pendingPulse {
    0%, 100% {
        opacity: 0.35;
        transform: scale(0.98);
    }
    50% {
        opacity: 1;
        transform: scale(1.04);
    }
}

.tooltip {
    position: relative;
}

.tooltip .tooltiptext {
    visibility: hidden;
    width: 300px;
    background-color: #1b2838;
    color: #c7d5e0;
    text-align: left;
    border: 1px solid #66c0f4;
    border-radius: 3px;
    padding: 8px;
    position: absolute;
    z-index: 1300;
    bottom: 125%;
    left: 50%;
    margin-left: -150px;
    opacity: 0;
    transition: opacity 0.3s;
    font-size: 12px;
    line-height: 1.4;
    pointer-events: none;
}

.tooltip:hover .tooltiptext {
    visibility: visible;
    opacity: 1;
}

.table-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
}

.table-actions {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.stats {
    margin: 0;
    flex: 1;
    min-width: 0;
    font-size: 14px;
    color: #8b9cae;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.stats-price-row {
    font-size: 12px;
    color: #6a7d8e;
}

.stats-orig-price {
    color: #4e5f6d;
}

.stats-hltb-row {
    font-size: 12px;
    color: #6a7d8e;
}

.lucky-btn {
    padding: 6px 12px;
    font-size: 12px;
    white-space: nowrap;
}

.table-export-btn {
    padding: 6px 12px;
    font-size: 12px;
    white-space: nowrap;
}

.no-data {
    text-align: center;
    padding: 40px;
    color: #8b9cae;
}

.total-row td {
    background: #1e3548;
    border-top: 2px solid #375a74;
    padding: 8px 8px;
    font-size: 13px;
}

.total-row-label {
    color: #66c0f4;
    font-weight: 700;
    white-space: nowrap;
}

.total-row-value {
    color: #c6dfe9;
    font-weight: 600;
    white-space: nowrap;
}

.total-row-name-stats {
    color: #c6dfe9;
    font-size: 12px;
    line-height: 1.7;
}

.status-badge {
    padding: 4px 12px;
    border-radius: 3px;
    font-size: 12px;
    font-weight: bold;
}

.status-badge.unfinished {
    background: #8b2020;
    color: #ffcccc;
}

.status-badge.finished {
    background: #5c7e10;
    color: #b8d884;
}

.stat-item {
    text-align: center;
}

.stat-value {
    font-size: 32px;
    font-weight: bold;
    color: #66c0f4;
}

.stat-label {
    font-size: 14px;
    color: #8b929a;
    margin-top: 5px;
}

/* API Status */
.api-status {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 8px;
    font-size: 13px;
}

.api-status-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    min-height: 34px;
}

.api-status-indicator {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

.api-status .status-badge {
    padding: 0;
    border-radius: 0;
    font-size: 18px;
    line-height: 1;
}

#statusText {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.progress-bar-container {
    margin-top: 0;
}

.progress-bar-track {
    background: #1b2838;
    border-radius: 4px;
    overflow: hidden;
    height: 18px;
    border: 1px solid #66c0f4;
}

#progressBar {
    background: linear-gradient(90deg, #66c0f4, #4c9cd4);
    height: 100%;
    width: 0%;
    transition: width 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 11px;
    font-weight: bold;
}

.steam-input-wrapper {
    padding: 0;
    background: transparent;
    border-radius: 0;
    margin-top: 0;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
        "label label"
        "input button";
    align-items: center;
    gap: 6px 10px;
}

.steam-input-wrapper.header-search {
    width: 100%;
}

.steam-input-wrapper label {
    grid-area: label;
    color: #8b9cae;
    font-size: 12px;
    font-weight: 600;
}

.steam-input-wrapper input[type="text"] {
    grid-area: input;
    width: 100%;
    min-width: 0;
    padding: 9px 10px;
    background: #1b2838;
    color: #c7d5e0;
    border: 1px solid #66c0f4;
    border-radius: 3px;
    font-size: 13px;
}

.load-btn {
    grid-area: button;
    padding: 9px 14px;
    background: #66c0f4;
    color: #1b2838;
    border: none;
    border-radius: 3px;
    font-weight: 600;
    font-size: 13px;
    white-space: nowrap;
    cursor: pointer;
    transition: background 0.2s;
}

.load-btn:hover {
    background: #417a9b;
}

.refresh-btn {
    padding: 7px 12px;
    background: #5c7e10;
    color: #fff;
    border: none;
    border-radius: 3px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
    font-size: 12px;
    white-space: nowrap;
}

.refresh-btn:hover {
    background: #7ba512;
}

.refresh-btn:disabled {
    background: #3d3d3d;
    color: #8b9cae;
    cursor: not-allowed;
}

@media (max-width: 860px) {
    .site-header,
    .site-header-main {
        flex-direction: column;
        align-items: stretch;
    }

    .app-header-search {
        min-width: 0;
    }

    .site-header:not(.landing-mode) > .auth-section {
        margin-top: 0;
    }

    .auth-section.is-landing-auth {
        align-items: stretch;
    }

    .account-menu,
    .account-menu-button,
    .steam-login-btn {
        width: 100%;
    }

    .landing-card {
        padding: 18px;
    }

    .landing-card h2 {
        font-size: 25px;
    }

    .landing-load-row {
        grid-template-columns: 1fr;
    }

    .landing-load-row .landing-load-btn {
        grid-column: 1;
        grid-row: 2;
    }

    #landingSteamIdInput {
        font-size: 16px;
    }

    .landing-load-btn {
        width: 100%;
        min-height: 42px;
    }

    .landing-feature-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .section-title {
        font-size: 18px;
    }

    .filter-row {
        flex-direction: column;
        gap: 12px;
    }

    .filter-group,
    .filter-checkboxes,
    .bucket-checkboxes {
        width: 100%;
        min-width: 0;
    }

    .settings-header {
        flex-wrap: wrap;
        justify-content: flex-start;
        gap: 8px;
    }

    .settings-grid {
        grid-template-columns: 1fr;
    }

    .settings-group {
        padding: 10px;
    }

    .settings-group-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }

    .table-meta {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
    }

    .table-actions {
        display: grid;
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .lucky-btn,
    .table-export-btn {
        width: 100%;
    }

    .player-info,
    .api-status {
        flex-basis: 100%;
        min-width: 0;
    }

    .steam-input-wrapper {
        grid-template-columns: 1fr;
        grid-template-areas:
            "label"
            "input"
            "button";
    }

    .load-btn,
    .refresh-btn {
        width: 100%;
    }

    .api-status-header {
        flex-direction: column;
        align-items: stretch;
        min-height: 0;
    }

    #statusText {
        white-space: normal;
        overflow: visible;
        text-overflow: clip;
    }

    .player-meta {
        display: flex;
        flex-wrap: wrap;
        gap: 4px;
    }
}

/* Authentication Styles */
.auth-section {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 0 0 auto;
}

.site-header:not(.landing-mode) > .auth-section {
    margin-top: 20px;
}

.landing-auth-slot {
    margin-top: 16px;
}

.auth-section.is-landing-auth {
    justify-content: flex-start;
    padding: 10px 12px;
    border: 1px solid #34536b;
    border-radius: 6px;
    background: rgba(10, 18, 26, 0.35);
}

.auth-btn {
    padding: 8px 16px;
    background: #66c0f4;
    color: #1b2838;
    border: none;
    border-radius: 3px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
    font-size: 14px;
}

.auth-btn:hover {
    background: #4fa3d8;
}

.auth-btn.secondary {
    background: #2a475e;
    color: #c7d5e0;
}

.auth-btn.secondary:hover {
    background: #1b3549;
}

.auth-btn:disabled {
    background: #3d3d3d;
    color: #8b9cae;
    cursor: not-allowed;
}

.steam-login-btn {
    min-height: 42px;
    background: rgba(21, 35, 50, 0.8);
    border: 1px solid #3a5f79;
    border-radius: 6px;
    padding: 5px 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    transition: background 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
}

.steam-login-btn img {
    height: 32px;
    display: block;
}

.steam-login-btn:hover,
.steam-login-btn:focus-visible {
    background: rgba(30, 52, 70, 0.95);
    border-color: #66c0f4;
    transform: translateY(-1px);
}

.steam-login-btn:focus-visible {
    outline: 2px solid rgba(102, 192, 244, 0.35);
    outline-offset: 2px;
}

.lang-toggle-btn {
    background: rgba(21, 35, 50, 0.8);
    border: 1px solid #3a5f79;
    border-radius: 4px;
    color: #c7d5e0;
    cursor: pointer;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    padding: 4px 8px;
    transition: background 0.18s ease, border-color 0.18s ease;
}

.lang-toggle-btn:hover,
.lang-toggle-btn:focus-visible {
    background: rgba(30, 52, 70, 0.95);
    border-color: #66c0f4;
    color: #e8f4fc;
}

.lang-toggle-btn:focus-visible {
    outline: 2px solid rgba(102, 192, 244, 0.35);
    outline-offset: 2px;
}

.user-avatar {
    width: 30px;
    height: 30px;
    border-radius: 3px;
    object-fit: cover;
}

.account-menu {
    position: relative;
    align-items: center;
}

.account-menu-button {
    min-height: 42px;
    max-width: 240px;
    display: inline-flex;
    align-items: center;
    gap: 9px;
    padding: 5px 11px;
    background: rgba(42, 71, 94, 0.96);
    color: #c7d5e0;
    border: 1px solid #3a5f79;
    border-radius: 6px;
    cursor: pointer;
    font: inherit;
    font-size: 15px;
    font-weight: 600;
    line-height: 1;
    transition: background 0.18s ease, border-color 0.18s ease, color 0.18s ease, transform 0.18s ease;
}

.account-menu-button:hover,
.account-menu-button:focus-visible,
.account-menu.is-open .account-menu-button {
    background: rgba(50, 86, 114, 0.98);
    border-color: #66c0f4;
    color: #e3edf5;
}

.account-menu-button:hover {
    transform: translateY(-1px);
}

.account-menu-button:focus-visible {
    outline: 2px solid rgba(102, 192, 244, 0.35);
    outline-offset: 2px;
}

.account-menu-name {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.account-menu-caret {
    color: #8b9cae;
    font-size: 13px;
    line-height: 1;
}

.account-menu-panel {
    position: absolute;
    top: calc(100% + 7px);
    right: 0;
    z-index: 30;
    min-width: 180px;
    padding: 6px;
    background: #101b27;
    border: 1px solid #3a5f79;
    border-radius: 6px;
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.35);
    display: none;
}

.account-menu.is-open .account-menu-panel {
    display: block;
}

.account-menu-panel button {
    width: 100%;
    display: flex;
    align-items: center;
    padding: 9px 10px;
    background: transparent;
    border: 0;
    border-radius: 4px;
    color: #c7d5e0;
    cursor: pointer;
    font: inherit;
    font-size: 14px;
    font-weight: 600;
    text-align: left;
}

.account-menu-panel button:hover,
.account-menu-panel button:focus-visible {
    background: #22384c;
    color: #66c0f4;
    outline: none;
}

.auth-section.is-landing-auth .account-menu-panel {
    right: auto;
    left: 0;
}

.completion-playing {
    background: #5b8a5b;
    color: #fff;
}

.completion-near-done {
    background: #5b8a5b;
    color: #fff;
}

.completion-abandoned {
    background: #555;
    color: #ccc;
}

.completion-skipped {
    background: #444;
    color: #aaa;
    font-style: italic;
}

.completion-done-clickable {
    cursor: pointer;
}

.completion-done-clickable:hover .completion-badge {
    filter: brightness(1.15);
}

/* Status popover */
.status-popover {
    position: fixed;
    z-index: 500;
    background: #1b2838;
    border: 1px solid #66c0f4;
    border-radius: 4px;
    padding: 4px;
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 130px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.5);
}

.status-popover button {
    padding: 6px 12px;
    background: transparent;
    color: #c7d5e0;
    border: none;
    border-radius: 3px;
    cursor: pointer;
    text-align: left;
    font-size: 12px;
    white-space: nowrap;
}

.status-popover button:hover {
    background: #2a475e;
    color: #fff;
}

/* Modal Styles */
.modal {
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.7);
}

.modal-content {
    background-color: #2a475e;
    margin: 10% auto;
    padding: 30px;
    border: 1px solid #66c0f4;
    border-radius: 5px;
    width: 90%;
    max-width: 500px;
    position: relative;
}

.close {
    color: #8b9cae;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    line-height: 20px;
}

.close:hover,
.close:focus {
    color: #fff;
}

.modal-content h2 {
    color: #66c0f4;
    margin-top: 0;
    margin-bottom: 20px;
}

.modal-content input[type="email"],
.modal-content input[type="password"] {
    width: 100%;
    padding: 10px;
    background: #1b2838;
    color: #c7d5e0;
    border: 1px solid #66c0f4;
    border-radius: 3px;
    font-size: 14px;
    box-sizing: border-box;
}

.modal-content input[type="email"]:focus,
.modal-content input[type="password"]:focus {
    outline: none;
    border-color: #4fa3d8;
}

.launch-overlay {
    position: fixed;
    inset: 0;
    z-index: 1200;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(0, 0, 0, 0.72);
}

.launch-overlay-card {
    width: min(560px, 100%);
    background: #2a475e;
    border: 1px solid #66c0f4;
    border-radius: 8px;
    padding: 20px 20px 16px;
    position: relative;
    box-shadow: 0 18px 44px rgba(0, 0, 0, 0.45);
}

.launch-overlay-close {
    position: absolute;
    top: 8px;
    right: 8px;
    border: none;
    background: transparent;
    color: #8b9cae;
    font-size: 24px;
    cursor: pointer;
    line-height: 1;
    padding: 2px 8px;
}

.launch-overlay-close:hover {
    color: #ffffff;
}

.launch-overlay-card h3 {
    margin: 0 0 10px;
    color: #66c0f4;
    font-size: 22px;
}

.launch-overlay-card p {
    margin: 0 0 14px;
    color: #c7d5e0;
    line-height: 1.45;
}

.launch-overlay-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.launch-store-link {
    text-decoration: none;
    display: inline-flex;
    align-items: center;
}

.lucky-result-card {
    width: min(600px, 100%);
}

.lucky-result-game {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 16px;
}

.lucky-result-cover {
    width: 120px;
    height: auto;
    border-radius: 4px;
    flex-shrink: 0;
}

.lucky-result-header-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.lucky-result-name {
    font-size: 20px;
    font-weight: 600;
    color: #ffffff;
    line-height: 1.3;
}

.lucky-result-sub {
    font-size: 13px;
    color: #8b9cae;
}

.lucky-result-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin-bottom: 12px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 6px;
    padding: 10px 12px;
}

.lucky-result-hltb-section {
    margin-bottom: 16px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 6px;
    padding: 10px 12px;
}

.lucky-result-hltb-times {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin-bottom: 8px;
}

.lucky-result-hltb-link {
    font-size: 13px;
    color: #66c0f4;
    text-decoration: none;
}

.lucky-result-hltb-link:hover {
    text-decoration: underline;
}

.lucky-result-motivation {
    margin: 0 0 14px;
    padding: 10px 12px;
    background: rgba(102, 192, 244, 0.08);
    border-left: 3px solid #66c0f4;
    border-radius: 0 4px 4px 0;
    font-size: 13px;
    color: #c7d5e0;
    line-height: 1.5;
    font-style: italic;
}

.lucky-result-stat {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.lucky-stat-label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #8b9cae;
}

.lucky-stat-value {
    font-size: 15px;
    font-weight: 600;
    color: #c7d5e0;
}

#userInfo {
    display: flex;
    align-items: center;
}

#userEmail {
    color: #66c0f4;
    font-weight: 600;
}
