/* =========================================================================
   Release Hub - main.css
   Forum-style theme classic forum look (XenForo-like).
   ========================================================================= */

:root {
        --as-bg:        #e8ebef;
        --as-page:      #f4f6f9;
        --as-card:      #ffffff;
        --as-header:    #1f2733;
        --as-header2:   #2a3340;
        --as-accent:    #d8232a;   /* red accent like the ☄️RELEASE prefix */
        --as-accent2:   #2f6fb3;   /* link blue */
        --as-nav:       #3a4858;
        --as-border:    #d3d9e0;
        --as-soft:      #f0f3f7;
        --as-text:      #1c1f23;
        --as-muted:     #6b7480;
        --as-prefix-lang:#5a6b80;
        --as-radius:    6px;
        --as-shadow:    0 1px 3px rgba(0,0,0,.08);
        --as-maxw:      1180px;
        --as-font:      -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans JP", sans-serif;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
        margin: 0;
        font-family: var(--as-font);
        font-size: 15px;
        line-height: 1.5;
        color: var(--as-text);
        background: var(--as-bg);
}

a { color: var(--as-accent2); text-decoration: none; }
a:hover { text-decoration: underline; }

img { max-width: 100%; height: auto; }

.as-container {
        width: 100%;
        max-width: var(--as-maxw);
        margin: 0 auto;
        padding: 0 16px;
}

.screen-reader-text {
        position: absolute !important;
        clip: rect(1px,1px,1px,1px);
        width: 1px; height: 1px; overflow: hidden;
}
.skip-link { position: absolute; left: -9999px; }
.skip-link:focus { left: 8px; top: 8px; background:#fff; padding:8px; z-index:1000; }

/* ---------- Header ---------- */
.as-header { background: var(--as-header); color: #fff; }
.as-header__inner {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 16px;
        padding-top: 14px;
        padding-bottom: 14px;
}
.as-branding { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.as-logo { display: inline-flex; align-items: center; gap: 8px; color: #fff; font-size: 22px; font-weight: 800; letter-spacing: .3px; }
.as-logo:hover { text-decoration: none; }
.as-logo__mark { color: var(--as-accent); font-size: 24px; }
.as-tagline { margin: 0; color: #aab4c0; font-size: 12px; }
.custom-logo { max-height: 50px; width: auto; }

.as-search { display: flex; align-items: stretch; }
.as-search__field {
        border: 1px solid #11161d;
        border-right: 0;
        border-radius: var(--as-radius) 0 0 var(--as-radius);
        padding: 8px 12px;
        min-width: 230px;
        font-size: 14px;
}
.as-search__btn {
        border: 0;
        background: var(--as-accent);
        color: #fff;
        padding: 0 14px;
        border-radius: 0 var(--as-radius) var(--as-radius) 0;
        cursor: pointer;
        font-size: 14px;
}
.as-search__btn:hover { background: #b81d23; }

/* ---------- Nav ---------- */
.as-nav { background: var(--as-nav); }
.as-nav .as-container { display: flex; align-items: center; }
.as-menu {
        list-style: none;
        margin: 0; padding: 0;
        display: flex;
        flex-wrap: wrap;
}
.as-menu li { position: relative; }
.as-menu a {
        display: block;
        color: #e7ecf2;
        padding: 12px 16px;
        font-size: 14px;
        font-weight: 600;
}
.as-menu a:hover, .as-menu .current-menu-item > a, .as-menu .current-cat > a {
        background: var(--as-accent);
        color: #fff;
        text-decoration: none;
}
.as-nav__toggle {
        display: none;
        background: transparent;
        border: 0;
        color: #fff;
        font-size: 14px;
        font-weight: 600;
        padding: 12px 0;
        cursor: pointer;
        align-items: center;
        gap: 8px;
}
.as-nav__toggle span {
        display: block; width: 20px; height: 2px; background: #fff; margin: 3px 0;
}

/* ---------- Layout ---------- */
.as-layout {
        display: grid;
        grid-template-columns: minmax(0,1fr) 300px;
        gap: 20px;
        padding-top: 20px;
        padding-bottom: 40px;
        align-items: start;
}
.as-main { min-width: 0; }

/* ---------- Block (panel) ---------- */
.as-block {
        background: var(--as-card);
        border: 1px solid var(--as-border);
        border-radius: var(--as-radius);
        box-shadow: var(--as-shadow);
        overflow: hidden;
}
.as-block__head {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
        background: linear-gradient(var(--as-header2), var(--as-header));
        color: #fff;
        padding: 12px 16px;
}
.as-block__title { margin: 0; font-size: 17px; font-weight: 700; }
.as-block__title em { color: #ffd9a8; font-style: normal; }
.as-block__count { color: #aeb8c4; font-size: 13px; white-space: nowrap; }
.as-block__desc { padding: 12px 16px; border-bottom: 1px solid var(--as-border); color: var(--as-muted); }

/* ---------- Date group heading (homepage by date) ---------- */
.as-date-group {
        margin: 20px 0 0;
        padding: 12px 16px;
        background: linear-gradient(135deg, var(--as-accent) 0%, #1a5490 100%);
        border-radius: var(--as-radius);
        font-size: 15px;
        font-weight: 700;
        color: #fff;
        text-transform: none;
        letter-spacing: .02em;
        box-shadow: 0 2px 4px rgba(0,0,0,.08);
}
.as-date-group:first-of-type { margin-top: 0; }

/* ---------- Results list (search style) ---------- */
.as-results { list-style: none; margin: 0; padding: 0; counter-reset: as-counter; }
.as-result {
        counter-increment: as-counter;
        position: relative;
        display: flex;
        gap: 14px;
        padding: 14px 16px 14px 44px;
        border-bottom: 1px solid var(--as-border);
        background: var(--as-card);
}
.as-result:nth-child(even) { background: var(--as-soft); }
.as-result:hover { background: #eef4fb; }
.as-result::before {
        content: counter(as-counter);
        position: absolute;
        left: 12px; top: 16px;
        color: var(--as-muted);
        font-size: 12px;
        font-weight: 700;
}
.as-result__thumb {
        flex: 0 0 90px;
        width: 90px;
}
.as-result__thumb img {
        width: 90px; height: 120px;
        object-fit: cover;
        border-radius: 4px;
        border: 1px solid var(--as-border);
        display: block;
}
.as-result__body { flex: 1; min-width: 0; }
.as-result__title { margin: 0 0 6px; font-size: 15px; line-height: 1.4; font-weight: 700; }
.as-result__title a { color: #15324f; }

/* prefix labels */
.as-prefix {
        display: inline-block;
        font-size: 11px;
        font-weight: 700;
        line-height: 1;
        padding: 3px 6px;
        border-radius: 3px;
        margin-right: 4px;
        vertical-align: middle;
        text-transform: uppercase;
        letter-spacing: .4px;
}
.as-prefix--lang { background: var(--as-prefix-lang); color: #fff; }
.as-prefix--release { background: var(--as-accent); color: #fff; }

.as-result__meta { font-size: 12.5px; color: var(--as-muted); display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 6px; }
.as-result__meta strong { color: var(--as-text); }

.as-result__details { font-size: 13px; margin-bottom: 6px; display: flex; flex-wrap: wrap; gap: 6px 14px; }
.as-detail b { color: var(--as-muted); font-weight: 600; }

.as-result__tags { font-size: 12px; color: var(--as-muted); margin-bottom: 8px; line-height: 1.9; }
.as-result__footer { font-size: 12.5px; color: var(--as-muted); display: flex; flex-wrap: wrap; gap: 18px; }
.as-result__footer a { font-weight: 600; }

/* tag pills */
.as-tag {
        display: inline-block;
        background: var(--as-soft);
        border: 1px solid var(--as-border);
        color: #4a5562;
        font-size: 11.5px;
        padding: 2px 8px;
        border-radius: 11px;
        margin: 0 3px 3px 0;
}
.as-tag:hover { background: var(--as-accent2); color: #fff; border-color: var(--as-accent2); text-decoration: none; }

/* ---------- Pagination ---------- */
.pagination, .nav-links {
        display: flex;
        flex-wrap: wrap;
        gap: 6px;
        padding: 16px;
        justify-content: center;
}
.pagination .page-numbers, .nav-links .page-numbers {
        display: inline-block;
        padding: 7px 12px;
        border: 1px solid var(--as-border);
        border-radius: 4px;
        background: #fff;
        color: var(--as-text);
        font-size: 13px;
}
.pagination .page-numbers.current { background: var(--as-accent); color: #fff; border-color: var(--as-accent); }
.pagination a.page-numbers:hover { background: var(--as-soft); text-decoration: none; }

.as-empty { padding: 30px 16px; text-align: center; color: var(--as-muted); }

/* ---------- Single thread ---------- */
.as-thread { background: var(--as-card); border: 1px solid var(--as-border); border-radius: var(--as-radius); box-shadow: var(--as-shadow); overflow: hidden; }
.as-breadcrumb { padding: 10px 16px; font-size: 13px; background: var(--as-soft); border-bottom: 1px solid var(--as-border); color: var(--as-muted); }
.as-breadcrumb__sep { margin: 0 6px; }

.as-thread__head { padding: 16px; border-bottom: 1px solid var(--as-border); }
.as-thread__title { margin: 0 0 8px; font-size: 21px; line-height: 1.35; }
.as-thread__meta { font-size: 13px; color: var(--as-muted); display: flex; flex-wrap: wrap; gap: 16px; }
.as-thread__meta strong { color: var(--as-text); }

.as-thread__post { display: grid; grid-template-columns: 160px minmax(0,1fr); }
.as-thread__author {
        background: var(--as-soft);
        border-right: 1px solid var(--as-border);
        padding: 18px 12px;
        text-align: center;
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 4px;
}
.as-thread__author img { border-radius: 6px; }
.as-thread__authorname { font-weight: 700; color: #15324f; }
.as-thread__authortitle { font-size: 12px; color: var(--as-muted); }

.as-thread__content { padding: 18px; min-width: 0; }
.as-thread__content--full { grid-column: 1 / -1; } /* full width when no sidebar */
.as-thread__cover { text-align: center; margin-bottom: 16px; }
.as-thread__cover img { border-radius: 6px; border: 1px solid var(--as-border); }

/* info box */
.as-info { background: var(--as-soft); border: 1px solid var(--as-border); border-radius: var(--as-radius); padding: 12px 16px; margin-bottom: 16px; }
.as-info__title { margin: 0 0 10px; font-size: 15px; border-bottom: 1px solid var(--as-border); padding-bottom: 8px; }
.as-info__list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px,1fr)); gap: 6px 18px; }
.as-info__list li { display: flex; gap: 8px; font-size: 13.5px; }
.as-info__list b { flex: 0 0 120px; color: var(--as-muted); font-weight: 600; }

.as-thread__body { font-size: 15px; line-height: 1.7; word-wrap: break-word; }
.as-thread__body img { border-radius: 4px; }
.as-thread__body h2, .as-thread__body h3 { margin-top: 1.2em; }

.as-thread__tags { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--as-border); font-size: 12.5px; line-height: 2; }

/* downloads */
.as-downloads { margin-top: 20px; border: 1px solid var(--as-border); border-radius: var(--as-radius); overflow: hidden; }
.as-downloads__title { margin: 0; padding: 10px 16px; background: linear-gradient(var(--as-header2), var(--as-header)); color: #fff; font-size: 15px; }
.as-downloads__notice {
        margin: 0;
        padding: 10px 16px;
        background: #fff8e1;
        border-bottom: 1px solid var(--as-border);
        color: #7a5d00;
        font-size: 12.5px;
        line-height: 1.6;
}
.as-downloads__notice-en { display: block; }
.as-downloads__notice-ja { display: block; margin-top: 4px; color: #8a6d00; }
.as-downloads__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px,1fr)); gap: 12px; padding: 16px; }
.as-dl {
        display: flex;
        flex-direction: column;
        gap: 4px;
        padding: 14px 16px;
        border-radius: var(--as-radius);
        background: #2f6fb3;
        color: #fff;
        font-weight: 600;
        text-align: center;
        transition: transform .08s ease, filter .15s ease;
}
.as-dl:hover { filter: brightness(1.08); text-decoration: none; transform: translateY(-2px); }
.as-dl__host { font-size: 15px; }
.as-dl__cta { font-size: 12px; opacity: .85; text-transform: uppercase; letter-spacing: .5px; }
.as-dl--gofile { background: #2bb673; }
.as-dl--uploadgig { background: #e8732c; }
.as-dl--buzzheavier { background: #6c4ad6; }

.as-source { margin-top: 16px; font-size: 12.5px; color: var(--as-muted); display: flex; flex-direction: column; gap: 4px; word-break: break-all; }

/* post nav */
.as-postnav { display: flex; justify-content: space-between; gap: 12px; padding: 14px 16px; border-top: 1px solid var(--as-border); font-size: 13px; }
.as-postnav__next { text-align: right; }

/* ---------- Comments ---------- */
.as-comments { padding: 18px; border-top: 1px solid var(--as-border); }
.as-comments__title { font-size: 16px; margin: 0 0 12px; }
.as-comments__list { list-style: none; margin: 0 0 16px; padding: 0; }
.as-comments__list .comment-body { background: var(--as-soft); border: 1px solid var(--as-border); border-radius: var(--as-radius); padding: 12px 14px; margin-bottom: 10px; }
.as-comments__list .children { list-style: none; margin: 0 0 0 26px; padding: 0; }
.as-btn, .as-comments input[type="submit"] {
        background: var(--as-accent); color: #fff; border: 0; border-radius: 4px; padding: 9px 18px; cursor: pointer; font-weight: 600;
}
.as-btn:hover { background: #b81d23; }

/* ---------- Page ---------- */
.as-page__content { padding: 18px; line-height: 1.7; }
.as-pagelinks { margin-top: 14px; font-size: 13px; }

/* ---------- Sidebar / widgets ---------- */
.as-sidebar { display: flex; flex-direction: column; gap: 18px; }
.as-widget {
        background: var(--as-card);
        border: 1px solid var(--as-border);
        border-radius: var(--as-radius);
        box-shadow: var(--as-shadow);
        overflow: hidden;
}
/* Widget heading — matches the homepage date-group block exactly */
.as-widget__title {
        margin: 0;
        padding: 12px 16px;
        background: linear-gradient(135deg, var(--as-accent) 0%, #1a5490 100%);
        color: #fff;
        font-size: 15px;
        font-weight: 700;
        letter-spacing: .02em;
        box-shadow: 0 2px 4px rgba(0,0,0,.08);
}

/* --- Generic list (Categories / Recent posts) --- */
.as-widget__list { list-style: none; margin: 0; padding: 6px 0; }
.as-widget__list li {
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        padding: 9px 16px;
        border-bottom: 1px solid var(--as-border);
        font-size: 13.5px;
        line-height: 1.45;
        transition: background .15s ease;
}
.as-widget__list li:last-child { border-bottom: 0; }
.as-widget__list li:hover { background: var(--as-soft); }
.as-widget__list li a {
        color: var(--as-accent2);
        font-weight: 600;
}
.as-widget__list li a:hover { color: var(--as-accent); text-decoration: none; }

/* leading bullet marker */
.as-widget__list li::before {
        content: "";
        flex: 0 0 auto;
        width: 6px;
        height: 6px;
        border-radius: 50%;
        background: var(--as-accent);
        margin-right: 9px;
        opacity: .8;
}
/* post-count pill, pushed to the right edge */
.as-widget__list li .count {
        margin-left: auto;
        background: var(--as-soft);
        border: 1px solid var(--as-border);
        color: var(--as-muted);
        font-size: 11px;
        font-weight: 600;
        padding: 1px 8px;
        border-radius: 11px;
        line-height: 1.6;
}
/* nested children indent (full-width wrap below parent) */
.as-widget__list .children { list-style: none; margin: 6px 0 0; padding: 0 0 0 15px; width: 100%; }
.as-widget__list .children li { border-bottom: 0; padding: 5px 0; }
.as-widget__list .children li::before { width: 4px; height: 4px; opacity: .5; }

/* empty state */
.as-widget__empty { padding: 14px 16px; color: var(--as-muted); font-size: 13px; }

/* --- Tag cloud widget --- */
.as-tagcloud { padding: 14px 16px; line-height: 2.2; }

.as-search--block { padding: 12px 14px; }
.as-search--block .as-search__field { min-width: 0; flex: 1; }

/* ---------- Footer ---------- */
.as-footer { background: var(--as-header); color: #aeb8c4; margin-top: 30px; }
.as-footer__inner { padding: 20px 16px; }
.as-footer__menu { list-style: none; margin: 0 0 10px; padding: 0; display: flex; flex-wrap: wrap; gap: 16px; }
.as-footer__menu a { color: #cdd6e0; font-size: 13px; }
.as-footer__copy { margin: 0; font-size: 12.5px; }

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
        .as-layout { grid-template-columns: 1fr; }
        .as-sidebar { order: 2; }
}

@media (max-width: 768px) {
        .as-header__inner { flex-direction: column; align-items: stretch; }
        .as-search { width: 100%; }
        .as-search__field { flex: 1; min-width: 0; }

        .as-nav__toggle { display: inline-flex; }
        .as-menu {
                display: none;
                flex-direction: column;
                width: 100%;
                background: var(--as-nav);
        }
        .as-menu.is-open { display: flex; }
        .as-menu a { padding: 12px 4px; border-top: 1px solid rgba(255,255,255,.08); }

        .as-thread__post { grid-template-columns: 1fr; }
        .as-thread__author {
                flex-direction: row;
                justify-content: flex-start;
                border-right: 0;
                border-bottom: 1px solid var(--as-border);
                gap: 10px;
        }
        .as-thread__author img { width: 42px; height: 42px; }
}

@media (max-width: 540px) {
        .as-result { flex-direction: column; padding-left: 16px; }
        .as-result::before { position: static; display: inline-block; margin-bottom: 4px; }
        .as-result__thumb, .as-result__thumb img { width: 100%; height: auto; }
        .as-result__thumb img { height: auto; max-height: 220px; object-fit: contain; }
        .as-thread__title { font-size: 18px; }
        .as-downloads__grid { grid-template-columns: 1fr; }
}
