/* =========================================================
   Pixel Utilities TOOL — theme stylesheet
   Lightweight: system fonts, no frameworks, ~1 file
   ========================================================= */

:root {
    --blue: #1a73e8;
    --blue-dark: #1557b0;
    --blue-light: #e8f0fe;
    --ink: #1f1f1f;
    --ink-soft: #444746;
    --muted: #5f6368;
    --line: #e0e3e7;
    --bg: #ffffff;
    --bg-alt: #f6f8fc;
    --radius: 14px;
    --shadow: 0 1px 3px rgba(60,64,67,.15), 0 4px 12px rgba(60,64,67,.08);
    --shadow-lg: 0 4px 8px rgba(60,64,67,.12), 0 12px 28px rgba(60,64,67,.15);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    color: var(--ink);
    background: var(--bg);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; height: auto; display: block; }
h1, h2, h3 { line-height: 1.25; color: var(--ink); }

.container { max-width: 1140px; margin: 0 auto; padding: 0 20px; }

/* ---------- Buttons ---------- */
.btn {
    display: inline-block; padding: .7rem 1.5rem; border-radius: 999px;
    font-weight: 600; font-size: .95rem; cursor: pointer; border: 2px solid transparent;
    transition: background .15s, box-shadow .15s, color .15s; text-decoration: none !important;
}
.btn-primary { background: var(--blue); color: #fff; }
.btn-primary:hover { background: var(--blue-dark); box-shadow: var(--shadow); }
.btn-outline { border-color: var(--blue); color: var(--blue); background: transparent; }
.btn-outline:hover { background: var(--blue-light); }
.btn-ghost { color: var(--ink-soft); }
.btn-ghost:hover { background: var(--bg-alt); }
.btn-light { background: #fff; color: var(--blue); }
.btn-light:hover { box-shadow: var(--shadow-lg); }
.btn-sm { padding: .45rem 1.1rem; font-size: .88rem; }
.btn-lg { padding: .85rem 2rem; font-size: 1.05rem; }

/* ---------- Header ---------- */
.site-header {
    position: sticky; top: 0; z-index: 100; background: rgba(255,255,255,.95);
    backdrop-filter: blur(8px); border-bottom: 1px solid transparent;
    transition: box-shadow .2s, border-color .2s;
}
.site-header.is-scrolled { border-color: var(--line); box-shadow: 0 2px 8px rgba(60,64,67,.08); }
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 68px; }
.site-brand { display: flex; align-items: center; gap: .6rem; color: var(--ink); font-weight: 700; font-size: 1.15rem; }
.site-brand:hover { text-decoration: none; }
.brand-mark { display: flex; }

.main-nav { display: flex; align-items: center; gap: 1.5rem; }
.main-nav ul.menu { display: flex; gap: 1.4rem; list-style: none; margin: 0; padding: 0; }
.main-nav ul.menu a { color: var(--ink-soft); font-size: .95rem; font-weight: 500; }
.main-nav ul.menu a:hover { color: var(--blue); text-decoration: none; }
.nav-actions { display: flex; align-items: center; gap: .5rem; margin-left: .5rem; }

.nav-toggle { display: none; background: none; border: 0; padding: .6rem; cursor: pointer; flex-direction: column; gap: 5px; }
.nav-toggle span { width: 22px; height: 2px; background: var(--ink); border-radius: 2px; transition: .2s; }

/* ---------- Hero ---------- */
.hero {
    background: linear-gradient(160deg, #f8fbff 0%, var(--blue-light) 60%, #e3edfd 100%);
    padding: 96px 0 88px; text-align: center;
}
.badge {
    display: inline-block; background: #fff; color: var(--blue-dark);
    border: 1px solid #c6dafc; border-radius: 999px; padding: .3rem 1rem;
    font-size: .82rem; font-weight: 600; letter-spacing: .02em; margin-bottom: 1.2rem;
}
.hero-title { font-size: clamp(2.2rem, 5vw, 3.4rem); margin: 0 0 1rem; letter-spacing: -.02em; }
.hero-title .accent { color: var(--blue); }
.hero-sub { font-size: 1.25rem; color: var(--muted); max-width: 620px; margin: 0 auto 2rem; }
.hero-actions { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }
.hero-version { margin-top: 1.4rem; color: var(--muted); font-size: .92rem; }
.hero-version strong { color: var(--ink); }

/* ---------- Sections ---------- */
.section { padding: 84px 0; }
.section-alt { background: var(--bg-alt); }
.section-title { text-align: center; font-size: clamp(1.6rem, 3vw, 2.2rem); margin: 0 0 .6rem; letter-spacing: -.01em; }
.section-sub { text-align: center; color: var(--muted); max-width: 620px; margin: 0 auto 3rem; }

.grid { display: grid; gap: 1.4rem; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

/* ---------- Cards ---------- */
.card {
    background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
    padding: 1.8rem; box-shadow: var(--shadow); transition: box-shadow .2s, transform .2s;
}
.card:hover { box-shadow: var(--shadow-lg); }

.feature-card h3 { margin: .9rem 0 .4rem; font-size: 1.12rem; }
.feature-card p { margin: 0; color: var(--muted); font-size: .95rem; }
.feature-icon {
    width: 48px; height: 48px; border-radius: 12px; background: var(--blue-light);
    color: var(--blue); display: flex; align-items: center; justify-content: center;
}

/* ---------- Device cards ---------- */
.device-card { text-align: center; display: flex; flex-direction: column; align-items: center; color: var(--ink); }
a.device-card:hover { text-decoration: none; transform: translateY(-3px); }
.device-card img { width: 110px; height: auto; margin-bottom: .8rem; }
.device-card h3 { margin: .2rem 0; font-size: 1.08rem; }
.device-ph { color: var(--blue); margin-bottom: .8rem; }
.device-codename { color: var(--muted); font-size: .85rem; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.device-link { margin-top: .9rem; color: var(--blue); font-size: .88rem; font-weight: 600; }

/* ---------- Download card ---------- */
.download-card {
    display: grid; grid-template-columns: 1.2fr 1fr; gap: 2.5rem; align-items: center;
    padding: 3rem;
}
.download-main h2 { margin: 0 0 .3rem; font-size: 1.7rem; }
.download-version { color: var(--blue); font-weight: 600; margin: 0; }
.download-meta { color: var(--muted); margin: .2rem 0 1.4rem; }
.download-note { color: var(--muted); font-size: .85rem; margin-top: 1rem; }
.download-history h3 { margin-top: 0; }
.download-history ul { list-style: none; margin: 0; padding: 0; }
.download-history li {
    padding: .7rem 0; border-bottom: 1px dashed var(--line);
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .9rem; color: var(--ink-soft);
}
.download-history li:last-child { border-bottom: 0; }

/* ---------- CTA ---------- */
.cta-section { background: linear-gradient(135deg, var(--blue) 0%, #174ea6 100%); color: #fff; text-align: center; }
.cta-section h2 { color: #fff; margin: 0 0 .5rem; font-size: clamp(1.6rem, 3vw, 2.2rem); }
.cta-section p { color: #dbe7fd; margin: 0 0 1.8rem; }

/* ---------- Device (model) pages ---------- */
.device-hero { background: linear-gradient(160deg, #f8fbff 0%, var(--blue-light) 100%); padding: 64px 0; }
.device-hero-inner h1 { margin: .6rem 0; font-size: clamp(2rem, 4vw, 2.8rem); letter-spacing: -.01em; }
.breadcrumb { font-size: .88rem; color: var(--muted); display: flex; gap: .5rem; }
.breadcrumb a { color: var(--muted); }
.breadcrumb a:hover { color: var(--blue); }
.device-tagline { color: var(--ink-soft); font-size: 1.15rem; margin: 0 0 1.6rem; }
.device-layout { display: grid; grid-template-columns: 1.6fr 1fr; gap: 1.6rem; align-items: start; }
.device-main { display: flex; flex-direction: column; gap: 1.6rem; }
.device-side { display: flex; flex-direction: column; gap: 1.6rem; position: sticky; top: 88px; }
.spec-card dl { margin: 0; }
.spec-row { display: flex; justify-content: space-between; gap: 1rem; padding: .6rem 0; border-bottom: 1px solid var(--line); }
.spec-row dt { color: var(--muted); }
.spec-row dd { margin: 0; font-weight: 600; text-align: right; }
.feature-checklist { list-style: none; margin: 0; padding: 0; columns: 2; }
.feature-checklist li { padding: .45rem 0; break-inside: avoid; }
.feature-checklist .check { color: #188038; font-weight: 700; margin-right: .5rem; }

/* ---------- Pages / posts ---------- */
.page-wrap { padding: 64px 20px; max-width: 860px; }
.page-card { padding: 2.5rem; }
.page-title { margin: 0 0 1rem; }
.post-meta { color: var(--muted); font-size: .88rem; margin-bottom: 1.2rem; }
.post-card { margin-bottom: 1.5rem; }
.post-card .post-title { margin: 0 0 .3rem; font-size: 1.4rem; }
.entry-content a { text-decoration: underline; }

/* ---------- Footer ---------- */
.site-footer { background: #17181c; color: #b6bac2; margin-top: 0; }
.footer-grid {
    display: grid; grid-template-columns: 1.6fr 1fr 1fr 1.2fr; gap: 2.5rem; padding: 64px 20px 48px;
}
.footer-col h4 { color: #fff; margin: 0 0 1rem; font-size: .95rem; text-transform: uppercase; letter-spacing: .05em; }
.footer-col ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .55rem; }
.footer-col a { color: #b6bac2; font-size: .93rem; }
.footer-col a:hover { color: #fff; }
.footer-brand .brand-text { color: #fff; font-size: 1.2rem; font-weight: 700; }
.footer-brand p { font-size: .92rem; max-width: 300px; }
.footer-note { font-size: .85rem; color: #8a8f98; margin-top: .8rem; }
.footer-bottom { border-top: 1px solid #2a2c33; padding: 1.2rem 0; font-size: .85rem; color: #8a8f98; }
.footer-bottom p { margin: 0; }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
    .grid-4 { grid-template-columns: repeat(2, 1fr); }
    .grid-3 { grid-template-columns: repeat(2, 1fr); }
    .download-card { grid-template-columns: 1fr; padding: 2.2rem; }
    .device-layout { grid-template-columns: 1fr; }
    .device-side { position: static; }
    .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 720px) {
    .nav-toggle { display: flex; }
    .main-nav {
        position: absolute; top: 68px; left: 0; right: 0; background: #fff;
        flex-direction: column; align-items: stretch; gap: 0; padding: 1rem 20px 1.4rem;
        border-bottom: 1px solid var(--line); box-shadow: var(--shadow-lg);
        display: none;
    }
    .main-nav.is-open { display: flex; }
    .main-nav ul.menu { flex-direction: column; gap: .2rem; }
    .main-nav ul.menu a { display: block; padding: .65rem 0; font-size: 1.05rem; }
    .nav-actions { margin: .8rem 0 0; flex-direction: column; align-items: stretch; }
    .nav-actions .btn { text-align: center; }
    .grid-3, .grid-4 { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: 1fr; gap: 2rem; }
    .section { padding: 56px 0; }
    .hero { padding: 64px 0; }
    .feature-checklist { columns: 1; }
}
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    * { transition: none !important; }
}

/* ---------- Firebase Auth & License Portal (Lightweight, Modern SaaS) ---------- */
.auth-wrap { max-width: 410px; margin: 0 auto; transition: max-width .2s ease; }
.auth-wrap:has(.auth-dashboard-card:not([hidden])) { max-width: 820px; }

.auth-card {
    text-align: center; padding: 1.4rem 1.6rem; border-radius: var(--radius);
    background: #fff; border: 1px solid var(--line); box-shadow: var(--shadow);
}
.auth-brand-badge { margin-bottom: .4rem; }
.auth-title { font-size: 1.25rem; margin: .2rem 0 .2rem; font-weight: 700; letter-spacing: -.02em; }
.auth-sub { color: var(--muted); font-size: .84rem; margin: 0 0 .75rem; line-height: 1.4; }

/* Segmented Tabs */
.auth-tabs {
    display: flex; background: var(--bg-alt); padding: 3px; border-radius: 999px;
    border: 1px solid var(--line); margin-bottom: .75rem; gap: 2px;
}
.auth-tab-btn {
    flex: 1; padding: .4rem .6rem; font-size: .8rem; font-weight: 600;
    color: var(--ink-soft); background: transparent; border: 0; border-radius: 999px;
    cursor: pointer; transition: all .15s ease;
}
.auth-tab-btn:hover { color: var(--blue); }
.auth-tab-btn.active {
    background: #fff; color: var(--blue); box-shadow: 0 1px 3px rgba(60,64,67,.15);
}

/* Alerts */
.auth-alert {
    padding: .5rem .8rem; border-radius: 8px; font-size: .82rem;
    margin-bottom: .75rem; text-align: left; line-height: 1.4;
}
.auth-alert-error { background: #fce8e6; color: #c5221f; border: 1px solid #fad2cf; }
.auth-alert-success { background: #e6f4ea; color: #137333; border: 1px solid #ceead6; }

/* Form inputs & controls */
.form-group { margin-bottom: .65rem; text-align: left; }
.label-row { display: flex; justify-content: space-between; align-items: baseline; }
.text-sm { font-size: .8rem !important; }
.auth-label { display: block; font-size: .8rem; font-weight: 600; color: var(--ink-soft); margin-bottom: .2rem; }
.auth-input {
    width: 100%; padding: .5rem .8rem; border: 1.5px solid var(--line); border-radius: 8px;
    font-size: .9rem; transition: border-color .15s, box-shadow .15s; background: #fff; color: var(--ink);
}
.auth-input:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px var(--blue-light); }

.password-input-wrap { position: relative; display: flex; align-items: center; }
.password-input-wrap .auth-input { padding-right: 2.6rem; }
.btn-toggle-pwd {
    position: absolute; right: .6rem; background: none; border: 0;
    color: var(--muted); cursor: pointer; padding: .25rem; display: flex;
    align-items: center; justify-content: center; transition: color .15s;
}
.btn-toggle-pwd:hover, .btn-toggle-pwd.active { color: var(--blue); }

button.btn-submit-main {
    width: 100%; height: 40px; display: flex; align-items: center; justify-content: center;
    background: linear-gradient(180deg, #1a73e8 0%, #1557b0 100%); color: #fff;
    border: none; border-radius: 8px; font-size: 14px; font-weight: 600; cursor: pointer;
    box-shadow: 0 3px 12px rgba(26,115,232,.28); margin-top: 10px; transition: all .2s;
}
button.btn-submit-main:hover {
    background: linear-gradient(180deg, #1557b0 0%, #0d47a1 100%); transform: translateY(-1px);
    box-shadow: 0 5px 16px rgba(26,115,232,.35);
}
button.btn-submit-main:disabled { opacity: .7; cursor: not-allowed; transform: none; }


.auth-hint { font-size: .84rem; color: var(--muted); margin: 0 0 .75rem; text-align: left; line-height: 1.4; }
.auth-switch { margin: .55rem 0 0; font-size: .82rem; color: var(--muted); }
button.link-btn, .link-btn {
    background: none !important; border: 0 !important; color: var(--blue) !important;
    font-weight: 600; cursor: pointer; font-size: inherit; padding: 0 !important; margin: 0;
    text-decoration: none; transition: color .15s;
}
button.link-btn:hover, .link-btn:hover { text-decoration: underline; color: var(--blue-dark); }
.auth-legal { margin: .45rem 0 0; font-size: .74rem; color: var(--muted); }

/* ---------- Professional Signed-In User Portal ---------- */
.auth-dashboard-card {
    padding: 2.4rem; text-align: left; background: #fff;
    border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow);
}

.dash-user-header {
    display: flex; justify-content: space-between; align-items: center;
    border-bottom: 1px solid var(--line); padding-bottom: 1.6rem; margin-bottom: 1.8rem;
    flex-wrap: wrap; gap: 1.2rem;
}
.dash-user-info { display: flex; align-items: center; gap: 1.2rem; }
.auth-avatar {
    width: 58px; height: 58px; border-radius: 50%;
    background: linear-gradient(135deg, var(--blue-light) 0%, #d2e3fc 100%) center/cover no-repeat;
    color: var(--blue-dark); display: flex; align-items: center; justify-content: center;
    font-size: 1.45rem; font-weight: 700; flex-shrink: 0; border: 1.5px solid #c6dafc;
}
.dash-member-badge {
    font-size: .76rem; text-transform: uppercase; letter-spacing: .06em;
    color: #188038; font-weight: 700; display: inline-flex; align-items: center; gap: .3rem;
}
.dash-member-badge::before {
    content: ""; display: inline-block; width: 6px; height: 6px;
    border-radius: 50%; background: #188038;
}
.dash-email { font-size: 1.3rem; margin: .15rem 0 .2rem; color: var(--ink); word-break: break-all; font-weight: 700; }
.dash-plan-tag { font-size: .84rem; color: var(--muted); }

.dash-header-actions { display: flex; gap: .6rem; align-items: center; flex-wrap: wrap; }
.dash-btn-tool {
    display: inline-flex; align-items: center; gap: 6px; background: var(--blue); color: #fff;
    border-radius: 999px; padding: 8px 18px; font-size: 13.5px; font-weight: 600; text-decoration: none !important;
    box-shadow: 0 2px 6px rgba(26,115,232,.3); transition: all .15s;
}
.dash-btn-tool:hover { background: var(--blue-dark); transform: translateY(-1px); color: #fff; }
button.dash-btn-signout {
    display: inline-flex; align-items: center; background: #f8fafc; color: #475569; border: 1px solid #cbd5e1;
    border-radius: 999px; padding: 8px 18px; font-size: 13.5px; font-weight: 600; cursor: pointer;
    transition: all .15s;
}
button.dash-btn-signout:hover { background: #f1f5f9; color: var(--ink); border-color: #94a3b8; }

/* Dashboard Cards Grid */
.dash-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; align-items: stretch; }
.dash-card {
    background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
    padding: 1.5rem; display: flex; flex-direction: column; transition: box-shadow .2s;
    box-shadow: 0 1px 2px rgba(60,64,67,.06);
}
.dash-card:hover { box-shadow: var(--shadow); }

.dash-card-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1.2rem; gap: .8rem; }
.dash-card-title-wrap { display: flex; align-items: center; gap: .6rem; }
.dash-card-title-wrap h3 { margin: 0; font-size: 1.1rem; font-weight: 700; }
.dash-card-icon { color: var(--blue); display: flex; align-items: center; }

/* Modern Status Pills */
.status-pill {
    font-size: .76rem; font-weight: 700; padding: .3rem .75rem; border-radius: 999px;
    letter-spacing: .02em; white-space: nowrap; display: inline-flex; align-items: center; gap: .35rem;
}
.status-active, .status-ready { background: #e6f4ea; color: #137333; border: 1px solid #ceead6; }
.status-pending { background: #fef7e0; color: #b06000; border: 1px solid #feefc3; }
.status-cooldown { background: #fff8e1; color: #b06000; border: 1px solid #ffe082; }
.status-expired, .status-banned { background: #fce8e6; color: #c5221f; border: 1px solid #fad2cf; }
.status-loading { background: #f1f3f4; color: #5f6368; border: 1px solid #dadce0; }

/* Prominent Days Box */
.license-days-box {
    text-align: center; padding: 1.2rem .8rem; background: var(--bg-alt);
    border: 1px solid var(--line); border-radius: 12px; margin-bottom: 1.2rem;
}
.license-days-number { font-size: 2.4rem; font-weight: 800; line-height: 1; color: var(--blue); }
.license-days-box.days-active .license-days-number { color: #188038; }
.license-days-box.days-pending .license-days-number { color: #e37400; }
.license-days-box.days-expired .license-days-number,
.license-days-box.days-banned .license-days-number { color: #d93025; }
.license-days-label { font-size: .8rem; font-weight: 700; color: var(--muted); margin-top: .3rem; text-transform: uppercase; letter-spacing: .05em; }

/* Clean Metadata Rows */
.dash-details-list { margin: 0 0 1.2rem; }
.dash-detail-row {
    display: flex; justify-content: space-between; align-items: center;
    padding: .5rem 0; border-bottom: 1px dashed var(--line); font-size: .88rem;
}
.dash-detail-row:last-child { border-bottom: 0; }
.dash-detail-row dt { color: var(--muted); margin: 0; }
.dash-detail-row dd { margin: 0; text-align: right; color: var(--ink); font-weight: 500; }

/* Notice Banners */
.license-notice {
    padding: .75rem .95rem; border-radius: 10px; font-size: .86rem; line-height: 1.45;
    margin-top: auto;
}
.notice-active { background: #e6f4ea; color: #137333; border: 1px solid #ceead6; }
.notice-pending { background: #fef7e0; color: #b06000; border: 1px solid #feefc3; }
.notice-expired, .notice-banned { background: #fce8e6; color: #c5221f; border: 1px solid #fad2cf; }
.license-notice p { margin: 0; }

/* Cooldown Display */
.pc-cooldown-box {
    background: var(--bg-alt); border: 1px solid var(--line); border-radius: 12px;
    padding: 1.1rem; text-align: center; margin-bottom: 1rem;
}
.cooldown-header {
    font-size: .78rem; font-weight: 700; color: var(--muted);
    text-transform: uppercase; letter-spacing: .05em; margin-bottom: .35rem;
}
.cooldown-timer {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 1.7rem; font-weight: 800; letter-spacing: .04em; padding: .35rem .9rem;
    border-radius: 8px; display: inline-block;
}
.cooldown-timer.timer-active { color: #b06000; background: #fff8e1; border: 1px solid #ffe082; }
.cooldown-timer.timer-ready { color: #137333; background: #e8f5e9; border: 1px solid #c8e6c9; }
.cooldown-sub { margin: .65rem 0 0; font-size: .84rem; color: var(--ink-soft); line-height: 1.4; }
.cooldown-note {
    font-size: .82rem; color: var(--muted); background: var(--bg-alt); padding: .75rem .9rem;
    border-radius: 10px; border: 1px solid var(--line); line-height: 1.45; margin-top: auto;
}
.cooldown-note p { margin: 0; }

/* Loading State */
.dash-loading { text-align: center; padding: 2.8rem 1rem; }
.dash-loading p { color: var(--muted); font-size: .92rem; margin-top: .9rem; }
.spinner {
    width: 34px; height: 34px; border: 3px solid var(--line);
    border-top-color: var(--blue); border-radius: 50%;
    animation: pxSpin .75s linear infinite; margin: 0 auto;
}
@keyframes pxSpin { to { transform: rotate(360deg); } }

.dash-footer {
    margin-top: 1.8rem; padding-top: 1.2rem; border-top: 1px solid var(--line);
    text-align: center; font-size: .86rem; color: var(--muted);
}
.dash-footer p { margin: 0; }

/* Responsive */
@media (max-width: 800px) {
    .dash-grid { grid-template-columns: 1fr; }
    .dash-user-header { flex-direction: column; align-items: flex-start; }
    .dash-header-actions { width: 100%; }
    .auth-dashboard-card { padding: 1.6rem 1.2rem; }
    .auth-card { padding: 2rem 1.2rem; }
}
