/* General Styles */
body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    background: url('/images/background-desktop.jpg') no-repeat center center fixed;
    background-size: cover;
    color: white;
    display: flex;
    flex-direction: column;
}

/* Mobile Background */
@media only screen and (max-width: 767px) {
    body {
        background: url('/images/background-mobile.jpg') no-repeat center center fixed;
        background-size: cover;
    }
}

/* Tablet Background */
@media only screen and (min-width: 768px) and (max-width: 1024px) {
    body {
        background: url('/images/background-tablet.jpg') no-repeat center center fixed;
        background-size: cover;
    }
}

/* HEADER */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(0, 0, 0, 0.7);
    padding: 15px;
}

.logo img {
    display: block;
    max-width: 100%;
    height: auto;
}

/* Default size for desktops */
@media (min-width: 1025px) {
    .logo img {
        max-width: 200px;
    }
}

/* Tablet view */
@media (max-width: 1024px) {
    .logo img {
        max-width: 100px;
    }
}

/* Mobile view */
@media (max-width: 767px) {
    .logo img {
        max-width: 80px;
    }
}

/* NAVIGATION MENU */
nav {
    position: relative;
    background: none; /*Removes the parchment background */
    background-size: cover;
    padding: 10px 0;
    box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.3);
}

/* Tablet Navigation */
@media only screen and (max-width: 1024px) {
    nav {
        background: url('/images/parchment-tablet.jpg') no-repeat center center;
        background-size: cover;
    }
}

/* Mobile Navigation */
@media only screen and (max-width: 767px) {
    nav {
        background: url('/images/parchment-mobile.jpg') no-repeat center center;
        background-size: cover;
    }
}

.nav-links {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
}

.nav-links li {
    margin: 0 10px;
}

/* Parchment Buttons */
.nav-links li a {
    display: flex;
    align-items: center;
    background: url('/images/parchment-icon.jpg') no-repeat center center;
    background-size: cover;
    padding: 12px 20px;
    border-radius: 10px;
    text-decoration: none;
    font-size: 18px;
    font-weight: bold;
    color: #2a1a04; /* Dark Brown */
    box-shadow: 3px 3px 5px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease-in-out;
}

/* Navigation Icons - Desktop */
.nav-links a img {
    width: 64px;
    height: 64px;
}

/* Specific Icon Assignments for Desktop */
.nav-links a[href="index.php"] img {
    content: url('/images/icons/home-desktop.png');
}
.nav-links a[href="story.php"] img {
    content: url('/images/icons/story-desktop.png');
}
.nav-links a[href="game_faqs.php"] img {
    content: url('/images/icons/faq-desktop.png');
}
.nav-links a[href="my_character.php"] img {
    content: url('/images/icons/character-desktop.png');
}

/* Tablet */
@media (max-width: 1024px) {
    .nav-links a img {
        width: 48px;
        height: 48px;
    }

    .nav-links a[href="index.php"] img {
        content: url('/images/icons/home-tablet.png');
    }
    .nav-links a[href="story.php"] img {
        content: url('/images/icons/story-tablet.png');
    }
    .nav-links a[href="game_faqs.php"] img {
        content: url('/images/icons/faq-tablet.png');
    }
    .nav-links a[href="my_character.php"] img {
        content: url('/images/icons/character-tablet.png');
    }
}

/* Mobile */
@media (max-width: 767px) {
    .nav-links a img {
        width: 32px;
        height: 32px;
    }

    .nav-links a[href="index.php"] img {
        content: url('/images/icons/home-mobile.png');
    }
    .nav-links a[href="story.php"] img {
        content: url('/images/icons/story-mobile.png');
    }
    .nav-links a[href="game_faqs.php"] img {
        content: url('/images/icons/faq-mobile.png');
    }
    .nav-links a[href="my_character.php"] img {
        content: url('/images/icons/character-mobile.png');
    }
}

/* HOVER SHAKE ANIMATION */
.nav-links li a:hover {
    animation: shake 0.3s ease-in-out infinite;
}

@keyframes shake {
    0% { transform: translateX(0px); }
    25% { transform: translateX(-3px); }
    50% { transform: translateX(3px); }
    75% { transform: translateX(-3px); }
    100% { transform: translateX(3px); }
}

/* Mobile Menu */
.menu-toggle {
    display: none;
    font-size: 24px;
    cursor: pointer;
    color: white;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .menu-toggle {
        display: block;
    }

    .nav-links {
        display: none;
        flex-direction: column;
        background: rgba(0, 0, 0, 0.8);
        position: absolute;
        top: 60px;
        right: 0;
        width: 200px;
        padding: 10px;
        border-radius: 10px;
    }

    .nav-links li {
        margin: 10px 0;
        text-align: center;
    }

    .nav-links a {
        display: block;
    }
}

/* MAIN CONTENT */
main {
    text-align: center;
    padding: 50px 20px;
    flex: 1;
}

/* Hero Section */
.hero {
    background: rgba(0, 0, 0, 0.5);
    padding: 40px;
    border-radius: 10px;
}

.hero h1 {
    font-size: 36px;
}

.hero p {
    font-size: 18px;
    margin: 20px 0;
}

.cta-button {
    background: #ff9800;
    color: white;
    text-decoration: none;
    padding: 12px 25px;
    font-size: 20px;
    border-radius: 5px;
    display: inline-block;
    margin-top: 10px;
}

/* Trailer Section */
.trailer {
    margin-top: 50px;
}

.trailer video {
    width: 80%;
    max-width: 800px;
    border-radius: 10px;
}

/* STORY PAGE STYLING */
.story-container {
    text-align: left;
    max-width: 800px;
    margin: 50px auto;
    padding: 20px;
    background: rgba(0, 0, 0, 0.7);
    border-radius: 10px;
    color: white;
}

.story-container h1 {
    font-size: 32px;
    margin-bottom: 15px;
}

.story-image {
    width: 100%;
    max-width: 600px;
    border-radius: 10px;
    margin: 20px 0;
}

/* PAGINATION STYLING */
.pagination {
    display: flex;
    justify-content: space-between;
    margin-top: 20px;
}

.prev-button, .next-button {
    background: #ff9800;
    color: white;
    padding: 10px 20px;
    text-decoration: none;
    border-radius: 5px;
    font-weight: bold;
}

.prev-button:hover, .next-button:hover {
    background: #e68900;
}

/* Game Overview Section */
.game-overview {
    background: rgba(0, 0, 0, 0.7);
    padding: 20px;
    border-radius: 10px;
    margin: 20px;
}

.game-overview h1, h2 {
    color: #ffcc00;
}


/* Player Class Selection Section */
.class-selection {
    text-align: center;
    padding: 40px 20px;
    background: rgba(0, 0, 0, 0.7);
    border-radius: 10px;
    margin: 20px auto;
    max-width: 900px;
}

.class-selection h2 {
    font-size: 28px;
    color: #ffcc00;
}

.class-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
    margin-top: 20px;
}

.class-card {
    background: rgba(255, 255, 255, 0.1);
    padding: 20px;
    border-radius: 10px;
    text-align: center;
    width: 180px;
    transition: transform 0.3s ease-in-out;
}

.class-card img {
    width: 80px;
    height: 80px;
    margin-bottom: 10px;
}

.class-card h3 {
    color: #ffcc00;
    font-size: 20px;
    margin-bottom: 5px;
}

.class-card p {
    font-size: 14px;
    color: white;
}

.class-card:hover {
    transform: scale(1.05);
    background: rgba(255, 255, 255, 0.2);
}

/* Responsive Design */
@media (max-width: 768px) {
    .class-container {
        flex-direction: column;
        align-items: center;
    }

    .class-card {
        width: 90%;
    }
}


/* AGE & GENDER SELECTION */
.age-gender-selection {
    text-align: center;
    padding: 50px 20px;
    background: rgba(0, 0, 0, 0.7);
    border-radius: 10px;
    margin: 20px auto;
    max-width: 900px;
}

.age-gender-selection h2 {
    font-size: 28px;
    margin-bottom: 20px;
    color: #ffcc00;
}

/* Gender & Age Containers */
.gender-container, .age-container {
    margin-bottom: 30px;
}

.gender-container h3, .age-container h3 {
    font-size: 24px;
    margin-bottom: 15px;
    color: #ff9800;
}

/* Grid Layout */
.gender-grid, .age-grid {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 20px;
}

/* Individual Gender & Age Items */
.gender-item, .age-item {
    background: rgba(255, 255, 255, 0.1);
    padding: 15px;
    border-radius: 10px;
    text-align: center;
    width: 200px;
    transition: transform 0.3s ease-in-out, box-shadow 0.3s ease-in-out;
    cursor: pointer;
}

/* Hover Effects */
.gender-item:hover, .age-item:hover {
    transform: scale(1.1);
    box-shadow: 0px 0px 15px rgba(255, 204, 0, 0.8);
}

/* Image Styling */
.gender-item img, .age-item img {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    margin-bottom: 10px;
    transition: transform 0.3s ease-in-out;
}

/* Image Hover Effect */
.gender-item:hover img, .age-item:hover img {
    
}

/* Text Styling */
.gender-item p, .age-item p {
    font-size: 16px;
    color: white;
    margin: 5px 0;
}



/* FAQ SECTION (FIXED COLLAPSIBLE ISSUE) */
.faq-section {
    margin: 20px;
}

/* FAQ Search */
#faqSearch {
    width: 50%;
    padding: 10px;
    margin-bottom: 15px;
    border: 2px solid #ffcc00;
    border-radius: 5px;
    font-size: 16px;
}

/* FAQ Container */
.faq-container {
    max-width: 800px;
    margin: auto;
}

/* FAQ Items */
.faq-item {
    margin-bottom: 10px;
}

/* Collapsible FAQ Button */
.faq-question {
    background-color: #ff9800;
    color: white;
    cursor: pointer;
    padding: 12px;
    width: 100%;
    border: none;
    text-align: left;
    outline: none;
    font-size: 18px;
    transition: background-color 0.3s ease-in-out;
    border-radius: 5px;
    font-weight: bold;
    display: block;
}

/* Active State */
.faq-question.active {
    background-color: #e68900;
}

/* FAQ Answer (Hidden by Default) */
.faq-answer {
    display: none;
    padding: 10px;
    background-color: #333;
    color: white;
    border-radius: 5px;
    margin-top: 5px;
}
/* Opened FAQ Answer */
.faq-answer.show {
    max-height: 500px; /* Adjust height if needed */
    padding: 10px;
}

/* Footer styling */
footer {
    width: 100%;
    background-color: #222; /* Adjust as needed */
    color: white;
    text-align: center;
    padding: 15px 0;
    position: relative;
    bottom: 0;
    left: 0;
}

/* Prevents the footer from being stuck inside another container */
.character-overview-container {
    overflow: visible; /* Ensures it doesn't cut off the footer */
}

/* Ensure the body expands to push the footer down */
html, body {
    height: 100%;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
}

/* Push the content down so the footer is always at the bottom */
.character-overview-container {
    flex: 1; /* This makes sure the content pushes the footer down */
}

.footer-wrapper {
    width: 100%;
    clear: both;
    position: relative;
    z-index: 100;
}

footer {
    width: 100%;
    background-color: #222;
    color: white;
    text-align: center;
    padding: 15px 0;
    position: relative;
}


/*************************************
  MY CHARACTER PAGE STYLING
*************************************/

/* ✅ Scope to prevent conflicts */
.character-overview-container {
    max-width: 900px;
    margin: 50px auto;
    padding: 20px;
    background: rgba(0, 0, 0, 0.7);
    border-radius: 10px;
    color: white;
    text-align: center;
}

/* ✅ Profile Picture Styling */
.profile-picture-container {
    text-align: center;
    margin-bottom: 20px;
}

.profile-picture {
    width: 220px;
    height: 220px;
    border-radius: 50%;
    border: 3px solid #ffcc00;
    object-fit: cover;
}

/* ✅ Profile Upload Button */
.upload-form {
    margin-top: 10px;
}

.upload-form input[type="file"] {
    display: none;
}

.upload-label {
    display: inline-block;
    background: #ff9800;
    color: white;
    padding: 8px 15px;
    border-radius: 5px;
    cursor: pointer;
    font-weight: bold;
    transition: background 0.3s ease-in-out;
}

.upload-label:hover {
    background: #e68900;
}

/* ✅ Character Info Section */
.character-details {
    background: rgba(255, 255, 255, 0.1);
    padding: 15px;
    border-radius: 10px;
    margin-bottom: 20px;
}

.character-details p {
    font-size: 18px;
    margin: 8px 0;
}

/* ✅ Player Stats Section */
.character-stats {
    background: rgba(255, 255, 255, 0.1);
    padding: 15px;
    border-radius: 10px;
    margin-bottom: 20px;
}

/* ✅ Stat Bars */
.stat-bar {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 5px;
    width: 100%;
    height: 20px;
    margin-bottom: 8px;
    position: relative;
    overflow: hidden;
}

.stat-bar span {
    display: block;
    height: 100%;
    width: 100%;
    text-align: center;
    line-height: 20px;
    font-size: 14px;
    font-weight: bold;
    color: black;
}

/* ✅ Color Codes for Stat Bars */
.health-bar span {
    background: #e60000;
}
.stamina-bar span {
    background: #ffcc00;
}
.hunger-bar span {
    background: #008000;
}
.thirst-bar span {
    background: #1e90ff;
}

/* ✅ Inventory Section */
/* Make each inventory list item a flex container */
.inventory li {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding: 10px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    margin-bottom: 8px;
}

/* Style the buttons container on the left */
.item-buttons {
    display: flex;
    gap: 5px; /* Adjust spacing between buttons if needed */
    margin-right: 15px; /* Space between buttons and item info */
}

/* Style the item info container */
.item-info {
    display: flex;
    align-items: center;
}

/* Style the quantity to have space before the item name */
.item-qty {
    font-weight: bold;
    margin-right: 10px; /* Space between quantity and item name */
}

/* (Optional) Ensure buttons look consistent */
.consume-btn,
.transfer-button {
    background: #ff9800;
    color: white;
    padding: 6px 12px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-weight: bold;
    transition: background 0.3s ease-in-out;
}

.consume-btn:hover,
.transfer-button:hover {
    background: #e68900;
}
/* ✅ Quest Log & Game Completion */
.game-completion,
.quest-log,
.badges {
    background: rgba(255, 255, 255, 0.1);
    padding: 15px;
    border-radius: 10px;
    margin-bottom: 20px;
}

.game-completion p,
.quest-log p,
.badges p {
    font-size: 16px;
    margin: 5px 0;
}

/* ✅ Logout Button */
.logout-button {
    background: red;
    color: white;
    padding: 10px 20px;
    text-decoration: none;
    border-radius: 5px;
    font-weight: bold;
    display: inline-block;
    margin-top: 20px;
    transition: background 0.3s ease-in-out;
}

.logout-button:hover {
    background: darkred;
}

/* ✅ RESPONSIVE DESIGN */
@media (max-width: 768px) {
    .character-overview-container {
        padding: 15px;
    }

    .profile-picture {
        width: 200px;
        height: 200px;
    }

    .consume-btn, .transfer-button {
        padding: 5px 10px;
        font-size: 14px;
    }

    .logout-button {
        padding: 8px 15px;
        font-size: 14px;
    }
}

/* Login Page Container */
.login-container {
    max-width: 400px;
    margin: 100px auto;  /* Centers the container and adds vertical spacing */
    padding: 20px;
    background: rgba(0, 0, 0, 0.7);  /* Matches your other content containers */
    border-radius: 10px;
    text-align: center;
    color: white;
}

/* Login Heading */
.login-container h2 {
    font-size: 28px;
    color: #ffcc00;
    margin-bottom: 20px;
}

/* Form Labels */
.login-container label {
    display: block;
    margin-bottom: 5px;
    font-size: 18px;
    text-align: left;
}

/* Form Inputs */
.login-container input[type="text"],
.login-container input[type="password"] {
    width: 100%;
    padding: 8px;
    margin-bottom: 15px;
    border: none;
    border-radius: 5px;
}

/* Submit Button */
.login-container input[type="submit"] {
    background: #ff9800;
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 18px;
    transition: background 0.3s ease-in-out;
}

.login-container input[type="submit"]:hover {
    background: #e68900;
}

/* Error Message Styling */
.error-message {
    color: #ff4444;
    margin-bottom: 15px;
    font-weight: bold;
}


.upload-form input[type="file"] {
    opacity: 0;
    position: absolute;
    left: -9999px;
}

/* Style for the custom label acting as the file selector */
.upload-label {
    display: inline-block;
    background: #ff9800;
    color: white;
    padding: 8px 15px;
    border-radius: 5px;
    cursor: pointer;
    font-weight: bold;
    transition: background 0.3s ease-in-out;
    margin-right: 10px; /* Optional spacing between label and submit */
}

.upload-label:hover {
    background: #e68900;
}

/* Style for the submit button */
.upload-submit {
    background: #ff9800;
    color: white;
    padding: 8px 15px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-weight: bold;
    transition: background 0.3s ease-in-out;
}

.upload-submit:hover {
    background: #e68900;
}


.item-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.item-icon {
    width: 64px; /* Adjust to desired size */
    height: 64px;
    object-fit: contain;
    border-radius: 10px; /* Rounded corners */
    transition: transform 0.2s ease-in-out;
}

/* Ensure responsiveness */
@media (max-width: 768px) {
    .item-icon {
        width: 48px; /* Smaller size for mobile */
        height: 48px;
    }
}

/* Hover effect */
.item-icon:hover {
    transform: scale(1.1); /* Slight zoom effect on hover */
}