:root {
    --shp-bg-1: #081321;
    --shp-bg-2: #0b1f34;
    --shp-panel: rgba(13, 21, 38, 0.9);
    --shp-panel-soft: rgba(18, 29, 50, 0.82);
    --shp-panel-strong: rgba(15, 24, 43, 0.96);
    --shp-border: rgba(148, 163, 184, 0.14);
    --shp-border-strong: rgba(0, 245, 255, 0.16);
    --shp-text: #e5edf7;
    --shp-text-soft: #c7d2e3;
    --shp-muted: #90a0ba;
    --shp-cyan: #00f5ff;
    --shp-blue: #3b82f6;
    --shp-purple: #8b5cf6;
    --shp-pink: #d946ef;
    --shp-shadow: 0 24px 90px rgba(2, 6, 23, 0.42);
}

html {
    background:
        radial-gradient(circle at 18% 18%, rgba(56, 189, 248, 0.18), transparent 42%),
        radial-gradient(circle at 82% 30%, rgba(20, 184, 166, 0.20), transparent 38%),
        radial-gradient(circle at 50% 80%, rgba(139, 92, 246, 0.15), transparent 45%),
        linear-gradient(135deg, rgba(7, 19, 33, 0.99), rgba(10, 28, 50, 0.97), rgba(8, 18, 32, 1));
    scroll-padding-top: 6rem;
    min-height: 100vh;
}

body {
    min-height: 100vh;
    background: transparent;
    color: var(--shp-text);
    font: 83.33%/160% "Inter", "Segoe UI", Arial, sans-serif;
}

a,
a:visited {
    color: #9fe9ff;
}

a:hover {
    color: #d5f8ff;
    text-decoration: none;
}

/* Featured Topics Section */
.featured-topics-container {
    display: grid;
    gap: 24px;
    margin-bottom: 32px;
    width: 100%;
}

.featured-topic-card {
    display: grid;
    grid-template-columns: 80px 1fr 140px 220px;
    gap: 20px;
    align-items: center;
    padding: 24px 28px;
    background: linear-gradient(135deg, rgba(13, 21, 38, 0.92), rgba(18, 29, 50, 0.88));
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 28px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.02);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition: all 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
    will-change: transform;
}

.featured-topic-card:hover {
    transform: translateY(-3px);
    border-color: rgba(0, 245, 255, 0.25);
    box-shadow: 0 12px 40px rgba(0, 245, 255, 0.15), 0 20px 50px rgba(2, 6, 23, 0.4);
}

.featured-topic-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 80px;
    height: 64px;
    border-radius: 20px;
    background: linear-gradient(135deg, rgba(0, 245, 255, 0.12), rgba(0, 132, 255, 0.18));
    border: 1px solid rgba(0, 245, 255, 0.2);
    box-shadow: 0 4px 16px rgba(0, 245, 255, 0.15), inset 0 1px 0 rgba(255, 255, 255, 0.08);
    font-size: 36px;
    line-height: 1;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.featured-topic-card:hover .featured-topic-icon {
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(0, 245, 255, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.featured-topic-content {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 0;
}

.featured-topic-title {
    margin: 0;
    padding: 0;
    font-size: 1.15rem;
    font-weight: 700;
    color: #ffffff;
    word-wrap: break-word;
    overflow-wrap: break-word;
    line-height: 1.4;
}

.featured-topic-title a {
    color: inherit !important;
    text-decoration: none;
    transition: color 0.2s ease, text-shadow 0.2s ease;
    display: inline;
}

.featured-topic-title a:hover {
    color: #00f5ff !important;
    text-shadow: 0 2px 8px rgba(0, 245, 255, 0.4);
}

.featured-title-accent {
    color: #00f5ff !important;
    font-weight: 700;
    display: inline;
}

.featured-title-main {
    color: #ffffff !important;
    font-weight: 700;
    display: inline;
}

.featured-topic-starter {
    margin: 0;
    padding: 0;
    font-size: 0.9rem;
    color: var(--shp-muted);
    line-height: 1.4;
}

.featured-topic-starter a {
    color: #00f5ff !important;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s ease;
}

.featured-topic-starter a:hover {
    color: #66d9ff !important;
}

.featured-topic-stats {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    min-width: 140px;
    flex-shrink: 0;
    padding: 0 8px;
}

.featured-stat {
    margin: 0;
    padding: 0;
    font-size: 0.85rem;
    color: var(--shp-muted);
    line-height: 1.6;
    word-spacing: normal;
}

.featured-stat strong {
    color: #00f5ff;
    font-weight: 700;
    font-size: 1.1rem;
    display: block;
}

.featured-topic-date {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    justify-content: center;
    text-align: right;
    min-width: 220px;
    flex-shrink: 0;
    padding: 0;
}

.featured-date-info {
    margin: 0;
    padding: 0;
    font-size: 0.8rem;
    line-height: 1.5;
}

.featured-date {
    display: block;
    color: var(--shp-muted);
    font-weight: 500;
    margin-bottom: 4px;
}

.featured-author {
    display: block;
    color: var(--shp-muted);
    font-size: 0.75rem;
    margin-top: 4px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 220px;
}

/* Responsive Featured Topics */
@media (max-width: 1024px) {
    .featured-topic-card {
        grid-template-columns: 72px 1fr 1fr;
        gap: 16px;
        padding: 20px 24px;
    }

    .featured-topic-icon {
        width: 72px;
        font-size: 32px;
    }

    .featured-topic-stats {
        min-width: auto;
        text-align: left;
        align-items: flex-start;
        justify-content: flex-start;
    }

    .featured-topic-date {
        grid-column: 3;
        text-align: left;
        align-items: flex-start;
        min-width: auto;
    }

    .featured-date {
        margin-bottom: 2px;
    }
}

@media (max-width: 768px) {
    .featured-topic-card {
        grid-template-columns: 64px 1fr;
        gap: 14px;
        padding: 16px 18px;
    }

    .featured-topic-icon {
        width: 64px;
        height: 56px;
        font-size: 28px;
    }

    .featured-topic-title {
        font-size: 1.05rem;
    }

    .featured-topic-stats,
    .featured-topic-date {
        grid-column: 2;
        text-align: left;
        align-items: flex-start;
        min-width: auto;
    }

    .featured-stat {
        font-size: 0.8rem;
    }

    .featured-stat strong {
        font-size: 1rem;
    }

    .featured-date {
        font-size: 0.75rem;
    }
}

@media (max-width: 480px) {
    .featured-topic-card {
        grid-template-columns: 1fr;
        gap: 12px;
        padding: 14px 12px;
    }

    .featured-topic-icon {
        width: 56px;
        height: 56px;
        font-size: 28px;
    }

    .featured-topic-title {
        font-size: 1.05rem;
    }

    .featured-topic-starter {
        font-size: 0.85rem;
    }

    .featured-topic-stats,
    .featured-topic-date {
        grid-column: 1;
        text-align: left;
        min-width: auto;
    }

    .featured-stat {
        font-size: 0.75rem;
        text-align: left;
    }

    .featured-date {
        font-size: 0.75rem;
        text-align: left;
    }
}

strong,
.strong,
h1,
h2,
h3,
h4,
h5,
h6 {
    color: #f8fbff;
}

input,
button,
select,

textarea {
    font: 83.33%/160% "Inter", "Segoe UI", Arial, sans-serif;
}

#top_section,
#header,
#upper_section {
    display: none;
}

#wrapper {
    max-width: 1320px;
    width: calc(100% - 32px);
    margin: 112px auto 32px;
    background: transparent;
}

#content_section {
    background: rgba(8, 17, 31, 0.68);
    border: 1px solid var(--shp-border);
    border-radius: 30px;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: var(--shp-shadow);
}

#main_content_section {
    padding: 28px;
}

#footer {
    max-width: 1320px;
    width: calc(100% - 32px);
    margin: 0 auto 32px;
    background: rgba(10, 17, 31, 0.74);
    border: 1px solid var(--shp-border);
    border-top: none;
    border-radius: 0 0 20px 20px;
}

#footer a,
#footer li,
#footer p {
    color: var(--shp-muted);
}

.platform-bridge {
    position: fixed;
    inset: 0 0 auto 0;
    z-index: 1050;
    background: rgba(10, 14, 26, 0.84);
    border-bottom: 1px solid var(--shp-border);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
}

.forum-site-container {
    max-width: 1320px;
    width: calc(100% - 32px);
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 16px 0;
}

.forum-site-brand {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    color: #fff !important;
    font-weight: 800;
    font-size: 1.05rem;
    letter-spacing: -0.02em;
}

.forum-site-brand-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 14px;
    background: linear-gradient(135deg, rgba(0, 245, 255, 0.14), rgba(59, 130, 246, 0.22));
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 0 30px rgba(0, 245, 255, 0.12);
}

.forum-site-brand-text {
    color: #fff;
}

.forum-site-menu ul,
.forum-site-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.forum-site-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 14px;
    border-radius: 999px;
    color: var(--shp-muted) !important;
    border: 1px solid transparent;
    transition: all 0.22s ease;
}

.forum-site-link:hover,
.forum-site-link.active {
    color: #fff !important;
    background: rgba(255, 255, 255, 0.06);
    border-color: var(--shp-border-strong);
}

.forum-action-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0.75rem 1.35rem;
    border-radius: 999px;
    font-weight: 600;
    transition: all 0.22s ease;
}

.forum-action-secondary {
    color: var(--shp-text) !important;
    border: 2px solid rgba(255, 255, 255, 0.08);
    background: transparent;
}

.forum-action-secondary:hover {
    border-color: rgba(0, 245, 255, 0.24);
    color: #fff !important;
}

.forum-action-primary {
    background: linear-gradient(135deg, var(--shp-cyan), var(--shp-blue));
    color: #04101f !important;
    box-shadow: 0 0 30px rgba(0, 245, 255, 0.16);
}

.forum-action-primary:hover {
    filter: brightness(1.04);
    box-shadow: 0 0 38px rgba(59, 130, 246, 0.22);
}

.information,
.roundframe,
.windowbg,
.windowbg2,
.generic_list_wrapper,
.pagesection,
.navigate_section,
.main_container,
#topic_icons .information,
#display_head,
[id$="_childboards"],
#info_center {
    background: var(--shp-panel-soft);
    border: 1px solid var(--shp-border);
    border-radius: 24px;
    box-shadow: none;
}

.main_container,
#topic_container,
#messageindex,
#forumposts {
    display: grid;
    gap: 16px;
}

.cat_bar,
.title_bar {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.22), rgba(0, 245, 255, 0.12));
    border: 1px solid var(--shp-border-strong);
    border-radius: 20px 20px 0 0;
    box-shadow: none;
}

.cat_bar h3,
.title_bar h3,
.cat_bar .catbg,
.title_bar .titlebg {
    color: #fff !important;
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: 0.01em;
}

.navigate_section {
    padding: 10px 16px;
}

.navigate_section ul {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.navigate_section li,
.navigate_section a,
.navigate_section span {
    color: var(--shp-muted) !important;
}

.navigate_section li.last a,
.navigate_section a:hover {
    color: #fff !important;
}

#display_head {
    padding: 22px 24px;
    margin-bottom: 18px;
}

.display_title,
#display_head h2 {
    margin: 0 0 8px;
    font-size: clamp(1.8rem, 2.8vw, 2.7rem);
    line-height: 1.12;
    font-weight: 800;
    color: #fff;
}

#display_head p,
#display_head .nextlinks,
.board_description,
.board_stats,
.board_stats p,
.lastpost,
.lastpost p,
.smalltext,
.postinfo .smalltext,
.postinfo a.smalltext,
.inline,
.welcome,
.message_index_title + p,
.postarea .keyinfo .postinfo {
    color: var(--shp-muted) !important;
}

#boardindex_table .main_container {
    padding: 0;
    background: transparent;
    border: none;
}

body.action_home #boardindex_table,
body.action_messageindex #boardindex_table {
    display: grid;
    gap: 24px;
}

body.action_home #boardindex_table .main_container,
body.action_messageindex #boardindex_table .main_container {
    padding: 24px;
    background: rgba(10, 21, 38, 0.95);
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 32px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

body.action_home #boardindex_table .cat_bar,
body.action_home #boardindex_table .cat_bar,
body.action_messageindex #boardindex_table .cat_bar {
    border-radius: 28px;
    padding: 20px 24px;
    margin-bottom: 24px;
    background: linear-gradient(135deg, rgba(20, 31, 54, 0.98), rgba(15, 25, 45, 1));
    border: 2px solid var(--shp-border-light);
    box-shadow: var(--shp-shadow-light), inset 0 1px 0 rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(20px);
}

body.action_home #boardindex_table .cat_bar .catbg,
body.action_home #boardindex_table .cat_bar .catbg a,
body.action_messageindex #boardindex_table .cat_bar .catbg,
body.action_messageindex #boardindex_table .cat_bar .catbg a {
    font-size: clamp(1.6rem, 2.4vw, 2.4rem);
    font-weight: 900;
    color: var(--shp-text-primary) !important;
    letter-spacing: -0.01em;
    text-shadow: 0 4px 8px rgba(0, 0, 0, 0.6);
    text-transform: uppercase;
}

body.action_home #boardindex_table .main_container,
body.action_messageindex #boardindex_table .main_container {
    padding: 32px;
    background: rgba(10, 21, 38, 0.98);
    border: 2px solid var(--shp-border-light);
    border-radius: 36px;
    box-shadow: var(--shp-shadow), var(--shp-glow), inset 0 1px 0 rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(20px);
    margin-bottom: 24px;
    min-height: 150px;
    padding: 28px 26px;
    border-radius: 28px;
}

body.action_home #boardindex_table .info .subject,
body.action_messageindex #boardindex_table .info .subject {
    font-size: clamp(1.6rem, 2.8vw, 2.5rem);
    font-weight: 700;
    color: #ffffff;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    margin-bottom: 8px;
}

body.action_home #boardindex_table .board_description,
body.action_messageindex #boardindex_table .board_description {
    max-width: 760px;
    font-size: 1.05rem;
    color: var(--shp-text-soft);
    line-height: 1.6;
    margin-bottom: 12px;
}

body.action_home #info_center {
    display: none;
}

#boardindex_table .up_contain,
[id$="_childboards"] .up_contain,
#topic_container > div,
#forumposts .windowbg,
#info_center,
#topic_icons {
    padding: 32px 28px;
    border-radius: 32px;
    background: linear-gradient(135deg, rgba(15, 25, 45, 0.95), rgba(10, 21, 38, 0.98));
    border: 2px solid var(--shp-border-light);
    box-shadow: var(--shp-shadow-light), inset 0 1px 0 rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(20px);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

#boardindex_table .up_contain::before,
[id$="_childboards"] .up_contain::before,
#topic_container > div::before,
#forumposts .windowbg::before,
#info_center::before,
#topic_icons::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--shp-cyan), transparent);
    opacity: 0;
    transition: opacity 0.4s ease;
}

#boardindex_table .up_contain:hover::before,
[id$="_childboards"] .up_contain:hover::before,
#topic_container > div:hover::before,
#forumposts .windowbg:hover::before,
#info_center:hover::before,
#topic_icons:hover::before {
    opacity: 0.6;
}

#boardindex_table .up_contain:hover,
[id$="_childboards"] .up_contain:hover,
#topic_container > div:hover,
#forumposts .windowbg:hover,
#info_center:hover,
#topic_icons:hover {
    transform: translateY(-6px) scale(1.02);
    border-color: rgba(0, 245, 255, 0.4);
    box-shadow: var(--shp-shadow), var(--shp-glow), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

/* Apply enhanced styling to both forum index and board pages */
body.action_home #boardindex_table .up_contain,
body.action_messageindex #boardindex_table .up_contain {
    background: linear-gradient(135deg, rgba(13, 21, 38, 0.92), rgba(18, 29, 50, 0.88));
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 28px;
    overflow: hidden;
    transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.02);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

body.action_home #boardindex_table .up_contain:hover,
body.action_messageindex #boardindex_table .up_contain:hover {
    transform: translateY(-3px);
    border-color: rgba(0, 245, 255, 0.25);
    box-shadow: 0 12px 40px rgba(0, 245, 255, 0.15), 0 20px 50px rgba(2, 6, 23, 0.4);
}

#boardindex_table .up_contain,
[id$="_childboards"] .up_contain,
#topic_container > div {
    display: grid;
    grid-template-columns: 84px minmax(0, 1.5fr) 140px 230px;
    gap: 18px;
    align-items: center;
    padding: 20px 22px;
}

.board_icon {
    display: flex;
    align-items: center;
    justify-content: center;
}

.board_icon a.board_on,
.board_icon a.board_off,
.board_icon a.board_redirect,
.board_icon img,
.messageicon img {
    width: 64px;
    height: 64px;
    border-radius: 20px;
    background: linear-gradient(135deg, rgba(0, 245, 255, 0.12), rgba(0, 132, 255, 0.18));
    border: 1px solid rgba(0, 245, 255, 0.2);
    box-shadow: 0 4px 16px rgba(0, 245, 255, 0.15), inset 0 1px 0 rgba(255, 255, 255, 0.08);
    padding: 14px;
    object-fit: contain;
    transition: all 0.3s ease;
}

.board_icon a.board_on:hover,
.board_icon a.board_off:hover,
.board_icon a.board_redirect:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(0, 245, 255, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

/* Apply enhanced board icon styling to both pages */
body.action_home #boardindex_table .board_icon a.board_on,
body.action_home #boardindex_table .board_icon a.board_off,
body.action_home #boardindex_table .board_icon a.board_redirect,
body.action_home #boardindex_table .board_icon img,
body.action_home #boardindex_table .messageicon img,
body.action_messageindex #boardindex_table .board_icon a.board_on,
body.action_messageindex #boardindex_table .board_icon a.board_off,
body.action_messageindex #boardindex_table .board_icon a.board_redirect,
body.action_messageindex #boardindex_table .board_icon img,
body.action_messageindex #boardindex_table .messageicon img {
    width: 64px;
    height: 64px;
    border-radius: 20px;
    background: linear-gradient(135deg, rgba(0, 245, 255, 0.12), rgba(0, 132, 255, 0.18));
    border: 1px solid rgba(0, 245, 255, 0.2);
    box-shadow: 0 4px 16px rgba(0, 245, 255, 0.15), inset 0 1px 0 rgba(255, 255, 255, 0.08);
    padding: 14px;
    object-fit: contain;
    transition: all 0.3s ease;
}

body.action_home #boardindex_table .board_icon a.board_on:hover,
body.action_home #boardindex_table .board_icon a.board_off:hover,
body.action_home #boardindex_table .board_icon a.board_redirect:hover,
body.action_messageindex #boardindex_table .board_icon a.board_on:hover,
body.action_messageindex #boardindex_table .board_icon a.board_off:hover,
body.action_messageindex #boardindex_table .board_icon a.board_redirect:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(0, 245, 255, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.board_icon a.board_on,
.board_icon a.board_off,
.board_icon a.board_redirect {
    background-position: center;
    background-repeat: no-repeat;
    background-size: 28px 28px;
}

.info .subject,
.message_index_title a,
.display_title a,
.poster h4,
.subject_title a,
.preview a,
.preview span a {
    color: #fff !important;
    font-size: 1.18rem;
    font-weight: 700;
    letter-spacing: -0.01em;
}

.info .subject.mobile_subject,
.message_index_title {
    display: block;
    margin-bottom: 8px;
}

.board_description,
.message_index_title + p,
.lastpost p,
.board_stats p {
    font-size: 0.95rem;
    line-height: 1.65;
}

.board_stats.centertext {
    text-align: left;
}

.board_stats p {
    margin: 0;
    font-weight: 500;
}

.lastpost a,
.lastpost .postby a {
    color: var(--shp-text-soft) !important;
}

.lastpost {
    min-width: 240px;
    overflow: hidden;
    text-overflow: ellipsis;
    text-align: right;
}

.lastpost p {
    margin: 0;
    line-height: 1.5;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: var(--shp-text-soft);
    font-size: 0.9rem;
}

.lastpost strong {
    color: #ffffff;
    font-weight: 600;
}

.lastpost a {
    color: var(--shp-cyan);
    text-decoration: none;
    transition: color 0.2s ease;
}

.lastpost a:hover {
    color: #ffffff;
    text-decoration: underline;
}

.lastpost strong,
.board_stats strong,
#display_head strong,
.postinfo strong {
    color: #fff;
}

.topic_pages .nav_page,
.pages .nav_page,
.current_page {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 34px;
    height: 34px;
    padding: 0 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: var(--shp-muted) !important;
}

.current_page {
    background: rgba(59, 130, 246, 0.2);
    border-color: rgba(59, 130, 246, 0.24);
    color: #fff !important;
}

.pagesection {
    padding: 14px 18px;
    margin: 14px 0;
}

.pagelinks,
.buttonlist {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.button,
button,
input[type="submit"],
input[type="button"],
a.button {
    border: none !important;
    border-radius: 999px !important;
    background: linear-gradient(135deg, var(--shp-cyan), var(--shp-blue)) !important;
    color: #04101f !important;
    font-weight: 700 !important;
    box-shadow: 0 0 28px rgba(0, 245, 255, 0.14);
}

.button:hover,
button:hover,
input[type="submit"]:hover,
input[type="button"]:hover,
a.button:hover {
    filter: brightness(1.04);
    box-shadow: 0 0 36px rgba(59, 130, 246, 0.2);
}

input,
select,
textarea {
    color: var(--shp-text);
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    box-shadow: none;
}

input:focus,
select:focus,
textarea:focus {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(0, 245, 255, 0.2);
}

#forumposts .windowbg {
    padding: 0;
}

.post_wrapper {
    display: grid;
    grid-template-columns: 240px minmax(0, 1fr);
    gap: 0;
}

.poster {
    padding: 26px 22px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.02), rgba(255, 255, 255, 0.01));
    border-right: 1px solid var(--shp-border);
}

.poster h4 {
    margin: 0 0 8px;
}

.poster .user_info,
.poster .user_info li,
.membergroup,
.poster_ip {
    color: var(--shp-muted) !important;
    font-size: 0.92rem;
}

.postarea {
    padding: 24px 26px 22px;
}

.keyinfo {
    padding-bottom: 16px;
    margin-bottom: 18px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.postinfo {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.postinfo .messageicon {
    position: static !important;
    z-index: 1 !important;
}

.post {
    font-size: 1rem;
    line-height: 1.9;
}

.post .inner,
.post .inner * {
    color: var(--shp-text-soft);
}

.post .inner a {
    color: #9fe9ff !important;
}

.post_separator {
    height: 1px;
    border: none;
    background: rgba(255, 255, 255, 0.05);
    margin: 16px 0;
}

.under_message,
.moderatorbar,
#moderationbuttons,
#display_jump_to,
.mobile_buttons,
#mobile_action {
    color: var(--shp-muted);
}

.new_posts,
a.new_posts {
    border-radius: 999px;
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.95), rgba(217, 70, 239, 0.95));
    color: #fff !important;
    font: 11px/20px "Inter", Arial, sans-serif;
    padding: 0 10px;
    opacity: 1;
}

.main_icons {
    opacity: 0.88;
    filter: saturate(0) brightness(2.1);
}

.noticebox,
.infobox {
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.16);
    color: var(--shp-text);
    border-radius: 20px;
}

@media (max-width: 1100px) {
    .forum-site-container {
        flex-wrap: wrap;
    }

    .forum-site-menu {
        order: 3;
        width: 100%;
    }

    .forum-site-menu ul,
    .forum-site-actions {
        justify-content: center;
    }

    #boardindex_table .up_contain,
    [id$="_childboards"] .up_contain,
    #topic_container > div {
        grid-template-columns: 72px minmax(0, 1fr);
    }

    .board_stats,
    .lastpost {
        grid-column: 2;
    }
}

@media (max-width: 820px) {
    #wrapper,
    #footer,
    .forum-site-container {
        width: calc(100% - 20px);
    }

    #main_content_section {
        padding: 18px;
    }

    .post_wrapper {
        grid-template-columns: 1fr;
    }

    .poster {
        border-right: none;
        border-bottom: 1px solid var(--shp-border);
    }
}

@media (max-width: 560px) {
    .forum-site-menu ul,
    .forum-site-actions {
        gap: 8px;
    }

    .forum-site-link,
    .forum-action-btn {
        width: 100%;
    }

    #boardindex_table .up_contain,
    [id$="_childboards"] .up_contain,
    #topic_container > div {
        grid-template-columns: 1fr;
        padding: 16px;
    }

    .board_icon,
    .board_stats,
    .lastpost {
        justify-content: flex-start;
        text-align: left;
    }

    .display_title,
    #display_head h2 {
        font-size: 1.6rem;
    }
}

/* Enhanced Forum Index Styles - Accessibility and Modernization */
:root {
    --shp-text-primary: #ffffff;
    --shp-text-secondary: #e5edf7;
    --shp-text-muted: #94a3b8;
    --shp-cyan: #00f5ff;
    --shp-cyan-light: #66d9ff;
    --shp-purple: #8b5cf6;
    --shp-purple-light: #a78bfa;
    --shp-bg-primary: #0a1121;
    --shp-bg-secondary: #1a2332;
    --shp-bg-tertiary: #243447;
    --shp-border: rgba(148, 163, 184, 0.2);
    --shp-border-light: rgba(148, 163, 184, 0.3);
    --shp-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    --shp-shadow-light: 0 4px 16px rgba(0, 0, 0, 0.3);
    --shp-glow: 0 0 20px rgba(0, 245, 255, 0.3);
    --shp-glow-strong: 0 0 40px rgba(0, 245, 255, 0.5);
}

.board-icon-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.board-icon-inner {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, rgba(0, 245, 255, 0.2), rgba(0, 132, 255, 0.3));
    border: 3px solid rgba(0, 245, 255, 0.4);
    border-radius: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shp-shadow), var(--shp-glow), inset 0 2px 8px rgba(255, 255, 255, 0.15);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.board-icon-inner::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, transparent, rgba(255, 255, 255, 0.1));
    border-radius: 24px;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.board-icon-inner:hover::before {
    opacity: 1;
}

.board-icon-inner:hover {
    transform: scale(1.08) translateY(-2px);
    box-shadow: var(--shp-shadow), var(--shp-glow-strong), inset 0 2px 12px rgba(255, 255, 255, 0.2);
    border-color: rgba(0, 245, 255, 0.6);
}

.board-icon-emoji {
    font-size: 40px;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.4));
    transition: transform 0.4s ease;
    z-index: 1;
    position: relative;
}

.board-icon-inner:hover .board-icon-emoji {
    transform: scale(1.1) rotate(5deg);
}

.board-info-wrapper {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.board-title {
    font-size: clamp(1.6rem, 2.4vw, 2.2rem);
    font-weight: 800;
    color: var(--shp-text-primary);
    text-shadow: 0 4px 8px rgba(0, 0, 0, 0.6);
    margin: 0 0 12px 0;
    line-height: 1.3;
    letter-spacing: -0.02em;
    position: relative;
}

.board-title a {
    color: var(--shp-text-primary) !important;
    text-decoration: none;
    transition: color 0.3s ease, text-shadow 0.3s ease;
    position: relative;
    z-index: 1;
}

.board-title a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--shp-cyan), var(--shp-purple));
    border-radius: 2px;
    transform: scaleX(0);
    transition: transform 0.3s ease;
    z-index: -1;
}

.board-title a:hover::after {
    transform: scaleX(1);
}

.board-title a:hover {
    color: var(--shp-cyan-light) !important;
    text-shadow: 0 4px 12px rgba(0, 245, 255, 0.4);
}

.board-description {
    font-size: 1.1rem;
    color: var(--shp-text-secondary);
    line-height: 1.6;
    margin: 0 0 16px 0;
    max-width: 700px;
    font-weight: 500;
    letter-spacing: 0.01em;
}

.board-stats-wrapper {
    display: flex;
    flex-direction: column;
    gap: 8px;
    text-align: right;
}

.stat-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
    text-align: right;
}

.stat-number {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--shp-cyan);
    text-shadow: 0 0 12px rgba(0, 245, 255, 0.5);
    letter-spacing: 0.02em;
    transition: color 0.3s ease, text-shadow 0.3s ease;
}

.stat-label {
    font-size: 0.9rem;
    color: var(--shp-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 600;
    margin-top: 4px;
}

.lastpost-wrapper {
    display: flex;
    flex-direction: column;
    gap: 12px;
    text-align: right;
    min-width: 280px;
    padding: 16px;
    background: rgba(36, 52, 71, 0.3);
    border: 1px solid var(--shp-border-light);
    border-radius: 16px;
    backdrop-filter: blur(10px);
}

.lastpost-info {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.lastpost-stats {
    font-size: 0.9rem;
    color: var(--shp-text-soft);
    font-weight: 500;
}

.lastpost-details {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.lastpost-time {
    font-size: 0.85rem;
    color: var(--shp-text-muted);
    font-weight: 500;
}

.lastpost-topic {
    font-size: 1.0rem;
    color: var(--shp-cyan-light);
    font-weight: 600;
    text-decoration: none;
    transition: color 0.3s ease, text-shadow 0.3s ease;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.4);
}

.lastpost-topic:hover {
    color: var(--shp-cyan) !important;
    text-shadow: 0 2px 8px rgba(0, 245, 255, 0.4);
    text-decoration: underline;
    text-decoration-color: var(--shp-cyan-light);
}

.lastpost-author {
    font-size: 0.85rem;
    color: var(--shp-text-soft);
}

.lastpost-author a {
    color: var(--shp-cyan-light) !important;
    text-decoration: none;
    font-weight: 600;
}

.lastpost-author a:hover {
    color: var(--shp-cyan) !important;
    text-shadow: 0 2px 4px rgba(0, 245, 255, 0.3);
}

.redirect-notice,
.recycle-notice {
    background: rgba(255, 193, 7, 0.1);
    border: 1px solid rgba(255, 193, 7, 0.2);
    border-radius: 12px;
    padding: 8px 12px;
    font-size: 0.85rem;
    color: #fbbf24;
    text-align: center;
    margin-top: 8px;
}

/* Enhanced Category Bar */
.category-icon {
    display: inline-block;
    font-size: 1.2rem;
    margin-right: 8px;
    vertical-align: middle;
}

/* Enhanced Hover Effects */
.up_contain:hover {
    transform: translateY(-4px) scale(1.02);
    border-color: rgba(0, 245, 255, 0.3);
    box-shadow: 0 16px 50px rgba(0, 245, 255, 0.2), 0 24px 60px rgba(2, 6, 23, 0.4);
}

/* Enhanced Board Icon Hover */
.board-icon-wrapper:hover .board-icon-inner {
    transform: scale(1.08);
    box-shadow: 0 12px 40px rgba(0, 245, 255, 0.3), inset 0 2px 6px rgba(255, 255, 255, 0.15);
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .board-stats-wrapper {
        text-align: left;
    }

    .lastpost-wrapper {
        text-align: left;
        min-width: auto;
        padding: 12px;
    }

    .stat-item {
        text-align: left;
    }

    .board-stats-wrapper {
        gap: 6px;
    }

    .board-info-wrapper {
        gap: 6px;
    }

    .board-icon-inner {
        width: 70px;
        height: 70px;
        border-radius: 20px;
    }

    .board-icon-emoji {
        font-size: 35px;
    }

    .board-title {
        font-size: 1.4rem;
    }

    .stat-number {
        font-size: 1.1rem;
    }

    .stat-label {
        font-size: 0.8rem;
    }

    .up_contain {
        padding: 24px 20px;
        border-radius: 24px;
    }

    .board-icon-wrapper {
        margin-bottom: 16px;
    }
}

@media (max-width: 480px) {
    .up_contain {
        grid-template-columns: 1fr;
        gap: 16px;
        padding: 20px 16px;
        border-radius: 20px;
    }

    .board_icon {
        margin-bottom: 16px;
    }

    .board-stats-wrapper,
    .lastpost-wrapper {
        text-align: left;
    }

    .board-info-wrapper {
        gap: 6px;
    }

    .board-icon-inner {
        width: 60px;
        height: 60px;
        border-radius: 16px;
    }

    .board-icon-emoji {
        font-size: 30px;
    }

    .board-title {
        font-size: 1.3rem;
    }

    .board-description {
        font-size: 0.95rem;
    }

    .stat-number {
        font-size: 1.0rem;
    }

    .stat-label {
        font-size: 0.8rem;
    }

    .lastpost-wrapper {
        padding: 12px;
        min-width: auto;
    }

    .cat_bar {
        padding: 16px 20px;
        border-radius: 20px;
    }

    .main_container {
        padding: 24px 20px;
        border-radius: 28px;
    }
}

/* Accessibility - High Contrast Mode */
@media (prefers-contrast: high) {
    :root {
        --shp-text-primary: #ffffff;
        --shp-text-secondary: #f0f0f0;
        --shp-text-muted: #cccccc;
        --shp-cyan: #00ffff;
        --shp-cyan-light: #66ffff;
        --shp-border: rgba(255, 255, 255, 0.4);
        --shp-border-light: rgba(255, 255, 255, 0.6);
    }

    .board-icon-inner {
        border: 3px solid var(--shp-cyan);
        background: linear-gradient(135deg, rgba(0, 255, 255, 0.3), rgba(0, 132, 255, 0.4));
    }

    .up_contain {
        border: 2px solid var(--shp-border-light);
    }

    .board-title {
        text-shadow: 0 4px 8px rgba(0, 0, 0, 0.8);
    }

    .stat-number {
        text-shadow: 0 0 16px rgba(0, 255, 255, 0.6);
    }
}

/* Accessibility - Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    .board-icon-inner,
    .board-icon-inner:hover,
    .up_contain,
    .up_contain:hover,
    .board-title a,
    .board-title a:hover,
    .lastpost-topic,
    .lastpost-topic:hover {
        transition: none;
        transform: none;
    }

    .board-icon-emoji {
        transition: none;
    }

    .board-icon-inner:hover .board-icon-emoji {
        transform: none;
    }
}

/* Accessibility - Focus Visible */
@media (prefers-focus-visible) {
    .board-icon-inner:focus,
    .board-title a:focus,
    .lastpost-topic:focus {
        outline: 3px solid var(--shp-cyan);
        outline-offset: 2px;
        border-radius: 8px;
    }
}

/* PERMANENT VISUAL FIX - MASTER STYLESHEET */

/* Force consistent rendering across browsers */
* {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

/* Ensure text is never cut off */
html, body {
    -webkit-text-size-adjust: 100%;
    -ms-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

/* Board container - Fixed layout consistency */
#boardindex_table {
    width: 100%;
    display: block;
}

#boardindex_table .up_contain {
    display: grid;
    grid-template-columns: 84px minmax(0, 1.5fr) 140px 230px;
    gap: 18px;
    align-items: center;
    padding: 20px 22px;
    width: 100%;
    box-sizing: border-box;
}

/* Board icon - Fixed size and alignment */
#boardindex_table .board_icon {
    min-width: 84px;
    width: 84px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
}

#boardindex_table .board-icon-wrapper,
#boardindex_table .board-icon-inner,
#boardindex_table .board-icon-emoji {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

#boardindex_table .board-icon-emoji {
    font-size: 40px;
    line-height: 1;
    margin: 0;
    padding: 0;
}

/* Board info section - Fixed layout */
#boardindex_table .info {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 0 8px;
}

#boardindex_table .info .subject,
#boardindex_table .mobile_subject {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 700;
    color: #fff;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

#boardindex_table .board_description {
    margin: 0;
    font-size: 0.9rem;
    color: var(--shp-muted);
    word-wrap: break-word;
    overflow-wrap: break-word;
    display: block;
}

/* Board stats - Fixed alignment */
#boardindex_table .board_stats {
    min-width: 140px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

#boardindex_table .board_stats p {
    margin: 4px 0;
    font-size: 0.85rem;
    line-height: 1.4;
}

/* Last post section - Fixed layout */
#boardindex_table .lastpost {
    min-width: 230px;
    max-width: 230px;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    justify-content: center;
    text-align: right;
    padding: 0;
}

#boardindex_table .lastpost p {
    margin: 4px 0;
    font-size: 0.8rem;
    line-height: 1.4;
    white-space: normal;
    overflow-wrap: break-word;
    word-wrap: break-word;
}

/* Category bar - Fixed styling */
#boardindex_table .main_container {
    width: 100%;
}

#boardindex_table .cat_bar {
    width: 100%;
    margin: 24px 0 0 0;
    padding: 20px 24px;
    box-sizing: border-box;
}

#boardindex_table .cat_bar .catbg {
    margin: 0;
    padding: 0;
    font-size: 1.3rem;
    font-weight: 700;
    letter-spacing: -0.01em;
}

/* Ensure proper spacing and margins */
#boardindex_table .main_container > div {
    display: grid;
    gap: 16px;
}

/* Fix image rendering in board icons */
#boardindex_table .board_icon img,
#boardindex_table .messageicon img {
    display: block;
    width: 100%;
    height: 100%;
    max-width: 100%;
    max-height: 100%;
}

/* Responsive grid adjustments */
@media (max-width: 1024px) {
    #boardindex_table .up_contain {
        grid-template-columns: 72px minmax(0, 1fr) 1fr;
        gap: 16px;
        padding: 18px 20px;
    }

    #boardindex_table .board_icon {
        min-width: 72px;
        width: 72px;
    }

    #boardindex_table .board-icon-emoji {
        font-size: 36px;
    }

    #boardindex_table .lastpost {
        grid-column: 3;
        min-width: auto;
        max-width: 100%;
    }
}

@media (max-width: 768px) {
    #boardindex_table .up_contain {
        grid-template-columns: 64px 1fr;
        gap: 14px;
        padding: 16px 18px;
    }

    #boardindex_table .board_icon {
        min-width: 64px;
        width: 64px;
    }

    #boardindex_table .board-icon-emoji {
        font-size: 32px;
    }

    #boardindex_table .board_stats,
    #boardindex_table .lastpost {
        grid-column: 2;
        text-align: left;
        min-width: auto;
        align-items: flex-start;
    }

    #boardindex_table .lastpost {
        text-align: left;
    }
}

@media (max-width: 480px) {
    #boardindex_table .up_contain {
        grid-template-columns: 1fr;
        gap: 12px;
        padding: 14px 12px;
    }

    #boardindex_table .board_icon {
        min-width: 56px;
        width: 56px;
        height: 56px;
    }

    #boardindex_table .board-icon-emoji {
        font-size: 28px;
    }

    #boardindex_table .board_stats,
    #boardindex_table .lastpost {
        grid-column: 1;
        text-align: left;
        min-width: auto;
    }

    #boardindex_table .board_stats p,
    #boardindex_table .lastpost p {
        font-size: 0.75rem;
    }
}

/* Prevent layout shift on hover */
#boardindex_table .up_contain {
    will-change: transform;
}

/* Optimize transitions for performance */
#boardindex_table .up_contain {
    transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

/* Fallback for older browsers - plain styling */
.no-backdrop #boardindex_table .up_contain {
    background: rgba(13, 21, 38, 0.92);
    border: 1px solid rgba(148, 163, 184, 0.18);
    backdrop-filter: none;
}

/* Print styles - ensure readability */
@media print {
    #boardindex_table .up_contain {
        page-break-inside: avoid;
        box-shadow: none;
        border: 1px solid #ccc;
        background: white;
        color: black;
    }

    #boardindex_table .up_contain:hover {
        transform: none;
        box-shadow: none;
    }
}

/* Global SMF surface modernization - keeps every forum screen on the platform theme. */
:root {
    --shp-surface: rgba(9, 18, 34, 0.94);
    --shp-surface-2: rgba(14, 25, 45, 0.92);
    --shp-surface-3: rgba(20, 36, 60, 0.82);
    --shp-line: rgba(148, 163, 184, 0.18);
    --shp-line-strong: rgba(34, 211, 238, 0.28);
    --shp-field: rgba(6, 15, 29, 0.72);
    --shp-field-focus: rgba(9, 24, 43, 0.92);
    --shp-danger: #fb7185;
    --shp-success: #34d399;
    --shp-warning: #fbbf24;
}

body#smf,
#footerfix,
#wrapper,
#main_content_section,
#main_container,
#content_section {
    background: transparent !important;
    color: var(--shp-text) !important;
}

#wrapper {
    max-width: 1584px;
}

#main_content_section {
    padding: clamp(18px, 2.4vw, 34px) !important;
    background:
        linear-gradient(135deg, rgba(7, 17, 32, 0.96), rgba(8, 28, 42, 0.9)) !important;
    border: 1px solid rgba(34, 211, 238, 0.22) !important;
    border-radius: 28px !important;
    box-shadow: 0 28px 90px rgba(2, 6, 23, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.04) !important;
}

.forum_site_actions,
.forum-site-actions,
.buttonlist,
.buttonrow,
.pagelinks,
.quickbuttons {
    gap: 10px;
}

.information,
.roundframe,
.windowbg,
.windowbg2,
.approvebg,
.approvebg2,
.generic_list_wrapper,
.reportlinks,
.settings,
.flow_hidden,
.forumposts,
.postbg,
.topic_table,
.table_grid,
.plainbox,
.noticebox,
.infobox,
.errorbox,
.description,
.description_board,
.bbc_code,
.bbc_quote,
.blue_container,
#profileview,
#profile_error,
#admincenter,
#manage_boards,
#personal_messages,
#searchform,
#calendar,
#registration,
#postmodify,
#topic_icons,
#statistics,
#mlist,
#recent,
#help_container,
#likes,
#alerts,
#moderationcenter {
    background: linear-gradient(135deg, var(--shp-surface), var(--shp-surface-2)) !important;
    border: 1px solid var(--shp-line) !important;
    border-radius: 22px !important;
    color: var(--shp-text) !important;
    box-shadow: 0 18px 46px rgba(2, 6, 23, 0.24), inset 0 1px 0 rgba(255, 255, 255, 0.035) !important;
}

.information,
.roundframe,
.windowbg,
.windowbg2,
.generic_list_wrapper,
.plainbox,
.noticebox,
.infobox,
.errorbox {
    padding: 18px 20px;
}

.cat_bar,
.title_bar,
.sub_bar,
.profile_hd,
.table_head,
.listlevel1,
.listlevel2 {
    min-height: 48px;
    padding: 0 !important;
    overflow: hidden;
    background:
        linear-gradient(135deg, rgba(14, 116, 144, 0.52), rgba(30, 64, 175, 0.32), rgba(124, 58, 237, 0.22)) !important;
    border: 1px solid var(--shp-line-strong) !important;
    border-radius: 18px 18px 0 0 !important;
    color: #fff !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08) !important;
}

.cat_bar h3,
.title_bar h3,
.sub_bar h3,
.catbg,
.titlebg,
.subbg,
.table_head th,
.table_head td {
    margin: 0 !important;
    padding: 12px 16px !important;
    color: #fff !important;
    font-weight: 800 !important;
    letter-spacing: 0 !important;
    text-shadow: none !important;
}

.catbg a,
.titlebg a,
.subbg a,
.table_head a {
    color: #fff !important;
}

.windowbg + .windowbg,
.windowbg2 + .windowbg,
.roundframe + .roundframe,
.generic_list_wrapper + .generic_list_wrapper {
    margin-top: 14px;
}

table,
.table_grid,
.topic_table table,
.generic_list_wrapper table {
    width: 100%;
    border-collapse: separate !important;
    border-spacing: 0 !important;
    color: var(--shp-text) !important;
}

tr.windowbg td,
tr.windowbg2 td,
tr.bg td,
.table_grid tr td,
.table_grid tr th,
.topic_table td,
.topic_table th,
.generic_list_wrapper td,
.generic_list_wrapper th {
    background: rgba(8, 19, 35, 0.62) !important;
    border-color: rgba(148, 163, 184, 0.12) !important;
    color: var(--shp-text-soft) !important;
}

.table_grid tr:hover td,
.topic_table tr:hover td,
.generic_list_wrapper tr:hover td {
    background: rgba(14, 35, 58, 0.82) !important;
}

dl.settings {
    display: grid !important;
    grid-template-columns: minmax(220px, 0.9fr) minmax(260px, 1.3fr) !important;
    gap: 0 !important;
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
}

dl.settings dt,
dl.settings dt.windowbg,
dl.settings dd {
    float: none !important;
    clear: none !important;
    width: auto !important;
    min-height: 48px;
    margin: 0 !important;
    padding: 14px 18px !important;
    background: rgba(8, 19, 35, 0.46) !important;
    border: 0 !important;
    border-bottom: 1px solid rgba(148, 163, 184, 0.12) !important;
    color: var(--shp-text-soft) !important;
}

dl.settings dt {
    border-right: 1px solid rgba(148, 163, 184, 0.12) !important;
    color: #f8fbff !important;
    font-weight: 700 !important;
}

dl.settings dd {
    color: var(--shp-text) !important;
}

dl.settings dt strong,
dl.settings label,
.settings label,
fieldset legend,
.roundframe label,
.windowbg label {
    color: #f8fbff !important;
}

label,
.smalltext,
.middletext,
.description,
.description_board,
.help,
.alert,
.unread_links,
.additional_row,
.custom_fields_above_signature,
.custom_fields_below_signature {
    color: var(--shp-text-soft) !important;
}

strong,
b,
.strong,
.subject,
.topic_name,
.board_name,
.poster h4,
.keyinfo h5,
.keyinfo h3,
.postarea h3,
.main_section h2,
.main_section h3 {
    color: #fff !important;
}

input,
select,
textarea,
.input_text,
.input_password,
.input_file,
.sceditor-container,
.sceditor-toolbar,
.sceditor-group {
    background: var(--shp-field) !important;
    border: 1px solid rgba(148, 163, 184, 0.22) !important;
    border-radius: 12px !important;
    color: #f8fbff !important;
    box-shadow: none !important;
}

input,
select,
textarea,
.input_text,
.input_password {
    min-height: 38px;
    padding: 8px 11px;
}

textarea {
    min-height: 120px;
    line-height: 1.6;
}

input:focus,
select:focus,
textarea:focus,
.input_text:focus,
.input_password:focus {
    background: var(--shp-field-focus) !important;
    border-color: rgba(34, 211, 238, 0.52) !important;
    outline: 3px solid rgba(34, 211, 238, 0.14) !important;
    color: #fff !important;
}

input::placeholder,
textarea::placeholder {
    color: rgba(199, 210, 227, 0.58) !important;
}

select option {
    background: #0b1729 !important;
    color: #f8fbff !important;
}

input[type="checkbox"],
input[type="radio"] {
    width: 18px !important;
    min-width: 18px !important;
    height: 18px !important;
    min-height: 18px !important;
    padding: 0 !important;
    accent-color: var(--shp-cyan);
    vertical-align: middle;
}

input[disabled],
textarea[disabled],
select[disabled],
.button.disabled,
.button[disabled] {
    opacity: 0.58 !important;
    cursor: not-allowed !important;
}

.button,
.quickbuttons > li > a,
.inline_mod_check,
button,
input[type="submit"],
input[type="button"],
a.button {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-height: 38px !important;
    padding: 8px 14px !important;
    border: 1px solid rgba(34, 211, 238, 0.24) !important;
    border-radius: 12px !important;
    background: linear-gradient(135deg, rgba(34, 211, 238, 0.96), rgba(59, 130, 246, 0.96)) !important;
    color: #03111f !important;
    font-weight: 800 !important;
    line-height: 1.2 !important;
    text-decoration: none !important;
    box-shadow: 0 12px 28px rgba(14, 165, 233, 0.14) !important;
}

.button.secondary,
.buttonlist .button:not(:first-child),
.quickbuttons > li > a,
.inline_mod_check {
    background: rgba(15, 30, 52, 0.92) !important;
    color: var(--shp-text) !important;
    border-color: rgba(148, 163, 184, 0.2) !important;
    box-shadow: none !important;
}

.button:hover,
.quickbuttons > li:hover > a,
button:hover,
input[type="submit"]:hover,
input[type="button"]:hover,
a.button:hover {
    transform: translateY(-1px);
    border-color: rgba(34, 211, 238, 0.48) !important;
    filter: brightness(1.05);
}

.dropmenu li a,
.top_menu li a,
#main_menu .button_title,
.profile_menu_top,
.profile_menu_top a {
    color: var(--shp-text-soft) !important;
}

.dropmenu li a:hover,
.dropmenu li:hover a,
.dropmenu li.active a,
.top_menu li a:hover,
#main_menu .active .button_title {
    color: #fff !important;
    background: rgba(34, 211, 238, 0.12) !important;
}

.dropmenu li ul,
.top_menu li ul,
.popup_container,
.popup_window,
.popup_content,
.ajax_infobox {
    background: rgba(8, 18, 34, 0.98) !important;
    border: 1px solid rgba(34, 211, 238, 0.22) !important;
    border-radius: 16px !important;
    box-shadow: 0 22px 60px rgba(2, 6, 23, 0.48) !important;
    color: var(--shp-text) !important;
}

.profileblock,
.profileblock_left,
.profileblock_right,
.profile_pie,
.activity_stats,
.ignoreboards,
.theme_options,
.notification_settings,
.contact_list,
.pm_inline_time,
.pm_subject,
.pm_from_to,
.pm_time,
.pm_icon,
.alerts_unread,
.alerts_read {
    background: rgba(8, 19, 35, 0.58) !important;
    border-color: rgba(148, 163, 184, 0.14) !important;
    color: var(--shp-text-soft) !important;
}

.export_options,
#creator dl,
#tracking,
#permissions,
#groups,
#paid_subscription,
#ban_items,
#warnings,
#profile_attachments,
#profile_actions,
#profile_export {
    background: transparent !important;
    color: var(--shp-text) !important;
}

.bbc_quote {
    border-left: 4px solid rgba(34, 211, 238, 0.55) !important;
}

.bbc_code {
    font-family: Consolas, Monaco, monospace;
    color: #d8f7ff !important;
}

.errorbox {
    border-color: rgba(251, 113, 133, 0.38) !important;
    background: rgba(127, 29, 29, 0.28) !important;
}

.noticebox {
    border-color: rgba(251, 191, 36, 0.34) !important;
    background: rgba(120, 53, 15, 0.22) !important;
}

.infobox {
    border-color: rgba(34, 211, 238, 0.28) !important;
    background: rgba(14, 116, 144, 0.18) !important;
}

.successbox {
    border-color: rgba(52, 211, 153, 0.34) !important;
    background: rgba(6, 78, 59, 0.22) !important;
    color: #dcfff3 !important;
}

.valid_input {
    border-color: rgba(52, 211, 153, 0.45) !important;
}

.invalid_input {
    border-color: rgba(251, 113, 133, 0.55) !important;
}

.sceditor-container iframe,
.sceditor-container textarea {
    background: #081321 !important;
    color: #f8fbff !important;
}

.sceditor-button,
.sceditor-button div {
    border-radius: 8px !important;
}

.main_icons {
    filter: saturate(0.25) brightness(2.3) !important;
}

hr,
.clear,
.separator,
.post_separator {
    border-color: rgba(148, 163, 184, 0.12) !important;
}

@media (max-width: 780px) {
    #main_content_section {
        padding: 14px !important;
        border-radius: 20px !important;
    }

    dl.settings {
        grid-template-columns: 1fr !important;
    }

    dl.settings dt,
    dl.settings dd {
        border-right: 0 !important;
        padding: 12px 14px !important;
    }

    dl.settings dt {
        border-bottom: 0 !important;
        padding-bottom: 4px !important;
    }

    dl.settings dd {
        padding-top: 6px !important;
    }

    .cat_bar h3,
    .title_bar h3,
    .sub_bar h3,
    .catbg,
    .titlebg,
    .subbg {
        padding: 11px 13px !important;
    }

    .button,
    .quickbuttons > li > a,
    button,
    input[type="submit"],
    input[type="button"],
    a.button {
        width: auto;
        max-width: 100%;
        white-space: normal;
    }
}

/* Final forum index layout pass: stable, modern board/category cards. */
body.action_home #boardindex_table,
body.action_messageindex #boardindex_table {
    display: grid !important;
    gap: 22px !important;
}

body.action_home #boardindex_table .main_container,
body.action_messageindex #boardindex_table .main_container {
    display: grid !important;
    gap: 16px !important;
    width: 100% !important;
    min-height: 0 !important;
    margin: 0 0 22px !important;
    padding: clamp(16px, 2vw, 24px) !important;
    border-radius: 26px !important;
    background:
        linear-gradient(145deg, rgba(7, 16, 31, 0.98), rgba(9, 23, 42, 0.94)) !important;
    border: 1px solid rgba(34, 211, 238, 0.18) !important;
    box-shadow: 0 22px 70px rgba(2, 6, 23, 0.34), inset 0 1px 0 rgba(255, 255, 255, 0.04) !important;
}

body.action_home #boardindex_table .cat_bar,
body.action_messageindex #boardindex_table .cat_bar {
    width: 100% !important;
    min-height: 64px !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 1px solid rgba(125, 211, 252, 0.2) !important;
    border-radius: 22px !important;
    background:
        radial-gradient(circle at 4% 50%, rgba(34, 211, 238, 0.20), transparent 26%),
        linear-gradient(135deg, rgba(17, 34, 64, 0.96), rgba(18, 26, 50, 0.98)) !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06) !important;
}

body.action_home #boardindex_table .cat_bar .catbg,
body.action_home #boardindex_table .cat_bar .catbg a,
body.action_messageindex #boardindex_table .cat_bar .catbg,
body.action_messageindex #boardindex_table .cat_bar .catbg a {
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
    min-height: 64px !important;
    margin: 0 !important;
    padding: 0 24px !important;
    color: #f8fbff !important;
    font-size: clamp(1.2rem, 1.9vw, 1.7rem) !important;
    font-weight: 850 !important;
    line-height: 1.1 !important;
    letter-spacing: 0 !important;
    text-transform: none !important;
    text-shadow: none !important;
}

body.action_home #boardindex_table .up_contain,
body.action_messageindex #boardindex_table .up_contain {
    display: grid !important;
    grid-template-columns: 78px minmax(280px, 1fr) minmax(112px, 0.18fr) minmax(240px, 0.34fr) !important;
    gap: clamp(14px, 1.7vw, 24px) !important;
    align-items: center !important;
    width: 100% !important;
    min-height: 118px !important;
    margin: 0 !important;
    padding: clamp(16px, 1.8vw, 22px) !important;
    border-radius: 22px !important;
    background:
        linear-gradient(135deg, rgba(12, 23, 42, 0.96), rgba(13, 24, 44, 0.90)) !important;
    border: 1px solid rgba(148, 163, 184, 0.15) !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.035) !important;
    overflow: hidden !important;
    transform: none !important;
}

body.action_home #boardindex_table .up_contain:hover,
body.action_messageindex #boardindex_table .up_contain:hover {
    transform: translateY(-2px) !important;
    border-color: rgba(34, 211, 238, 0.34) !important;
    box-shadow: 0 18px 46px rgba(8, 145, 178, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.05) !important;
}

body.action_home #boardindex_table .board_icon,
body.action_messageindex #boardindex_table .board_icon {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 78px !important;
    min-width: 78px !important;
    height: 70px !important;
    min-height: 70px !important;
    margin: 0 !important;
    padding: 0 !important;
}

body.action_home #boardindex_table .board_icon a,
body.action_home #boardindex_table .board_icon img,
body.action_messageindex #boardindex_table .board_icon a,
body.action_messageindex #boardindex_table .board_icon img {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 64px !important;
    height: 64px !important;
    min-width: 64px !important;
    min-height: 64px !important;
    margin: 0 !important;
    border-radius: 18px !important;
    background: linear-gradient(135deg, rgba(34, 211, 238, 0.18), rgba(59, 130, 246, 0.14)) !important;
    border: 1px solid rgba(34, 211, 238, 0.25) !important;
    box-shadow: 0 12px 28px rgba(14, 165, 233, 0.10), inset 0 1px 0 rgba(255, 255, 255, 0.08) !important;
    font-size: 30px !important;
    line-height: 1 !important;
    object-fit: contain !important;
}

body.action_home #boardindex_table .info,
body.action_messageindex #boardindex_table .info {
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
    gap: 7px !important;
    width: 100% !important;
    max-width: none !important;
    min-width: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: hidden !important;
}

body.action_home #boardindex_table .info .subject,
body.action_home #boardindex_table .info .subject.mobile_subject,
body.action_messageindex #boardindex_table .info .subject,
body.action_messageindex #boardindex_table .info .subject.mobile_subject {
    display: block !important;
    width: 100% !important;
    margin: 0 !important;
    color: #fff !important;
    font-size: clamp(1.15rem, 1.45vw, 1.55rem) !important;
    font-weight: 850 !important;
    line-height: 1.18 !important;
    letter-spacing: 0 !important;
    white-space: normal !important;
    overflow-wrap: anywhere !important;
    text-shadow: none !important;
}

body.action_home #boardindex_table .board_description,
body.action_messageindex #boardindex_table .board_description {
    width: 100% !important;
    max-width: 680px !important;
    margin: 0 !important;
    color: rgba(199, 210, 227, 0.82) !important;
    font-size: 0.96rem !important;
    line-height: 1.55 !important;
}

body.action_home #boardindex_table .board_stats,
body.action_messageindex #boardindex_table .board_stats {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 5px !important;
    align-items: center !important;
    justify-items: center !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 10px 8px !important;
    border-radius: 16px !important;
    background: rgba(6, 18, 32, 0.45) !important;
    border: 1px solid rgba(148, 163, 184, 0.12) !important;
    text-align: center !important;
}

body.action_home #boardindex_table .board_stats p,
body.action_messageindex #boardindex_table .board_stats p {
    margin: 0 !important;
    color: rgba(199, 210, 227, 0.78) !important;
    font-size: 0.84rem !important;
    line-height: 1.35 !important;
}

body.action_home #boardindex_table .board_stats strong,
body.action_messageindex #boardindex_table .board_stats strong {
    display: block !important;
    color: #67e8f9 !important;
    font-size: 1.08rem !important;
    font-weight: 850 !important;
}

body.action_home #boardindex_table .lastpost,
body.action_messageindex #boardindex_table .lastpost {
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-end !important;
    justify-content: center !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 12px 14px !important;
    border-radius: 16px !important;
    background: rgba(6, 18, 32, 0.45) !important;
    border: 1px solid rgba(148, 163, 184, 0.12) !important;
    text-align: right !important;
    overflow: hidden !important;
}

body.action_home #boardindex_table .lastpost p,
body.action_messageindex #boardindex_table .lastpost p {
    width: 100% !important;
    margin: 0 !important;
    color: rgba(199, 210, 227, 0.80) !important;
    font-size: 0.84rem !important;
    line-height: 1.45 !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
}

body.action_home #boardindex_table .lastpost strong,
body.action_messageindex #boardindex_table .lastpost strong {
    display: block !important;
    margin-bottom: 3px !important;
    color: #f8fbff !important;
    font-size: 0.86rem !important;
}

body.action_home #boardindex_table .lastpost a,
body.action_messageindex #boardindex_table .lastpost a {
    color: #a5f3fc !important;
    font-weight: 700 !important;
}

@media (max-width: 1180px) {
    body.action_home #boardindex_table .up_contain,
    body.action_messageindex #boardindex_table .up_contain {
        grid-template-columns: 72px minmax(0, 1fr) minmax(200px, 0.42fr) !important;
    }

    body.action_home #boardindex_table .board_stats,
    body.action_messageindex #boardindex_table .board_stats {
        grid-column: 2 !important;
        justify-self: start !important;
        width: auto !important;
        min-width: 190px !important;
        justify-items: start !important;
        text-align: left !important;
    }

    body.action_home #boardindex_table .lastpost,
    body.action_messageindex #boardindex_table .lastpost {
        grid-column: 3 !important;
    }
}

@media (max-width: 820px) {
    body.action_home #boardindex_table .up_contain,
    body.action_messageindex #boardindex_table .up_contain {
        grid-template-columns: 64px minmax(0, 1fr) !important;
        gap: 14px !important;
        min-height: 0 !important;
    }

    body.action_home #boardindex_table .board_icon,
    body.action_messageindex #boardindex_table .board_icon {
        width: 64px !important;
        min-width: 64px !important;
    }

    body.action_home #boardindex_table .board_icon a,
    body.action_home #boardindex_table .board_icon img,
    body.action_messageindex #boardindex_table .board_icon a,
    body.action_messageindex #boardindex_table .board_icon img {
        width: 56px !important;
        height: 56px !important;
        min-width: 56px !important;
        min-height: 56px !important;
    }

    body.action_home #boardindex_table .board_stats,
    body.action_home #boardindex_table .lastpost,
    body.action_messageindex #boardindex_table .board_stats,
    body.action_messageindex #boardindex_table .lastpost {
        grid-column: 2 !important;
        width: 100% !important;
        min-width: 0 !important;
        align-items: flex-start !important;
        justify-items: start !important;
        text-align: left !important;
    }
}

@media (max-width: 520px) {
    body.action_home #boardindex_table .up_contain,
    body.action_messageindex #boardindex_table .up_contain {
        grid-template-columns: 1fr !important;
    }

    body.action_home #boardindex_table .board_icon,
    body.action_home #boardindex_table .board_stats,
    body.action_home #boardindex_table .lastpost,
    body.action_messageindex #boardindex_table .board_icon,
    body.action_messageindex #boardindex_table .board_stats,
    body.action_messageindex #boardindex_table .lastpost {
        grid-column: 1 !important;
    }
}
