/* Import Inter Font from Google Fonts */
@import url(https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap);

/* Formality Theme - Global Foundation */
body {
    background-image: url(/images/backgroundblack1.png);
    background-repeat: no-repeat;
    background-size: cover;
    background-attachment: fixed;
    font-family: 'Inter', sans-serif;
    color: #c4d1de;
}

a {
    color: #4a90e2;
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover {
    color: #72aee6;
}

#container {
    width: 90%;
    max-width: 1400px;
    margin: 30px auto;
}

/* --- MODERNIZED HEADER & STICKY NAV (FORCED COMPACT) --- */
#header-container {
    position: sticky !important;
    top: 0 !important;
    z-index: 1000 !important;
    background: rgba(21, 28, 37, 0.95) !important;
    backdrop-filter: blur(8px) !important;
    border-bottom: 1px solid rgba(40, 52, 69, 0.8) !important;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5) !important;
    padding: 5px 0 !important;
    margin-bottom: 10px !important;
}

.nav-flex {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 90%;
    max-width: 1400px;
    margin: 0 auto;
    flex-wrap: wrap;
}

#logo {
    flex: 0 0 500px;
    max-width: 500px;
    margin-right: 20px;
}

#logo img {
    display: block;
    max-width: 100%;
    height: auto;
}

.header-welcome {
    flex: 1;
    text-align: right;
    min-width: 300px;
    padding-left: 20px;
}

/* --- HEADER WELCOME GRID STYLING --- */
.header-welcome-wrapper {
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 100%;
}

.header-welcome-top, .header-welcome-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.welcome-text, .view-posts {
    display: flex;
    gap: 15px;
    align-items: center;
}

.panel-column, .pm-column {
    display: flex;
    flex-direction: row;
    gap: 15px;
    justify-content: flex-end;
    align-items: center;
}

.header-welcome-wrapper a {
    color: #4a90e2;
    font-size: 11px;
    text-transform: uppercase;
    font-weight: 700;
    text-decoration: none;
    white-space: nowrap;
}

.header-welcome-wrapper a:hover {
    color: #ffffff;
}

.welcome-text {
    font-size: 11px;
    color: #c4d1de;
}

/* Remove bullet points from header */
.header-welcome-wrapper ul, 
.header-welcome-wrapper li, 
.panel-column a, 
.pm-column a {
    list-style: none !important;
    list-style-type: none !important;
    background-image: none !important;
    padding: 0 !important;
    margin: 0 !important;
}

.nav-links {
    display: none !important;
}

#panel {
    text-align: center;
    margin-bottom: 0;
    border: none !important;
    background: transparent !important;
}

/* --- IPB STYLE FORUM BLOCKS (Flexbox) --- */
.category-block {
    background: #1E1E1E;
    border-radius: 8px;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.4);
    margin-bottom: 35px;
    border: 1px solid #283445;
    overflow: hidden;
}

.category-header {
    background: #151c25 url(/images/fmdivider.png) repeat-x center top;
    background-size: auto 100%;
    padding: 18px 25px;
    border-bottom: 2px solid #2161b5;
}

.category-header a {
    color: #ffffff;
    font-size: 18px;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.node-item {
    display: flex;
    align-items: center;
    padding: 20px 25px;
    border-bottom: 1px solid #283445;
    background: #1E1E1E;
    transition: background 0.2s ease;
}

.node-item:hover {
    background: #232d3b;
}

.node-item:last-child {
    border-bottom: none;
}

.node-icon {
    width: 45px;
    flex-shrink: 0;
}

.node-info {
    flex-grow: 1;
    padding-right: 25px;
    display: flex;
    flex-direction: column;
}

.node-title {
    margin: 0 0 4px 0;
    font-size: 17px;
    font-weight: 600;
}

.node-title a { color: #ffffff; }
.node-title a:hover { color: #4a90e2; }

.node-desc {
    color: #8b9eb3;
    font-size: 13px;
    line-height: 1.4;
}

.node-stats {
    width: 140px;
    flex-shrink: 0;
    text-align: right;
    padding-right: 25px;
    border-right: 1px solid #283445;
    color: #8b9eb3;
    font-size: 12px;
}

.stat-count {
    color: #c4d1de;
    font-weight: 600;
    font-size: 14px;
}

.node-lastpost {
    width: 250px;
    flex-shrink: 0;
    padding-left: 25px;
    font-size: 13px;
    color: #c4d1de;
    line-height: 1.5;
}

/* --- LEGACY MYBB TABLES --- */
.tborder {
    background: #1E1E1E;
    border: 1px solid #283445;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
    margin-bottom: 25px;
    border-collapse: collapse !important;
    table-layout: fixed !important;
    border-spacing: 0;
    overflow: visible;
    width: 100% !important;
}

.thead {
    background: #151c25 url(/images/fmdivider.png) repeat-x center top !important;
    background-size: auto 100% !important;
    color: #ffffff;
    font-size: 16px;
    font-weight: 600;
    padding: 18px 20px;
    border-bottom: 2px solid #2161b5;
    border-radius: 7px 7px 0 0;
}

.tcat {
    background: #283445;
    color: #8b9eb3;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    padding: 12px 20px;
    border-bottom: 1px solid #151c25;
}

.trow1, .trow2 {
    background: #1E1E1E;
    padding: 15px !important;
    border-bottom: 1px solid #283445;
    color: #c4d1de;
}

/* Thread List Column Sizing */
.tborder td {
    padding: 15px 10px !important;
    vertical-align: middle !important;
    word-wrap: break-word !important;
}

.trow1:first-of-type td, .trow2:first-of-type td,
.trow1 td:nth-child(2), .trow2 td:nth-child(2) {
    width: 55% !important;
}

.trow1 td:nth-child(3), .trow1 td:nth-child(4), .trow1 td:nth-child(5),
.trow2 td:nth-child(3), .trow2 td:nth-child(4), .trow2 td:nth-child(5) {
    width: 10% !important;
    text-align: center !important;
}

/* --- POSTBIT & THREAD ELEMENTS --- */
.post {
    border-bottom: 7px solid #283445;
    margin-bottom: 15px;
    padding-bottom: 15px;
}

.post_author {
    border: 1px solid #3B3B3B !important;
    background: #3B3B3B !important;
    border-radius: 6px !important;
    padding: 12px 15px !important;
    display: inline-block !important;
    width: fit-content !important;
    max-width: 100% !important;
    margin: 5px 15px 15px 0 !important;
}

.post_body, .post_content {
    color: #c4d1de !important;
    margin-top: 20px !important;
    display: block;
}

.signature {
    margin-top: 30px !important;
    border-top: none !important;
    padding-top: 0 !important;
}

.postbit_group_image,
.post_author img[src*="star"] {
    display: none !important;
}

.inline_rating,
.star_rating,
form[action*="ratethread"] {
    display: none !important;
}

/* --- BUTTONS --- */
.button, a.button {
    background-color: #2161b5;
    color: #ffffff !important;
    border-radius: 4px;
    padding: 10px 18px;
    font-weight: 500;
    border: none;
    transition: background 0.2s ease;
    cursor: pointer;
    display: inline-block;
}

.button:hover, a.button:hover {
    background-color: #1a4d90;
}

/* --- NAVIGATION BREADCRUMBS --- */
.navigation {
    background: transparent;
    padding: 0;
    font-size: 13px;
    color: #8b9eb3;
    margin-bottom: 15px;
}

.navigation a {
    color: #ffffff;
    text-decoration: none;
    font-weight: 500;
}

.navigation a:hover {
    color: #4a90e2;
}

/* --- CLAN HEADER ASSETS --- */
.clan-header-wrapper {
    display: flex;
    justify-content: space-around;
    background: linear-gradient(rgba(30, 30, 30, 0.5), rgba(30, 30, 30, 0.5)), 
                url(/images/rankheaderlogo4.png) no-repeat center center;
    background-color: #1E1E1E;
    background-size: cover;
    background-position: center;
    padding: 10px 20px;
    margin-top: -10px;
    margin-bottom: 25px;
    font-family: 'Inter', sans-serif;
    text-align: center;
    border: 1px solid #283445;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

.clan-col { width: 45%; }
.clan-title { color: #3b82a0; font-size: 24px; font-weight: bold; text-transform: uppercase; margin-bottom: 20px; letter-spacing: 2px; }
.clan-item { margin-bottom: 15px; display: flex; flex-direction: column; }
.rank-title { font-size: 18px; font-weight: bold; letter-spacing: 1px; }
.rank-title.founder { color: #C71B00; }
.rank-title.leader { color: #ff3333; }
.rank-title.highcouncil { color: #0F8700; }
.rank-title.officer { color: #F09005; }
.rank-name, .info-desc { color: #cccccc; font-size: 14px; margin-top: 5px; }
.info-title { color: #5599bb; font-size: 18px; font-weight: bold; }

/* --- QUOTES & MISC --- */
blockquote .mycode_quote {
    background: #151c25;
    border: 1px solid #283445;
    border-left: 4px solid #2161b5;
    padding: 15px;
    margin: 15px 0;
    border-radius: 4px;
    color: #c4d1de;
    width: fit-content;
    max-width: 100%;
}

blockquote .mycode_quote cite {
    font-weight: 600;
    color: #ffffff;
    display: block;
    border-bottom: 1px solid #283445;
    margin-bottom: 8px;
    padding-bottom: 5px;
}

.smalltext, .post_meta, .edited_post, .post_date { color: #c4d1de !important; }
.smalltext a, .post_meta a, .edited_post a, .post_date a { color: #c4d1de !important; }
.smalltext a:hover, .post_meta a:hover, .edited_post a:hover, .post_date a:hover { color: #ffffff !important; }

/* --- POSTBIT (IPB Style) --- */
.post-container { display: flex; background: #1E1E1E; border: 1px solid #283445; border-radius: 8px; box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4); margin-bottom: 20px; overflow: hidden; }
.post-author-panel { width: 200px; flex-shrink: 0; background: #151c25; padding: 20px 15px; text-align: center; border-right: 1px solid #283445; }
.post-author-panel .author_avatar img { max-width: 100px; max-height: 100px; border-radius: 50%; border: 3px solid #283445; margin-bottom: 12px; }
.post-author-name { font-size: 16px; font-weight: 700; margin-bottom: 8px; }
.post-author-name a { color: #ffffff; }
.rank-badge { display: inline-block; padding: 4px 12px; background: #2161b5; border-radius: 20px; font-size: 11px; font-weight: 700; text-transform: uppercase; color: #fff; margin-bottom: 10px; }
.post-author-stats { font-size: 12px; color: #8b9eb3; text-align: left; margin-top: 15px; padding-top: 15px; border-top: 1px dashed #283445; }
.post-main { flex-grow: 1; display: flex; flex-direction: column; }
.post-head { padding: 15px 25px; border-bottom: 1px solid #283445; display: flex; justify-content: space-between; color: #8b9eb3; font-size: 13px; }
.post-content { padding: 25px; font-size: 15px; line-height: 1.6; color: #c4d1de; flex-grow: 1; }
.post-controls { padding: 15px 25px; background: rgba(21, 28, 37, 0.4); border-top: 1px solid #283445; display: flex; justify-content: flex-end; gap: 10px; }

/* --- SIDEBAR & FOOTER --- */
.index-wrapper { display: flex; gap: 30px; align-items: flex-start; }
.index-main { flex-grow: 1; min-width: 0; }
.index-sidebar { width: 320px; flex-shrink: 0; display: flex; flex-direction: column; gap: 25px; }

/* Updated Formality Info Box Background */
.side-block:nth-of-type(1) {
    background: linear-gradient(rgba(30, 30, 30, 0.85), rgba(30, 30, 30, 0.85)), 
                url(/images/rankheaderlogo4.png) no-repeat center center;
    background-size: 85% auto;
    border: 1px solid #283445;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
    overflow: hidden;
}

.side-block { background: #1E1E1E; border: 1px solid #283445; border-radius: 8px; box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4); overflow: hidden; }
.side-block-header { background: #151c25 url(/images/fmdivider.png) repeat-x center top; padding: 15px 20px; border-bottom: 2px solid #2161b5; color: #ffffff; font-size: 15px; font-weight: 700; text-transform: uppercase; }
.side-block:nth-of-type(1) .side-block-header { background: rgba(21, 28, 37, 0.6); }

.side-block-content { padding: 20px; color: #c4d1de; font-size: 14px; }
#fat-footer { background: #11171f; border-top: 4px solid #2161b5; padding: 40px 0; margin-top: 50px; }
.footer-flex { display: flex; justify-content: space-between; width: 90%; max-width: 1400px; margin: 0 auto; gap: 40px; }
.footer-col { flex: 1; }
.footer-col h4 { color: #ffffff; font-size: 16px; font-weight: 700; text-transform: uppercase; margin-bottom: 20px; border-bottom: 1px solid #283445; padding-bottom: 10px; }
.footer-links { list-style: none; padding: 0; margin: 0; }
.footer-links li { margin-bottom: 10px; }
.footer-links a { color: #c4d1de; font-size: 14px; }
#bottom-bar { background: #0a0d12; padding: 15px 0; text-align: center; color: #5d7085; font-size: 12px; }

/* --- THREAD LIST --- */
.thread-item { display: flex; align-items: center; padding: 15px 25px; border-bottom: 1px solid #283445; background: #1E1E1E; }
.thread-item:hover { background: #232d3b; }
.thread-icon { width: 45px; text-align: center; }
.thread-info { flex-grow: 1; padding-right: 15px; }
.thread-title { font-size: 16px; font-weight: 600; margin-bottom: 4px; }
.thread-title a { color: #ffffff; }
.thread-stats { width: 140px; text-align: center; color: #8b9eb3; }
.thread-lastpost { width: 250px; padding-left: 20px; font-size: 12px; color: #c4d1de; }

/* --- FORMS & QUICK REPLY --- */
input.textbox, textarea, select { background: #151c25; color: #c4d1de; border: 1px solid #283445; border-radius: 4px; padding: 10px 12px; width: 100%; box-sizing: border-box; }
.quick-reply-block { background: #1E1E1E; border: 1px solid #283445; border-radius: 8px; margin-top: 25px; overflow: hidden; }
.quick-reply-head { background: #151c25; padding: 15px 25px; border-bottom: 2px solid #2161b5; color: #ffffff; font-weight: 700; }
.quick-reply-body { padding: 25px; }

/* --- BOARD STATS & DEEP CUTS --- */
.board-stats-block { background: #1E1E1E; border-radius: 8px; margin-top: 30px; border: 1px solid #283445; }
.stats-row { display: flex; align-items: center; padding: 20px 25px; border-bottom: 1px solid #283445; }
::-webkit-scrollbar { width: 12px; }
::-webkit-scrollbar-track { background: #11171f; }
::-webkit-scrollbar-thumb { background: #283445; border-radius: 6px; border: 3px solid #11171f; }
.pagination { display: inline-flex; gap: 6px; }
.pagination a, .pagination .pagination_current { padding: 6px 12px; border-radius: 4px; background: #1E1E1E; border: 1px solid #283445; }
.pagination .pagination_current { background: #2161b5; }

/* Neon Chevron Indicators */
.forum-status {
    width: 0; 
    height: 0; 
    border-top: 6px solid transparent;
    border-bottom: 6px solid transparent;
    border-left: 8px solid #283445;
}
.forum_on, .forum_onlock {
    border-left: 8px solid #4a90e2;
    filter: drop-shadow(0 0 5px #4a90e2);
}

.pm-alert-banner { background: rgba(33, 97, 181, 0.1); border: 1px solid #2161b5; border-left: 4px solid #4a90e2; padding: 15px 25px; display: flex; justify-content: space-between; align-items: center; }
.usercp-nav-list div a { display: block; padding: 12px 20px; color: #c4d1de; border-bottom: 1px solid #283445; }
.usercp-nav-list div a:hover { background: #232d3b; color: #ffffff; }

/* Subforum Fixes */
.subforum-container { margin-top: 4px; }
.subforum-inline { font-size: 12px; color: #8b9eb3; }
.subforum-inline a { color: #8b9eb3; margin-right: 8px; }
.subforum-inline a:hover { color: #ffffff; }

@media (max-width: 1024px) {
    .index-wrapper { flex-direction: column; }
    .index-sidebar { width: 100%; display: grid; grid-template-columns: 1fr 1fr; }
}

/* --- Targeted Clan Ranks Styling (Sidebar Only) --- */
.side-block-content .rank-container {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #283445;
    text-align: center;
}

.side-block-content .rank-title {
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-top: 15px;
}

.side-block-content .rank-name {
    font-size: 12px;
    color: #c4d1de;
    margin-bottom: 2px;
}

/* Rank Colors with Glow Effect */
.side-block-content .rank-title.founder { 
    color: #C71B00; 
    text-shadow: 0 0 8px #C71B00; 
}
.side-block-content .rank-title.highcouncil { 
    color: #0F8700; 
    text-shadow: 0 0 8px #0F8700; 
}
.side-block-content .rank-title.officer { 
    color: #F09005; 
    text-shadow: 0 0 8px #F09005; 
}
.side-block-content .rank-title.elite { 
    color: #9b59b6; 
    text-shadow: 0 0 8px #9b59b6; 
}