body {
    background-color: #060606;
    background-image: url('/res/images/bg.png?v=3');
    background-size: cover;
    background-attachment: fixed;
    background-position: center top;
    color: #c0c0c0;
    font-family: 'Times New Roman', Times, serif;
    margin: 0;
    padding: 0;
}

/* Global links (Sidebar, Header, Footer) */
a {
    color: #e0bc5d;
    text-decoration: none;
    font-weight: bold;
}

a:hover {
    color: #ffefaf;
    text-shadow: 0 0 5px #ffefaf;
}

.main-container {
    display: flex;
    justify-content: center;
    max-width: 1200px;
    margin: 0 auto;
    padding-top: 20px;
}

header {
    text-align: center;
    padding: 20px 0;
}

header img.logo {
    max-width: 500px;
    mask-image: radial-gradient(circle, black 20%, transparent 70%);
    -webkit-mask-image: radial-gradient(circle, black 20%, transparent 70%);
    filter: drop-shadow(0 0 20px rgba(0,0,0,0.9));
    mix-blend-mode: screen;
    border-radius: 50%;
    transition: 0.5s;
}

header img.logo:hover {
    transform: scale(1.02);
}

.sidebar {
    width: 200px;
    flex-shrink: 0;
    background: rgba(0,0,0,0.8);
    border: 2px solid #3c3c3c;
    border-radius: 5px;
    padding: 10px;
    height: fit-content;
    box-shadow: 0 0 15px rgba(0,0,0,0.5);
}

.sidebar h3 {
    color: #e0bc5d;
    text-transform: uppercase;
    font-size: 1.1em;
    border-bottom: 1px solid #3c3c3c;
    padding-bottom: 5px;
    margin-bottom: 10px;
    text-align: center;
}

.sidebar-menu {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar-menu li {
    margin-bottom: 5px;
}

.sidebar-menu a {
    display: block;
    padding: 8px;
    background: #1a1a1a;
    border-left: 3px solid transparent;
    transition: all 0.3s;
}

.sidebar-menu a:hover {
    background: #2a2a2a;
    border-left: 3px solid #e0bc5d;
}

/* CONTENT AREA (Clean Parchment Style) */
.content-area {
    flex-grow: 1;
    margin: 0 20px;
    background: linear-gradient(to bottom, #fcf9f2 0%, #f4ebd5 100%);
    color: #2b1d0e; /* Dark brown for text */
    padding: 30px;
    border: 10px solid;
    border-image: linear-gradient(to right, #3c3c3c, #1a1a1a) 1;
    box-shadow: 0 0 25px rgba(0,0,0,0.8);
    min-height: 600px;
}

/* Darker headings on parchment */
.content-area h1, .content-area h2, .content-area h3 {
    color: #4a3420;
    border-bottom: 2px solid #a38b6d;
    padding-bottom: 10px;
    margin-top: 0;
}

/* Links inside parchment area must be dark for contrast */
.content-area a {
    color: #7d0000; /* Deep red for links on parchment */
    text-decoration: underline;
}

.content-area a:hover {
    color: #b00000;
    text-shadow: none;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
}

th {
    background: rgba(163, 139, 109, 0.3);
    color: #4a3420;
    padding: 10px;
    text-align: left;
    border-bottom: 2px solid #a38b6d;
}

td {
    padding: 10px;
    border-bottom: 1px solid #dcd1ba;
    color: #2b1d0e; /* Ensure table cell text is dark */
}

tr:hover td {
    background: rgba(0,0,0,0.05);
}

.box {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid #a38b6d;
    padding: 20px;
    margin: 10px 0;
    border-radius: 3px;
}

.box label {
    display: block;
    font-weight: bold;
    margin-bottom: 5px;
    color: #4a3420;
}

input[type=text], input[type=password], select {
    width: 100%;
    padding: 10px;
    margin-bottom: 15px;
    border: 1px solid #a38b6d;
    background: #fdf5e6;
    border-radius: 3px;
    box-sizing: border-box;
    color: #2b1d0e; /* Dark text in inputs */
}

input[type=submit], button {
    background: linear-gradient(to bottom, #e0bc5d, #a38b6d);
    border: 1px solid #4a3420;
    color: #2b1d0e;
    padding: 10px 20px;
    font-weight: bold;
    cursor: pointer;
    text-transform: uppercase;
    transition: 0.2s;
}

input[type=submit]:hover, button:hover {
    background: linear-gradient(to bottom, #ffefaf, #e0bc5d);
    box-shadow: 0 0 5px #e0bc5d;
}

footer {
    text-align: center;
    padding: 40px;
    color: #888;
    font-size: 0.9em;
}

@media (max-width: 900px) {
    .main-container {
        flex-direction: column;
        align-items: center;
    }
    .sidebar {
        width: 90%;
        margin-bottom: 20px;
    }
    .content-area {
        width: 90%;
        margin: 0;
    }
}

/* Sidebar Login & Buttons */
.sidebar-login {
    padding: 15px;
    background: rgba(40, 40, 40, 0.5);
    border: 1px solid #3c3c3c;
    border-radius: 4px;
    margin-bottom: 20px;
    color: #e0bc5d;
}

.sidebar-login label {
    display: block;
    font-size: 0.85em;
    font-weight: bold;
    margin-bottom: 4px;
    color: #fff;
    text-shadow: 1px 1px 2px #000;
}

.sidebar-login input[type=text], 
.sidebar-login input[type=password] {
    width: 100%;
    padding: 6px;
    background: #1a1a1a;
    border: 1px solid #4a4a4a;
    color: #fff;
    margin-bottom: 10px;
    font-size: 0.9em;
}

.sidebar-login input[type=submit] {
    width: 100%;
    padding: 8px;
    font-size: 1em;
    margin-bottom: 8px;
}

.btn-sidebar {
    display: block;
    width: 100%;
    padding: 8px;
    background: linear-gradient(to bottom, #222, #000);
    border: 1px solid #3c3c3c;
    color: #e0bc5d;
    text-align: center;
    font-size: 0.9em;
    font-weight: bold;
    margin-bottom: 5px;
    transition: 0.3s;
    box-sizing: border-box;
}

.btn-sidebar:hover {
    background: linear-gradient(to bottom, #333, #111);
    color: #ffefaf;
    border-color: #e0bc5d;
}

.lost-pw {
    margin-top: 10px;
    text-align: center;
}

.lost-pw a {
    font-size: 0.8em;
    color: #fff;
    text-decoration: none;
    font-weight: normal;
}

.lost-pw a:hover {
    text-decoration: underline;
}

.welcome-box {
    text-align: center;
    font-size: 0.9em;
}

/* Changelog & News Containers */
.changelog-container {
    background: #1a1a1a;
    border: 1px solid #e0bc5d;
    margin-bottom: 25px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.5);
}

.changelog-header, .news-header {
    background: linear-gradient(to bottom, #2a2a2a, #000);
    color: #e0bc5d;
    padding: 10px 15px;
    font-weight: bold;
    font-size: 1.1em;
    border-bottom: 1px solid #e0bc5d;
    display: flex;
    align-items: center;
    gap: 10px;
}

.changelog-content {
    padding: 20px;
    background: linear-gradient(to bottom, #fcf9f2 0%, #f4ebd5 100%);
    color: #2b1d0e;
    font-weight: 600;
}

.changelog-content p {
    margin: 0 0 10px 0;
    font-size: 0.95em;
    border-left: 3px solid #7d0000;
    padding-left: 10px;
}

.changelog-items-scroll {
    max-height: 240px;
    overflow-y: auto;
    padding-right: 5px;
}

.changelog-items-scroll::-webkit-scrollbar {
    width: 6px;
}

.changelog-items-scroll::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.05);
    border-radius: 3px;
}

.changelog-items-scroll::-webkit-scrollbar-thumb {
    background: #a38b6d;
    border-radius: 3px;
}

.changelog-items-scroll::-webkit-scrollbar-thumb:hover {
    background: #7d0000;
}

.changelog-footer {
    text-align: right;
    margin-top: 15px;
}

.news-container {
    border: 1px solid #3c3c3c;
}

.news-post {
    padding: 25px;
    line-height: 1.6;
    color: #000;
    font-weight: 600;
}

.news-post h2 {
    color: #7d0000;
    font-size: 1.4em;
    margin-bottom: 15px;
}

/* FORUM STYLES */
.forum-header {
    background: linear-gradient(to bottom, #2a2a2a, #000);
    color: #e0bc5d;
    padding: 12px 15px;
    font-weight: bold;
    font-size: 1.2em;
    border: 1px solid #3c3c3c;
    border-bottom: none;
    display: flex;
    align-items: center;
    gap: 10px;
}

.forum-category-header {
    background: #1a1a1a;
    color: #fff;
    padding: 8px 15px;
    font-weight: bold;
    font-size: 0.9em;
    border-left: 1px solid #3c3c3c;
    border-right: 1px solid #3c3c3c;
}

.forum-table {
    width: 100%;
    border-collapse: collapse;
    
    border: 1px solid #3c3c3c;
    margin-bottom: 20px;
}

.forum-table th {
    background: #222;
    color: #e0bc5d;
    font-size: 0.85em;
    text-transform: uppercase;
    padding: 8px;
    border-bottom: 1px solid #3c3c3c;
}

.forum-table td {
    padding: 12px 8px;
    border-bottom: 1px solid #222;
    
    color: #000;
    font-weight: 600;
    font-size: 1.0em;
}

.forum-table tr:hover td {
    background: rgba(255, 255, 255, 0.1);
}

.col-icon { width: 40px; text-align: center; }
.col-board { text-align: left; }
.col-topics, .col-posts { width: 60px; text-align: center; }
.col-last { width: 200px; text-align: left; font-size: 0.85em; }

.forum-table a {
    color: #7d0000;
    text-decoration: underline;
    font-weight: bold;
    
}

.forum-table a:hover {
    text-decoration: underline;
}

.forum-table small {
    color: #444;
    font-weight: bold;
    font-size: 0.85em;
}

/* TOPIC & POST STYLES */
.post-container {
    display: flex;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid #a38b6d;
    margin-bottom: 10px;
}

.post-sidebar {
    width: 180px;
    flex-shrink: 0;
    padding: 15px;
    background: rgba(0, 0, 0, 0.1);
    border-right: 1px solid #a38b6d;
    text-align: center;
    font-size: 0.85em;
    color: #2b1d0e;
}

.post-sidebar b {
    display: block;
    font-size: 1.1em;
    margin-bottom: 10px;
    color: #7d0000;
}

.post-avatar {
    width: 100px;
    height: 100px;
    margin: 10px auto;
    border: 1px solid #a38b6d;
    background: #fdf5e6;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.post-avatar img {
    max-width: 100%;
    max-height: 100%;
}

.post-content {
    flex-grow: 1;
    padding: 20px;
    color: #000;
    font-weight: 500;
    line-height: 1.5;
    position: relative;
    min-height: 200px;
}

.post-header {
    font-size: 0.8em;
    color: #666;
    border-bottom: 1px solid rgba(0,0,0,0.1);
    padding-bottom: 5px;
    margin-bottom: 15px;
    display: flex;
    justify-content: space-between;
}

.post-quote {
    position: absolute;
    bottom: 10px;
    right: 20px;
    font-size: 0.85em;
    color: #7d0000;
    font-weight: bold;
    cursor: pointer;
}

.forum-path {
    font-size: 0.9em;
    margin-bottom: 15px;
    color: #4a3420;
}

.forum-path a {
    color: #7d0000;
    text-decoration: none;
}

.btn-forum {
    background: linear-gradient(to bottom, #e0bc5d, #a38b6d);
    border: 1px solid #4a3420;
    color: #2b1d0e;
    padding: 5px 15px;
    font-weight: bold;
    font-size: 0.85em;
    text-transform: uppercase;
    cursor: pointer;
    float: right;
    margin-bottom: 10px;
}
