/* ═══════════════════════════════════════════════════════════════
   MX Bikes Toolbox — Unified Landing CSS
   Used by: coming_soon.html · login.php · kit-download.php
   ═══════════════════════════════════════════════════════════════ */

/* ── Reset & Variables ─────────────────────────────────────────── */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    --bg-dark: #0d0d0d;
    --bg-panel: #1e1e1e;
    --bg-card: #1a1a1f;
    --accent-cyan: #00d2ff;
    --accent-orange: #ff9d00;
    --accent-red: #ff3333;
    --accent-green: #22c55e;
    --text-main: #f0f0f0;
    --text-muted: #8a8a9a;
    --border: #2a2a35;
    --font-ui: 'Inter', system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
    --font-display: 'Rajdhani', system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
    --fs-10: 10px;
    --fs-11: 11px;
    --fs-13: 13px;
    --fs-14: 14px;
    --fs-17: 17px;
    --fs-18: 18px;
    --fs-20: 20px;
    --fs-22: 22px;
    --fs-28: 28px;
    --track-tight: 0.2px;
    --track-wide: 1.2px;
    --track-wider: 2px;
    --track-widest: 3px;
    --lh-tight: 1.2;
    --lh-base: 1.5;
    --lh-loose: 1.65;
    --lh-relaxed: 1.8;
}

html {
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ── Base Body ─────────────────────────────────────────────────── */
body {
    font-family: var(--font-ui);
    font-size: var(--fs-14);
    line-height: var(--lh-loose);
    letter-spacing: var(--track-tight);
    color: var(--text-main);
    background-color: var(--bg-dark);
    background-image: radial-gradient(ellipse at 50% 0%, rgba(0, 229, 255, 0.07) 0%, transparent 70%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 40px 20px 64px;
    /* bottom pad leaves room for fixed footer */
}

/* coming_soon uses overflow:hidden; download page needs scroll */
body.page-coming-soon {
    overflow: hidden;
    height: 100%;
}

/* ── Shared Logo ───────────────────────────────────────────────── */
.logo {
    max-width: 100%;
    width: 560px;
    margin-bottom: 40px;
    height: auto;
}

/* ── Badge ─────────────────────────────────────────────────────── */
.badge {
    display: inline-block;
    background: rgba(0, 229, 255, 0.08);
    border: 1px solid rgba(0, 229, 255, 0.25);
    color: var(--accent-cyan);
    font-size: var(--fs-11);
    font-weight: 500;
    letter-spacing: var(--track-wider);
    text-transform: uppercase;
    padding: 6px 16px;
    border-radius: 20px;
    margin-bottom: 24px;
}

/* ── Page Title (coming soon) ──────────────────────────────────── */
.subtitle {
    font-family: var(--font-display);
    font-size: 1.1em;
    font-weight: 600;
    color: #555;
    letter-spacing: var(--track-widest);
    text-transform: uppercase;
}

h1 {
    font-family: var(--font-display);
    font-size: 3em;
    font-weight: 700;
    margin-bottom: 8px;
}

h1 .kit {
    color: #00aaff;
    text-shadow: 0 0 40px rgba(0, 170, 255, 0.4);
}

h1 .sharer {
    color: #ff7a00;
    text-shadow: 0 0 40px rgba(255, 122, 0, 0.4);
}

.divider {
    width: 60px;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--accent-cyan), transparent);
    margin: 0 auto 40px;
}

.slogan {
    max-width: 100%;
    font-size: 1.15em;
    line-height: var(--lh-relaxed);
    color: #ccc;
}

.slogan strong {
    color: #fff;
    font-weight: 600;
}

.slogan .highlight {
    color: #00aaff;
    font-weight: 600;
}

/* ── Centered Footer (Used across subpages) ───────────────────────── */
.centered-footer {
    text-align: center;
    font-size: var(--fs-12);
    color: var(--text-muted);
    opacity: 0.6;
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid var(--border);
    cursor: default;
    /* Optional: let it take full width if needed */
    width: 100%;
}

.centered-footer a {
    color: var(--text-muted);
    text-decoration: none;
}

.centered-footer a:hover {
    color: var(--text-main);
    text-decoration: underline;
}



/* ── Shared Scrollbar ──────────────────────────────────────────── */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, .15);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, .3);
}

/* ════════════════════════════════════════════════════════════════
   LOGIN PAGE
   ════════════════════════════════════════════════════════════════ */
.login-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 28px;
    max-width: 440px;
    width: 100%;
}

.login-container hr {
    width: 100%;
    border-color: var(--text-muted);
}

.login-container a {
	color: inherit;
}

.login-container a:hover {
	font-weight: bold;
}

.login-desc {
    font-size: var(--fs-14);
    color: var(--text-muted);
    text-align: center;
    line-height: var(--lh-base);
    max-width: 360px;
}

.login-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 28px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 18px;
    width: 100%;
    box-shadow: 0 8px 24px rgba(0, 0, 0, .4);
}

.login-card h3 {
    font-family: var(--font-display);
    font-size: var(--fs-18);
    font-weight: 600;
    letter-spacing: var(--track-wide);
    text-transform: uppercase;
    color: var(--accent-cyan);
    margin: 0;
}

.login-card p {
    font-size: var(--fs-13);
    color: var(--text-muted);
    text-align: center;
    line-height: var(--lh-base);
    margin: 0;
}

.steam-login-link {
    display: inline-block;
    transition: transform 0.15s ease, filter 0.15s ease;
}

.steam-login-link:hover {
    transform: scale(1.03);
    filter: brightness(1.1);
}

.steam-login-link img {
    display: block;
    height: auto;
}

/* Remember-me checkbox */
.remember-me-label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    user-select: none;
}

.remember-me-label input[type="checkbox"] {
    display: none;
}

.remember-me-check {
    width: 18px;
    height: 18px;
    border: 2px solid var(--border);
    border-radius: 4px;
    background: var(--bg-dark);
    flex-shrink: 0;
    position: relative;
    transition: all 0.15s ease;
}

.remember-me-label input:checked+.remember-me-check {
    background: var(--accent-cyan);
    border-color: var(--accent-cyan);
}

.remember-me-label input:checked+.remember-me-check::after {
    content: '';
    position: absolute;
    left: 5px;
    top: 1px;
    width: 5px;
    height: 10px;
    border: solid #000;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.remember-me-text {
    font-size: var(--fs-13);
    color: var(--text-muted);
}

/* ════════════════════════════════════════════════════════════════
   KIT DOWNLOAD PAGE
   ════════════════════════════════════════════════════════════════ */
.dl-shell {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 32px;
    width: 100%;
    max-width: 520px;
}

.dl-shell>img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
}

.dl-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 32px;
    width: 100%;
    box-shadow: 0 12px 40px rgba(0, 0, 0, .5), 0 0 0 1px rgba(255, 255, 255, .03);
    display: flex;
    flex-direction: column;
    gap: 24px;
}

/* Image on top of the card */
.dl-kit-preview {
    margin: -32px -32px 0 -32px;
    border-radius: 12px 12px 0 0;
    overflow: hidden;
    cursor: pointer;
    background: #000;
}

.dl-kit-preview img {
    width: 100%;
    height: auto;
    display: block;
    transition: opacity 0.2s, transform 0.3s ease;
}

.dl-kit-preview:hover img {
    opacity: 0.8;
    transform: scale(1.05);
}

/* Kit header */
.dl-kit-header {
    display: flex;
    align-items: flex-start;
}

.dl-kit-info {
    flex: 1;
    min-width: 0;
}

.dl-kit-name {
    font-family: var(--font-display);
    font-size: var(--fs-20);
    font-weight: 700;
    letter-spacing: .4px;
    line-height: var(--lh-tight);
    word-break: break-word;
    color: var(--text-main);
    margin-bottom: 4px;
}

.dl-kit-sub {
    font-size: var(--fs-13);
    color: var(--text-muted);
}

.dl-kit-sub span {
    color: var(--text-main);
}

/* Meta bar */
.dl-meta {
    display: flex;
    border: 1px solid var(--border);
    border-radius: 8px;
    overflow: hidden;
}

.dl-meta-item {
    flex: 1;
    min-width: 0; /* Allow flex items to shrink below content size */
    padding: 12px 16px;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.dl-meta-item+.dl-meta-item {
    border-left: 1px solid var(--border);
}

.dl-meta-label {
    font-size: var(--fs-10);
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--text-muted);
}

.dl-meta-value {
    font-size: var(--fs-14);
    font-weight: 500;
    color: var(--text-main);
    word-break: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
}

/* Download count pill */
.dl-download-count {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: var(--accent-cyan);
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}

.dl-count-icon {
    opacity: .7;
    font-size: 12px;
}

@keyframes dl-count-pop {
    0% {
        transform: scale(1);
    }

    40% {
        transform: scale(1.22);
    }

    70% {
        transform: scale(0.94);
    }

    100% {
        transform: scale(1);
    }
}

.dl-download-count.pop {
    animation: dl-count-pop .35s ease;
}

/* Instructions */
.dl-instructions {
    background: rgba(0, 0, 0, .2);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 16px 18px;
}

.dl-instructions-title {
    font-size: var(--fs-11);
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 10px;
}

.dl-instructions ol {
    padding-left: 18px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.dl-instructions li {
    font-size: var(--fs-13);
    color: var(--text-muted);
    line-height: var(--lh-base);
}

.dl-instructions li strong {
    color: var(--text-main);
    font-weight: 500;
}

.dl-instructions code {
    background: rgba(255, 255, 255, .06);
    padding: 1px 5px;
    border-radius: 3px;
    font-size: 12px;
    color: var(--accent-cyan);
}

/* Download button */
.dl-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 14px 24px;
    background: linear-gradient(135deg, #0099bb, var(--accent-cyan));
    color: #000;
    font-family: var(--font-display);
    font-size: var(--fs-17);
    font-weight: 700;
    letter-spacing: .8px;
    text-transform: uppercase;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    text-decoration: none;
    transition: transform .15s ease, box-shadow .15s ease, filter .15s ease;
    box-shadow: 0 4px 20px rgba(0, 210, 255, .25);
}

.dl-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 28px rgba(0, 210, 255, .4);
    filter: brightness(1.08);
}

.dl-btn:active {
    transform: translateY(0);
}

/* Install Kit button */
.dl-install-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 13px 24px;
    background: linear-gradient(135deg, #cc7a00, var(--accent-orange));
    color: #000;
    font-family: var(--font-display);
    font-size: var(--fs-17);
    font-weight: 700;
    letter-spacing: .8px;
    text-transform: uppercase;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: transform .15s ease, box-shadow .15s ease, filter .15s ease;
    box-shadow: 0 4px 20px rgba(255, 157, 0, .2);
}

.dl-install-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 28px rgba(255, 157, 0, .35);
    filter: brightness(1.08);
}

.dl-install-btn:active:not(:disabled) {
    transform: translateY(0);
}

.dl-install-btn:disabled {
    opacity: .7;
    cursor: wait;
}

.dl-install-btn.unsupported {
    background: #2a2a35;
    box-shadow: none;
    cursor: not-allowed;
    opacity: .45;
}

.dl-install-btn.installed {
    background: linear-gradient(135deg, #1a8a3e, var(--accent-green));
    box-shadow: 0 4px 20px rgba(34, 197, 94, .2);
    cursor: default;
    opacity: 1;
}

/* Install hint */
.dl-install-hint {
    font-size: var(--fs-11);
    color: var(--text-muted);
    text-align: center;
    margin: -12px 0 0;
    opacity: .7;
}

/* Install status / progress */
.dl-install-status {
    background: rgba(0, 0, 0, .2);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 14px 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.dl-install-progress-track {
    width: 100%;
    height: 6px;
    background: rgba(255, 255, 255, .08);
    border-radius: 3px;
    overflow: hidden;
}

.dl-install-progress-bar {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--accent-orange), #ffb347);
    border-radius: 3px;
    transition: width .3s ease;
}

.dl-install-progress-bar.done {
    background: linear-gradient(90deg, var(--accent-green), #4ade80);
}

.dl-install-progress-bar.error {
    background: linear-gradient(90deg, var(--accent-red), #ff6666);
}

.dl-install-msg {
    font-size: var(--fs-13);
    color: var(--text-muted);
    line-height: var(--lh-base);
}

.dl-install-msg strong {
    color: var(--text-main);
}

.dl-install-msg code {
    background: rgba(255, 255, 255, .06);
    padding: 1px 5px;
    border-radius: 3px;
    font-size: 12px;
    color: var(--accent-cyan);
}

/* Mini button (e.g. Install anyway) */
.dl-mini-btn {
    background: rgba(255, 157, 0, 0.15);
    border: 1px solid rgba(255, 157, 0, 0.4);
    color: var(--accent-orange);
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.15s ease;
    font-family: var(--font-ui);
}

.dl-mini-btn:hover {
    background: rgba(255, 157, 0, 0.25);
    border-color: var(--accent-orange);
}

/* File list */
.dl-files {
    background: rgba(0, 0, 0, .2);
    border: 1px solid var(--border);
    border-radius: 8px;
    overflow: hidden;
}

.dl-files-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 16px;
    border-bottom: 1px solid var(--border);
}

.dl-files-title {
    font-size: var(--fs-11);
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--text-muted);
}

.dl-files-count {
    font-size: var(--fs-11);
    color: var(--text-muted);
    background: rgba(255, 255, 255, .06);
    padding: 2px 8px;
    border-radius: 10px;
}

.dl-files-list {
    padding: 8px 0;
    max-height: 200px;
    overflow-y: auto;
}

.dl-files-list::-webkit-scrollbar {
    width: 4px;
}

.dl-files-list::-webkit-scrollbar-track {
    background: transparent;
}

.dl-files-list::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, .12);
    border-radius: 4px;
}

.dl-file-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 5px 16px;
    font-size: 12px;
    color: var(--text-muted);
    transition: background .1s;
}

.dl-file-row:hover {
    background: rgba(255, 255, 255, .03);
}

.dl-file-tag {
    font-size: var(--fs-10);
    font-weight: 600;
    letter-spacing: .5px;
    padding: 1px 5px;
    border-radius: 3px;
    flex-shrink: 0;
    text-transform: uppercase;
}

.dl-file-tag.pnt {
    background: rgba(34, 197, 94, .12);
    color: var(--accent-green);
}

.dl-file-tag.pkz {
    background: rgba(255, 157, 0, .12);
    color: var(--accent-orange);
}

.dl-file-tag.other {
    background: rgba(255, 255, 255, .06);
    color: var(--text-muted);
}

.dl-file-name {
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: var(--text-main);
}

.dl-file-path {
    font-size: var(--fs-10);
    color: var(--text-muted);
    opacity: .6;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 50%;
}

/* Not-found state */
.dl-not-found {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.dl-not-found .icon {
    font-size: 48px;
}

.dl-not-found h2 {
    font-family: var(--font-display);
    font-size: var(--fs-22);
    font-weight: 700;
}

.dl-not-found p {
    font-size: var(--fs-14);
    color: var(--text-muted);
}

/* ── Dashboard Toast ───────────────────────────────────────────── */
.owner-dashboard-toast {
    display: flex;
    gap: 16px;
    align-items: flex-start;
    background: rgba(0, 210, 255, 0.08);
    border: 1px solid rgba(0, 210, 255, 0.2);
    border-radius: 8px;
    padding: 16px 20px;
}

.toast-icon {
    font-size: 24px;
    line-height: 1;
}

.toast-content {
    flex: 1;
}

.toast-content strong {
    display: block;
    color: var(--accent-cyan);
    font-family: var(--font-display);
    font-size: var(--fs-18);
    font-weight: 700;
    margin-bottom: 4px;
    letter-spacing: var(--track-wide);
    text-transform: uppercase;
}

.toast-content p {
    font-size: var(--fs-13);
    color: var(--text-muted);
    line-height: var(--lh-base);
}

/* ── Responsive ────────────────────────────────────────────────── */
@media (max-width: 600px) {
    body {
        padding: 16px 16px 64px;
    }

    .logo {
        margin-bottom: 16px;
    }

    .badge {
        margin-bottom: 12px;
    }

    h1 {
        font-size: 2em;
        margin-bottom: 4px;
    }

    .subtitle {
        font-size: 0.85em;
    }

    .divider {
        margin-bottom: 16px;
    }

    .slogan {
        font-size: 0.9em;
        line-height: 1.6;
    }

    .dl-card {
        padding: 20px;
    }

    .dl-kit-preview {
        margin: -20px -20px 0 -20px;
    }

    .dl-meta {
        flex-wrap: wrap;
    }

    .dl-meta-item+.dl-meta-item {
        border-left: none;
        border-top: 1px solid var(--border);
    }
}