static/styles.css
/* ======================================= */
/*            COMMON STYLES                */
/* These styles apply to all pages         */
/* ======================================= */

/* CSS Variables for Consistency */
:root {
    --primary-color: #7a4a36;
    --secondary-color: #222222;
    --background-color: #fffdf5;
    --accent-color: #d4c5a2;
    --light-background-color: rgba(255, 248, 230, 0.9);
    --font-family: 'Roboto', sans-serif;
    --heading-font-family: 'Cinzel Decorative', serif;
}

/* General Body Styling */
body {
    font-family: var(--font-family), serif;
    background-color: var(--background-color);
    background-image: url('https://www.transparenttextures.com/patterns/old-mathematics.png');
    color: var(--secondary-color);
    font-size: 18px; /* Increased base font size for readability */
    font-weight: 400;
    margin: 0;
    padding: 0;
    line-height: 1.8; /* Increased line-height for improved readability */
}

/* Navbar Styling */
.navbar {
    background-color: var(--primary-color);
    padding: 15px;
    text-align: center;
}

.navbar a {
    color: #fff8e7;
    text-decoration: none;
    margin: 0 15px;
    font-size: 18px;
}

.navbar a:hover {
    text-decoration: underline;
}

/* Heading (H1) Styling */
h1 {
    font-family: var(--heading-font-family), serif;
    text-align: center;
    color: var(--primary-color);
    font-size: 3.5rem; /* Larger font size for h1 */
    margin-bottom: 20px;
    line-height: 1.2;
    text-shadow: 2px 2px var(--accent-color);
}

h2 {
    font-family: var(--heading-font-family), serif;
    color: var(--primary-color);
    font-size: 2.75rem; /* Larger font size for h2 */
    margin-bottom: 15px;
    line-height: 1.3;
}

h3 {
    font-family: var(--heading-font-family), serif;
    color: var(--primary-color);
    font-size: 2.25rem; /* Larger font size for h3 */
    margin-bottom: 10px;
    line-height: 1.4;
}

/* Shared Button Styling */
button {
    padding: 12px 25px;
    font-size: 18px; /* Slightly larger button font size */
    border: 2px solid var(--primary-color);
    border-radius: 5px;
    background-color: var(--primary-color);
    color: #fff8e7;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

button:hover {
    background-color: var(--secondary-color);
}

button:focus {
    outline: 2px solid var(--accent-color);
}

/* Shared Form Element Styling */
label {
    font-weight: bold;
    display: block;
    margin-bottom: 5px;
    font-size: 18px;
    color: var(--secondary-color);
}

input[type="text"],
input[type="email"],
select,
textarea {
    width: 100%;
    padding: 12px;
    margin-bottom: 15px;
    border-radius: 5px;
    border: 2px solid var(--primary-color);
    font-size: 18px; /* Increased input font size */
    background-color: #fff8e7;
    color: var(--secondary-color);
    box-sizing: border-box;
}

input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

/* Shared Textarea Styling */
textarea {
    resize: none;
    overflow: auto;
}

/* Custom Scrollbar Styling */
::-webkit-scrollbar {
    width: 12px;
}

::-webkit-scrollbar-track {
    background: rgba(255, 248, 230, 0.6);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background-color: var(--primary-color);
    border-radius: 10px;
    border: 2px solid var(--accent-color);
}

::-webkit-scrollbar-thumb:hover {
    background-color: var(--secondary-color);
}

/* Shared Button Container */
.button-container {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 15px;
}

.button-container button {
    margin: 0;
}

strong {
    font-weight: 700; /* Explicitly setting it to bold */
    color: var(--primary-color); /* Retain your color preference */
}

/* Loading Spinner */
.loading-spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid var(--primary-color);
    border-radius: 50%;
    width: 20px;
    height: 20px;
    animation: spin 1s linear infinite;
    display: none;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.alert-box {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 15px;
    border-radius: 5px;
    background-color: var(--primary-color);
    color: #fff;
    font-size: 16px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    z-index: 1000;
    transition: opacity 0.5s ease;
}

.alert-box.success {
    background-color: #4CAF50;
}

.alert-box.error {
    background-color: #f44336;
}


/* ======================================= */
/*            INDEX PAGE STYLES            */
/* Styles specific to index.html           */
/* ======================================= */

/* Main Container for Index Page */
.index-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px;
    max-width: 1200px;
    margin: 0 auto;
    overflow-y: auto;
}

/* Game Display Styling */
.game-display {
    width: 100%;
    max-width: 960px;
    height: 400px;
    padding: 15px;
    margin-bottom: 20px;
    border: 2px solid var(--primary-color);
    border-radius: 10px;
    background-color: var(--light-background-color);
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.3);
    overflow-y: auto;
    overflow-x: hidden; /* Prevent horizontal scroll */
    color: var(--secondary-color);
    font-size: 18px; /* Increased text size for better readability */
}

/* Ensure text wraps within the game display */
.game-display p,
.game-display pre {
    white-space: pre-wrap;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

/* Formatted Text for Game Display */
.formatted-text {
    padding: 12px 18px;  /* Increased padding */
    margin-bottom: 10px; /* Increased space between text blocks */
    white-space: normal;
    word-wrap: break-word;
    overflow-wrap: break-word;
    color: var(--secondary-color);
    font-weight: 400;
    line-height: 1.8;
}

/* Alternating Background Colors for Messages */
.formatted-text:nth-child(odd) {
    background-color: #f9f3e5;
}

.formatted-text:nth-child(even) {
    background-color: #f4ebd7;
}

.message-wrapper {
    margin-bottom: 15px;
    padding: 8px;
    background-color: var(--light-background-color);
    border-radius: 5px;
    border: 1px solid rgba(0, 0, 0, 0.2); /* Add a subtle, darker border */
    box-shadow: 2px 4px 8px rgba(0, 0, 0, 0.15), 4px 8px 16px rgba(0, 0, 0, 0.1); /* Improved shadow */
}



/* Layout for Input Section and Character Sheet */
.input-character-layout {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    width: 100%;
    max-width: 960px;
}

/* Responsive Layout for Input and Character Sheet */
@media screen and (max-width: 768px) {
    .input-character-layout {
        flex-direction: column;
        align-items: center;
    }

    .input-section, .character-sheet {
        margin: 0;
        max-width: 100%;
    }

    .input-section {
        margin-bottom: 20px;
    }
}

/* Input Section Styling */
.input-section {
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 600px;
    padding: 15px;
    margin-right: 20px;
    border: 2px solid var(--primary-color);
    border-radius: 10px;
    background-color: var(--light-background-color);
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.3);
}

/* Textarea Styling for User Input */
textarea#userInput {
    height: 140px; /* Slightly increased height for textarea */
}

/* Character Sheet Styling */
.character-sheet {
    flex: 0 0 300px;
    padding: 15px;
    margin-left: 20px;
    border: 2px solid var(--primary-color);
    border-radius: 10px;
    background-color: var(--light-background-color);
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.3);
}

.character-sheet h2 {
    font-size: 26px; /* Increased font size */
    text-align: center;
    margin-bottom: 10px;
    color: var(--secondary-color);
}

.character-sheet p {
    margin: 5px 0;
}

.character-sheet p strong {
    color: var(--primary-color);
}

/* Game Controls Styling */
.game-controls {
    width: 100%;
    max-width: 960px;
    margin-bottom: 20px;
}

.game-controls .button-container {
    justify-content: center;
}

/* Modal styling */
.modal {
    display: none; /* Hidden by default */
    position: fixed; /* Stay in place on scroll */
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5); /* Semi-transparent background */
    z-index: 1000; /* Higher than other elements */
    justify-content: center;
    align-items: center;
}

/* Modal content box */
.modal-content {
    background-color: white;
    padding: 20px;
    width: 90%;
    max-width: 400px;
    border-radius: 8px;
    text-align: center;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

/* Modal buttons */
.modal-buttons {
    margin-top: 20px;
    display: flex;
    gap: 10px;
    justify-content: center;
}

.modal-button {
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}

.modal-button.confirm {
    background-color: #4CAF50;
    color: white;
}

.modal-button.cancel {
    background-color: #f44336;
    color: white;
}

.btn-confirm {
    background-color: #f44336;
    color: white;
}

.btn-confirm:hover {
    background-color: #d32f2f;
}

.btn-cancel {
    background-color: #ccc;
    color: #333;
}

.btn-cancel:hover {
    background-color: #bbb;
}

/* Button container adjustments */
.game-controls .button-container {
    display: flex;
    gap: 1rem;
    justify-content: center;
}


/* ======================================= */
/*      CHARACTER CREATION PAGE STYLES     */
/* Styles specific to character_creation.html */
/* ======================================= */

/* Character Creation Container */
.character-creation-container {
    width: 100%;
    max-width: 800px;
    padding: 20px;
    margin: 0 auto;
    border: 2px solid #7a4a36;
    border-radius: 10px;
    background-color: rgba(255, 248, 230, 0.9);
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.3);
}

/* Character Creation Form */
.character-form {
    width: 100%;
    margin: 20px 0;
}

/* Specific Form Elements for Character Creation */
.character-form label {
    /* Inherits common label styles */
}

.character-form input[type="text"],
.character-form select {
    /* Inherits common input styles */
}

.character-form input[type="text"]:focus,
.character-form select:focus {
    /* Inherits common focus styles */
}

/* ======================================= */
/*          CONTACT PAGE STYLES            */
/* Styles specific to contact.html         */
/* ======================================= */

/* Contact Container */
.contact-container {
    width: 100%;
    max-width: 800px;
    padding: 20px;
    margin: 0 auto;
    border: 2px solid #7a4a36;
    border-radius: 10px;
    background-color: rgba(255, 248, 230, 0.9);
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.3);
}

/* Contact Form */
.contact-form {
    width: 100%;
    margin: 20px 0;
}

/* Specific Form Elements for Contact Page */
.contact-form label {
    /* Inherits common label styles */
}

.contact-form input[type="text"],
.contact-form input[type="email"],
.contact-form textarea {
    /* Inherits common input styles */
}

.contact-form input[type="text"]:focus,
.contact-form input[type="email"]:focus,
.contact-form textarea:focus {
    /* Inherits common focus styles */
}

/* ======================================= */
/*            ABOUT PAGE STYLES            */
/* Styles specific to about.html           */
/* ======================================= */

/* About Container */
.about-container {
    width: 100%;
    max-width: 800px;
    padding: 20px;
    margin: 0 auto;
    border: 2px solid #7a4a36;
    border-radius: 10px;
    background-color: rgba(255, 248, 230, 0.9);
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.3);
}

.about-container p {
    margin-bottom: 15px;
    font-size: 18px; /* Increased font size for body text */
    color: #2a1d1b;
}

.about-container h2 {
    margin-top: 20px;
    margin-bottom: 10px;
    font-size: 26px; /* Increased font size */
    color: #7a4a36;
}

/* ======================================= */
/*       GAME PREFERENCES PAGE STYLES      */
/* Styles specific to game_preferences.html */
/* ======================================= */

/* Game Preferences Container */
.game-preferences-container {
    width: 100%;
    max-width: 800px;
    padding: 20px;
    margin: 0 auto;
    border: 2px solid #7a4a36;
    border-radius: 10px;
    background-color: rgba(255, 248, 230, 0.9);
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.3);
}

/* Game Preferences Form */
.game-preferences-form {
    width: 100%;
    margin: 20px 0;
}

/* ======================================= */
/*     MANAGE CHARACTERS PAGE STYLES       */
/* Styles specific to manage_characters.html */
/* ======================================= */

.manage-characters-container {
    width: 100%;
    max-width: 1000px;
    padding: 20px;
    margin: 0 auto;
    border: 2px solid #7a4a36;
    border-radius: 10px;
    background-color: rgba(255, 248, 230, 0.9);
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.3);
}

/* Character Table Styling */
.character-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 18px; /* Increased table font size */
    color: #2a1d1b;
}

.character-table thead {
    background-color: #7a4a36;
    color: #fff8e7;
}

.character-table th, .character-table td {
    padding: 10px;
    border: 1px solid #7a4a36;
    text-align: left;
}

.character-table tr:nth-child(even) {
    background-color: rgba(255, 248, 230, 0.6);
}

.character-table tr:hover {
    background-color: rgba(255, 248, 230, 0.8);
}

/* Actions Column Button Container */
.character-table .button-container {
    display: flex;
    gap: 5px;
}

/* Adjust Button Styling for Smaller Buttons */
.character-table .button-container button {
    padding: 5px 10px;
    font-size: 14px;
}

/* Confirmation Dialog for Delete */
.character-table button {
    /* Inherits common button styles */
}

/* ======================================= */
/*       THANK YOU PAGE STYLES             */
/* Styles specific to thank_you.html */
/* ======================================= */

.thank-you-container {
    width: 100%;
    max-width: 800px;
    padding: 20px;
    margin: 0 auto;
    border: 2px solid #7a4a36;
    border-radius: 10px;
    background-color: rgba(255, 248, 230, 0.9);
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.3);
}

/* ======================================= */
/*     MANAGE SAVED GAMES PAGE STYLES      */
/* Styles specific to manage_saved_games.html */
/* ======================================= */

.manage-games-container {
    width: 100%;
    max-width: 1000px;
    padding: 20px;
    margin: 0 auto;
    border: 2px solid var(--primary-color);
    border-radius: 10px;
    background-color: var(--light-background-color);
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.3);
}

/* Game Table Styling */
.game-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 18px; /* Consistent with overall font size */
    color: var(--secondary-color);
}

.game-table thead {
    background-color: var(--primary-color);
    color: #fff8e7;
}

.game-table th, .game-table td {
    padding: 10px;
    border: 1px solid var(--primary-color);
    text-align: left;
}

.game-table tr:nth-child(even) {
    background-color: rgba(255, 248, 230, 0.6);
}

.game-table tr:hover {
    background-color: rgba(255, 248, 230, 0.8);
}

/* Button Container for Actions */
.game-table .button-container {
    display: flex;
    gap: 10px;
}

/* Button Adjustments for Game Actions */
.game-table button {
    padding: 8px 12px;
    font-size: 16px;
    border: 2px solid var(--primary-color);
    border-radius: 5px;
    background-color: var(--primary-color);
    color: #fff8e7;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.game-table button:hover {
    background-color: var(--secondary-color);
}

/* Responsive Design */
@media screen and (max-width: 768px) {
    .manage-games-container {
        padding: 15px;
    }

    .game-table th, .game-table td {
        font-size: 16px;
        padding: 8px;
    }

    .game-table button {
        font-size: 14px;
        padding: 6px 10px;
    }
}

/* ======================================= */
/*    LLM CONFIGURATION PAGE STYLES        */
/* Styles specific to llm_config.html      */
/* ======================================= */

/* Main Container for LLM Configuration */
.llm-config-container {
    width: 100%;
    max-width: 700px;
    padding: 20px;
    margin: 0 auto;
    border: 2px solid var(--primary-color);
    border-radius: 10px;
    background-color: var(--light-background-color);
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.3);
}

/* Form Styling */
.llm-config-container form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.llm-config-container label {
    font-size: 18px;
    color: var(--secondary-color);
    font-weight: bold;
}

.llm-config-container select {
    font-size: 16px;
    padding: 10px;
    border: 2px solid var(--primary-color);
    border-radius: 5px;
    background-color: #fff8e7;
    color: var(--secondary-color);
}

/* Success Alert Styling */
.alert-success {
    display: none; /* Initially hidden */
    padding: 15px;
    margin-top: 20px;
    border: 2px solid var(--primary-color);
    background-color: #d4e6d6; /* Light green background for success */
    color: #2e6e2f; /* Darker green text */
    border-radius: 5px;
    font-size: 18px;
    text-align: center;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

/* Success Button */
.llm-config-container button[type="submit"] {
    align-self: center;
    width: 50%;
    background-color: var(--primary-color);
    color: #fff8e7;
    padding: 12px;
    font-size: 18px;
    font-weight: bold;
    border-radius: 5px;
    transition: background-color 0.3s ease;
}

.llm-config-container button[type="submit"]:hover {
    background-color: var(--secondary-color);
}

.alert-success {
    color: #155724;
    background-color: #d4edda;
    border-color: #c3e6cb;
    padding: 10px 15px;
    margin-top: 15px;
    border-radius: 5px;
    font-size: 18px;
    text-align: center;
    font-weight: bold;
}
