/* General styles */
html, body {
    height: 100%;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
}

body {
    width: 100%;
    font-family: Arial, sans-serif;
    background-color: #000;
    background-size: cover;
    background-position: center;
    color: #fff;
    display: flex;
    flex-direction: column;
}

h5 {
    font-size: 2.5em;
    color: #ffd700;
    margin-bottom: 20px;
    font-family: 'Space', Arial, sans-serif;
    font-size: 2.5rem;
    margin: 0.2rem 0;
    padding: 1%;
    text-shadow: 2px 2px 5px rgba(0, 0, 0, 0.7);
    white-space: nowrap;
}

/* Font faces */
@font-face {
    font-family: 'Castle';
    src: url('font/Castle.woff2') format('woff2'), 
         url('font/Castle.woff') format('woff'); 
    font-display: swap;
}

@font-face {
    font-family: 'Neb';
    src: url('font/NebulousRegular.woff2') format('woff2'), 
         url('font/NebulousRegular.woff') format('woff'); 
    font-display: swap;
}

@font-face {
    font-family: 'Space';
    src: url('font/Space.woff2') format('woff2'), 
         url('font/Space.woff') format('woff'); 
    font-display: swap;
}

@font-face {
    font-family: 'FantasyFont';
    src: url('font/NightMare.woff2') format('woff2'), 
         url('font/NightMare.woff') format('woff'); 
    font-display: swap;
}

/* Common container styles */
.header, .nav, .main-content, .footer {
    width: 100%;
}

/* Header styles */
.header {
    background-image: url('/images/banner.webp');
    background-size: cover;
    background-position: center;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 1rem;
    margin: 0 auto;
    min-height: 340px;
}

.header-content {
    max-width: 700px;
    text-shadow: 2px 2px 5px rgba(0, 0, 0, 0.7);
    background: rgba(0, 0, 0, 0.5);
    padding: 1rem;
    border-radius: 10px;
}

.header .line {
    width: 100%;
    border-bottom: 1px solid #fff;
    margin: 0.5rem 0;
}

.header h1, .header h4 {
    font-family: 'Neb', Arial, sans-serif;
    font-size: 0.8rem;
    margin: 0.2rem 0;
    position: relative;
    text-shadow: 2px 2px 5px rgba(0, 0, 0, 0.7);
}

.header h1:before, .header h1:after, .header h4:before, .header h4:after {
    content: '';
    position: absolute;
    top: 50%;
    width: 30%;
    height: 1px;
    background: #fff;
}

.header h1:before, .header h4:before {
    left: 0%;
}

.header h1:after, .header h4:after {
    right: 0%;
}

.header h2 {
    font-family: 'Space', Arial, sans-serif;
    font-size: 2.5rem;
    margin: 0.2rem 0;
    padding: 1%;
    text-shadow: 2px 2px 5px rgba(0, 0, 0, 0.7);
    white-space: nowrap;
}

.header p {
    font-size: 0.9rem;
    margin: 0.2rem 0;
    line-height: 1.4;
    text-shadow: 2px 2px 5px rgba(0, 0, 0, 0.7);
}

.header p2 {
    font-size: 0.9rem;
    margin: 0.2rem 0;
    line-height: 1.4;
    text-shadow: 2px 2px 5px rgba(0, 0, 0, 0.7);
}

p2 {
    font-size: 0.9rem;
    margin: 0.2rem 0;
    line-height: 1.4;
    text-shadow: 2px 2px 5px rgba(0, 0, 0, 0.7);
}

/* Navbar styles */
.nav {
    background-color: rgba(0, 0, 0, 0.7);
    padding: 1rem;
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: nowrap;
    border-bottom: 1px solid #B0B1AA;
    box-sizing: border-box;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    position: relative;
    z-index: 1000;
}

.nav a {
    color: #fff;
    text-decoration: none;
    font-size: 1.2rem;
    font-family: Arial, serif;
    padding: 0.5rem 1rem;
    border-radius: 5px;
    transition: background-color 0.3s;
    white-space: nowrap;
}

.nav a:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

/* Scrollbar styles */
.nav::-webkit-scrollbar {
    height: 8px;
}

.nav::-webkit-scrollbar-thumb {
    background: #444 !important;
    border-radius: 10px !important;
}

.nav::-webkit-scrollbar-track {
    background: #222 !important;
    border-radius: 10px !important;
}

/* Main content styles */
.main-content {
    max-width: 900px;
    margin: 2rem auto;
    padding: 2rem;
    background: #141C27;
    border-radius: 15px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
    position: relative;
    color: #929292;
    background-size: cover;
    background-blend-mode: multiply;
    flex: 1;
    width: calc(100% - 4rem);
    box-sizing: border-box;
}

.main-content:before, .main-content:after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(to right, rgba(165, 161, 149, 0), #A5A195, rgba(165, 161, 149, 0));
}

.main-content:after {
    bottom: 0;
}

.main-content h1 {
    font-family: 'Space', serif;
    font-size: 2.5rem;
    margin-bottom: 1rem;
    text-align: center;
}

.main-content p {
    font-size: 1.2rem;
    line-height: 1.8;
    text-align: justify;
}

/* Footer styles */
.footer {
    background-image: url('/images/footer.webp');
    background-size: cover;
    background-position: center;
    text-align: center;
    padding: 1rem;
    color: #979ca0;
    position: relative;
    bottom: 0;
    top: 20px;
    left: 0;
    height: 150px;
}

footer p {
    margin: 0;
    padding: 0.5rem;
    position: absolute;
    bottom: 0;
    width: 100%;
}

.footer a {
    color: #e0c18d; 
    text-decoration: none;
    font-size: 1rem;
    font-family: 'Merriweather', serif; 
    padding: 0.3rem 0.6rem;
    border-radius: 5px;
    transition: color 0.3s, background-color 0.3s;
    white-space: nowrap;
}

.footer a:hover {
    color: #fff;
    background-color: rgba(224, 193, 141, 0.2); 
    text-shadow: 0px 0px 5px rgba(224, 193, 141, 0.8); 
}


/* Login styles */
.login-container {
    text-align: center;
    margin-top: 100px;
}

.login-container h1 {
    font-size: 2rem;
    margin-bottom: 20px;
}

.login-button, .logout-button {
    background-color: #141C27;
    color: #929292;
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 5px;
    font-size: 1rem;
    cursor: pointer;
    margin-top: 1rem;
    text-decoration: none;
    display: inline-block;
}

.login-button:hover, .logout-button:hover {
    background-color: #2A323D;
}

/* User menu styles */
.user-menu {
    position: absolute;
    top: 0;
    left: 0;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
    z-index: 1000 !important;
}

.dropdown {
    position: relative;
    display: inline-block;
}

.dropbtn {
    background-color: #141C27;
    color: #929292;
    padding: 10px;
    font-size: 16px;
    border: none;
    cursor: pointer;
    border-radius: 0 0 10px 10px;
}

.dropdown-content {
    display: none;
    position: absolute;
    left: 0;
    top: 100%;
    background-color: #141C27;
    min-width: 160px;
    box-shadow: 0px 8px 16px 0px rgba(0, 0, 0, 0.2);
    z-index: 1001; /* Ensure dropdowns appear above all other elements */
    border-radius: 5px;
}

.dropdown-content a {
    color: #929292;
    padding: 12px 16px;
    text-decoration: none;
    display: block;
    border-bottom: 1px solid #444;
}

.dropdown-content a:hover {
    background-color: #2A323D;
}

.dropdown:hover .dropdown-content {
    display: block;
}

.dropdown:hover .dropbtn {
    background-color: #2A323D;
}

/* Image and card styles */
.npc-image, .character-avatar {
    width: 100%;
    max-width: 300px;
    height: auto;
    margin: 0 auto 1rem;
    display: block;
    border-radius: 10px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
}

.character-card {
    border: 1px solid #555;
    border-radius: 10px;
    padding: 1rem;
    margin: 1rem;
    text-align: center;
    background: #141C27;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
    display: inline-block;
    width: 200px;
}

.character-card h2 {
    color: #fff;
    font-size: 1.2rem;
    margin-top: 0.5rem;
}

.character-card button, .character-card a.button {
    background-color: #555;
    color: #fff;
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 5px;
    font-size: 1rem;
    cursor: pointer;
    margin-top: 1rem;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.character-card button:hover, .character-card a.button:hover {
    background-color: #777;
}

/* Avatar styles */
.avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    margin-right: 10px;
}

/* Selected character styles */
.selected-character {
    text-align: center;
    margin-top: 1rem;
}

.selected-character .avatar {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    display: block;
    margin: 0 auto;
}

.selected-character h3 {
    margin-top: 0.5rem;
    font-size: 1.5rem;
    color: #fff;
}

.switch-character {
    display: inline-block;
    margin-top: 0.5rem;
    color: #e4d8b5;
    text-decoration: none;
    font-size: 1rem;
    padding: 0.5rem 1rem;
    background-color: rgba(0, 0, 0, 0.473);
    border-radius: 5px;
    transition: background-color 0.3s;
}

.switch-character:hover {
    background-color: rgba(214, 192, 125, 0.2);
}
















/* Navbar styles */
.fantasy-navbar {
    background: url('/images/navbar-background.webp') no-repeat center center;
    background-size: cover;
    padding: 0;
    text-align: center;
    position: relative;
    border: 1px solid #888;
    border-radius: 10px;
    margin-bottom: 20px;
    font-family: 'FantasyFont', Arial, sans-serif;
    width: 100%;
    box-sizing: border-box;
    overflow: visible; /* Ensure dropdowns are visible */
}

.fantasy-navbar ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    justify-content: center;
    align-items: center;
}

.fantasy-navbar ul li {
    position: relative;
    margin: 0 15px;
}

.fantasy-navbar ul li a {
    text-decoration: none;
    color: #fff;
    font-family: 'FantasyFont', Arial, sans-serif;
    font-size: 1.2rem;
    padding: 10px 20px;
    border-radius: 5px;
    transition: background-color 0.3s, color 0.3s;
    display: block;
    text-align: center; /* Center the text */
}

.fantasy-navbar ul li a:hover {
    background-color: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.fantasy-navbar ul li ul.dropdown-content {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background-color: rgba(0, 0, 0, 0.8);
    padding: 0;
    list-style: none;
    border: 1px solid #888;
    border-radius: 5px;
    z-index: 1001; /* Ensure dropdowns appear above all other elements */
    width: 100%; /* Ensure the dropdown has a minimum width */
}

.fantasy-navbar ul li:hover ul.dropdown-content {
    display: block;
}

.fantasy-navbar ul li ul.dropdown-content li {
    margin: 0;
    width: 100%; /* Ensure the items take full width of the dropdown */
}

.fantasy-navbar ul li ul.dropdown-content li a {
    padding: 10px 20px;
    display: block;
    white-space: nowrap;
    border-bottom: 1px solid #888;
    background-color: transparent; /* Ensure the background is transparent */
    width: 100%; /* Ensure the links take full width of the item */
    box-sizing: border-box;
}

.fantasy-navbar ul li ul.dropdown-content li a:last-child {
    border-bottom: none;
}

.fantasy-navbar ul li ul.dropdown-content li a:hover {
    background-color: rgba(255, 255, 255, 0.1);
    color: #fff;
}












.avatar-group {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 20px;
}
.avatar-preview img {
    width: 150px;
    height: 150px;
    border-radius: 10px;
    margin-right: 20px;
    object-fit: cover;
}
.form-container {
    display: flex;
    flex-direction: column;
}
.form-group {
    margin-bottom: 15px;
    text-align: left;
}
.form-group label {
    display: block;
    color: #FFD700;
}
.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 10px;
    border-radius: 5px;
    border: 1px solid #ddd;
    background: rgba(0, 0, 0, 0.8);
    color: white;
}
.form-group input[readonly] {
    background: rgba(0, 0, 0, 0.5);
}
.btn-green, .btn-red, .btn-blue {
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    color: white;
    border: none;
}
.btn-green {
    background-color: #4C9D41;
}
.btn-red {
    background-color: #B63323;
}
.btn-blue {
    background-color: #6AB3C8;
}
.guild-card {
    width: 100%;
    background: rgba(0, 0, 0, 0.7);
    border-radius: 15px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
    padding: 20px;
    margin-bottom: 20px;
    text-align: left;
}
.guild-card img {
    width: 50px;
    height: 50px;
    border-radius: 10px;
    object-fit: cover;
}
.guild-card table {
    width: 100%;
    margin-bottom: 20px;
}
.guild-card th, .guild-card td {
    padding: 10px;
    text-align: left;
    border-bottom: 1px solid #444;
}
.guild-card th {
    background: #444;
    color: #FFD700;
}
.permissions-container {
    display: flex;
    flex-direction: column;
}
.permission-item {
    margin-bottom: 5px;
}
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.8);
}
.modal-content {
    background-color: #2c3e50;
    margin: 100px auto;
    padding: 20px;
    border: 1px solid #888;
    width: 80%;
    max-width: 500px;
    color: white;
    border-radius: 10px;
}
.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
}
.close:hover,
.close:focus {
    color: white;
    text-decoration: none;
    cursor: pointer;
}
.checkbox-container {
    display: flex;
    align-items: center;
}
.checkbox-container input {
    margin-right: 10px;
}
.btn-disable {
    background-color: grey;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: not-allowed;
}
.btn-enable {
    background-color: red;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
}
.bottom-right-buttons {
    position: absolute;
    bottom: 20px;
    right: 20px;
    display: flex;
    gap: 10px;
}
.member-list li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 5px 0;
}
.member-list li span {
    flex: 1;
}
.styled-button {
    padding: 5px 10px;
    background: #4C9D41;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}
.styled-button:hover {
    background: #6AB3C8;
}

/* Responsive Design */
@media (max-width: 768px) {
    .help-section {
        padding: 1rem;
    }

    .npc-image {
        max-width: 100%;
    }

    .help-section p {
        font-size: 1rem;
    }

    .header {
        height: auto;
        padding: 2rem 1rem;
    }

    .header-content {
        padding: 0.5rem;
    }

    .header h1 {
        font-size: 0.6rem;
    }

    .header h2 {
        font-size: 1.8rem;
    }

    .header p {
        font-size: 0.8rem;
    }

    .nav {
        justify-content: flex-start;
        padding: 0.5rem;
    }

    .nav a {
        font-size: 1rem;
        padding: 0.5rem;
    }

    .main-content {
        padding: 1rem;
        margin: 1rem;
    }

    .fantasy-navbar ul {
        flex-direction: row;
        justify-content: flex-start;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        white-space: nowrap;
    }

    .fantasy-navbar ul li {
        margin: 0 10px;
    }
}


.avatar-group {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 20px;
}
.avatar-preview img {
    width: 150px;
    height: 150px;
    border-radius: 10px;
    margin-right: 20px;
    object-fit: cover;
}
.form-container {
    display: flex;
    flex-direction: column;
}
.form-group {
    margin-bottom: 15px;
    text-align: left;
}
.form-group label {
    display: block;
    color: #FFD700;
}
.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 10px;
    border-radius: 5px;
    border: 1px solid #ddd;
    background: rgba(0, 0, 0, 0.8);
    color: white;
}
.form-group input[readonly] {
    background: rgba(0, 0, 0, 0.5);
}
.btn-green, .btn-red, .btn-blue {
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    color: white;
    border: none;
}
.btn-green {
    background-color: #4C9D41;
}
.btn-red {
    background-color: #B63323;
}
.btn-blue {
    background-color: #6AB3C8;
}
.guild-card {
    width: 100%;
    background: rgba(0, 0, 0, 0.7);
    border-radius: 15px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
    padding: 20px;
    margin-bottom: 20px;
    text-align: left;
}
.guild-card img {
    width: 50px;
    height: 50px;
    border-radius: 10px;
    object-fit: cover;
}
.guild-card table {
    width: 100%;
    margin-bottom: 20px;
}
.guild-card th, .guild-card td {
    padding: 10px;
    text-align: left;
    border-bottom: 1px solid #444;
}
.guild-card th {
    background: #444;
    color: #FFD700;
}
.permissions-container {
    display: flex;
    flex-direction: column;
}
.permission-item {
    margin-bottom: 5px;
}
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.8);
}
.modal-content {
    background-color: #2c3e50;
    margin: 100px auto;
    padding: 20px;
    border: 1px solid #888;
    width: 80%;
    max-width: 500px;
    color: white;
    border-radius: 10px;
}
.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
}
.close:hover,
.close:focus {
    color: white;
    text-decoration: none;
    cursor: pointer;
}
.checkbox-container {
    display: flex;
    align-items: center;
}
.checkbox-container input {
    margin-right: 10px;
}
.btn-disable {
    background-color: grey;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: not-allowed;
}
.btn-enable {
    background-color: red;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
}
.bottom-right-buttons {
    position: absolute;
    bottom: 20px;
    right: 20px;
    display: flex;
    gap: 10px;
}
.member-list li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 5px 0;
}
.member-list li span {
    flex: 1;
}
.styled-button {
    padding: 5px 10px;
    background: #4C9D41;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}
.styled-button:hover {
    background: #6AB3C8;
}

/* Responsive Design */
@media (max-width: 768px) {
    .help-section {
        padding: 1rem;
    }

    .npc-image {
        max-width: 100%;
    }

    .help-section p {
        font-size: 1rem;
    }

    .header {
        height: auto;
        padding: 2rem 1rem;
    }

    .header-content {
        padding: 0.5rem;
    }

    .header h1 {
        font-size: 0.6rem;
    }

    .header h2 {
        font-size: 1.8rem;
    }

    .header p {
        font-size: 0.8rem;
    }

    .nav {
        justify-content: flex-start;
        padding: 0.5rem;
    }

    .nav a {
        font-size: 1rem;
        padding: 0.5rem;
    }

    .main-content {
        padding: 1rem;
        margin: 1rem;
    }

    .fantasy-navbar ul {
        flex-direction: row;
        justify-content: flex-start;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        white-space: nowrap;
    }

    .fantasy-navbar ul li {
        margin: 0 10px;
    }
}
