html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: rgb(17, 17, 17);
  color: #ccc;
  font-family: "IBM Plex Mono", ui-monospace, "Cascadia Mono", Consolas, "Courier New", monospace;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.main {
    margin: 0;
    padding: 10px;
    width: auto;
    height: 100%;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.container {
    text-align: center;
    border: 1px solid #ccc;
    justify-content: center;
}

.section-site {
    display: grid;
    grid-template-columns: 96px minmax(0, 1fr);
    padding: 0;
    text-align: left;
    background: #0f0f0f;
}

.section-rail {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 16px 8px;
    border-right: 1px solid #333;
    background: #141414;
}

.section-num {
    font-size: 56px;
    font-weight: 700;
    line-height: 1;
    color: #262626;
    letter-spacing: -2px;
}

.section-rail-text {
    font-size: 10px;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: #666;
    writing-mode: vertical-rl;
    transform: rotate(180deg);
    white-space: nowrap;
}

.section-body {
    min-width: 0;
    padding: 24px;
}

.section-body h1 {
    margin: 0 0 8px;
    font-size: 32px;
    line-height: 1.1;
    text-align: left;
}

.section-lead {
    max-width: 72ch;
    margin: 0 0 16px;
    font-size: 14px;
    line-height: 1.6;
    color: #888;
}

.section-body .projects-grid,
.section-body .faq-grid {
    padding: 0;
}

.section-body .faq-intro {
    margin: 0 0 16px;
    padding: 0;
}

.section-body .chat-list {
    margin: 0 0 16px;
}

.section-body .chat-form {
    padding: 0 0 8px;
}

.section-body .chat-status {
    padding: 0 0 16px;
}

.about-lead {
    max-width: 72ch;
    margin: 0 0 16px;
    font-size: 15px;
    line-height: 1.7;
    color: #ccc;
}

.about-columns {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
    margin-bottom: 16px;
    padding-top: 16px;
    border-top: 1px solid #333;
}

.about-col {
    min-width: 0;
}

.about-col-title {
    display: block;
    margin-bottom: 8px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: #666;
}

.about-col p,
.about-col ul {
    margin: 0;
    font-size: 13px;
    line-height: 1.6;
    color: #888;
}

.about-col ul {
    padding: 0;
    list-style: none;
}

.about-col li {
    position: relative;
    padding-left: 14px;
}

.about-col li::before {
    content: "+";
    position: absolute;
    left: 0;
    color: #00ff80;
}

.about-facts {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding-top: 16px;
    border-top: 1px solid #333;
}

.about-fact {
    padding: 4px 10px;
    border: 1px solid #333;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: #888;
    white-space: nowrap;
}

.about-fact strong {
    color: #00ff80;
}

@media (max-width: 900px) {
    .section-site {
        grid-template-columns: 1fr;
    }

    .section-rail {
        flex-direction: row;
        align-items: center;
        justify-content: flex-start;
        gap: 16px;
        padding: 12px 16px;
        border-right: 0;
        border-bottom: 1px solid #333;
    }

    .section-num {
        font-size: 32px;
    }

    .section-rail-text {
        writing-mode: horizontal-tb;
        transform: none;
    }

    .section-body {
        padding: 16px;
    }

    .section-body h1 {
        font-size: 24px;
    }

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

.container footer {
    color: #333;
    font-size: 10px;
}

.projects-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    padding: 16px;
    text-align: left;
}

.project-card {
    position: relative;
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    gap: 16px;
    flex: 1 1 calc((100% - 32px) / 3);
    min-width: 0;
    box-sizing: border-box;
    padding: 16px;
    border: 1px solid #333;
    color: inherit;
    text-decoration: none;
    transition: border-color 0.1s, transform 0.1s, box-shadow 0.1s;
}

.project-icon {
    flex: none;
    width: 64px;
    height: 64px;
    box-sizing: border-box;
    border: 1px solid #333;
    object-fit: cover;
    background: #0a0a0a;
    image-rendering: pixelated;
}

.project-icon--fallback {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    font-weight: 700;
    color: #888;
    text-transform: uppercase;
}

.project-body {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.project-card:hover {
    border-color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 2px 0 #333;
}

.project-index {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: #888;
}

.project-title {
    margin: 0;
    font-size: 32px;
    line-height: 1.2;
    font-weight: 700;
    text-transform: uppercase;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.project-desc {
    margin: 0;
    color: #888;
    word-break: break-word;
}

.project-card:hover .project-index,
.project-card:hover .project-title {
    color: #00ff80;
}

@media (max-width: 768px) {
    .project-card {
        flex-basis: 100%;
    }
}

@media (min-width: 769px) {
    .project-card:last-child:nth-child(3n + 1)::after {
        content: "";
        position: absolute;
        right: 2px;
        bottom: 2px;
        width: 64px;
        height: 64px;
        background: url("/static/icon/spiderweb.png") no-repeat right bottom / contain;
        opacity: 0.2;
        pointer-events: none;
    }
}

.stats-top {
    display: flex;
    gap: 16px;
    padding: 16px;
}

.stat-big {
    flex: 1 1 0;
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 24px 16px;
    border: 1px solid #333;
}

.stat-label {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: #888;
}

.stat-number {
    font-size: 64px;
    line-height: 1;
    font-weight: 700;
    color: #fff;
    font-variant-numeric: tabular-nums;
}

.stat-number--time {
    font-size: 40px;
}

.chart-axis {
    display: flex;
    justify-content: space-between;
    padding: 0 16px 8px;
    font-size: 10px;
    letter-spacing: 2px;
    color: #888;
    font-variant-numeric: tabular-nums;
}

.stats-note {
    margin: 0;
    padding: 0 16px 16px;
    font-size: 12px;
    color: #888;
}

.stat-online {
    color: #00ff80;
    text-shadow: 0 0 12px rgba(0, 255, 128, 0.4);
}

.chart {
    display: flex;
    align-items: flex-end;
    gap: 16px;
    padding: 16px;
    overflow-x: auto;
}

.chart-item {
    flex: 1 1 0;
    min-width: 64px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.chart-bar-wrap {
    display: flex;
    align-items: flex-end;
    width: 100%;
    height: 180px;
}

.chart-bar {
    width: 100%;
    height: 0%;
    border: 1px solid #333;
    box-sizing: border-box;
    background: linear-gradient(to top, #ff0040, #00ff80);
    transition: height 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

.chart-value {
    font-size: 28px;
    font-weight: 700;
    line-height: 1;
    color: #fff;
    font-variant-numeric: tabular-nums;
}

.chart-label {
    max-width: 100%;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: #888;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.faq-intro {
    margin: 0;
    padding: 0 16px 16px;
    color: #888;
}

.faq-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    padding: 16px;
    text-align: left;
}

.faq-card {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 16px;
    border: 1px solid #333;
    background: #141414;
}

a {
    color: #ccc;
    text-decoration: none;
}

.faq-question {
    margin: 0;
    font-size: 16px;
    font-weight: 700;
    line-height: 1.3;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: #ccc;
}

.faq-answer {
    margin: 0;
    max-width: none;
    font-size: 14px;
    line-height: 1.6;
    color: #888;
}

@media (max-width: 768px) {
    .stats-top {
        flex-direction: column;
    }

    .stat-number {
        font-size: 48px;
    }

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

@media (min-width: 769px) {
    .faq-card:last-child:nth-child(odd) {
        grid-column: 1 / -1;
    }
}

.top-subdomains {
    display: flex;
    flex-direction: column;
    padding: 0 16px 16px;
    text-align: left;
}

.top-row {
    display: grid;
    grid-template-columns: 32px 1fr auto;
    align-items: center;
    gap: 12px;
    padding: 10px 0;
    border-top: 1px solid #333;
}

.top-row:first-child {
    border-top: 0;
}

.top-rank {
    font-size: 12px;
    letter-spacing: 1px;
    color: #888;
}

.top-name {
    min-width: 0;
    font-weight: 700;
    color: #ccc;
    word-break: break-all;
}

.top-hits {
    font-variant-numeric: tabular-nums;
    color: #00ff80;
}

.top-empty {
    padding: 16px 0;
    text-align: center;
    font-size: 13px;
    color: #666;
}

.chat-intro {
    margin: 0;
    padding: 0 16px 16px;
    color: #888;
}

.chat-list {
    margin: 0 16px 16px;
    height: 360px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    border: 1px solid #333;
    background: #141414;
    text-align: left;
}

.chat-msg {
    padding: 12px 16px;
    border-top: 1px solid #222;
}

.chat-msg:first-child {
    border-top: 0;
}

.chat-meta {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 4px;
    font-size: 11px;
    letter-spacing: 1px;
}

.chat-hash {
    color: #00ff80;
    font-weight: 700;
}

.chat-time {
    color: #666;
}

.chat-text {
    margin: 0;
    color: #ccc;
    word-break: break-word;
}

.chat-empty {
    margin: auto;
    padding: 24px 16px;
    text-align: center;
    font-size: 13px;
    color: #666;
}

.chat-form {
    display: flex;
    gap: 16px;
    padding: 0 16px 8px;
    text-align: left;
}

.chat-input {
    flex: 1 1 auto;
    min-width: 0;
    padding: 12px 16px;
    box-sizing: border-box;
    font-family: inherit;
    font-size: 16px;
    color: #ccc;
    background: #141414;
    border: 1px solid #333;
    outline: none;
    transition: border-color 0.1s;
}

.chat-input::placeholder {
    color: #666;
}

.chat-input:focus {
    border-color: #00ff80;
}

.chat-button {
    flex: none;
    padding: 12px 24px;
    font-family: inherit;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: #111;
    background: #fff;
    border: 1px solid #fff;
    cursor: pointer;
    transition: background 0.1s, border-color 0.1s, color 0.1s, opacity 0.1s;
}

.chat-button:hover:not(:disabled) {
    background: #00ff80;
    border-color: #00ff80;
    color: #111;
}

.chat-button:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.chat-status {
    margin: 0;
    padding: 0 16px 16px;
    min-height: 1.2em;
    font-size: 12px;
    color: #888;
    text-align: left;
}

.chat-status.is-error {
    color: #ff0040;
}

.chat-status.is-ok {
    color: #00ff80;
}

@media (max-width: 768px) {
    .chat-form {
        flex-direction: column;
    }

    .chat-button {
        width: 100%;
    }
}

.topbar {
    width: 100%;
    height: 200px;
    padding: 0;
    margin: 0;
    background: none;
    image-rendering: pixelated;
}

#bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: none;
    image-rendering: pixelated;
    z-index: -10
}

.site-footer {
    border: 1px solid #333;
    background: #0f0f0f;
    text-align: left;
}

.footer-body .footer-top {
    padding: 0 0 16px;
}

.footer-body .footer-bottom {
    padding: 16px 0 0;
}

.footer-top {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 32px;
    padding: 24px 16px;
}

.footer-brand {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-width: 380px;
}

.footer-logo {
    font-size: 24px;
    font-weight: 700;
    letter-spacing: 4px;
    color: #fff;
}

.footer-tagline {
    margin: 0;
    font-size: 14px;
    line-height: 1.6;
    color: #888;
}

.footer-stats-button {
    display: inline-block;
    align-self: flex-start;
    margin-top: 8px;
    padding: 8px 16px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: #888;
    text-decoration: none;
    border: 1px solid #333;
    transition: color 0.1s, border-color 0.1s;
}

.footer-stats-button:hover {
    color: #00ff80;
    border-color: #00ff80;
}

.footer-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 48px;
}

.footer-col {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 110px;
}

.footer-title {
    margin-bottom: 4px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: #666;
}

.footer-col a {
    font-size: 13px;
    color: #888;
    text-decoration: none;
    transition: color 0.1s;
}

.footer-col a:hover {
    color: #00ff80;
}

.footer-bottom {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 12px 16px;
    border-top: 1px solid #333;
    font-size: 11px;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: #666;
}

.footer-status {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #888;
}

.footer-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    background: #00ff80;
    box-shadow: 0 0 8px rgba(0, 255, 128, 0.6);
}

.footer-motto {
    color: #888;
}

@media (max-width: 768px) {
    .footer-top {
        flex-direction: column;
        gap: 24px;
    }

    .footer-nav {
        gap: 32px;
    }

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