body { font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif; }
.gadget-battle-page { max-width: 1100px; margin: 20px auto; padding: 0 16px; }
.battle-top { display: grid; grid-template-columns: 1.8fr 1fr; gap: 1rem; margin-bottom: 1rem; }
.battle-header { background: #fff; border-radius: 14px; box-shadow: 0 6px 24px rgba(0,0,0,0.06); padding: 1rem; }
.battle-header h1 { margin: 0 0 0.4rem; font-size: 2rem; color: #0f172a; }
.battle-header p { margin:0; color:#334155; }
.gadget-filters { background:#fff; border-radius:14px; box-shadow:0 6px 24px rgba(15,23,42,0.08); padding:1rem; }
.gadget-filter-form { display:grid; grid-template-columns:1fr 1fr; gap:0.7rem; }
.filter-row { display:flex; flex-direction:column; margin-bottom:0.3rem; }
.filter-row label { font-size:0.75rem; text-transform:uppercase; letter-spacing:.08em; color:#475569; margin-bottom:.2rem; }
.filter-row select { padding:0.5rem; border:1px solid #cbd5e1; border-radius:8px; background:#fff; }
.random-gadget-battle { display:grid; grid-template-columns:1fr 1fr; gap:1rem; margin-bottom:1rem; }
.gadget-card { background:#fff; border-radius:14px; overflow:hidden; border:1px solid #e2e8f0; box-shadow:0 4px 16px rgba(0,0,0,.05); display:flex; flex-direction:column; }
.gadget-card-image img { width:100%; height:170px; object-fit:cover; display:block; }
.gadget-card-body { padding:1rem; display:flex; flex-direction:column; gap:.4rem; }
.gadget-card-meta { margin-bottom:.2rem; }
.chip { display:inline-block; background:#e0e7ff; color:#1d4ed8; border-radius:999px; padding:.2rem .65rem; font-size:.75rem; font-weight:600; }
.gadget-card h2 { margin:.2rem 0; font-size:1.2rem; color:#0f172a; }
.gadget-card p { margin:0; color:#475569; font-size:.95rem; min-height:2.2rem; }
.gadget-footer { margin-top:auto; display:flex; justify-content:space-between; align-items:center; gap:.5rem; }
.vote-count { color:#334155; font-size:.9rem; font-weight:600; }
.vote-button { border:0; border-radius:10px; background:#0ea5e9; color:#fff; font-size:.9rem; font-weight:700; padding:.55rem .95rem; cursor:pointer; transition:.2s; }
.vote-button:hover { background:#0284c7; }
.vote-button.voted { background:#64748b; cursor:not-allowed; }
.leaderboard-wrapper { margin-top: 0.2rem; }
.leaderboard { background:#0f172a; color:#fff; border-radius:14px; padding:1rem; box-shadow:0 8px 24px rgba(0,0,0,.15); }
.leaderboard h2 { margin:0 0 0.75rem; font-size:1.2rem; }
.top-list { list-style:none; margin:0; padding:0; display:grid; gap:.5rem; }
.top-list li { background:#1e293b; border-radius:8px; padding:.5rem .7rem; display:flex; justify-content:space-between; align-items:center; }
.top-list .gadget-name { color:#e2e8f0; font-weight:600; }
.top-list .gadget-votes { color:#f8fafc; font-size:.85rem; }
.no-gadgets { color:#334155; background:#f8fafc; border:1px dashed #cbd5e1; padding:.8rem; border-radius:8px; }
.compare-bar { display:flex; justify-content:space-between; align-items:center; margin:1rem 0; background:#fff; border:1px solid #e2e8f0; border-radius:10px; padding:.7rem 1rem; }
.compare-action { background:#0ea5e9; color:#fff; border:0; border-radius:8px; padding:.45rem .8rem; cursor:pointer; font-weight:700; }
.compare-action:disabled { background:#94a3b8; cursor:not-allowed; }
.compare-toggle { border:1px dashed #0ea5e9; background:#fff; color:#0ea5e9; border-radius:8px; padding:.3rem .5rem; font-size:.8rem; margin-left:.5rem; cursor:pointer; }
.compare-toggle.selected { border-style:solid; background:#0ea5e9; color:#fff; }
.gadget-detail-page { background:#fff; border-radius:14px; padding:1rem; margin-top:1rem; }
.gadget-summary-card { border:1px solid #e2e8f0; border-radius:14px; overflow:hidden; margin-bottom:1rem; }
.gadget-hero img { width:100%; display:block; object-fit:contain; max-height:340px; }

/* ── Compare page ─────────────────────────────────────────────────────────── */
.ts-compare-page {
    max-width: 1240px;
    margin: 0 auto;
    padding: 40px 20px 80px;
    color: #eaf2ff;
}

.ts-compare-message {
    max-width: 700px;
    margin: 80px auto;
    padding: 32px;
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 24px;
    background: linear-gradient(180deg, #111827 0%, #0b1220 100%);
    text-align: center;
}

.ts-compare-hero {
    text-align: center;
    margin-bottom: 32px;
}

.ts-compare-eyebrow {
    display: inline-block;
    margin-bottom: 12px;
    padding: 6px 12px;
    border-radius: 999px;
    background: rgba(55, 187, 255, 0.12);
    color: #6fd3ff;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.ts-compare-hero h1 {
    margin: 0;
    font-size: clamp(34px, 5vw, 56px);
    line-height: 1.05;
    color: #ffffff;
}

.ts-compare-subtitle {
    margin: 14px auto 0;
    max-width: 700px;
    color: #97a3b6;
    font-size: 16px;
}

.ts-compare-summary {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 180px minmax(0, 1fr);
    gap: 20px;
    align-items: center;
    margin-bottom: 32px;
}

.ts-device-card,
.ts-versus-block,
.ts-compare-table-section {
    border: 1px solid rgba(255,255,255,0.08);
    background: linear-gradient(180deg, #111827 0%, #0b1220 100%);
    border-radius: 28px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.32);
}

.ts-device-card {
    overflow: hidden;
}

.ts-device-card.is-leading {
    border-color: rgba(92, 229, 164, 0.45);
    box-shadow: 0 20px 70px rgba(22, 163, 74, 0.12);
}

.ts-device-media {
    aspect-ratio: 4 / 3;
    background: radial-gradient(circle at top, rgba(55, 187, 255, 0.22), rgba(55, 187, 255, 0) 55%), #0f172a;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.ts-device-media img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.ts-device-placeholder {
    width: 100%;
    height: 100%;
    border-radius: 18px;
    background: linear-gradient(135deg, rgba(55, 187, 255, 0.14), rgba(255,255,255,0.03));
}

.ts-device-content {
    padding: 24px;
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 20px;
}

.ts-device-content h2 {
    margin: 0;
    font-size: 24px;
    line-height: 1.15;
    color: #ffffff;
}

.ts-device-score {
    min-width: 88px;
    padding: 14px 16px;
    border-radius: 18px;
    background: rgba(255,255,255,0.04);
    text-align: center;
    font-size: 30px;
    font-weight: 800;
    line-height: 1;
    color: #ffffff;
}

.ts-device-score span {
    display: block;
    margin-top: 6px;
    font-size: 12px;
    color: #97a3b6;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.ts-versus-block {
    padding: 22px 18px;
    text-align: center;
}

.ts-versus {
    width: 72px;
    height: 72px;
    margin: 0 auto 14px;
    border-radius: 999px;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, #38bdf8, #22c55e);
    color: #08111f;
    font-size: 24px;
    font-weight: 900;
}

.ts-result-pill {
    display: inline-block;
    padding: 10px 14px;
    border-radius: 999px;
    background: rgba(255,255,255,0.06);
    color: #ffffff;
    font-weight: 700;
}

.ts-result-meta {
    margin-top: 12px;
    color: #97a3b6;
    font-size: 13px;
}

.ts-compare-table-section {
    padding: 24px;
}

.ts-table-header {
    margin-bottom: 18px;
}

.ts-table-header h2 {
    margin: 0;
    font-size: 24px;
    color: #ffffff;
}

.ts-compare-table-wrap {
    overflow-x: auto;
}

.ts-compare-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 760px;
}

.ts-compare-table th,
.ts-compare-table td {
    padding: 18px 16px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    text-align: left;
}

.ts-compare-table thead th {
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #97a3b6;
    background: rgba(255,255,255,0.02);
}

.ts-compare-table tbody tr:last-child td {
    border-bottom: 0;
}

.ts-spec-label {
    width: 24%;
    font-weight: 700;
    color: #ffffff;
}

.ts-spec-value {
    width: 38%;
    color: #d7e3f4;
    font-weight: 600;
    border-radius: 14px;
}

.ts-spec-value.is-win {
    background: rgba(34, 197, 94, 0.12);
    color: #b6f7cb;
}

.ts-spec-value.is-lose {
    background: rgba(239, 68, 68, 0.08);
    color: #f1b4b4;
}

.ts-spec-value.is-tie {
    background: rgba(255,255,255,0.03);
    color: #ffffff;
}

@media (max-width: 980px) {
    .ts-compare-summary {
        grid-template-columns: 1fr;
    }

    .ts-versus-block {
        order: -1;
    }
}

@media (max-width: 640px) {
    .ts-compare-page {
        padding: 24px 14px 56px;
    }

    .ts-device-content {
        flex-direction: column;
        align-items: flex-start;
    }

    .ts-device-score {
        width: 100%;
    }

    .ts-compare-table-section {
        padding: 16px;
        border-radius: 22px;
    }
}
