:root {
    --bg: #f2f5f8;
    --surface: #ffffff;
    --ink: #18202c;
    --muted: #596273;
    --primary: #e33f3f;
    --accent: #0b6cd4;
    --success: #1f8a4d;
    --danger: #b4232c;
    --wire-blue: #0b6cd4;
    --wire-red: #e33f3f;
    --wire-green-yellow: #50b452;
    --wire-violet: #6d4dcc;
    --wire-black: #1f2329;
    --shadow: 0 12px 30px rgba(15, 25, 35, 0.1);
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    padding: 0;
}

body {
    font-family: "Exo 2", sans-serif;
    color: var(--ink);
    background:
        radial-gradient(circle at 10% 10%, rgba(11, 108, 212, 0.12), transparent 30%),
        radial-gradient(circle at 85% 25%, rgba(227, 63, 63, 0.13), transparent 28%),
        linear-gradient(180deg, #fbfcfd 0%, #edf1f5 100%);
    min-height: 100vh;
}

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

a:hover {
    text-decoration: underline;
}

.container {
    width: min(1180px, calc(100% - 2rem));
    margin: 1.5rem auto 2rem;
    min-height: 100vh;
}

.topbar {
    position: sticky;
    top: 0;
    z-index: 50;
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: center;
    background: rgba(22, 30, 40, 0.95);
    backdrop-filter: blur(6px);
    border-bottom: 3px solid var(--wire-green-yellow);
    padding: 0.75rem 1rem;
}

.logo {
    color: #fff;
    font-family: "Rajdhani", sans-serif;
    letter-spacing: 0.06em;
    font-size: 1.2rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

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

.bolt {
    color: #ffd200;
}

.nav-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.nav-links a {
    color: #edf4ff;
    padding: 0.45rem 0.7rem;
    border-radius: 0.5rem;
    border: 1px solid rgba(237, 244, 255, 0.2);
}

.nav-links a:hover {
    background: rgba(255, 255, 255, 0.1);
    text-decoration: none;
}

h1,
h2,
h3 {
    font-family: "Rajdhani", sans-serif;
    letter-spacing: 0.02em;
}

.hero {
    display: grid;
    grid-template-columns: 1.3fr 0.7fr;
    gap: 1.2rem;
    background: linear-gradient(120deg, #122034, #18293f);
    color: #eaf2ff;
    padding: 1.4rem;
    border-radius: 1rem;
    box-shadow: var(--shadow);
    border: 2px solid #2b4e77;
}

.hero p {
    color: #d6e4ff;
}

.search-form {
    margin-top: 1rem;
    display: flex;
    gap: 0.6rem;
}

.search-form input[type="search"],
.search-form input[type="email"],
.search-form input[type="text"] {
    flex: 1;
}

input,
textarea,
button,
select {
    font: inherit;
}

input,
textarea,
select {
    border: 1px solid #c4cddd;
    background: #fff;
    border-radius: 0.6rem;
    padding: 0.65rem 0.8rem;
    color: var(--ink);
}

input:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(11, 108, 212, 0.15);
}

button,
.button-link {
    border: 1px solid transparent;
    background: linear-gradient(160deg, #0b6cd4, #0a59ad);
    color: #fff;
    padding: 0.62rem 0.9rem;
    border-radius: 0.65rem;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
}

button:hover,
.button-link:hover {
    filter: brightness(1.06);
    text-decoration: none;
}

button.ghost,
.ghost {
    background: #fff;
    color: var(--ink);
    border: 1px solid #b8c4d6;
}

button.danger,
.danger {
    background: linear-gradient(160deg, #cf3340, #b52231);
    border-color: #a51f2d;
}

.hero-stats {
    display: grid;
    gap: 0.6rem;
}

.hero-stats article {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 0.8rem;
    padding: 0.8rem;
}

.hero-stats strong {
    display: block;
    font-size: 1.6rem;
}

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

.small-link {
    font-size: 0.95rem;
}

.schema-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.schema-card {
    background: var(--surface);
    border-radius: 0.95rem;
    overflow: hidden;
    box-shadow: var(--shadow);
    border: 2px solid #e2e8f2;
}

.wire-color-0 {
    border-color: var(--wire-blue);
}

.wire-color-1 {
    border-color: var(--wire-red);
}

.wire-color-2 {
    border-color: var(--wire-green-yellow);
}

.wire-color-3 {
    border-color: var(--wire-violet);
}

.wire-color-4 {
    border-color: var(--wire-black);
}

.schema-thumb-wrap {
    display: block;
}

.schema-thumb {
    display: block;
    width: 100%;
    height: 190px;
    object-fit: cover;
    background: #dce4f3;
}

.schema-thumb.placeholder {
    display: grid;
    place-content: center;
    color: #5c6573;
    font-weight: 600;
}

.schema-card-body {
    padding: 0.9rem;
}

.schema-card h2,
.schema-card h3 {
    margin: 0;
    font-size: 1.15rem;
}

.schema-card p {
    color: var(--muted);
    margin: 0.6rem 0 0.75rem;
}

.page-head {
    background: var(--surface);
    border-radius: 1rem;
    padding: 1rem 1.1rem;
    box-shadow: var(--shadow);
    border: 1px solid #e0e8f2;
}

.pagination {
    display: flex;
    gap: 0.4rem;
    flex-wrap: wrap;
    margin: 1rem 0;
}

.pagination a {
    background: #fff;
    border: 1px solid #c8d2e3;
    border-radius: 0.5rem;
    padding: 0.35rem 0.65rem;
    color: #1e2a3d;
}

.pagination a.active {
    background: #1d74d2;
    border-color: #1d74d2;
    color: #fff;
}

.schema-detail {
    display: grid;
    gap: 1rem;
}

.schema-header {
    background: var(--surface);
    border-radius: 1rem;
    box-shadow: var(--shadow);
    padding: 1rem 1.1rem;
}

.schema-meta {
    color: var(--muted);
    margin: 0.25rem 0 0;
}

.schema-block,
.panel {
    background: var(--surface);
    border-radius: 1rem;
    padding: 1rem 1.1rem;
    box-shadow: var(--shadow);
    border: 1px solid #e0e8f2;
}

.danger-zone {
    border: 2px solid #f3b8bc;
    background: linear-gradient(160deg, #fff7f7, #fff);
}

.danger-zone h2 {
    color: #9b1e2a;
}

.safety-link-panel {
    border-left: 6px solid #2a7fd9;
    background: linear-gradient(140deg, #eff7ff, #fff);
}

.safety-section h2 {
    margin-top: 0;
}

.sections-builder {
    display: grid;
    gap: 0.9rem;
}

.section-editor-item {
    border: 1px solid #d6e2f3;
    border-radius: 0.8rem;
    background: #f9fbff;
    padding: 0.85rem;
    display: grid;
    gap: 0.65rem;
}

.chef-tip {
    background: linear-gradient(135deg, #fff7de, #fff);
    border-left: 6px solid #f2b71f;
}

.favorite-btn.active {
    background: linear-gradient(160deg, #da4141, #bf2e2e);
}

.detail-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 0.8rem;
}

.detail-gallery figure {
    margin: 0;
}

.image-open-btn {
    border: 2px solid #d5deec;
    padding: 0;
    width: 100%;
    border-radius: 0.8rem;
    overflow: hidden;
    background: #fff;
}

.image-open-btn img {
    display: block;
    width: 100%;
    height: 190px;
    object-fit: cover;
}

.comments .comment-form {
    margin-bottom: 1rem;
}

.comment-form textarea {
    width: 100%;
}

.comment-list {
    display: grid;
    gap: 0.75rem;
}

.comment-card {
    border: 1px solid #d8e2f1;
    border-left: 5px solid var(--wire-violet);
    border-radius: 0.8rem;
    background: #fff;
    padding: 0.75rem 0.85rem;
}

.comment-card header {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    color: #2a3950;
}

.comment-card time {
    color: #5b6a81;
    font-size: 0.9rem;
}

.alert {
    padding: 0.75rem 0.9rem;
    border-radius: 0.7rem;
    margin-bottom: 1rem;
}

.alert.success {
    background: #e8fbf0;
    border: 1px solid #9ed7b2;
    color: #1f6e42;
}

.alert.error {
    background: #ffefef;
    border: 1px solid #f5b1b4;
    color: #8d2230;
}

.site-footer {
    margin-top: 2rem;
    padding: 1.4rem 1rem 2rem;
    background: #141a24;
    color: #dae5f7;
}

.newsletter-block {
    width: min(980px, 100%);
    margin: 0 auto;
}

.newsletter-form {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
}

.newsletter-form input {
    min-width: 260px;
    flex: 1;
}

.copyright {
    text-align: center;
    margin-top: 1rem;
    color: #a9b8d1;
}

.auth-card {
    width: min(520px, 100%);
    margin: 0 auto;
    background: var(--surface);
    border-radius: 1rem;
    border: 2px solid #d6e0ef;
    box-shadow: var(--shadow);
    padding: 1.1rem;
}

.stack-form {
    display: grid;
    gap: 0.8rem;
}

.stack-form label {
    display: grid;
    gap: 0.4rem;
    color: #24324a;
}

.inline-check {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.dev-box {
    margin-top: 1rem;
    background: #f0f7ff;
    border: 1px dashed #7aa8de;
    border-radius: 0.7rem;
    padding: 0.75rem;
    word-break: break-word;
}

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

.admin-stats {
    display: grid;
    gap: 0.9rem;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
}

.admin-stats article strong {
    display: block;
    font-size: 1.5rem;
    margin-bottom: 0.25rem;
}

.admin-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
}

.table-wrap {
    overflow-x: auto;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
}

.admin-table th,
.admin-table td {
    border-bottom: 1px solid #e0e8f5;
    padding: 0.6rem 0.5rem;
    text-align: left;
    vertical-align: top;
}

.badge {
    border-radius: 1rem;
    padding: 0.2rem 0.55rem;
    font-size: 0.8rem;
    font-weight: 700;
    display: inline-block;
}

.badge.ok {
    background: #e4faee;
    color: #1f7447;
}

.badge.bad {
    background: #ffe9ea;
    color: #9f2730;
}

.inline-form {
    display: flex;
    gap: 0.35rem;
    flex-wrap: wrap;
}

.simple-list {
    margin: 0;
    padding: 0;
    list-style: none;
    display: grid;
    gap: 0.45rem;
}

.simple-list li {
    display: flex;
    justify-content: space-between;
    gap: 0.7rem;
    border-bottom: 1px solid #e4ebf5;
    padding-bottom: 0.4rem;
}

.image-modal {
    position: fixed;
    inset: 0;
    display: none;
    z-index: 120;
}

.image-modal.visible {
    display: block;
}

.image-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(6px);
}

.image-modal-content {
    position: relative;
    z-index: 2;
    width: min(80vw, 1200px);
    max-height: 86vh;
    margin: 6vh auto 0;
    background: #0e1218;
    border: 1px solid #3a4f68;
    border-radius: 0.8rem;
    box-shadow: 0 20px 45px rgba(0, 0, 0, 0.45);
    padding: 0.75rem;
}

.image-modal-content img {
    display: block;
    width: 100%;
    max-height: 72vh;
    object-fit: contain;
    border-radius: 0.4rem;
    background: #0f1825;
}

.download-btn {
    display: inline-flex;
    margin-top: 0.65rem;
    padding: 0.45rem 0.7rem;
    border-radius: 0.6rem;
    border: 1px solid #91c2ff;
    background: #102844;
    color: #d9ebff;
}

.download-btn:hover {
    text-decoration: none;
    filter: brightness(1.1);
}

.modal-close {
    position: absolute;
    right: 0.6rem;
    top: 0.45rem;
    background: #172130;
    border: 1px solid #617a9c;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    padding: 0;
    line-height: 1;
}

body.modal-open {
    overflow: hidden;
}

.cable-yoyo {
    --drop: 0px;
    --line-base: 26px;
    --reel-size: 56px;
    --reel-rot: 0deg;
    position: fixed;
    top: 0;
    right: 1.2rem;
    z-index: 130;
    display: flex;
    flex-direction: column;
    align-items: center;
    background: transparent;
    border: 0;
    padding: 0;
    opacity: 0;
    pointer-events: none;
    transform: translateY(-14px);
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.cable-yoyo.show {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

.cable-line {
    width: 3px;
    height: calc(var(--line-base) + var(--drop));
    border-radius: 2px;
    background: linear-gradient(180deg, #0b0b0b, #303030);
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.1);
    transition: height 0.15s linear;
}

.cable-reel {
    width: var(--reel-size);
    height: var(--reel-size);
    border-radius: 50%;
    background: radial-gradient(circle at 30% 30%, #34373d, #0e1013 70%);
    color: #f2f5fb;
    border: 3px solid #060708;
    display: grid;
    place-content: center;
    font-size: calc(var(--reel-size) * 0.34);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.4);
    transform: rotate(var(--reel-rot));
    transition: width 0.15s linear, height 0.15s linear, font-size 0.15s linear, transform 0.15s linear;
}


article ,section{
margin-top: 1rem;
margin-bottom:1rem;
}


@media (max-width: 880px) {
    .hero {
        grid-template-columns: 1fr;
    }

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

    .nav-links {
        width: 100%;
    }

    .nav-links a {
        flex: 1;
        text-align: center;
    }

    .search-form {
        flex-direction: column;
    }

    .image-modal-content {
        width: 92vw;
    }
}
