/* Import Inter Font from Google Fonts */
@import url(https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap);

/* =========================================
   1. BASE STYLES & LAYOUT
   ========================================= */
body { 
    font-family: 'Inter', sans-serif; 
    color: #c4d1de; 
    background-color: #0d1117; 
    margin: 0;
    padding: 0;
}

body::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-image: url(/images/backgroundblack1.png);
    background-repeat: no-repeat;
    background-size: cover;
    background-position: center;
    z-index: -1;
    transform: translateZ(0); 
    will-change: transform;
}

a { color: #4a90e2; text-decoration: none; transition: color 0.2s ease; }
a:hover { color: #72aee6; }
#container { width: 90%; max-width: 1400px; margin: 30px auto; }

/* =========================================
   2. HEADER & NAVIGATION
   ========================================= */
#header { background: transparent; padding: 25px 5% 0 5%; color: #ffffff; border: none; margin-bottom: -10px; }
#logo { color: #ffffff; font-size: 26px; font-weight: 700; text-decoration: none; letter-spacing: -0.5px; display: block; margin-bottom: 15px; text-align: center; }
#logo img { display: block; margin: 0 auto; max-width: 100%; height: auto; }
.navigation { background: transparent; padding: 0; font-size: 13px; color: #8b9eb3; margin-bottom: 10px; }
.navigation a { color: #ffffff; }
#panel { text-align: center; margin-bottom: 0; border: none !important; background: transparent !important; }
#header a, #panel a, .menu a { color: #c4d1de !important; text-decoration: none; font-weight: 500; font-size: 14px; transition: color 0.2s ease-in-out; }
#header a:hover, #panel a:hover, .menu a:hover { color: #ffffff !important; }
.menu ul, #header ul { display: flex !important; flex-direction: row !important; justify-content: center !important; list-style: none !important; margin: 10px 0 !important; padding: 5px 0 !important; gap: 25px !important; }
.portal, .search, .memberlist, .calendar, .help { display: none !important; }
#header form { display: none !important; }

/* =========================================
   3. GLOBAL FORUM TABLES
   ========================================= */
.tborder { background: #1E1E1E; border: 1px solid #283445; border-radius: 6px; box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4); margin-bottom: 25px; border-collapse: separate; border-spacing: 0; overflow: hidden; width: 100%; }
.thead { background: transparent !important; color: #ffffff; font-size: 16px; font-weight: 600; padding: 18px 20px; border-bottom: 2px solid #2161b5; border-radius: 6px 6px 0 0; }
.forum-header-container { background: #151c25 url(/images/fmdivider.png) repeat-x center top; background-size: cover; border-radius: 6px 6px 0 0; overflow: hidden; }
.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: 18px 20px; border-bottom: 1px solid #283445; transition: background 0.2s ease; }
.trow1:hover, .trow2:hover { background: #232323; }

/* =========================================
   4. IPB-STYLE INDEX PAGE
   ========================================= */
.category_block { background: #1E1E1E; border: 1px solid #283445; border-radius: 6px; box-shadow: 0 2px 5px rgba(0,0,0,0.3); margin-bottom: 25px; overflow: hidden; }
.category_header { background: #151c25 url(/images/fmdivider.png) repeat-x center top; background-size: cover; padding: 15px 20px; border-bottom: 2px solid #2161b5; }
.category_header a { color: #ffffff; font-size: 16px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; }
.forum_row { display: flex; align-items: center; padding: 20px; border-bottom: 1px solid #283445; transition: background 0.2s ease; }
.forum_row:hover { background: #232323; }
.forum_row:last-child { border-bottom: none; }
.forum_icon { flex-shrink: 0; width: 50px; text-align: center; }
.node_indicator { display: inline-block; width: 12px; height: 12px; background-color: #283445; border-radius: 50%; position: relative; margin: 0 auto; }
.node_indicator.on { background-color: #4a90e2; }
.node_indicator.on::after { content: ''; position: absolute; top: -6px; left: -6px; right: -6px; bottom: -6px; border: 2px solid #2161b5; border-radius: 50%; animation: pulse 1.5s infinite ease-out; }
@keyframes pulse { 0% { transform: scale(0.5); opacity: 1; } 100% { transform: scale(1.5); opacity: 0; } }
.forum_details { flex-grow: 1; padding: 0 20px; }
.forum_stats { flex-shrink: 0; width: 120px; text-align: right; }
.forum_lastpost { flex-shrink: 0; width: 200px; text-align: right; padding-left: 20px; font-size: 13px; }
.forum_name { font-size: 18px; font-weight: 600; display: block; margin-bottom: 5px; }
.forum_name a { color: #ffffff; }
.forum_description { font-size: 13px; color: #8b9eb3; line-height: 1.5; }

/* =========================================
   5. IPB-STYLE THREAD LISTINGS
   ========================================= */
.thread_row td { padding: 16px 12px; border-bottom: 1px solid #283445; vertical-align: middle; transition: background 0.2s ease; }
.thread_row:hover td { background: #232323 !important; }
.thread_title a { color: #ffffff; text-decoration: none; }

/* =========================================
   6. IPB-STYLE POST STRUCTURE
   ========================================= */
.post { display: flex; background: #1E1E1E; border: 1px solid #283445; border-radius: 6px; margin-bottom: 15px; overflow: hidden; box-shadow: 0 2px 5px rgba(0,0,0,0.3); }
.post_author { width: 200px; background: linear-gradient(to bottom, #1E1E1E, #151c25) !important; border: none !important; border-right: 1px solid #283445 !important; box-shadow: inset -5px 0 10px rgba(0, 0, 0, 0.2); padding: 20px 10px !important; display: block !important; flex-shrink: 0; text-align: center; }
.author_avatar img { border-radius: 50% !important; width: 85px !important; height: 85px !important; object-fit: cover; border: 2px solid #283445; box-shadow: 0 4px 8px rgba(0, 0, 0, 0.5); margin-bottom: 10px; }
.post_author .smalltext { background: #181818; border: 1px solid #283445; border-radius: 4px; padding: 10px; margin-top: 15px; display: inline-block; width: 85%; box-shadow: 0 2px 5px rgba(0,0,0,0.3); }
.post_content { flex-grow: 1; min-width: 0; padding: 20px; display: flex; flex-direction: column; }
.post_meta { background: rgba(0, 0, 0, 0.2); padding: 8px 15px; border-bottom: 1px solid #283445; margin: -20px -20px 15px -20px; display: flex; justify-content: space-between; font-size: 12px; color: #8b9eb3 !important; }
.post_body { line-height: 1.7; font-size: 15px; color: #d1d9e0 !important; padding-right: 20px; margin-top: 10px !important; flex-grow: 1; overflow-wrap: break-word; word-wrap: break-word; max-width: 100%; box-sizing: border-box; }
.post_head { max-width: 100%; overflow-x: hidden; overflow-wrap: break-word; }
.signature { margin-top: 30px !important; border-top: 1px solid #2161b5 !important; padding-top: 15px !important; }
.postbit_group_image, .post_author img[src*="star"], .inline_rating, .star_rating, form[action*="ratethread"], #thread_rating_container { display: none !important; }

/* =========================================
   7. IPB-STYLE USER PROFILES
   ========================================= */
.profile_layout { display: flex; gap: 20px; align-items: flex-start; }
.profile_sidebar { width: 300px; flex-shrink: 0; }
.profile_block { background: #1E1E1E; border: 1px solid #283445; border-radius: 6px; margin-bottom: 20px; padding: 20px; box-shadow: 0 2px 5px rgba(0,0,0,0.3); }

/* =========================================
   8. UI ELEMENTS & MISC
   ========================================= */
.button, a.button { background-color: #2161b5; color: #ffffff !important; border-radius: 4px; padding: 10px 18px; font-weight: 500; border: none; cursor: pointer; display: inline-block; }

/* =========================================
   9. CLAN HEADER & ALIGNMENT
   ========================================= */
.clan-header-wrapper { position: relative; display: flex; flex-direction: column; align-items: center; background-color: #1E1E1E; padding: 60px 80px; margin-top: 20px; margin-bottom: 25px; border: 1px solid #283445; border-radius: 8px; box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4); overflow: hidden; }
.clan-logo-container { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); z-index: 0; pointer-events: none; }
.clan-logo-container img { max-width: 600px; width: 100%; height: auto; display: block; opacity: 0.25; }
.clan-rows { position: relative; z-index: 1; display: flex; flex-direction: column; gap: 40px; width: 100%; max-width: 1100px; }
.clan-row { display: flex; justify-content: space-between; width: 100%; align-items: flex-start; }
.clan-item { display: flex; flex-direction: column; align-items: center; min-width: 200px; }
.rank-title { font-size: 20px !important; font-weight: 700 !important; margin: 0 0 5px 0 !important; text-transform: uppercase; }
.rank-name, .info-desc { color: #cccccc; font-size: 14px; margin: 0 !important; line-height: 1.4; text-align: center; }

.glow-red-gradient { background: linear-gradient(to bottom, #ff4d4d, #b30000); -webkit-background-clip: text; -webkit-text-fill-color: transparent; text-shadow: 0 0 8px rgba(179, 0, 0, 0.6), 0 0 15px rgba(179, 0, 0, 0.4); }
.glow-green-gradient { background: linear-gradient(to bottom, #00ff00, #008000); -webkit-background-clip: text; -webkit-text-fill-color: transparent; text-shadow: 0 0 8px rgba(0, 128, 0, 0.6), 0 0 15px rgba(0, 128, 0, 0.4); }
.glow-orange-gradient { background: linear-gradient(to bottom, #ffc000, #ff9f1a); -webkit-background-clip: text; -webkit-text-fill-color: transparent; text-shadow: 0 0 8px rgba(255, 159, 26, 0.6), 0 0 15px rgba(255, 159, 26, 0.4); }
.glow-purple { background: linear-gradient(to bottom, #bf40bf, #4b0082); -webkit-background-clip: text; -webkit-text-fill-color: transparent; text-shadow: 0 0 8px rgba(191, 64, 191, 0.6), 0 0 15px rgba(128, 0, 128, 0.4); }
.glow-white { background: linear-gradient(to bottom, #ffffff, #aaaaaa); -webkit-background-clip: text; -webkit-text-fill-color: transparent; text-shadow: 0 0 8px rgba(255, 255, 255, 0.6), 0 0 15px rgba(255, 255, 255, 0.3); }

/* =========================================
   10. CUSTOM SCROLLBAR & MOBILE
   ========================================= */
html { scrollbar-width: thin; scrollbar-color: #283445 #151c25; }
::-webkit-scrollbar { width: 12px; height: 12px; }
::-webkit-scrollbar-track { background: #151c25; border-left: 1px solid #1E1E1E; }
::-webkit-scrollbar-thumb { background: #283445; border-radius: 6px; border: 3px solid #151c25; }
@media screen and (max-width: 768px) {
    .post { flex-direction: column !important; }
    .post_author { width: 100% !important; border-right: none !important; }
    .clan-row { flex-direction: column; align-items: center; gap: 30px; } 
    .clan-logo-container img { max-width: 90% !important; margin: 0 auto; opacity: 0.15; } 
    .clan-header-wrapper { padding: 40px 20px; }
}

/* =========================================
   11. FOOTER
   ========================================= */
#footer_wrapper { 
    background: #151c25; 
    border-top: 2px solid #2161b5; 
    padding: 30px 5% 20px 5%; 
    margin-top: 50px; 
    color: #8b9eb3; 
    width: 100%; 
    box-sizing: border-box; 
    display: flex; 
    flex-direction: column; 
    align-items: center; 
    gap: 20px; 
}

.footer-links { 
    display: flex; 
    gap: 20px; 
    flex-wrap: wrap; 
    justify-content: center; 
    list-style: none; 
    padding: 0; 
    margin: 0; 
    font-size: 13px; 
    font-weight: 500; 
}

.footer-links li { display: inline-block; }
.footer-links a { color: #c4d1de !important; }
.footer-links a:hover { color: #ffffff !important; }

/* Adds the | divider between links automatically */
.footer-links li:not(:last-child)::after { 
    content: "|"; 
    color: #283445; 
    margin-left: 20px; 
}

.footer-bottom { 
    display: flex; 
    justify-content: space-between; 
    width: 100%; 
    align-items: flex-end; 
    font-size: 12px; 
    border-top: 1px solid #283445; 
    padding-top: 20px; 
}

.footer-time { text-align: left; }
.footer-copyright { text-align: right; color: #8b9eb3; line-height: 1.6; }
.footer-copyright strong { color: #ffffff; font-size: 13px; }

@media screen and (max-width: 768px) {
    .footer-bottom { flex-direction: column; align-items: center; text-align: center; gap: 15px; }
    .footer-time, .footer-copyright { text-align: center; }
    .footer-links li:not(:last-child)::after { display: none; } /* Hide separators on mobile */
}

/* =========================================
   12. USER CP LAYOUT & SIDEBAR
   ========================================= */
.usercp_container { display: flex; gap: 25px; align-items: flex-start; margin-top: 20px; width: 100%; }
.usercp_sidebar { width: 260px; flex-shrink: 0; }
.usercp_content { flex-grow: 1; min-width: 0; }

.usercp-nav-section { background: #1E1E1E; border: 1px solid #283445; margin-bottom: 10px; border-radius: 6px; overflow: hidden; box-shadow: 0 2px 5px rgba(0,0,0,0.3); }
.usercp-nav-header { background: #151c25; color: #ffffff; padding: 12px 15px; font-weight: 600; cursor: pointer; border-bottom: 1px solid #283445; transition: background 0.2s ease; }
.usercp-nav-header:hover { background: #232323; }

.usercp-nav-links { list-style: none; margin: 0; padding: 0; background: #1E1E1E; }
.usercp-nav-links li a { display: block; padding: 10px 15px 10px 25px; color: #8b9eb3 !important; text-decoration: none; border-bottom: 1px solid #283445; font-size: 13px; transition: all 0.2s ease; }
.usercp-nav-links li a:hover { background: #232323; color: #ffffff !important; border-left: 3px solid #2161b5; padding-left: 22px; }
.usercp-nav-links li:last-child a { border-bottom: none; }

@media screen and (max-width: 768px) {
    .usercp_container { flex-direction: column; }
    .usercp_sidebar { width: 100%; margin-bottom: 20px; }
}