 :root{--bg:#0b0d10;--panel:#12151a;--panel2:#171b21;--line:#262c35;--muted:#929ba8;--text:#edf0f4;--accent:#d6ff62;--radius:16px}
*{box-sizing:border-box}body{margin:0;background:var(--bg);color:var(--text);font:15px/1.6 Inter,system-ui,-apple-system,Segoe UI,sans-serif}a{color:inherit;text-decoration:none}.wrap{max-width:1180px;margin:auto;padding:0 24px}
.top{border-bottom:1px solid var(--line);background:#0b0d10e8;position:sticky;top:0;z-index:5;backdrop-filter:blur(16px)}.nav{height:70px;display:flex;align-items:center;gap:30px}.brand{font-weight:900;letter-spacing:.12em;font-size:18px}.brand i{font-style:normal;color:var(--accent)}.slash{color:#747e88}.navlinks{display:flex;gap:22px;color:#aeb6c1;font-size:14px}.navlinks a:hover{color:white}.navright{margin-left:auto;display:flex;gap:8px;align-items:center}.user-label{font-size:12px;color:var(--muted)}
.btn{display:inline-flex;align-items:center;justify-content:center;gap:6px;border:1px solid var(--line);background:var(--panel2);color:var(--text);border-radius:10px;padding:10px 14px;font-weight:650;font-size:13px}.btn.primary{background:var(--accent);border-color:var(--accent);color:#12150a}.btn:hover{filter:brightness(1.08)}.hero{padding:62px 0 40px;display:grid;grid-template-columns:1.1fr .9fr;gap:40px;align-items:center}.eyebrow{color:var(--accent);font-size:11px;letter-spacing:.2em;text-transform:uppercase;font-weight:800}.hero h1{font-size:clamp(38px,5vw,64px);line-height:1.03;letter-spacing:-.055em;margin:16px 0}.hero p{color:var(--muted);font-size:17px;max-width:520px}.heroactions{display:flex;gap:12px;margin-top:25px;flex-wrap:wrap}.art{min-height:280px;border:1px solid #343a43;border-radius:22px;overflow:hidden;position:relative;background:radial-gradient(ellipse at 75% 25%,#d6ff6230,transparent 34%),linear-gradient(135deg,#313a3a,#151b20 52%,#292b25)}.art:before{content:"";position:absolute;inset:0;background:linear-gradient(0deg,#0b0d10 0%,transparent 70%)}.sun{position:absolute;width:130px;height:130px;border-radius:50%;background:#d6ff6230;right:17%;top:14%}.ridge{position:absolute;bottom:0;width:100%;height:72%;background:#101519;clip-path:polygon(0 80%,20% 50%,36% 70%,56% 28%,73% 63%,88% 35%,100% 55%,100% 100%,0 100%)}.ridge.two{height:48%;background:#22292b;clip-path:polygon(0 52%,24% 30%,43% 66%,64% 25%,82% 47%,100% 20%,100% 100%,0 100%)}.artlabel{position:absolute;left:24px;bottom:22px}.artlabel strong{font-size:24px;letter-spacing:.08em}.artlabel small{display:block;color:#b6bdc5;letter-spacing:.16em;font-size:10px}
.stats{display:flex;gap:28px;margin-top:28px;color:var(--muted);font-size:12px}.stats b{color:var(--text);display:block;font-size:18px}.sectionhead{display:flex;align-items:end;justify-content:space-between;gap:16px;margin:24px 0 18px}.sectionhead h2{margin:0;font-size:24px;letter-spacing:-.03em}.sectionhead p{margin:4px 0 0;color:var(--muted);font-size:13px}.filters{display:flex;gap:8px;flex-wrap:wrap;margin-bottom:18px}.chip{padding:8px 12px;border-radius:99px;border:1px solid var(--line);color:#aeb6c1;background:transparent;font-size:12px;cursor:pointer}.chip.active{background:#d6ff621a;border-color:#d6ff6270;color:var(--accent)}.search{display:flex;gap:10px;margin-bottom:22px}.search input,.field input,.field textarea,.field select{flex:1;min-width:0;border:1px solid var(--line);border-radius:10px;padding:12px 14px;background:var(--panel);color:var(--text);outline:none;width:100%}.search input:focus,.field input:focus,.field textarea:focus{border-color:#d6ff6270}.grid{display:grid;grid-template-columns:repeat(3,1fr);gap:16px}.guide{background:var(--panel);border:1px solid var(--line);border-radius:var(--radius);overflow:hidden;transition:transform .2s,border-color .2s}.guide:hover{transform:translateY(-3px);border-color:#596345}.thumb{height:150px;position:relative;background:radial-gradient(circle at 70% 30%,#d6ff6230,transparent 40%),linear-gradient(135deg,#353c37,#14191e);overflow:hidden}.thumb:after{content:"";position:absolute;left:-10%;right:-10%;bottom:-25%;height:80%;background:#101418;clip-path:polygon(0 80%,20% 30%,35% 68%,55% 20%,70% 55%,85% 10%,100% 50%,100% 100%,0 100%)}.tag{position:absolute;z-index:2;top:13px;left:13px;background:#0b0d10c9;border:1px solid #ffffff20;border-radius:6px;padding:5px 8px;color:var(--accent);font-size:10px;font-weight:800;letter-spacing:.08em;text-transform:uppercase}.readtime{position:absolute;z-index:2;right:13px;top:13px;color:#e6e9eb;font-size:11px}.guidebody{padding:17px}.guide h3{margin:0 0 8px;font-size:17px;line-height:1.3;letter-spacing:-.02em}.guide p{color:var(--muted);font-size:13px;margin:0;min-height:40px}.meta{display:flex;align-items:center;gap:8px;border-top:1px solid var(--line);margin-top:16px;padding-top:13px;color:var(--muted);font-size:11px}.avatar{width:24px;height:24px;border-radius:50%;background:#2a3137;display:grid;place-items:center;color:var(--accent);font-weight:800}.date{margin-left:auto}.empty{padding:40px;text-align:center;color:var(--muted)}footer{border-top:1px solid var(--line);margin-top:70px;padding:25px 0;color:#737d89;font-size:12px}.foot{display:flex;justify-content:space-between;gap:15px;flex-wrap:wrap}
.notice{margin-top:15px;border:1px solid var(--line);background:var(--panel);padding:11px 14px;border-radius:10px;font-size:13px}.notice.error{border-color:#824b4b;color:#ffb8b8}.notice.success{border-color:#596b32;color:var(--accent)}.content{padding:45px 0 10px}.content h1{font-size:clamp(30px,4vw,48px);line-height:1.12;letter-spacing:-.04em;margin:8px 0 14px}.muted{color:var(--muted)}.formcard{max-width:760px;margin:44px auto;background:var(--panel);border:1px solid var(--line);border-radius:18px;padding:26px}.field{display:grid;gap:7px;margin:16px 0}.field label{font-size:12px;color:var(--muted)}.field textarea{min-height:280px;resize:vertical;line-height:1.6}.field small{color:var(--muted)}.two-col{display:grid;grid-template-columns:1fr 1fr;gap:14px}.prose{font-size:16px;line-height:1.8;color:#d4d9df;overflow-wrap:anywhere}.prose h1,.prose h2,.prose h3,.prose h4{color:var(--text);line-height:1.25;letter-spacing:-.03em;margin:1.6em 0 .6em}.prose h1{font-size:2em}.prose h2{font-size:1.55em;border-bottom:1px solid var(--line);padding-bottom:9px}.prose a{color:var(--accent);text-decoration:underline}.prose code{background:#242a31;padding:2px 5px;border-radius:4px;font-size:.9em}.prose pre{background:#080a0c;border:1px solid var(--line);padding:15px;border-radius:10px;overflow:auto}.prose pre code{padding:0;background:none}.prose blockquote{border-left:3px solid var(--accent);margin:1.3em 0;padding:2px 0 2px 16px;color:#aeb6c1}.prose img{max-width:100%;height:auto}.prose table{border-collapse:collapse;width:100%;display:block;overflow:auto}.prose td,.prose th{border:1px solid var(--line);padding:8px 10px}.article-meta{display:flex;gap:14px;flex-wrap:wrap;color:var(--muted);font-size:12px;margin:16px 0 26px}.article-cover{height:220px;border-radius:18px;border:1px solid var(--line);background:radial-gradient(circle at 75% 25%,#d6ff6230,transparent 35%),linear-gradient(135deg,#343b36,#151a1f);margin:25px 0}.actions{display:flex;gap:8px;flex-wrap:wrap;margin:18px 0}.preview{border:1px solid var(--line);border-radius:12px;padding:18px;margin-top:15px;display:none}.danger{color:#ff9e9e}.inline-form{display:inline}
@media(max-width:850px){.hero{grid-template-columns:1fr;padding-top:42px}.art{min-height:230px}.grid{grid-template-columns:repeat(2,1fr)}.navlinks{display:none}}
@media(max-width:560px){.wrap{padding:0 16px}.nav{height:62px}.navright .user-label,.navright .btn:nth-child(2){display:none}.hero{padding:34px 0 25px;gap:23px}.hero h1{font-size:43px}.hero p{font-size:15px}.art{min-height:190px}.grid{grid-template-columns:1fr}.thumb{height:170px}.sectionhead{align-items:start;flex-direction:column}.stats{gap:18px}.search{flex-direction:column}.foot{flex-direction:column}.formcard{padding:19px;margin:25px auto}.two-col{grid-template-columns:1fr}.content{padding-top:30px}}

.article-cover {
    width: 100%;
    height: 340px;
    margin: 24px 0;
    overflow: hidden;
    border-radius: 18px;
    background: #171a19;
}

.article-cover img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

@media (max-width: 700px) {
    .article-cover {
        height: 210px;
        border-radius: 13px;
    }
}

.edit-cover-preview {
    width: 100%;
    max-height: 280px;
    overflow: hidden;
    border-radius: 14px;
    background: #171a19;
    margin-bottom: 14px;
}

.edit-cover-preview img {
    display: block;
    width: 100%;
    max-height: 280px;
    object-fit: cover;
}

.cover-remove {
    display: flex;
    align-items: center;
    gap: 9px;
    cursor: pointer;
    color: #ff7777;
    font-size: 14px;
}

.cover-remove input {
    accent-color: #ff5555;
}

/* Обложки гайдов в библиотеке */

.thumb {
    position: relative;
    overflow: hidden;
}

.thumb .guide-cover {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform .4s ease;
}

.guide:hover .guide-cover {
    transform: scale(1.045);
}

/* Затемнение для читаемости категорий и времени */
.thumb:has(.guide-cover)::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to bottom,
        rgba(0, 0, 0, .35),
        transparent 35%,
        transparent 55%,
        rgba(0, 0, 0, .4)
    );
    pointer-events: none;
}

.thumb .tag,
.thumb .readtime {
    position: absolute;
    z-index: 2;
}



/* ========================================
   PROFILE DROPDOWN
======================================== */

.navright {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 8px;
}

.profile-dropdown {
    position: relative;
}

.profile-trigger {
    display: flex;
    align-items: center;
    gap: 10px;
    height: 44px;
    padding: 5px 12px 5px 6px;
    background: #171b21;
    border: 1px solid #292f38;
    border-radius: 12px;
    color: var(--text);
    font: inherit;
    font-size: 13px;
    font-weight: 650;
    cursor: pointer;
    transition: background .2s, border-color .2s;
}

.profile-trigger:hover,
.profile-trigger.active {
    background: #20252c;
    border-color: #414954;
}

.profile-avatar,
.profile-menu-avatar {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    background: linear-gradient(145deg, #d6ff62, #a8cf42);
    color: #151a10;
    font-weight: 800;
    border-radius: 9px;
}

.profile-avatar {
    width: 32px;
    height: 32px;
    font-size: 14px;
}

.profile-username {
    max-width: 150px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.profile-chevron {
    width: 15px;
    height: 15px;
    color: #929ba8;
    transition: transform .2s;
}

.profile-trigger.active .profile-chevron {
    transform: rotate(180deg);
}

/* Dropdown */

.profile-menu {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    width: 235px;
    padding: 7px;
    background: #14181e;
    border: 1px solid #2b323c;
    border-radius: 14px;
    box-shadow: 0 14px 45px rgba(0, 0, 0, .45);
    z-index: 100;
    animation: profileMenuShow .18s ease;
}

.profile-menu[hidden] {
    display: none;
}

@keyframes profileMenuShow {
    from {
        opacity: 0;
        transform: translateY(-6px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* User information */

.profile-menu-header {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 11px 10px;
}

.profile-menu-avatar {
    width: 39px;
    height: 39px;
    font-size: 16px;
    border-radius: 11px;
}

.profile-menu-user {
    display: flex;
    flex-direction: column;
    min-width: 0;
    gap: 2px;
}

.profile-menu-user strong {
    font-size: 13px;
    color: #edf0f4;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.profile-menu-user span {
    color: #7e8996;
    font-size: 11px;
}

/* Divider */

.profile-menu-divider {
    height: 1px;
    background: #292f38;
    margin: 5px 3px;
}

/* Menu items */

.profile-menu-item {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 11px 10px;
    margin: 2px 0;
    border-radius: 9px;
    color: #c3cad3;
    font-size: 13px;
    font-weight: 550;
    transition: background .15s, color .15s;
}

.profile-menu-item:hover {
    background: #222831;
    color: #fff;
}

.profile-menu-item svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    color: #8994a1;
}

.profile-menu-item:hover svg {
    color: var(--accent);
}

/* Logout */

.profile-menu-item.logout-item {
    color: #ed8585;
}

.profile-menu-item.logout-item svg {
    color: #ed8585;
}

.profile-menu-item.logout-item:hover {
    background: #ed555515;
    color: #ff9999;
}

/* Mobile */

@media (max-width: 560px) {
    .profile-trigger {
        height: 42px;
        gap: 8px;
        padding-right: 9px;
    }

    .profile-username {
        max-width: 110px;
    }

    .profile-menu {
        width: 225px;
    }
}

/* ========================================
   AFTERDAY SEARCH
======================================== */
.search {
    position: relative;
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    min-height: 54px;
    margin: 0 0 18px;
    padding: 5px 6px 5px 17px;
    border: 1px solid #2b323c;
    border-radius: 14px;
    background: linear-gradient(180deg, #171b21 0%, #13171c 100%);
    box-shadow: 0 5px 18px rgba(0, 0, 0, .12), inset 0 1px 0 rgba(255,255,255,.025);
    transition: border-color .2s ease, box-shadow .2s ease, background .2s ease;
}
.search:focus-within {
    border-color: rgba(214, 255, 98, .58);
    background: #171c20;
    box-shadow: 0 0 0 3px rgba(214, 255, 98, .075), 0 8px 24px rgba(0,0,0,.18);
}
.search-icon {
    display: grid;
    place-items: center;
    flex: 0 0 21px;
    width: 21px;
    height: 21px;
    color: #7f8996;
    pointer-events: none;
}
.search-icon svg { width: 21px; height: 21px; display: block; }
.search input {
    flex: 1 1 auto;
    width: 100%;
    min-width: 0;
    height: 42px;
    margin: 0;
    padding: 0 5px;
    border: 0 !important;
    border-radius: 0;
    outline: 0;
    background: transparent !important;
    box-shadow: none !important;
    color: var(--text);
    font: inherit;
    font-size: 14px;
}
.search input::placeholder { color: #75808d; opacity: 1; }
.search input::-webkit-search-cancel-button { display: none; }
.search-clear {
    display: grid;
    place-items: center;
    flex: 0 0 30px;
    width: 30px;
    height: 30px;
    border-radius: 8px;
    color: #84909d;
    transition: background .15s ease, color .15s ease;
}
.search-clear:hover { background: #252c34; color: #edf0f4; }
.search-clear svg { width: 17px; height: 17px; }
.search-submit {
    display: grid;
    place-items: center;
    flex: 0 0 42px;
    width: 42px;
    height: 42px;
    padding: 0;
    border: 0;
    border-radius: 10px;
    background: var(--accent);
    color: #151a10;
    cursor: pointer;
    transition: transform .15s ease, filter .15s ease;
}
.search-submit:hover { filter: brightness(1.07); transform: translateX(1px); }
.search-submit:active { transform: scale(.96); }
.search-submit svg { width: 20px; height: 20px; }
.search-submit:focus-visible, .search-clear:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

@media (max-width: 560px) {
    .search {
        display: flex;
        flex-direction: row;
        align-items: center;
        width: 100%;
        min-height: 52px;
        gap: 8px;
        margin-bottom: 16px;
        padding: 4px 5px 4px 13px;
        border-radius: 13px;
    }
    .search-icon, .search-icon svg { width: 19px; height: 19px; }
    .search input { height: 42px; padding: 0 2px; font-size: 13px; }
    .search-submit { flex-basis: 40px; width: 40px; height: 40px; border-radius: 9px; }
    .search-clear { flex-basis: 27px; width: 27px; height: 30px; }
    .filters {
        flex-wrap: nowrap;
        overflow-x: auto;
        overflow-y: hidden;
        margin: 0 -16px 18px;
        padding: 2px 16px 7px;
        scrollbar-width: none;
        -webkit-overflow-scrolling: touch;
    }
    .filters::-webkit-scrollbar { display: none; }
    .filters .chip { flex: 0 0 auto; white-space: nowrap; }
}



















/* PROJECT ACTIONS */

.project-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    margin: 26px 0 28px;
}

.project-btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 13px;
    min-width: 220px;
    padding: 13px 16px;
    border-radius: 16px;
    text-decoration: none;
    color: var(--text);
    border: 1px solid var(--border);
    background: var(--card);
    transition:
        transform .25s ease,
        border-color .25s ease,
        box-shadow .25s ease,
        background .25s ease;
    overflow: hidden;
}

.project-btn:hover {
    transform: translateY(-3px);
}

.project-btn-icon {
    width: 43px;
    height: 43px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 13px;
}

.project-btn-icon svg {
    width: 23px;
    height: 23px;
}

.project-btn-content {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
}

.project-btn-content strong {
    font-size: 14px;
    font-weight: 700;
}

.project-btn-content small {
    font-size: 11px;
    color: var(--muted);
}

.project-btn-arrow {
    width: 18px;
    height: 18px;
    opacity: .55;
    flex-shrink: 0;
    transition: transform .25s ease;
}

.project-btn:hover .project-btn-arrow {
    transform: translate(2px, -2px);
    opacity: 1;
}

/* LAUNCHER */

.launcher-btn {
    background: linear-gradient(
        120deg,
        rgba(102, 126, 234, .13),
        rgba(118, 75, 162, .10)
    );
    border-color: rgba(102, 126, 234, .3);
}

.launcher-btn .project-btn-icon {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
}

.launcher-btn:hover {
    border-color: #667eea;
    box-shadow: 0 8px 28px rgba(102, 126, 234, .18);
}

/* GITHUB */

.github-btn {
    background: var(--card);
}

.github-btn .project-btn-icon {
    background: rgba(128, 128, 128, .13);
}

.github-btn:hover {
    border-color: var(--text);
    box-shadow: 0 8px 24px rgba(0, 0, 0, .08);
}

/* MOBILE */

@media (max-width: 600px) {
    .project-actions {
        display: grid;
        grid-template-columns: 1fr;
        gap: 10px;
        margin: 20px 0 24px;
    }

    .project-btn {
        width: 100%;
        min-width: 0;
        box-sizing: border-box;
    }
}