:root {
    --primary-glow: #00ffaa;
    --secondary-glow: #00ccff;
    --bg-dark: #020805;
    --card-bg: rgba(7, 18, 14, 0.76);
    --text-main: #f8fafc;
    --text-muted: #97a59b;
    --border-color: rgba(0, 255, 170, 0.2);
    --border-strong: rgba(0, 255, 170, 0.42);
    --shadow-soft: 0 20px 45px rgba(0, 0, 0, 0.45);
    --shell-padding-x: 28px;
    --card-padding: 24px;
    --grid-gap: 20px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: Consolas, "Lucida Console", "Courier New", monospace;
}

html {
    scroll-behavior: smooth;
}

body {
    background: var(--bg-dark);
    color: var(--text-main);
    min-height: 100vh;
}

canvas {
    position: fixed;
    inset: 0;
    z-index: -2;
}

a {
    color: inherit;
}

button,
input,
select {
    font: inherit;
}

.site-page {
    padding: 42px 20px 20px;
    min-height: 100vh;
}

.site-page::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    background:
        radial-gradient(circle at top, rgba(0, 255, 170, 0.12), transparent 38%),
        radial-gradient(circle at bottom, rgba(0, 204, 255, 0.08), transparent 30%);
    z-index: -1;
}

.page-shell {
    width: min(1180px, 100%);
    margin: 0 auto;
    border: 1px solid var(--border-color);
    border-radius: 16px;
    background: rgba(2, 8, 5, 0.72);
    box-shadow: var(--shadow-soft);
    backdrop-filter: blur(6px);
    overflow: hidden;
}

.page-shell > *,
.top-nav > *,
.hero-grid > *,
.expertise-grid > *,
.project-grid > *,
.tool-grid > *,
.micro-info-grid > *,
.form-row.two-columns > *,
.dns-columns-wrapper > * {
    min-width: 0;
}

.global-site-header {
    position: sticky;
    top: 0;
    z-index: 30;
    background: rgba(2, 8, 5, 0.88);
    backdrop-filter: blur(12px);
}

.top-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 16px var(--shell-padding-x) 20px;
    position: relative;
}

.top-nav::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(0, 255, 170, 0.5), transparent);
    box-shadow: 0 0 10px rgba(0, 255, 170, 0.28);
}

.brand-link {
    text-decoration: none;
}

.brand {
    font-size: clamp(28px, 3vw, 44px);
    font-weight: 700;
    color: var(--text-main);
    letter-spacing: 0.04em;
}

.site-nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
}

.site-nav a,
.ghost-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 14px;
    border-radius: 7px;
    border: 1px solid rgba(0, 255, 170, 0.22);
    background: rgba(0, 255, 170, 0.04);
    color: var(--text-main);
    text-decoration: none;
    transition: 0.25s ease;
    line-height: 1.4;
    white-space: normal;
    overflow-wrap: anywhere;
}

.site-nav a {
    text-align: center;
}

.site-nav a:hover,
.ghost-btn:hover {
    border-color: var(--border-strong);
    color: var(--primary-glow);
    box-shadow: 0 0 16px rgba(0, 255, 170, 0.12);
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.language-switcher {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px;
    border: 1px solid rgba(0, 255, 170, 0.18);
    border-radius: 10px;
    background: rgba(0, 255, 170, 0.03);
}

.lang-btn {
    min-width: 44px;
    padding: 8px 10px;
    border: 1px solid transparent;
    border-radius: 7px;
    background: transparent;
    color: var(--text-muted);
    cursor: pointer;
    transition: 0.25s ease;
}

.lang-btn:hover {
    color: var(--primary-glow);
}

.lang-btn.is-active {
    color: var(--primary-glow);
    border-color: rgba(0, 255, 170, 0.34);
    background: rgba(0, 255, 170, 0.08);
    box-shadow: 0 0 12px rgba(0, 255, 170, 0.08);
}

.main-btn,
.generate-btn,
.copy-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    border-radius: 8px;
    border: 1px solid rgba(0, 255, 170, 0.65);
    background: var(--primary-glow);
    color: #02130c;
    text-decoration: none;
    font-weight: 700;
    cursor: pointer;
    transition: 0.25s ease;
    line-height: 1.4;
    text-align: center;
    white-space: normal;
    overflow-wrap: anywhere;
}

.main-btn:hover,
.generate-btn:hover {
    box-shadow: 0 0 24px rgba(0, 255, 170, 0.38);
    transform: translateY(-1px);
}

.ghost-btn {
    background: transparent;
}

.nav-github,
.small-btn {
    padding: 10px 18px;
    font-size: 13px;
}

.hero-header {
    padding: 36px var(--shell-padding-x) 28px;
}

.hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(0, 0.9fr);
    gap: 28px;
    align-items: start;
}

.hero-copy {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 20px;
    padding: 24px 0 12px;
}

.hero-kicker,
.card-eyebrow {
    color: var(--primary-glow);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 12px;
    line-height: 1.35;
}

.hero-copy h1 {
    font-size: clamp(34px, 5vw, 58px);
    line-height: 1.08;
    overflow-wrap: anywhere;
    text-wrap: balance;
}

.hero-lead,
.section-subtitle,
.project-card p,
.feature-card p,
.tool-card p,
.tab-intro p,
.terminal-answer,
.info-text,
.form-group small {
    color: var(--text-muted);
    line-height: 1.7;
}

.hero-lead {
    max-width: 62ch;
}

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

.hero-actions {
    padding-top: 4px;
}

.hero-panel,
.feature-card,
.project-card,
.tool-card,
.script-container {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    box-shadow: 0 0 0 1px rgba(0, 255, 170, 0.05) inset;
}

.feature-card h3,
.project-card h3,
.tool-card h3,
.script-container h2,
.tab-intro h3,
.checklist-panel h2 {
    color: var(--text-main);
    line-height: 1.2;
    overflow-wrap: anywhere;
    text-wrap: balance;
}

.hero-panel {
    padding: var(--card-padding);
    background: linear-gradient(180deg, rgba(7, 18, 14, 0.86), rgba(4, 12, 9, 0.94));
}

.terminal-panel,
.checklist-panel {
    display: flex;
    flex-direction: column;
    gap: 14px;
    height: 100%;
}

.terminal-line {
    color: var(--primary-glow);
    font-size: 14px;
}

.prompt {
    color: var(--secondary-glow);
    margin-right: 8px;
}

.terminal-list,
.bullet-list {
    list-style: none;
    display: grid;
    gap: 12px;
}

.terminal-list li,
.bullet-list li {
    position: relative;
    padding-left: 18px;
    color: var(--text-muted);
    line-height: 1.5;
}

.terminal-list li::before,
.bullet-list li::before {
    content: ">";
    position: absolute;
    left: 0;
    color: var(--primary-glow);
}

.compact-list li {
    font-size: 14px;
}

.content-section {
    padding: 24px var(--shell-padding-x) 28px;
}

main {
    display: grid;
    gap: 4px;
}

.section-title-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin-bottom: 24px;
}

.section-title {
    font-size: clamp(22px, 2.3vw, 32px);
    white-space: normal;
    text-align: center;
    overflow-wrap: anywhere;
    line-height: 1.2;
    text-wrap: balance;
}

.section-title-line {
    flex: 1;
    max-width: 240px;
    height: 1px;
    position: relative;
}

.section-title-line.left {
    background: linear-gradient(to left, var(--primary-glow), transparent);
}

.section-title-line.right {
    background: linear-gradient(to right, var(--primary-glow), transparent);
}

.expertise-grid,
.project-grid,
.tool-grid,
.micro-info-grid {
    display: grid;
    gap: var(--grid-gap);
}

.expertise-grid,
.micro-info-grid {
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr));
}

.project-grid {
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr));
}

.tool-grid {
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr));
}

.feature-card,
.project-card,
.tool-card {
    padding: var(--card-padding);
    overflow-wrap: anywhere;
    height: 100%;
}

.feature-card,
.tool-card,
.project-card {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.feature-card h3,
.project-card h3,
.tool-card h3 {
    font-size: clamp(20px, 1.8vw, 28px);
}

.feature-card p,
.project-card p,
.tool-card p {
    font-size: 15px;
}

.featured-project {
    background: linear-gradient(180deg, rgba(7, 18, 14, 0.9), rgba(3, 10, 8, 0.98));
    padding: calc(var(--card-padding) + 2px);
}

.project-card a,
.tool-card a {
    display: inline-flex;
    align-self: flex-start;
    margin-top: auto;
    padding: 9px 14px;
    border: 1px solid rgba(0, 255, 170, 0.34);
    border-radius: 8px;
    text-decoration: none;
    transition: 0.25s ease;
    max-width: 100%;
    text-align: center;
    line-height: 1.4;
    white-space: normal;
    overflow-wrap: anywhere;
}

.project-card a:hover,
.tool-card a:hover {
    color: var(--primary-glow);
    border-color: var(--border-strong);
    box-shadow: 0 0 16px rgba(0, 255, 170, 0.1);
}

.color-primary {
    color: var(--primary-glow);
}

.tool-hero-layout {
    padding-bottom: 12px;
}

.micro-info-grid {
    padding-top: 12px;
}

.mikrotik-section {
    padding-top: 10px;
}

.script-container {
    padding: var(--card-padding);
    background: linear-gradient(180deg, rgba(7, 18, 14, 0.82), rgba(4, 12, 9, 0.96));
}

.generator-toolbar {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 24px;
}

.tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 24px;
    border-bottom: 1px solid rgba(0, 255, 170, 0.14);
    padding-bottom: 14px;
}

.tab-btn {
    padding: 10px 16px;
    background: transparent;
    color: var(--text-muted);
    border: 1px solid rgba(0, 255, 170, 0.14);
    border-radius: 8px;
    cursor: pointer;
    transition: 0.25s ease;
    white-space: normal;
    text-align: center;
    line-height: 1.4;
    overflow-wrap: anywhere;
}

.tab-btn:hover,
.tab-btn.active {
    color: var(--primary-glow);
    border-color: rgba(0, 255, 170, 0.4);
    box-shadow: 0 0 12px rgba(0, 255, 170, 0.08);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

.tab-intro {
    margin-bottom: 18px;
}

.nat-form {
    display: grid;
    gap: 18px;
}

.form-row.two-columns {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.checkbox-row {
    padding: 12px 14px;
    border: 1px solid rgba(0, 255, 170, 0.12);
    border-radius: 10px;
    background: rgba(0, 255, 170, 0.03);
}

.warning-text {
    margin-top: 10px;
    color: #ffd166;
    font-size: 13px;
    line-height: 1.5;
}

.checkbox-row label {
    display: inline-flex;
    align-items: flex-start;
    gap: 10px;
    margin: 0;
    width: 100%;
}

.checkbox-row input[type="checkbox"] {
    width: 16px;
    height: 16px;
    flex: 0 0 auto;
    margin: 0;
    accent-color: var(--primary-glow);
}

.toggle-group {
    padding: 16px;
    border: 1px solid rgba(0, 255, 170, 0.12);
    border-radius: 10px;
    background: rgba(0, 255, 170, 0.025);
}

.form-group label,
.output-container h3,
.dns-column h4 {
    color: var(--primary-glow);
    font-weight: 700;
    font-size: 14px;
    overflow-wrap: anywhere;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 12px 14px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    background: rgba(2, 8, 5, 0.86);
    color: var(--text-main);
    outline: none;
    transition: 0.25s ease;
}

.form-group input:focus,
.form-group select:focus {
    border-color: rgba(0, 255, 170, 0.55);
    box-shadow: 0 0 12px rgba(0, 255, 170, 0.14);
}

.dns-columns-wrapper {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.dns-list {
    display: grid;
    gap: 12px;
}

.dns-checkbox-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border-radius: 10px;
    border: 1px solid var(--border-color);
    background: rgba(2, 8, 5, 0.74);
    color: var(--text-muted);
    cursor: pointer;
    transition: 0.25s ease;
}

.dns-checkbox-item:hover {
    border-color: rgba(0, 255, 170, 0.45);
}

.dns-checkbox-item span,
.terminal-answer,
.terminal-list li,
.bullet-list li,
.feature-card p,
.project-card p,
.tool-card p,
.tab-intro p,
.info-text,
footer {
    overflow-wrap: anywhere;
}

.dns-checkbox-item input[type="checkbox"] {
    accent-color: var(--primary-glow);
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

.dns-checkbox-item input[type="checkbox"]:checked + span {
    color: var(--primary-glow);
}

.generate-btn,
.copy-btn {
    width: 100%;
}

.copy-btn {
    background: transparent;
    color: var(--text-main);
}

.copy-btn:hover {
    border-color: rgba(0, 255, 170, 0.75);
    background: rgba(0, 255, 170, 0.06);
}

.output-container {
    margin-top: 24px;
}

.command-box {
    margin: 14px 0;
    padding: 18px;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    background: rgba(2, 8, 5, 0.92);
    overflow-x: auto;
    max-height: 420px;
    overflow-y: auto;
}

.command-box pre {
    color: var(--primary-glow);
    font-size: 13px;
    white-space: pre;
}

@media (max-width: 760px) {
    .section-title-wrapper {
        align-items: flex-start;
    }

    .section-title-line {
        margin-top: 0.9em;
    }
}

footer {
    text-align: center;
    padding: 22px var(--shell-padding-x) 28px;
    color: var(--text-muted);
    border-top: 1px solid rgba(0, 255, 170, 0.12);
}

@media (max-width: 1100px) {
    .hero-grid,
    .tool-grid,
    .expertise-grid,
    .micro-info-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 900px) {
    .top-nav {
        flex-wrap: wrap;
        justify-content: center;
    }

    .brand-link {
        width: 100%;
        text-align: center;
    }

    .hero-grid,
    .tool-grid,
    .expertise-grid,
    .micro-info-grid,
    .form-row.two-columns,
    .dns-columns-wrapper {
        grid-template-columns: 1fr;
    }

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

@media (max-width: 640px) {
    .site-page {
        padding: 16px 10px 10px;
    }

    .page-shell {
        border-radius: 12px;
    }

    .top-nav,
    .hero-header,
    .content-section,
    .script-container,
    footer {
        padding-left: 14px;
        padding-right: 14px;
    }

    .site-nav {
        display: none;
    }

    .nav-actions {
        width: 100%;
        justify-content: center;
    }

    .language-switcher {
        justify-content: center;
    }

    .hero-copy h1 {
        font-size: 30px;
    }

    .brand {
        font-size: 26px;
    }

    .section-title-wrapper {
        gap: 10px;
    }

    .section-title-line {
        max-width: 42px;
    }

    .tabs {
        display: grid;
        grid-template-columns: 1fr;
    }

    .tab-btn,
    .main-btn,
    .ghost-btn,
    .generate-btn,
    .copy-btn {
        width: 100%;
    }

    .hero-actions {
        flex-direction: column;
    }
}
