:root {
    --bg: #070a10;
    --panel: rgba(15, 20, 30, 0.78);
    --panel-strong: #101620;
    --border: rgba(255, 255, 255, 0.08);
    --border-hover: rgba(121, 91, 255, 0.35);
    --text: #f3f5f8;
    --muted: #8d97a8;
    --accent: #795bff;
    --accent-2: #9f8cff;
    --green: #3ee69b;
    --red: #ff5f72;
    --max: 1180px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    background:
        radial-gradient(circle at 50% -20%, rgba(121, 91, 255, 0.18), transparent 42rem),
        var(--bg);
    color: var(--text);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    line-height: 1.5;
}

a {
    color: inherit;
    text-decoration: none;
}

button,
a {
    -webkit-tap-highlight-color: transparent;
}

.grid-bg {
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    opacity: 0.32;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
    background-size: 42px 42px;
    mask-image: linear-gradient(to bottom, black, transparent 75%);
}

.site-header {
    width: min(calc(100% - 40px), var(--max));
    min-height: 76px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--border);
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 11px;
    font-size: 15px;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.brand-mark {
    width: 31px;
    height: 31px;
    border-radius: 9px;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, var(--accent), #4f38c5);
    box-shadow: 0 8px 28px rgba(121, 91, 255, 0.24);
}

.nav {
    display: flex;
    align-items: center;
    gap: 6px;
}

.nav a {
    color: var(--muted);
    padding: 9px 13px;
    border-radius: 9px;
    font-size: 14px;
    font-weight: 650;
    transition: color 150ms ease, background 150ms ease;
}

.nav a:hover,
.nav a.active {
    color: var(--text);
    background: rgba(255, 255, 255, 0.05);
}

.menu-button {
    display: none;
    width: 38px;
    height: 38px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.03);
    padding: 9px;
}

.menu-button span {
    display: block;
    height: 2px;
    margin: 4px 0;
    background: var(--text);
    border-radius: 10px;
}

main {
    width: min(calc(100% - 40px), var(--max));
    margin: 0 auto;
}

.hero {
    min-height: 700px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    padding: 85px 0 64px;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    padding: 7px 11px;
    border: 1px solid var(--border);
    border-radius: 999px;
    color: #c5ccda;
    background: rgba(255, 255, 255, 0.025);
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.pulse {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--green);
    box-shadow: 0 0 0 4px rgba(62, 230, 155, 0.1);
}

.hero h1,
.page-hero h1,
.error-page h1 {
    margin: 28px 0 20px;
    font-size: clamp(54px, 8vw, 96px);
    line-height: 0.98;
    letter-spacing: -0.065em;
}

.hero h1 span {
    color: var(--accent-2);
}

.hero-copy {
    max-width: 650px;
    margin: 0;
    color: var(--muted);
    font-size: clamp(17px, 2vw, 20px);
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 34px;
}

.button {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 18px;
    border: 1px solid transparent;
    border-radius: 11px;
    font: inherit;
    font-size: 14px;
    font-weight: 750;
    cursor: pointer;
    transition: transform 150ms ease, background 150ms ease, border-color 150ms ease;
}

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

.button.primary {
    background: linear-gradient(135deg, var(--accent), #5b42dc);
    color: white;
    box-shadow: 0 10px 30px rgba(121, 91, 255, 0.18);
}

.button.primary:hover {
    background: linear-gradient(135deg, #866bff, #674dde);
}

.button.secondary {
    border-color: var(--border);
    color: #d8dde7;
    background: rgba(255, 255, 255, 0.035);
}

.button.secondary:hover {
    border-color: rgba(255, 255, 255, 0.16);
}

.button.disabled {
    cursor: not-allowed;
    color: #737d8d;
    background: rgba(255, 255, 255, 0.035);
    border-color: var(--border);
}

.button.disabled:hover {
    transform: none;
}

.hero-stats {
    width: 100%;
    max-width: 760px;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    margin-top: 70px;
    border: 1px solid var(--border);
    border-radius: 14px;
    overflow: hidden;
    background: rgba(10, 14, 21, 0.65);
    backdrop-filter: blur(14px);
}

.hero-stats div {
    padding: 18px 20px;
}

.hero-stats div + div {
    border-left: 1px solid var(--border);
}

.hero-stats strong,
.hero-stats span {
    display: block;
}

.hero-stats strong {
    font-size: 14px;
    margin-bottom: 3px;
}

.hero-stats span {
    color: var(--muted);
    font-size: 12px;
}

.section {
    padding: 90px 0;
}

.section.topless {
    padding-top: 0;
}

.section.compact {
    padding-top: 40px;
}

.section-heading {
    margin-bottom: 34px;
}

.section-heading span,
.eyebrow {
    color: var(--accent-2);
    font-size: 11px;
    font-weight: 850;
    letter-spacing: 0.14em;
}

.section-heading h2,
.cta h2 {
    margin: 10px 0 0;
    font-size: clamp(32px, 5vw, 50px);
    line-height: 1.05;
    letter-spacing: -0.045em;
}

.feature-grid,
.script-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
}

.feature-card,
.script-card,
.status-panel,
.cta {
    border: 1px solid var(--border);
    background: linear-gradient(180deg, rgba(19, 25, 36, 0.74), rgba(10, 14, 21, 0.74));
    backdrop-filter: blur(16px);
}

.feature-card,
.script-card {
    min-height: 245px;
    padding: 26px;
    border-radius: 16px;
    transition: border-color 160ms ease, transform 160ms ease;
}

.feature-card:hover,
.script-card:hover {
    transform: translateY(-2px);
    border-color: var(--border-hover);
}

.feature-icon {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border: 1px solid rgba(121, 91, 255, 0.2);
    border-radius: 10px;
    background: rgba(121, 91, 255, 0.08);
    color: var(--accent-2);
    font-size: 11px;
    font-weight: 850;
}

.feature-card h3 {
    margin: 58px 0 9px;
    font-size: 20px;
    letter-spacing: -0.025em;
}

.feature-card p,
.script-card p,
.cta p,
.page-hero p,
.error-page p {
    margin: 0;
    color: var(--muted);
}

.cta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 30px;
    padding: 38px;
    border-radius: 18px;
}

.cta p {
    margin-top: 10px;
}

.page-hero {
    padding: 115px 0 70px;
}

.page-hero h1 {
    margin-top: 12px;
    margin-bottom: 18px;
    font-size: clamp(50px, 7vw, 82px);
}

.page-hero p {
    max-width: 630px;
    font-size: 17px;
}

.script-card {
    min-height: 290px;
    display: flex;
    flex-direction: column;
}

.script-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.tag {
    color: var(--accent-2);
    font-size: 10px;
    font-weight: 850;
    letter-spacing: 0.12em;
}

.version {
    color: var(--muted);
    font-size: 11px;
}

.script-card h2 {
    margin: 58px 0 10px;
    font-size: 22px;
    letter-spacing: -0.03em;
}

.script-card .button {
    align-self: flex-start;
    margin-top: auto;
}

.status-panel {
    padding: 34px;
    border-radius: 18px;
}

.status-main {
    display: flex;
    align-items: center;
    gap: 18px;
    padding-bottom: 30px;
    border-bottom: 1px solid var(--border);
}

.status-main h2 {
    margin: 4px 0 0;
    font-size: clamp(24px, 4vw, 34px);
    letter-spacing: -0.035em;
}

.status-label {
    color: var(--muted);
    font-size: 12px;
}

.status-orb {
    width: 48px;
    height: 48px;
    flex: 0 0 auto;
    border-radius: 50%;
}

.status-orb.loading {
    border: 3px solid rgba(255, 255, 255, 0.08);
    border-top-color: var(--accent);
    animation: spin 0.8s linear infinite;
}

.status-orb.online {
    background: var(--green);
    box-shadow: 0 0 0 10px rgba(62, 230, 155, 0.08), 0 0 40px rgba(62, 230, 155, 0.16);
}

.status-orb.offline {
    background: var(--red);
    box-shadow: 0 0 0 10px rgba(255, 95, 114, 0.08), 0 0 40px rgba(255, 95, 114, 0.16);
}

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

.status-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    margin-top: 30px;
}

.status-item {
    padding: 4px 22px;
}

.status-item:first-child {
    padding-left: 0;
}

.status-item + .status-item {
    border-left: 1px solid var(--border);
}

.status-item span,
.status-item strong {
    display: block;
}

.status-item span {
    color: var(--muted);
    font-size: 11px;
    margin-bottom: 8px;
}

.status-item strong {
    font-size: 14px;
}

.error-page {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
}

.error-page h1 {
    font-size: clamp(50px, 8vw, 82px);
}

.error-page .button {
    margin-top: 28px;
}

footer {
    width: min(calc(100% - 40px), var(--max));
    min-height: 100px;
    margin: 80px auto 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    border-top: 1px solid var(--border);
    color: #727c8c;
    font-size: 12px;
}

@media (max-width: 820px) {
    .feature-grid,
    .script-grid {
        grid-template-columns: 1fr;
    }

    .status-grid {
        grid-template-columns: 1fr 1fr;
        gap: 24px 0;
    }

    .status-item:nth-child(3) {
        padding-left: 0;
        border-left: 0;
    }
}

@media (max-width: 640px) {
    .site-header {
        position: relative;
    }

    .menu-button {
        display: block;
    }

    .nav {
        display: none;
        position: absolute;
        top: 66px;
        left: 0;
        right: 0;
        z-index: 20;
        flex-direction: column;
        align-items: stretch;
        padding: 8px;
        border: 1px solid var(--border);
        border-radius: 12px;
        background: #0c111a;
        box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
    }

    .nav.open {
        display: flex;
    }

    .hero {
        min-height: auto;
        padding-top: 120px;
    }

    .hero h1 {
        font-size: clamp(48px, 15vw, 72px);
    }

    .hero-stats {
        grid-template-columns: 1fr;
        margin-top: 52px;
    }

    .hero-stats div + div {
        border-left: 0;
        border-top: 1px solid var(--border);
    }

    .cta {
        align-items: flex-start;
        flex-direction: column;
    }

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

    .status-item,
    .status-item:first-child,
    .status-item:nth-child(3) {
        padding: 0;
        border-left: 0;
    }

    footer {
        align-items: flex-start;
        flex-direction: column;
        justify-content: center;
    }
}


.source-pill {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    align-self: flex-start;
    padding: 9px 13px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.025);
    color: #c5ccda;
    font-size: 12px;
    font-weight: 700;
}

.scripts-hero {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 32px;
}

.status-summary {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    margin-bottom: 18px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: rgba(10, 14, 21, 0.65);
    overflow: hidden;
}

.status-summary div {
    padding: 18px 20px;
}

.status-summary div + div {
    border-left: 1px solid var(--border);
}

.status-summary strong,
.status-summary span {
    display: block;
}

.status-summary strong {
    font-size: 22px;
    letter-spacing: -0.03em;
}

.status-summary span {
    margin-top: 3px;
    color: var(--muted);
    font-size: 11px;
}

.script-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 18px;
}

.search-box {
    min-width: 260px;
    flex: 1;
    max-width: 410px;
    height: 44px;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0 13px;
    border: 1px solid var(--border);
    border-radius: 11px;
    background: rgba(255, 255, 255, 0.025);
}

.search-box span {
    color: var(--muted);
    font-size: 20px;
}

.search-box input {
    width: 100%;
    border: 0;
    outline: 0;
    background: transparent;
    color: var(--text);
    font: inherit;
    font-size: 13px;
}

.search-box input::placeholder {
    color: #667080;
}

.filter-row {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 7px;
}

.filter-button {
    min-height: 38px;
    padding: 0 12px;
    border: 1px solid var(--border);
    border-radius: 9px;
    background: rgba(255, 255, 255, 0.025);
    color: var(--muted);
    font: inherit;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
}

.filter-button:hover,
.filter-button.active {
    color: var(--text);
    border-color: rgba(121, 91, 255, 0.38);
    background: rgba(121, 91, 255, 0.09);
}

.live-script-grid {
    grid-template-columns: repeat(2, 1fr);
}

.live-script-card {
    min-height: 330px;
}

.script-card-head {
    display: flex;
    align-items: flex-start;
    gap: 16px;
}

.script-icon {
    width: 66px;
    height: 66px;
    flex: 0 0 auto;
    object-fit: cover;
    border-radius: 14px;
    border: 1px solid var(--border);
    background: #111722;
}

.script-icon.fallback {
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, var(--accent), #4f38c5);
    color: white;
    font-size: 23px;
    font-weight: 850;
}

.script-title-group {
    min-width: 0;
}

.script-title-group h2 {
    margin: 8px 0 0;
    font-size: 22px;
}

.game-id {
    display: block;
    margin-top: 2px;
    color: #697486;
    font-size: 10px;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    min-height: 23px;
    padding: 0 8px;
    border: 1px solid var(--border);
    border-radius: 999px;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.03em;
}

.status-badge i {
    width: 6px;
    height: 6px;
    border-radius: 50%;
}

.status-badge.undetected {
    color: #82f2bf;
    border-color: rgba(62, 230, 155, 0.2);
    background: rgba(62, 230, 155, 0.07);
}

.status-badge.undetected i {
    background: var(--green);
}

.status-badge.detected,
.status-badge.outdated {
    color: #ff8895;
    border-color: rgba(255, 95, 114, 0.2);
    background: rgba(255, 95, 114, 0.07);
}

.status-badge.detected i,
.status-badge.outdated i {
    background: var(--red);
}

.status-badge.disabled {
    color: #a8b0bc;
    background: rgba(255, 255, 255, 0.035);
}

.status-badge.disabled i {
    background: #747f8d;
}

.status-badge.checking {
    color: #f3db79;
    border-color: rgba(254, 231, 92, 0.18);
    background: rgba(254, 231, 92, 0.06);
}

.status-badge.checking i {
    background: #fee75c;
}

.live-script-card > p {
    margin-top: 22px;
    min-height: 48px;
}

.script-metrics {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    margin: 25px 0 20px;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

.script-metrics div {
    padding: 15px 12px;
}

.script-metrics div:first-child {
    padding-left: 0;
}

.script-metrics div + div {
    border-left: 1px solid var(--border);
}

.script-metrics span,
.script-metrics strong {
    display: block;
}

.script-metrics span {
    margin-bottom: 5px;
    color: var(--muted);
    font-size: 10px;
}

.script-metrics strong {
    font-size: 12px;
}

.script-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-top: auto;
}

.script-card-footer > span {
    max-width: 70%;
    color: #758092;
    font-size: 11px;
}

.button.small {
    min-height: 36px;
    padding: 0 13px;
    font-size: 11px;
}

.empty-state {
    padding: 70px 20px;
    text-align: center;
    border: 1px dashed var(--border);
    border-radius: 16px;
}

.empty-state h2 {
    margin: 0 0 6px;
    font-size: 22px;
}

.empty-state p {
    margin: 0;
    color: var(--muted);
}

.loading-card {
    overflow: hidden;
}

.skeleton-line {
    height: 12px;
    margin-top: 13px;
    border-radius: 999px;
    background: linear-gradient(90deg, rgba(255,255,255,0.04), rgba(255,255,255,0.09), rgba(255,255,255,0.04));
    background-size: 200% 100%;
    animation: skeleton 1.2s linear infinite;
}

.skeleton-line.short {
    width: 24%;
    margin-top: 0;
}

.skeleton-line.title {
    width: 65%;
    height: 24px;
    margin-top: 45px;
}

.skeleton-line.medium {
    width: 74%;
}

@keyframes skeleton {
    to {
        background-position: -200% 0;
    }
}

.status-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 24px 0;
}

.status-item:nth-child(4) {
    padding-left: 0;
    border-left: 0;
}

@media (max-width: 900px) {
    .scripts-hero {
        align-items: flex-start;
        flex-direction: column;
    }

    .live-script-grid {
        grid-template-columns: 1fr;
    }

    .script-toolbar {
        align-items: stretch;
        flex-direction: column;
    }

    .search-box {
        max-width: none;
    }

    .filter-row {
        justify-content: flex-start;
    }
}

@media (max-width: 640px) {
    .status-summary {
        grid-template-columns: 1fr 1fr;
    }

    .status-summary div:nth-child(3) {
        border-left: 0;
        border-top: 1px solid var(--border);
    }

    .status-summary div:nth-child(4) {
        border-top: 1px solid var(--border);
    }

    .script-metrics {
        grid-template-columns: 1fr;
    }

    .script-metrics div,
    .script-metrics div:first-child {
        padding: 12px 0;
    }

    .script-metrics div + div {
        border-left: 0;
        border-top: 1px solid var(--border);
    }

    .script-card-footer {
        align-items: flex-start;
        flex-direction: column;
    }

    .script-card-footer > span {
        max-width: 100%;
    }

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

    .status-item,
    .status-item:nth-child(4) {
        padding: 0;
        border-left: 0;
    }
}
