/* assets/style.css */

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #0a0a0a;
    color: #e5e5e5;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    padding: 48px 24px 0;
}

/* ── Layout ────────────────────────────── */
.container {
    max-width: 420px;
    width: 100%;
    margin: 0 auto;
    flex: 1;
}

/* ── Header ────────────────────────────── */
.header { text-align: center; margin-bottom: 36px; }

.icon { width: 48px; height: 48px; margin: 0 auto 14px; opacity: 0.7; }
.icon svg { width: 100%; height: 100%; }

h1 { font-size: 18px; font-weight: 500; color: #a3a3a3; }

.updater-version {
    display: inline-block;
    margin-top: 6px;
    font-size: 11px;
    color: #3a3a3a;
    letter-spacing: 0.4px;
}

/* ── Card ──────────────────────────────── */
.card {
    background: #171717;
    border: 1px solid #262626;
    border-radius: 10px;
    padding: 18px;
    margin-bottom: 20px;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2px;
}

.card-title  { font-size: 12px; color: #737373; text-transform: uppercase; letter-spacing: 0.5px; }
.card-value  { font-size: 24px; font-weight: 600; color: #fafafa; }

/* ── Badge ─────────────────────────────── */
.badge {
    font-size: 10px;
    padding: 3px 7px;
    border-radius: 4px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.badge-update  { background: #262626; color: #a3a3a3; }
.badge-ok      { background: #171717; color: #525252; }
.badge-default { background: #1f1f1f; color: #737373; }
.badge-current { background: #262626; color: #a3a3a3; }

/* ── Settings ──────────────────────────── */
.settings-card { margin-bottom: 20px; }

.settings-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid #262626;
}
.settings-row:last-child { border-bottom: none; }

.settings-label { font-size: 13px; color: #a3a3a3; }
.settings-desc  { font-size: 11px; color: #525252; margin-top: 2px; }

/* ── Prefix input ──────────────────────── */
.prefix-input {
    background: #262626;
    border: 1px solid #363636;
    border-radius: 6px;
    color: #d4d4d4;
    font-size: 13px;
    font-weight: 600;
    padding: 5px 10px;
    width: 72px;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    outline: none;
    transition: border-color 0.15s;
}
.prefix-input:focus { border-color: #525252; }

/* ── Toggle ────────────────────────────── */
.toggle { position: relative; width: 40px; height: 22px; cursor: pointer; }
.toggle input { opacity: 0; width: 0; height: 0; }

.toggle-slider {
    position: absolute;
    inset: 0;
    background: #262626;
    border-radius: 11px;
    transition: 0.2s;
}
.toggle-slider:before {
    content: '';
    position: absolute;
    width: 16px; height: 16px;
    left: 3px; top: 3px;
    background: #525252;
    border-radius: 50%;
    transition: 0.2s;
}
.toggle input:checked + .toggle-slider { background: #404040; }
.toggle input:checked + .toggle-slider:before {
    transform: translateX(18px);
    background: #a3a3a3;
}

/* ── Version list ──────────────────────── */
.section-title {
    font-size: 11px;
    font-weight: 500;
    color: #525252;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.version-list { display: flex; flex-direction: column; gap: 4px; }

.version-item {
    background: #171717;
    border: 1px solid #262626;
    border-radius: 8px;
    padding: 12px 14px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: border-color 0.15s;
}
.version-item:hover        { border-color: #404040; }
.version-item.current      { border-color: #404040; cursor: pointer; }
.version-item.current:hover { border-color: #525252; background: #1f1f1f; }

.version-info   { display: flex; align-items: center; gap: 8px; }
.version-number { font-size: 14px; font-weight: 500; color: #d4d4d4; }

/* ── Button ────────────────────────────── */
.btn {
    font-size: 12px;
    font-weight: 500;
    padding: 6px 12px;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    transition: all 0.15s;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}
.btn-install           { background: #262626; color: #d4d4d4; }
.btn-install:hover     { background: #363636; color: #fafafa; }
.btn-install:disabled  { background: #1a1a1a; color: #404040; cursor: not-allowed; }

.btn.loading .btn-text  { display: none; }
.btn.loading .spinner   { display: inline-block; }

/* ── Spinner ───────────────────────────── */
.spinner {
    display: none;
    width: 10px; height: 10px;
    border: 1.5px solid #404040;
    border-top-color: #a3a3a3;
    border-radius: 50%;
    animation: spin 0.5s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* ── Misc ──────────────────────────────── */
.status { font-size: 12px; color: #525252; }
.empty  { text-align: center; padding: 32px; color: #404040; font-size: 13px; }

/* ── Loading/redirect screen ───────────── */
.loading-screen { text-align: center; padding: 80px 20px; }

.spinner-large {
    width: 32px; height: 32px;
    border: 2px solid #262626;
    border-top-color: #525252;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
    margin: 0 auto 20px;
}
.loading-text { color: #a3a3a3; font-size: 14px; }

/* ── Toast ─────────────────────────────── */
.toast {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%) translateY(60px);
    background: #171717;
    border: 1px solid #262626;
    border-radius: 6px;
    padding: 8px 14px;
    font-size: 12px;
    color: #a3a3a3;
    transition: transform 0.2s ease;
    z-index: 100;
}
.toast.show { transform: translateX(-50%) translateY(0); }

/* ── Footer ────────────────────────────── */
.footer {
    text-align: center;
    padding: 28px 0 20px;
    font-size: 11px;
    color: #3a3a3a;
    letter-spacing: 0.3px;
}
.footer a { color: #525252; text-decoration: none; transition: color 0.15s; }
.footer a:hover { color: #737373; }