html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
    color: #e5e7eb;
    background: #0f172a;
}

#app {
    min-height: 100vh;
}

#blazor-error-ui {
    display: none;
}

h1,
h2,
h3,
p,
ul {
    margin-top: 0;
}

p {
    line-height: 1.7;
}

a {
    color: inherit;
}

img {
    max-width: 100%;
    display: block;
}

.container {
    width: min(1120px, calc(100% - 32px));
    margin: 0 auto;
}

.content-section {
    padding: 88px 0;
}

.section-alt {
    background: rgba(15, 23, 42, 0.55);
    border-top: 1px solid rgba(148, 163, 184, 0.14);
    border-bottom: 1px solid rgba(148, 163, 184, 0.14);
}

.section-header {
    margin-bottom: 28px;
}

.section-header h2 {
    margin-bottom: 0;
    font-size: clamp(2rem, 5vw, 2.9rem);
    line-height: 1.1;
    color: #f8fafc;
}

.eyebrow {
    margin-bottom: 10px;
    color: #38bdf8;
    font-size: 0.92rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.content-text {
    max-width: 880px;
    color: #cbd5e1;
}

.section-intro {
    margin-bottom: 22px;
}

.hero-section {
    padding: 84px 0 88px;
}

.hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 40px;
    align-items: center;
}

.hero-content h1 {
    margin-bottom: 16px;
    font-size: clamp(3rem, 8vw, 4.8rem);
    line-height: 0.97;
    letter-spacing: -0.03em;
    color: #ffffff;
}

.hero-content h1:focus {
    outline: none;
}

.hero-lead {
    margin-bottom: 16px;
    max-width: 760px;
    font-size: 1.2rem;
    line-height: 1.7;
    color: #cbd5e1;
}

.hero-description {
    max-width: 760px;
    color: #94a3b8;
}

.hero-actions,
.contact-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin-top: 28px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 0 20px;
    border-radius: 999px;
    text-decoration: none;
    font-weight: 700;
    transition: transform 0.18s ease, opacity 0.18s ease;
}

.btn:hover {
    transform: translateY(-1px);
    text-decoration: none;
}

.btn-primary {
    background: linear-gradient(135deg, #38bdf8, #67e8f9);
    color: #04111d;
    box-shadow: 0 10px 30px rgba(56, 189, 248, 0.28);
}

.btn-secondary {
    background: rgba(15, 23, 42, 0.72);
    border: 1px solid rgba(148, 163, 184, 0.24);
    color: #f8fafc;
}

.hero-list {
    margin: 24px 0 0;
    padding-left: 20px;
    color: #94a3b8;
    line-height: 1.8;
}

/* Hero preview */

.hero-panel {
    display: flex;
    justify-content: center;
}

.preview-window {
    width: 100%;
    max-width: 560px;
    border-radius: 24px;
    overflow: hidden;
    border: 1px solid rgba(56, 189, 248, 0.18);
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.94), rgba(2, 6, 23, 0.98));
    box-shadow: 0 20px 60px rgba(2, 6, 23, 0.34);
}

.preview-titlebar {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 56px;
    padding: 0 18px;
    border-bottom: 1px solid rgba(148, 163, 184, 0.14);
}

.preview-dot {
    width: 10px;
    height: 10px;
    border-radius: 999px;
    background: #22c55e;
    box-shadow: 0 0 12px rgba(34, 197, 94, 0.8);
    flex: 0 0 auto;
}

.preview-title-line {
    width: 160px;
    height: 14px;
    border-radius: 999px;
    background: #1e293b;
}

.preview-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 14px 18px;
    border-bottom: 1px solid rgba(148, 163, 184, 0.12);
    background: rgba(13, 27, 51, 0.75);
}

.preview-toolbar-left,
.preview-toolbar-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.preview-toggle {
    width: 18px;
    height: 18px;
    border-radius: 4px;
    background: #2563eb;
    box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.08);
}

.preview-chip {
    height: 12px;
    border-radius: 999px;
    background: #1e293b;
}

.preview-chip.short {
    width: 74px;
}

.preview-icon-grid {
    width: 34px;
    height: 28px;
    padding: 6px;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 4px;
    border-radius: 8px;
    background: #1e293b;
    border: 1px solid rgba(148, 163, 184, 0.14);
}

.preview-icon-grid span {
    background: #cbd5e1;
    border-radius: 2px;
    opacity: 0.9;
}

.preview-search {
    width: 120px;
    height: 14px;
    border-radius: 999px;
    background: #1e293b;
}

.preview-locale {
    width: 44px;
    height: 14px;
    border-radius: 999px;
    background: #1e293b;
}

.preview-table {
    padding: 0 0 16px;
}

.preview-table-header,
.preview-row {
    display: grid;
    grid-template-columns: 2.2fr 1fr 1fr 0.7fr 0.6fr 1.5fr;
    align-items: center;
    gap: 12px;
    padding: 0 18px;
}

.preview-table-header {
    min-height: 40px;
    background: rgba(20, 39, 68, 0.85);
    border-bottom: 1px solid rgba(148, 163, 184, 0.12);
}

.preview-col {
    height: 10px;
    border-radius: 999px;
    background: #334155;
}

.preview-col.process {
    width: 70px;
}

.preview-col.bytes {
    width: 82px;
}

.preview-col.working {
    width: 78px;
}

.preview-col.pid {
    width: 34px;
}

.preview-col.cpu {
    width: 28px;
}

.preview-col.desc {
    width: 92px;
}

.preview-row {
    min-height: 40px;
    border-bottom: 1px solid rgba(148, 163, 184, 0.06);
    background: rgba(8, 22, 46, 0.72);
}

.preview-row:nth-child(even) {
    background: rgba(10, 20, 44, 0.72);
}

.preview-row.selected {
    background: rgba(29, 78, 216, 0.26);
}

.preview-row.child .preview-cell.process {
    padding-left: 16px;
}

.preview-cell {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

.preview-cell.process {
    gap: 10px;
}

.preview-line {
    display: block;
    height: 10px;
    border-radius: 999px;
    background: linear-gradient(90deg, rgba(56, 189, 248, 0.22), rgba(148, 163, 184, 0.08));
}

.preview-line.accent {
    background: linear-gradient(90deg, rgba(56, 189, 248, 0.8), rgba(34, 197, 94, 0.55));
}

.selected-line {
    background: rgba(226, 232, 240, 0.85);
}

.tree-arrow {
    width: 8px;
    height: 8px;
    border-top: 2px solid #94a3b8;
    border-right: 2px solid #94a3b8;
    transform: rotate(45deg);
    opacity: 0.9;
    flex: 0 0 auto;
}

.tree-arrow.expanded {
    transform: rotate(135deg);
}

.tree-branch {
    width: 12px;
    height: 2px;
    background: #334155;
    border-radius: 999px;
    flex: 0 0 auto;
}

.tree-dot {
    width: 8px;
    height: 8px;
    border-radius: 999px;
    background: #38bdf8;
    flex: 0 0 auto;
}

.tree-dot.green {
    background: #22c55e;
}

.w-26 {
    width: 26%;
}

.w-28 {
    width: 28%;
}

.w-30 {
    width: 30%;
}

.w-32 {
    width: 32%;
}

.w-34 {
    width: 34%;
}

.w-35 {
    width: 35%;
}

.w-40 {
    width: 40%;
}

.w-45 {
    width: 45%;
}

.w-46 {
    width: 46%;
}

.w-48 {
    width: 48%;
}

.w-50 {
    width: 50%;
}

.w-52 {
    width: 52%;
}

.w-54 {
    width: 54%;
}

.w-55 {
    width: 55%;
}

.w-56 {
    width: 56%;
}

.w-58 {
    width: 58%;
}

.w-60 {
    width: 60%;
}

.w-65 {
    width: 65%;
}

.w-68 {
    width: 68%;
}

.w-70 {
    width: 70%;
}

.w-80 {
    width: 80%;
}

.w-90 {
    width: 90%;
}

/* Cards and sections */

.card-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
}

.card-grid-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.card-grid-4 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.info-card,
.screenshot-card,
.contact-panel {
    border-radius: 22px;
    border: 1px solid rgba(148, 163, 184, 0.14);
    background: rgba(15, 23, 42, 0.72);
    box-shadow: 0 20px 60px rgba(2, 6, 23, 0.22);
}

.info-card {
    padding: 22px;
}

.info-card h3 {
    margin-bottom: 12px;
    color: #f8fafc;
}

.info-card p {
    margin-bottom: 0;
    color: #cbd5e1;
}

/* Screenshots */

.screenshot-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
}

.screenshot-card {
    overflow: hidden;
    transition: transform 0.18s ease;
}

.screenshot-card:hover {
    transform: translateY(-2px);
}

.screenshot-card:has(.screenshot-trigger:focus-visible) {
    outline: 2px solid rgba(56, 189, 248, 0.9);
    outline-offset: 3px;
}

.screenshot-trigger {
    display: block;
    width: 100%;
    padding: 0;
    border: 0;
    background: transparent;
    cursor: zoom-in;
}

.screenshot-card img {
    width: 100%;
    aspect-ratio: 16 / 10;
    object-fit: cover;
    background: #0b1220;
    transition: transform 0.22s ease;
}

.screenshot-trigger:hover img,
.screenshot-trigger:focus-visible img {
    transform: scale(1.02);
}

.screenshot-card figcaption {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 16px 18px 18px;
}

.screenshot-card strong {
    color: #f8fafc;
}

.screenshot-card span {
    color: #94a3b8;
    line-height: 1.6;
}

/* Lightbox */

.lightbox-backdrop {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: rgba(2, 6, 23, 0.88);
    backdrop-filter: blur(8px);
}

.lightbox-dialog {
    position: relative;
    width: fit-content;
    max-width: min(1200px, 100%);
    max-height: calc(100vh - 48px);
    padding: 20px;
    border-radius: 24px;
    border: 1px solid rgba(148, 163, 184, 0.18);
    background: rgba(15, 23, 42, 0.96);
    box-shadow: 0 24px 80px rgba(2, 6, 23, 0.5);
}

.lightbox-image {
    display: block;
    width: auto;
    max-width: 100%;
    height: auto;
    max-height: calc(100vh - 88px);
    margin: 0 auto;
    object-fit: contain;
    border-radius: 16px;
    background: #020617;
}

.lightbox-close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 40px;
    height: 40px;
    border: 0;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.92);
    color: #f8fafc;
    font-size: 1.1rem;
    cursor: pointer;
}

.lightbox-close:hover,
.lightbox-close:focus-visible {
    background: rgba(56, 189, 248, 0.22);
}

/* Contact */

.contact-panel {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 28px;
    padding: 30px;
}

.contact-content h2 {
    margin-bottom: 12px;
    color: #f8fafc;
}

.contact-content p {
    margin-bottom: 0;
    color: #cbd5e1;
    max-width: 760px;
}

/* Responsive */

@media (max-width: 1100px) {
    .card-grid-4 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 960px) {

    .hero-grid,
    .card-grid,
    .card-grid-3,
    .card-grid-4,
    .screenshot-grid {
        grid-template-columns: 1fr;
    }

    .preview-toolbar {
        flex-direction: column;
        align-items: stretch;
    }

    .preview-toolbar-left,
    .preview-toolbar-right {
        justify-content: space-between;
    }

    .preview-table-header,
    .preview-row {
        gap: 8px;
        grid-template-columns: 2fr 1fr 1fr 0.7fr 0.6fr 1.2fr;
    }

    .contact-panel {
        flex-direction: column;
        align-items: flex-start;
    }
}

@media (max-width: 640px) {
    .container {
        width: min(100%, calc(100% - 24px));
    }

    .content-section,
    .hero-section {
        padding: 64px 0;
    }

    .hero-content h1 {
        font-size: clamp(2.4rem, 12vw, 3.5rem);
    }

    .preview-window {
        max-width: 100%;
    }

    .preview-table-header,
    .preview-row {
        grid-template-columns: 1.8fr 0.9fr 0.9fr 0.6fr 0.5fr 1fr;
        gap: 6px;
        padding: 0 12px;
    }

    .preview-toolbar {
        padding: 12px;
    }

    .preview-titlebar {
        padding: 0 12px;
    }

    .lightbox-backdrop {
        padding: 12px;
    }

    .lightbox-dialog {
        padding: 12px;
    }
}