/* public/css/style.css - REVISED */
@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@400..900&family=Lato:ital,wght@0,100;0,300;0,400;0,700;0,900;1,100;1,300;1,400;1,700;1,900&family=Uncial+Antiqua&display=swap');

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #1e1e1e;
    color: #d4d4d4;
    margin: 0;
    /* For pages OTHER than game.html that use this stylesheet */
    padding: 20px;
    box-sizing: border-box;
    /* Centering for single containers like login/register forms */
    display: flex;
    flex-direction: column; /* To stack multiple .container if ever needed */
    align-items: center;
    min-height: 90vh; /* Ensure footer content isn't immediately at bottom */
}

/* General container for forms like login, register, create_character */
.container {
    background-color: rgba(0, 0, 0, 0.8);
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.7);
    width: 100%;
    max-width: 600px;
    margin-top: 150px;
    border: 1px solid #3f382e;
    text-align: center;
}

h1, h2 { /* General headings for non-game pages */
    color: #b99050;
    text-align: center;
    margin-bottom: 20px;
    font-family: 'Uncial Antiqua';
    text-transform: uppercase;
    letter-spacing: 2px;
    font-size: 28px;
}

div#auth-links {
    font-family: 'Lato';
    font-weight: 700;
    font-size: 22px;
    color: #cbb89b;
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    color: #a9a9a9;
}

.form-group input[type="text"],
.form-group input[type="password"],
.form-group input[type="email"] {
    width: calc(100% - 22px);
    padding: 10px;
    border: 1px solid #555;
    border-radius: 4px;
    background-color: #333;
    color: #d4d4d4;
    font-size: 1em;
}

.form-group input[type="text"]:focus,
.form-group input[type="password"]:focus {
    outline: none;
    border-color: #bb86fc;
    box-shadow: 0 0 5px rgba(187, 134, 252, 0.5);
}

button { /* General button style */
    background-color: #6200ee;
    color: white;
    padding: 10px 15px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1em;
    width: 100%; /* Full width for form buttons */
    transition: background-color 0.3s ease;
}

button:hover {
    background-color: #3700b3;
}

.message-area {
    margin-top: 15px;
    padding: 10px;
    border-radius: 4px;
    text-align: center;
}

.message-area.error {
    background-color: rgba(255, 0, 0, 0.2);
    color: #ff8a80;
    border: 1px solid #ff5252;
}

.message-area.success {
    background-color: rgba(0, 255, 0, 0.1);
    color: #b9f6ca;
    border: 1px solid #69f0ae;
}

nav { /* For index.html auth links */
    margin-bottom: 0px;
    text-align: center;
	font-family: 'Merriweather', serif;
}

nav a, .link {
    color: #b99046;
    text-decoration: none;
    margin: 0 10px;
}

nav a:hover, .link:hover {
    text-decoration: underline;
}

/* Specific for index page logged-in state */
#user-info, #character-info {
    margin-top: 20px;
    padding: 15px;
    background-color: #2c2c2d;
    border-left: 4px solid #bb86fc;
}

/* REMOVED game-specific layout rules like #game-ui-container, #map-panel etc. from here */
/* Those belong in game.css */

/* Add to your main style.css or game.css */

#main-header {
    background-color: #161311; /* Darker, more distinct header */
    color: #e0e0e0;
    padding: 0;
    width: 100%;
    position: fixed; 
    top: 0;
    left: 0;
    z-index: 1000; 
    box-shadow: 0 2px 8px rgba(0,0,0,0.5); /* More pronounced shadow */
    /*font-family: 'Uncial Antiqua', serif; */
	text-transform: uppercase;
}

#main-header .header-top-bar {
    background-color: #111; 
    padding: 6px 25px; /* Slightly more padding */
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85em; /* Slightly larger for better readability */
    border-bottom: 1px solid #383838; /* Softer border */
}

#main-header .game-title-header {
    font-weight: 700;
    font-size: 1.2em;
    color: #b99050;
    display: block;
    height: 35px;
    text-align: center;
    padding: 8px 0px 0px 0px;
    text-transform: uppercase;
	font-family: 'Cinzel' , serif;
}

#main-nav ul {
    list-style-type: none;
    margin: 0;
    padding: 0;
    display: flex; 
    justify-content: center; 
    background-color: #252320; /* Nav background */
}

#main-nav li a {
    display: block;
    color: #d4c0a1; 
    text-align: center;
    padding: 10px 16px; /* Adjust for comfort */
    text-decoration: none;
    font-size: 1em; 
    font-weight: 700; /* Cinzel regular */
    text-transform: uppercase; 
    letter-spacing: 2.2px; /* More spacing for uppercase Cinzel */
    transition: background-color 0.2s, color 0.2s;
    /*border-right: 1px solid #383838; /* Separator lines */
}
#main-nav li:first-child a {
    /*border-left: 1px solid #383838; /* Border on the far left */
}


#main-nav li a:hover,
#main-nav li a.active-nav-link { 
    background-color: rgba(212, 192, 161, 0.6);
    color: #161311;
}

/* CRUCIAL: Offset for the main page content */
#page-content-wrapper {
    /* THIS VALUE NEEDS TO BE THE CALCULATED HEIGHT OF YOUR HEADER */
    /* Example: Top bar (30px) + Nav bar (40px) = 70px. Add a bit more for safety. */
    padding-top: 112px; /* ADJUST THIS BASED ON YOUR HEADER'S ACTUAL RENDERED HEIGHT */
    height: 100vh; 
	max-width: 1800px;
    box-sizing: border-box; 
    /* overflow-y: auto; /* Only if individual page content needs to scroll independently of game-ui */
    display: flex; /* To help center #game-ui-container if needed */
    justify-content: center; /* Centers #game-ui-container horizontally */
    align-items: center; /* Centers #game-ui-container vertically */
}

/* Adjust body styles */
body {
    font-family: Lato, Tahoma, Geneva, Verdana, sans-serif !important;
    background-color: #000;
    color: #d4d4d4;
    margin: 0;
    /* height: 100vh; -- This might be redundant if wrapper is 100vh */
    /* overflow: hidden; -- Let wrapper handle overflow if necessary */
    /* padding: 20px; -- Removed, page-content-wrapper handles offset */
    box-sizing: border-box;
    background-image: url('/images/ui/bg-wide.webp');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    width: 100%;
    /* display: flex; -- Removed, page-content-wrapper is now the main flex container for content */
    /* justify-content: center; */
    /* align-items: center; */
}

/* Ensure #game-ui-container still behaves as intended within the new wrapper */
#game-ui-container {
    display: flex;
    max-width: 95%;
    height: 88vh; /* This should still work relative to the viewport height */
    background-color: rgba(15, 15, 15, 0.8);
    border-radius: 0px;
    overflow: hidden;
    align-items: stretch;
    /* margin: auto; /* This was from before, might not be needed if parent wrapper centers it */
}

/* Optional: for other pages that aren't the game UI */
.page-container {
    padding: 20px;
    max-width: 1200px; /* Example max width for content pages */
    margin: 0 auto; /* Center content pages */
    background-color: rgba(30,30,30, 0.85);
    border-radius: 5px;
    height: calc(100vh - 72px); /* Full height minus header, adjust 72px! */
    overflow-y: auto;
    box-sizing: border-box;
}

.current-datetime-ingame {
    color: #d4c0a1;
    font-family: 'Cinzel', serif;
    font-size: 0.9em;
    font-weight: 700;
    letter-spacing: 1px;
    text-align: center;
    width: 100%;
    max-width: 1800px;
    margin: 0 auto;
    text-transform: none;
}

/*div#global-modal-placeholder {
    display: none;
}*/

*::-webkit-scrollbar { width: 8px; }
*::-webkit-scrollbar-track { background: transparent; }
*::-webkit-scrollbar-thumb { background-color: #555555; border-radius: 4px; }
*::-webkit-scrollbar-thumb:hover { background-color: #626262; }