/* =========================================================
   ATLAS / RUSFF — structural style.css
   Target: rusff.me / PunBB-style forum structure
   Paste into: Администрирование -> Свой стиль -> Структура style.css
   ========================================================= */

@import url(style_cs.1787948364.css);

/* ------------------------- RESET ------------------------- */
html, body {
    margin: 0;
    padding: 0;
    min-height: 100%;
}

html { scroll-behavior: smooth; }

.punbb *,
.punbb *::before,
.punbb *::after,
.punbb-admin *,
.punbb-admin *::before,
.punbb-admin *::after {
    box-sizing: border-box;
}

.punbb img,
.punbb-admin img {
    border: 0;
}

.punbb ul,
.punbb dl,
.punbb li,
.punbb dd,
.punbb dt {
    margin: 0;
    padding: 0;
    list-style: none;
}

/* ------------------------- PAGE WIDTH ------------------------- */
#pun {
    width: min(1180px, calc(100% - 34px));
    margin: 26px auto 40px;
    position: relative;
}

.punbb {
    width: 100%;
    float: none;
    height: auto;
}

.punbb .section,
.punbb .main {
    margin-bottom: 14px;
}

.punbb .category,
.punbb .post {
    margin-top: 10px;
}

/* ------------------------- HEADER ------------------------- */
#pun-title {
    margin: 0 0 10px;
    padding: 0;
    min-height: 92px;
    border: 0;
    background: transparent;
}

#pun-title .container {
    min-height: 92px;
    padding: 12px 18px 12px 20px;
    display: flex;
    align-items: center;
    border: 1px solid transparent;
}

#pun-title h1,
#pun-title h1 a {
    margin: 0;
    padding: 0;
}

#pun-title h1 a {
    display: inline-flex;
    align-items: center;
    gap: 14px;
    min-height: 62px;
    font-size: 0;
}

/* Put the Atlas emblem before the forum name.
   Replace the URL in style_cs.1787948364.css if your uploaded image has another address. */
#pun-title h1 a::before {
    content: "";
    display: block;
    flex: 0 0 62px;
    width: 62px;
    height: 62px;
    background: url("https://forumstatic.ru/files/001c/c6/ee/52874.png?v=1") center / contain no-repeat;
    filter: drop-shadow(0 5px 15px rgba(0, 0, 0, .30));
}

#pun-title h1 a::after {
    content: "ATLAS";
    display: block;
    font-size: 22px;
    line-height: 1;
    letter-spacing: .18em;
    font-weight: 650;
}

/* ------------------------- NAVIGATION ------------------------- */
#pun-navlinks {
    margin: 0 0 9px;
    border: 0;
    background: transparent;
}

#pun-navlinks .container {
    padding: 5px;
    border: 1px solid transparent;
    border-radius: 8px;
    background: rgba(12, 17, 21, .90);
    backdrop-filter: blur(10px);
}

#pun-navlinks ul {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px;
}

#pun-navlinks li {
    margin: 0;
    border: 0;
}

#pun-navlinks li a {
    display: block;
    padding: 8px 12px;
    border-radius: 5px;
    line-height: 1.25;
    transition: background .16s ease, color .16s ease, transform .16s ease;
}

#pun-navlinks li a:hover,
#pun-navlinks li a:focus-visible {
    transform: translateY(-1px);
}

#pun-navlinks li.isactive a {
    box-shadow: inset 0 -2px 0 currentColor;
}

/* secondary user links: visually quieter than main nav */
#pun-ulinks {
    margin: 0 0 8px;
}

#pun-ulinks .container {
    padding: 3px 5px;
    background: transparent;
    border: 0;
}

#pun-ulinks ul {
    display: flex;
    flex-wrap: wrap;
    gap: 3px;
}

#pun-ulinks li a {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 4px;
}

/* hide only the accessibility headings, not their content */
#pun-navlinks h2,
#pun-ulinks h2,
#pun-status h2,
#pun-crumbs1 h2,
#pun-crumbs2 h2,
#pun-pagelinks h2 {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0,0,0,0);
    white-space: nowrap;
    border: 0;
}

/* ------------------------- USER STATUS ------------------------- */
#pun-status,
#pun-visit,
#pun-online {
    color: inherit;
}

#pun-status .container {
    padding: 5px 0 11px;
    border-bottom: 1px solid transparent;
    font-size: 12px;
}

#pun-status ul,
#pun-status p {
    margin: 0;
}

/* ------------------------- BREADCRUMBS ------------------------- */
#pun-crumbs1,
#pun-crumbs2 {
    margin: 0 0 12px;
}

.punbb p.crumbs {
    margin: 0;
    padding: 0 2px;
    font-size: 12px;
}

.punbb p.crumbs strong {
    font-size: inherit;
}

/* ------------------------- HEADINGS ------------------------- */
.punbb .section h2,
#pun-main h1,
#pun-main h2,
#pun-stats h2,
#pun-debug h2 {
    margin: 0;
    padding: 10px 13px;
    border: 1px solid transparent;
    border-radius: 7px 7px 0 0;
    font-size: 13px;
    line-height: 1.3;
    text-transform: uppercase;
    letter-spacing: .10em;
}

.punbb .main h1 {
    margin-bottom: 8px;
}

/* ------------------------- CATEGORIES / FORUMS ------------------------- */
.punbb .category,
.punbb .forum,
.punbb .forum .container,
.punbb .category .container {
    border-radius: 8px;
}

.punbb .category > .container,
.punbb .forum > .container {
    overflow: hidden;
}

.punbb .forumtable,
.punbb .forumlist {
    border-radius: 0 0 8px 8px;
}

.punbb .forum .container {
    transition: background .18s ease, border-color .18s ease;
}

.punbb .forum h3 {
    margin: 0;
    line-height: 1.3;
}

.punbb .forum h3 a {
    font-weight: 620;
}

/* ------------------------- FORUM TABLES ------------------------- */
.punbb .main table {
    width: 100%;
    table-layout: fixed;
    border-collapse: separate;
    border-spacing: 0;
    overflow: hidden;
}

.punbb th,
.punbb td {
    vertical-align: middle;
}

.punbb th {
    padding: 9px 10px;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: .08em;
}

.punbb td {
    padding: 10px;
}

.punbb td.tcl { width: auto; }
.punbb td.tc2 { width: 92px; text-align: center; }
.punbb td.tc3 { width: 105px; text-align: center; }
.punbb td.tcr { width: 250px; }

/* ------------------------- TOPIC LIST ------------------------- */
.punbb .topic h3,
.punbb .topic h3 span {
    margin: 0;
}

.punbb .topic a,
.punbb .forum a {
    transition: color .15s ease;
}

/* status icons remain compact instead of looking like large blocks */
.punbb div.icon {
    width: 22px;
    height: 22px;
    margin-right: 8px;
    border-radius: 50%;
}

/* ------------------------- POSTS ------------------------- */
.punbb .post {
    border-radius: 8px;
    overflow: hidden;
}

.punbb .post .container {
    border: 0;
    overflow: hidden;
}

.punbb .post h3 {
    margin: 0;
    padding: 8px 12px;
    border: 0;
    line-height: 1.4;
}

.punbb .post h3 span {
    display: block;
    margin: 0;
    padding: 0;
    border: 0;
}

.punbb .post .post-author {
    width: 190px;
    padding: 12px;
    overflow: hidden;
}

.punbb .post .post-author .pa-author a {
    font-weight: 650;
}

.punbb .post .post-body {
    margin-left: 190px;
    min-height: 190px;
    padding: 13px 16px 16px;
    border-left: 1px solid transparent;
}

.punbb .post-content {
    width: 100%;
    margin: 0;
    padding: 0;
    overflow: hidden;
    line-height: 1.72;
}

.punbb .post-content p {
    margin: 0 0 1em;
    padding: 0;
}

.punbb .post-content p:last-child {
    margin-bottom: 0;
}

.punbb .post-sig dt {
    width: 260px;
    margin: 13px 0 8px;
    border-top: 1px solid transparent;
}

/* ------------------------- AVATARS ------------------------- */
.punbb .pa-avatar,
.punbb .pa-avatar.item2 {
    margin: 8px 0 10px;
    text-align: center;
}

.punbb .pa-avatar img,
.punbb .post-author .pa-avatar img,
.punbb .user-avatar img,
.punbb img.avatar {
    display: block;
    width: 120px;
    height: 120px;
    max-width: 100%;
    margin: 0 auto;
    object-fit: cover;
    border-radius: 8px;
    padding: 2px;
}

/* ------------------------- POST MEDIA ------------------------- */
.punbb .post-content img.postimg {
    display: block;
    max-width: 100%;
    height: auto;
    margin: 10px auto;
    border-radius: 6px;
}

.punbb .post-content figure,
.punbb .post-content .image-box {
    max-width: 100%;
    margin: 12px 0;
}

/* ------------------------- FILES / ATTACHMENTS ------------------------- */
.punbb .attachment,
.punbb .attachments,
.punbb .attach,
.punbb .file,
.punbb .download,
.punbb .file-box {
    display: block;
    max-width: 100%;
    margin: 12px 0;
    padding: 10px 12px;
    border: 1px solid transparent;
    border-radius: 7px;
    overflow: hidden;
}

.punbb .attachment a,
.punbb .attach a,
.punbb .file a,
.punbb .download a {
    font-weight: 600;
}

/* prevent oversized uploaded files from breaking the post */
.punbb .post-content iframe,
.punbb .post-content video,
.punbb .post-content object,
.punbb .post-content embed {
    max-width: 100%;
}

/* ------------------------- QUOTE / CODE ------------------------- */
.punbb .quote-box,
.punbb .code-box,
.spoiler-box {
    margin: 12px 0;
    padding: 11px 13px;
    border: 1px solid transparent;
    border-radius: 6px;
    overflow: auto;
}

.punbb .quote-box cite,
.punbb .code-box strong.legend {
    display: block;
    margin-bottom: 7px;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: .06em;
}

.punbb .code-box pre,
.punbb pre {
    margin: 0;
    overflow: auto;
    white-space: pre-wrap;
    word-break: break-word;
}

/* ------------------------- FORMS ------------------------- */
.punbb .formal,
.punbb fieldset,
.punbb .info-box {
    border-radius: 8px;
}

.punbb fieldset {
    margin: 0 0 12px;
    padding: 14px;
}

.punbb legend {
    padding: 0 7px;
    font-size: 12px;
    font-weight: 650;
}

.punbb legend span {
    padding: 0 5px;
}

.punbb textarea,
.punbb select,
.punbb input,
.punbb button {
    max-width: 100%;
    font: inherit;
}

.punbb textarea,
.punbb input[type="text"],
.punbb input[type="password"],
.punbb input[type="email"],
.punbb input[type="url"],
.punbb input[type="search"],
.punbb input[type="number"],
.punbb select {
    min-height: 36px;
    padding: 7px 9px;
    border-radius: 5px;
}

.punbb textarea {
    min-height: 130px;
    resize: vertical;
}

.punbb input[type="submit"],
.punbb input[type="button"],
.punbb button,
.punbb .button {
    padding: 7px 12px;
    border-radius: 5px;
    cursor: pointer;
    transition: transform .12s ease, background .15s ease, border-color .15s ease;
}

.punbb input[type="submit"]:active,
.punbb input[type="button"]:active,
.punbb button:active,
.punbb .button:active {
    transform: translateY(1px);
}

/* ------------------------- PAGINATION ------------------------- */
#pun-pagelinks ul,
#pun-pagelinks .linkst ul,
#pun-post .pagelink {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    align-items: center;
}

#pun-pagelinks a,
#pun-pagelinks strong,
.punbb .pagelink a,
.punbb .pagelink span {
    display: inline-block;
    min-width: 28px;
    padding: 4px 7px;
    border-radius: 4px;
    text-align: center;
}

/* ------------------------- PROFILE / USER LIST ------------------------- */
#viewprofile ul,
#profilenav ul,
#setmods dl,
.usertable table {
    border-radius: 7px;
    overflow: hidden;
}

#viewprofile li,
#setmods dd {
    padding: 8px 10px;
}

/* ------------------------- MODERATOR MENU ------------------------- */
.punbb .modmenu {
    margin: 8px 0;
}

.punbb .modmenu .container {
    padding: 7px 10px;
    border-radius: 6px;
    text-align: right;
}

.punbb .modmenu strong {
    float: left;
    line-height: 30px;
}

.punbb .modmenu input {
    margin-left: 5px;
}

/* ------------------------- ADMIN PANEL ------------------------- */
.punbb-admin #pun-admain,
.punbb-admin #pun-admain .adcontainer,
.punbb-admin #pun-admain fieldset,
.punbb-admin #pun-admain .info-box,
.punbb-admin #pun-admain .container,
.punbb-admin #pun-admain .section {
    color: inherit;
}

.punbb-admin #pun-admain {
    width: min(1180px, calc(100% - 34px));
    margin: 26px auto 40px;
}

.punbb-admin #pun-admain h2,
.punbb-admin #pun-admain legend,
.punbb-admin #pun-admain .admenu,
.punbb-admin #pun-admain .adcontainer {
    border-color: transparent;
}

.punbb-admin #pun-admain input,
.punbb-admin #pun-admain textarea,
.punbb-admin #pun-admain select,
.punbb-admin #pun-admain option,
.punbb-admin #pun-admain optgroup,
.punbb-admin #pun-admain button {
    color-scheme: dark;
}

/* ------------------------- MOBILE ------------------------- */
@media (max-width: 760px) {
    #pun,
    .punbb-admin #pun-admain {
        width: calc(100% - 18px);
        margin-top: 10px;
    }

    #pun-title,
    #pun-title .container {
        min-height: 72px;
    }

    #pun-title h1 a::before {
        width: 48px;
        height: 48px;
        flex-basis: 48px;
    }

    #pun-title h1 a::after {
        font-size: 18px;
    }

    .punbb .post .post-author {
        width: auto;
        float: none;
        text-align: center;
    }

    .punbb .post .post-body {
        margin-left: 0;
        border-left: 0;
        border-top: 1px solid transparent;
    }

    .punbb .pa-avatar img,
    .punbb .post-author .pa-avatar img,
    .punbb .user-avatar img,
    .punbb img.avatar {
        width: 92px;
        height: 92px;
    }

    .punbb td.tc2,
    .punbb td.tc3,
    .punbb td.tcr {
        width: auto;
    }

    .punbb th,
    .punbb td {
        padding: 8px;
    }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { transition: none !important; animation: none !important; }
}
