:root {
    --bg: #0f1419;
    --surface: #1a2332;
    --accent: #3dd68c;
    --accent-2: #5b9dff;
    --text: #e8eef7;
    --muted: #9aa8bc;
    --border: #2a3648;
    --error: #ff6b6b;
    --success: #3dd68c;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: "Segoe UI", system-ui, sans-serif;
    background: linear-gradient(160deg, #0f1419 0%, #15202b 50%, #0d1b2a 100%);
    color: var(--text);
    min-height: 100vh;
    line-height: 1.6;
}

a {
    color: var(--accent-2);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

.site-header {
    background: rgba(26, 35, 50, 0.95);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(8px);
}

.header-inner {
    max-width: 1100px;
    margin: 0 auto;
    padding: 1rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.logo {
    font-weight: 700;
    font-size: 1.35rem;
    color: var(--accent);
    text-decoration: none;
}

.main-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem 1.25rem;
}

.main-nav a {
    color: var(--text);
    font-size: 0.95rem;
}

.nav-toggle {
    display: none;
    background: var(--surface);
    border: 1px solid var(--border);
    color: var(--text);
    font-size: 1.25rem;
    padding: 0.35rem 0.65rem;
    border-radius: 6px;
    cursor: pointer;
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 2rem 1.5rem 4rem;
}

.logo-block {
    display: flex;
    flex-direction: column;
    text-decoration: none;
}

.logo-block:hover {
    text-decoration: none;
}

.logo-tagline {
    font-size: 0.75rem;
    color: var(--muted);
    font-weight: 400;
    letter-spacing: 0.04em;
    text-transform: lowercase;
}

.site-footer {
    padding: 2.5rem 1.5rem 1.5rem;
    color: var(--muted);
    font-size: 0.9rem;
    border-top: 1px solid var(--border);
    background: rgba(15, 20, 25, 0.6);
}

.footer-grid {
    max-width: 1100px;
    margin: 0 auto 1.5rem;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.5rem;
    text-align: left;
}

.footer-brand {
    color: var(--accent);
    font-size: 1.1rem;
}

.footer-col p {
    margin: 0.5rem 0 0;
    line-height: 1.55;
}

.footer-links {
    list-style: none;
    padding: 0;
    margin: 0.5rem 0 0;
}

.footer-links li {
    margin-bottom: 0.35rem;
}

.footer-links a {
    color: var(--text);
}

.footer-meta {
    font-size: 0.85rem;
}

.footer-dev {
    font-size: 0.8rem;
    margin-top: 0.75rem !important;
}

.footer-dev a {
    color: var(--muted);
}

.footer-copy {
    text-align: center;
    margin: 0;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
    font-size: 0.8rem;
}

.hero {
    text-align: center;
    padding: 3rem 1rem 2.5rem;
}

.hero-badge {
    display: inline-block;
    margin: 0 0 1rem;
    padding: 0.35rem 0.85rem;
    border-radius: 999px;
    background: rgba(61, 214, 140, 0.12);
    color: var(--accent);
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.02em;
}

.section-title {
    text-align: center;
    margin: 0 0 1.5rem;
    font-size: 1.5rem;
}

.features-section {
    margin-bottom: 2.5rem;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.25rem;
}

.feature-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.35rem;
}

.feature-icon {
    font-size: 1.75rem;
    display: block;
    margin-bottom: 0.5rem;
}

.feature-card h3 {
    margin: 0 0 0.5rem;
    font-size: 1.1rem;
}

.feature-card p {
    margin: 0;
    color: var(--muted);
    font-size: 0.95rem;
}

.about-strip {
    margin-bottom: 2.5rem;
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(91, 157, 255, 0.12), rgba(61, 214, 140, 0.08));
    border: 1px solid var(--border);
}

.about-strip-inner {
    padding: 1.75rem 1.5rem;
}

.about-strip h2 {
    margin: 0 0 0.5rem;
    font-size: 1.25rem;
}

.about-strip p {
    margin: 0;
    color: var(--muted);
    max-width: 720px;
}

.home-content-grid {
    margin-bottom: 2rem;
}

.card-desc {
    color: var(--muted);
    font-size: 0.9rem;
    margin: -0.25rem 0 0.75rem;
}

.card-link {
    display: inline-block;
    margin-top: 0.75rem;
    font-weight: 600;
    font-size: 0.95rem;
}

.cta-banner {
    text-align: center;
    padding: 2rem 1.5rem;
    border-radius: 12px;
    background: var(--surface);
    border: 1px solid var(--border);
}

.cta-banner h2 {
    margin: 0 0 0.5rem;
}

.cta-banner p {
    color: var(--muted);
    margin: 0 0 1.25rem;
}

.page-intro {
    margin-bottom: 1.5rem;
    padding-bottom: 1.25rem;
    border-bottom: 1px solid var(--border);
}

.page-intro h1 {
    margin: 0 0 0.5rem;
}

.page-intro p {
    margin: 0;
    color: var(--muted);
    max-width: 640px;
}

.page-intro--compact {
    border-bottom: none;
    padding-bottom: 0;
    margin-bottom: 1rem;
}

.hero h1 {
    font-size: 2.25rem;
    margin-bottom: 0.5rem;
}

.lead {
    color: var(--muted);
    max-width: 600px;
    margin: 0 auto 1.5rem;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    justify-content: center;
}

.page-block h1 {
    margin-top: 0;
}

.page-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.25rem;
}

.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.25rem;
}

.highlight-card {
    border-color: var(--accent);
}

.article-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.article-list li {
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border);
}

.meta {
    color: var(--muted);
    font-size: 0.9rem;
}

.btn {
    display: inline-block;
    padding: 0.55rem 1.1rem;
    border-radius: 8px;
    border: none;
    font-size: 0.95rem;
    cursor: pointer;
    text-decoration: none;
    transition: transform 0.15s, opacity 0.15s;
}

.btn:hover {
    transform: translateY(-1px);
    text-decoration: none;
}

.btn-primary {
    background: var(--accent);
    color: #0a0f14;
    font-weight: 600;
}

.btn-secondary {
    background: transparent;
    color: var(--text);
    border: 1px solid var(--border);
}

.form-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.5rem;
    max-width: 520px;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.form-card label {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    font-size: 0.9rem;
}

.form-card input,
.form-card select,
.form-card textarea {
    padding: 0.55rem 0.75rem;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: #0f1419;
    color: var(--text);
    font: inherit;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--surface);
    border-radius: 12px;
    overflow: hidden;
}

.data-table th,
.data-table td {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--border);
    text-align: left;
}

.data-table th {
    background: #121a24;
    color: var(--muted);
    font-weight: 600;
}

.actions {
    white-space: nowrap;
}

.inline-form {
    display: inline;
}

.link-btn {
    background: none;
    border: none;
    color: var(--error);
    cursor: pointer;
    font: inherit;
    padding: 0;
}

.comment {
    background: var(--surface);
    border-left: 3px solid var(--accent-2);
    padding: 1rem;
    margin-bottom: 1rem;
    border-radius: 0 8px 8px 0;
}

.comment-meta {
    font-size: 0.85rem;
    color: var(--muted);
    margin-bottom: 0.35rem;
}

.comments-section {
    margin-top: 2.5rem;
}

.article-full {
    margin-bottom: 2rem;
}

.article-text {
    font-size: 1.05rem;
}

.result-box {
    margin-top: 1.5rem;
    padding: 1.25rem;
    background: var(--surface);
    border-radius: 12px;
    border: 1px solid var(--border);
}

.alert {
    padding: 0.75rem 1rem;
    border-radius: 8px;
}

.alert-error {
    background: rgba(255, 107, 107, 0.15);
    color: var(--error);
}

.alert-success {
    background: rgba(61, 214, 140, 0.15);
    color: var(--success);
}

code {
    background: #0f1419;
    padding: 0.15rem 0.4rem;
    border-radius: 4px;
    font-size: 0.9em;
}

@media (max-width: 768px) {
    .nav-toggle {
        display: block;
    }

    .main-nav {
        display: none;
        flex-direction: column;
        width: 100%;
        padding-top: 0.5rem;
    }

    .main-nav.is-open {
        display: flex;
    }

    .header-inner {
        flex-wrap: wrap;
    }
}
