/* --- Base Styles --- */
html {
    box-sizing: border-box;
}
*, *:before, *:after {
    box-sizing: inherit;
}

body {
    font-family: 'Inter', 'Roboto', sans-serif; /* Modern sans-serif fonts */
    color: #E0E0E0; /* Lighter text for better contrast */
    background: #1A1A1A; /* Deeper, uniform dark background */
    font-size: 16px; /* Slightly larger base font for readability */
    margin: 0;
    padding: 20px; /* More overall padding */
    line-height: 1.6; /* Improved line height for readability */
}

/* Universal font sizing and family */
th, td, p, font {
    font-family: 'Inter', 'Roboto', sans-serif;
    font-size: 1rem; /* Use rem for scalability */
}

/* --- Utility Classes --- */
.nowrap {
    white-space: nowrap;
}

img {
    border: none;
    max-width: 100%; /* Ensure images are responsive */
    height: auto;
}

form {
    display: inline;
}

td {
    padding: 8px 10px; /* Increased padding for table cells */
}

td.spacerow {
    height: 15px; /* More vertical spacing */
    padding: 0;
}

.gen { font-size: 1rem; }
.genmed { font-size: 0.9rem; }
.gensmall { font-size: 0.8rem; color: #B0B0B0; }

/* --- Links --- */
a {
    text-decoration: none; /* No underline by default for cleaner look */
    color: #8CC63F; /* Modern green accent for links */
    transition: color 0.2s ease-in-out; /* Smooth transition on hover */
}
a:visited {
    color: #6B9F2A; /* Slightly muted visited link color */
}
a:active, a:hover {
    text-decoration: underline; /* Underline on hover for clarity */
    color: #A0D660; /* Brighter green on hover */
}

/* --- Main Structure & Tables --- */
.toptable {
    background: #282828; /* Darker header/top table background */
    border: 1px solid #000;
    border-radius: 8px; /* Rounded corners for the main table */
    overflow: hidden; /* Ensures content respects border-radius */
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3); /* Soft shadow for depth */
}

.bakfon {
    background: transparent; /* Assuming this is a placeholder or can be transparent */
}

.bakfonlogin {
    background: #242424; /* Consistent dark background for login area */
    color: #E0E0E0;
    padding: 15px;
    border-radius: 8px;
    margin-top: 20px;
}

.tablebg {
    border: none; /* Remove table border, let elements define boundaries */
    background: #212121; /* Slightly lighter background for main content tables */
    border-radius: 8px; /* Consistent rounded corners */
    margin-bottom: 20px; /* Space between tables/blocks */
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.row1, .row2, .row3, tr.row1 .row, tr.row2 .row, tr.row3 .row {
    border: none; /* Remove individual row borders */
    background: #212121; /* Uniform row background */
    padding: 12px 15px; /* Increased padding for rows */
    border-bottom: 1px solid rgba(0, 0, 0, 0.2); /* Subtle separator */
}

.row2 {
    background: #242424; /* Slightly different shade for alternating rows */
}

.row1:last-child, .row2:last-child, .row3:last-child {
    border-bottom: none; /* No border on the last row */
}

th, td.th {
    color: #FFFFFF;
    font-size: 1.1rem; /* Slightly larger headings */
    font-weight: 600; /* Medium bold */
    background: linear-gradient(to right, #3A3A3A, #2A2A2A); /* Modern gradient for headers */
    white-space: nowrap;
    padding: 12px 15px; /* Increased padding */
    text-align: left; /* Align headers to left, unless content dictates center */
    height: auto; /* Let content define height */
    border: none; /* Remove individual border lines for headers */
    border-bottom: 1px solid #000; /* Subtle line below header */
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5); /* Soft text shadow */
}

/* Category Headers */
td.cat {
    height: auto;
    padding: 10px 15px;
    border: none; /* Remove old borders */
    background: #2C2C2C; /* Consistent dark background */
    text-indent: 0; /* Remove text indent */
    font-weight: bold;
    color: #FFFFFF;
    border-bottom: 1px solid rgba(0, 0, 0, 0.2);
}

td.cathead {
    background: linear-gradient(to right, #4CAF50, #388E3C); /* Vibrant green gradient for main category headers */
    height: auto;
    padding: 12px 15px;
    border: none;
    border-radius: 8px 8px 0 0; /* Rounded top corners */
    color: #FFFFFF;
    font-size: 1.2rem;
    font-weight: bold;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
}

/* --- Navigation & Links --- */
.nav {
    font-weight: bold;
    font-size: 1.1rem;
    margin-bottom: 10px;
}
.nav a, .nav a:visited {
    text-decoration: none;
    color: #A0D660; /* Consistent with main link color */
}
.nav a:hover, .nav a:active {
    text-decoration: underline;
    color: #FFFFFF; /* White on hover for stronger highlight */
}

.forumlink {
    font-weight: bold;
    font-size: 1.1rem;
}
a.forumlink, a.forumlink:visited {
    font-family: 'Inter', 'Roboto', sans-serif;
    text-decoration: none;
    color: #8CC63F;
}
a.forumlink:hover, a.forumlink:active {
    text-decoration: underline;
    color: #A0D660;
}

/* --- Post Elements --- */
.postbody {
    font-size: 1rem;
    line-height: 1.6em;
    margin: 10px 0; /* More spacing for post content */
}
.postbody a { color: #8CC63F; text-decoration: underline; }
.postbody a:visited { color: #6B9F2A; }
.postbody a:visited:hover { color: #A0D660; }
.postbody a:hover { color: #A0D660; }

.postdetails {
    color: #B0B0B0;
    font-size: 0.9rem;
    text-align: left;
    padding-top: 5px;
    border-top: 1px dashed rgba(255, 255, 255, 0.1); /* Subtle separator */
    margin-top: 10px;
}
.postdetails b {
    color: #E0E0E0;
    font-weight: 600;
}

/* --- Inputs & Buttons --- */
input, textarea, select {
    color: #E0E0E0; /* Light text on dark inputs */
    font: normal 0.95rem 'Inter', 'Roboto', sans-serif;
    padding: 8px 12px; /* More padding for inputs */
    border-radius: 5px; /* Slightly rounded inputs */
    border: 1px solid #444; /* Darker border */
    background-color: #2F2F2F; /* Dark background for inputs */
    transition: border-color 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
}
input:focus, textarea:focus, select:focus {
    border-color: #8CC63F; /* Highlight on focus */
    outline: none;
    box-shadow: 0 0 0 2px rgba(140, 198, 63, 0.3); /* Subtle glow */
}

input.post, textarea.post, select {
    background-color: #2F2F2F;
    color: #E0E0E0;
    border: 1px solid #444;
}

input.button, input.liteoption, input.mainoption, .fakebut {
    background-color: #4CAF50; /* Green primary button */
    color: #FFFFFF;
    font-size: 1rem;
    font-weight: bold;
    border: none; /* No border for modern buttons */
    border-radius: 5px;
    padding: 10px 20px;
    cursor: pointer;
    transition: background-color 0.2s ease-in-out, transform 0.1s ease-in-out;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    min-height: 38px; /* Consistent button height */
}
input.button:hover, input.liteoption:hover, input.mainoption:hover, .fakebut:hover {
    background-color: #388E3C; /* Darker green on hover */
    transform: translateY(-1px); /* Slight lift effect */
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}
input.button:active, input.liteoption:active, input.mainoption:active, .fakebut:active {
    background-color: #2E7D32; /* Even darker on active */
    transform: translateY(0);
    box-shadow: none;
}

input.liteoption {
    background-color: #3A3A3A; /* More subdued option button */
    color: #E0E0E0;
    border: 1px solid #555;
    box-shadow: none;
}
input.liteoption:hover {
    background-color: #4A4A4A;
    transform: none;
    box-shadow: none;
}

input.post { height: auto; } /* Let height adjust to content */

/* --- Quotes & Code Blocks --- */
.quote {
    margin: 15px 0; /* More margin around quotes */
    padding: 12px 15px;
    border-left: 4px solid #8CC63F; /* Accent border on the left */
    border-radius: 5px;
    color: #E0E0E0;
    background-color: #2A2A2A; /* Slightly lighter background */
    font-size: 0.95rem;
    font-weight: normal;
    font-style: italic; /* Italic for quotes */
}

.code {
    margin: 15px 0;
    padding: 12px 15px;
    border-left: 4px solid #00BCD4; /* Cyan accent for code */
    border-radius: 5px;
    color: #E0E0E0;
    background-color: #2A2A2A;
    font-size: 0.95rem;
    font-family: 'Fira Code', 'Monaco', 'Courier New', monospace; /* Monospaced font for code */
    overflow-x: auto; /* Allow horizontal scrolling for long lines */
}

/* --- Separator --- */
hr {
    height: 1px; /* Thinner HR */
    border: none;
    border-top: 1px solid #3A3A3A; /* Subtle, dark line */
    margin: 20px 0; /* More spacing */
}

/* --- Titles --- */
.maintitle, h1 {
    font-family: 'Inter', 'Roboto', sans-serif;
    font-weight: 700; /* Bolder */
    font-size: 2.2rem; /* Larger main title */
    text-decoration: none;
    color: #FFFFFF;
    margin-bottom: 25px;
    text-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
}

h2 {
    font-family: 'Inter', 'Roboto', sans-serif;
    font-weight: 600;
    font-size: 1.8rem;
    text-decoration: none;
    line-height: 1.3;
    color: #E0E0E0;
    margin-bottom: 15px;
}

h3 {
    font-size: 1.5rem;
    font-weight: 600;
    font-family: 'Inter', 'Roboto', sans-serif;
    line-height: 1.4;
    color: #E0E0E0;
    margin-bottom: 10px;
}

h4 {
    margin: 0;
    font-size: 1.2rem;
    font-weight: 600;
    color: #E0E0E0;
}

.cattitle {
    font-weight: 600;
    font-size: 1rem;
    letter-spacing: 0.5px; /* Slightly increased letter spacing */
    color: #E0E0E0;
    text-transform: uppercase; /* Uppercase for categories */
}
a.cattitle { text-decoration: none; }
a.cattitle:hover { text-decoration: underline; }

.name {
    font-weight: bold;
    font-size: 1rem;
}
.name a, .name a:visited { text-decoration: none; color: #8CC63F; } /* Keep consistent link style */
.name a:hover, a.name a:active { text-decoration: underline; color: #A0D660; }

/* --- Footer --- */
.copyright {
    color: #888;
    font-weight: normal;
    font-size: 0.85rem;
    line-height: 1.5em;
    text-align: center;
    margin-top: 30px;
    padding-top: 15px;
    border-top: 1px solid #2A2A2A;
}
.copyright a, .copyright a:visited { color: #A0A0A0; text-decoration: underline;}
.copyright a:hover { color: #FFF; }

/* --- WR-Forum Professional specific styles --- */

/* Pagination buttons */
.pgbutt a {
    font-family: 'Inter', 'Roboto', sans-serif;
    padding: 6px 12px; /* More padding */
    text-decoration: none;
    border: 1px solid #555555; /* Subtle border */
    background: #2F2F2F; /* Dark background */
    margin: 0 4px 0 0; /* Adjust margin */
    border-radius: 5px; /* Rounded corners */
    transition: background-color 0.2s ease-in-out, border-color 0.2s ease-in-out;
    color: #E0E0E0;
}
.pgbutt a:hover {
    background: #4A4A4A;
    border-color: #8CC63F; /* Highlight border on hover */
    color: #FFFFFF;
}

/* QR-CODE */
#qr img {
    width: 40px; /* Slightly larger default */
    height: 40px;
    position: fixed;
    right: 20px; /* More space from edge */
    top: 20px;
    border: 2px solid #666; /* Thicker border */
    padding: 2px;
    background-color: white;
    border-radius: 8px; /* Rounded corners */
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
    transition: all 0.3s ease-in-out; /* Smooth transition for hover */
}
#qr img:hover {
    width: 250px; /* Larger on hover */
    height: 250px;
    z-index: 1000; /* Ensure it's on top */
    padding: 5px;
    border-color: #8CC63F; /* Highlight on hover */
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.6);
}

/* Avatar Placeholder */
.guestavatar {
    width: 100px; /* Standard avatar size */
    height: 100px;
    text-align: center;
    background: linear-gradient(to bottom right, #8CC63F, #6B9F2A); /* Modern gradient background */
    color: #FFFFFF; /* White text */
    font-size: 4rem; /* Larger font for initial */
    display: flex; /* Use flexbox for perfect centering */
    align-items: center;
    justify-content: center;
    border-radius: 50%; /* Perfect circle for avatars */
    position: relative;
    vertical-align: middle;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    overflow: hidden; /* Ensure content stays within circle */
}

/* Admin Menu (assuming this is global and not just admin specific visual) */
#nav8, #nav8 ul, #nav8 li {
    margin: 0;
    padding: 0;
    border: 0;
}
#nav8 {
    border-spacing: 0;
    position: relative;
    z-index: 50;
    width: 100%;
    background: #2A2A2A; /* Darker background for nav */
    border-radius: 8px; /* Rounded corners */
    overflow: hidden;
    margin-bottom: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}
#nav8 ul {
    position: absolute;
    display: none;
    background: #2A2A2A;
    min-width: 180px; /* Ensure dropdowns are wide enough */
    border-radius: 5px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.4);
    z-index: 60;
}
#nav8 td:hover ul {
    display: block;
}
#nav8 ul li {
    list-style: none;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1); /* Subtle separator */
}
#nav8 ul li:last-child {
    border-bottom: none;
}
#nav8 .right { direction: rtl; }
#nav8 .right ul { right: 0; }
#nav8 .right li { direction: ltr; }
#nav8 a {
    display: block;
    padding: 10px 0; /* More padding */
    text-align: center;
    text-decoration: none;
    color: #E0E0E0;
    transition: background-color 0.2s ease-in-out, color 0.2s ease-in-out;
}
#nav8 ul a {
    padding: 10px 20px; /* More padding for dropdown items */
    text-align: left;
}
#nav8 td:hover, #nav8 li:hover {
    background: #4A4A4A; /* Darker grey on hover */
    color: #FFFFFF;
}

/* Loading Bar */
#cssbar-wrapper {
    width: 300px;
    height: 25px; /* Taller bar */
    position: absolute;
    left: 50%;
    transform: translateX(-50%); /* Center perfectly */
    top: 50px; /* Adjust as needed */
    z-index: 999;
}
#cssbar-border {
    border: 3px solid #8CC63F; /* Green border */
    height: 100%;
    width: 100%;
    position: relative;
    padding: 3px;
    border-radius: 12px; /* More rounded corners */
    overflow: hidden;
}
#cssbar-whitespace {
    overflow: hidden;
    height: 100%;
    width: 100%;
    margin: 0 auto;
    position: relative;
    border-radius: 8px; /* Inner rounding */
}
#cssbar-line {
    background-color: #8CC63F; /* Green loading bar */
    position: absolute;
    height: 100%;
    width: 100%;
    animation: cssbar-slide 4s steps(40) infinite;
    border-radius: 8px; /* Consistent rounding */
}
@keyframes cssbar-slide {
    0% { left: -100%; }
    100% { left: 100%; }
}
@-o-keyframes cssbar-slide {
    0% { left: -100%; }
    100% { left: 100%; }
}
@-ms-keyframes cssbar-slide {
    0% { left: -100%; }
    100% { left: 100%; }
}
@-webkit-keyframes cssbar-slide {
    0% { left: -100%; }
    100% { left: 100%; }
}
@-moz-keyframes cssbar-slide {
    0% { left: -100%; }
    100% { left: 100%; }
}

/* Optional: Google Fonts Import */
/* You'll need to add this to your HTML <head> section: */
/* <link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;600;700&family=Roboto:wght@400;500;700&display=swap" rel="stylesheet"> */
/* If you want to use Fira Code for code blocks: */
/* <link href="https://fonts.googleapis.com/css2?family=Fira+Code:wght@400;500;600;700&display=swap" rel="stylesheet"> */