 
body {
    font-family: Arial, sans-serif;
    margin: 0;
    background-color: #f4f4f4;
    color: #333;
}

.container {
    max-width: 960px;
    margin: 20px auto;
    padding: 20px;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.status-box {
    padding: 15px;
    margin-top: 20px;
    border-radius: 5px;
}

.success {
    color: #155724;
    background-color: #d4edda;
    border: 1px solid #c3e6cb;
    padding: 10px;
    border-radius: 4px;
}

.error {
    color: #721c24;
    background-color: #f8d7da;
    border: 1px solid #f5c6cb;
    padding: 10px;
    border-radius: 4px;
}


/* Quest List Styling */
.quest-list {
    margin-top: 30px;
}

.quest-item {
    background-color: #f9f9f9;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    transition: box-shadow 0.3s ease;
}

.quest-item:hover {
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.quest-item h3 {
    margin-top: 0;
    color: #0056b3;
}

.quest-item p {
    line-height: 1.6;
}

.quest-item strong {
    color: #333;
}



/* Item Grid Styling */
.item-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    margin-top: 30px;
}

.item-card {
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 20px;
    background-color: #f9f9f9;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    display: flex;
    flex-direction: column;
}

.item-card h3 {
    margin-top: 0;
    margin-bottom: 10px;
    color: #333;
    border-bottom: 2px solid #eee;
    padding-bottom: 10px;
}

.item-meta {
    display: flex;
    justify-content: space-between;
    font-size: 0.9em;
    color: #666;
    margin-bottom: 15px;
}

.item-stats {
    list-style-type: none;
    padding: 0;
    margin: 0;
}

.item-stats li {
    margin-bottom: 5px;
}

/* Color coding for item grades */
.item-card.grade-normal { border-left: 5px solid #aaa; }
.item-card.grade-magic { border-left: 5px solid #62a8d1; }
.item-card.grade-rare { border-left: 5px solid #f2d45a; }
.item-card.grade-unique { border-left: 5px solid #a463d8; }



/* Farming Guide Styling */
.farming-guide {
    margin-top: 30px;
}

.level-range-section {
    background-color: #fff;
    border-radius: 8px;
    padding: 25px;
    margin-bottom: 30px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.level-range-section h2 {
    margin-top: 0;
    color: #004085;
    border-bottom: 2px solid #b8daff;
    padding-bottom: 10px;
}

.range-description {
    font-style: italic;
    color: #555;
}

.tip-card {
    background-color: #fcfcfc;
    border: 1px solid #e9e9e9;
    border-left: 5px solid #17a2b8;
    border-radius: 5px;
    padding: 20px;
    margin-top: 20px;
}

.tip-card h3 {
    margin-top: 0;
    color: #333;
}


/* Authentication Forms Styling */
.auth-form {
    max-width: 500px;
    margin-top: 40px;
    margin-bottom: 40px;
}

.auth-form h2 {
    text-align: center;
    margin-bottom: 10px;
}

.auth-form p {
    text-align: center;
    margin-bottom: 25px;
    color: #666;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
}

.form-group input {
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 5px;
    box-sizing: border-box; /* Important for padding not to break width */
}

.btn {
    display: block;
    width: 100%;
    padding: 12px;
    background-color: #0056b3;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1em;
    transition: background-color 0.3s ease;
}

.btn:hover {
    background-color: #004085;
}

.auth-switch {
    margin-top: 20px;
    font-size: 0.9em;
}

.login-btn {
    background-color: #28a745;
    color: white;
    padding: 8px 15px;
    border-radius: 5px;
}


/* Message Box Styling */
.message-box {
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 5px;
    border: 1px solid transparent;
}

.message-box.error {
    color: #721c24;
    background-color: #f8d7da;
    border-color: #f5c6cb;
}

.message-box.success {
    color: #155724;
    background-color: #d4edda;
    border-color: #c3e6cb;
}



/* Styling for the logout button in the nav */
.logout-btn {
    background-color: #dc3545; /* A shade of red */
    color: white;
    padding: 8px 15px;
    border-radius: 5px;
    transition: background-color 0.3s ease;
}

.logout-btn:hover {
    background-color: #c82333; /* A darker red */
    color: white;
}


/* Table Styling */
.table-container {
    overflow-x: auto; /* Makes table responsive on small screens */
    background-color: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

table {
    width: 100%;
    border-collapse: collapse;
}

th, td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

thead th {
    background-color: #f4f4f4;
    font-weight: bold;
}

tbody tr:hover {
    background-color: #f9f9f9;
}

/* Small form elements inside the table */
td form {
    display: flex;
    align-items: center;
    gap: 10px;
}

td select {
    padding: 6px;
    border-radius: 4px;
    border: 1px solid #ccc;
}

.btn-small {
    padding: 6px 12px;
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.btn-small:hover {
    background-color: #0056b3;
}



/* Admin Form Container */
.form-container {
    background-color: #fff;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    margin-bottom: 30px;
}

.form-container h2 {
    margin-top: 0;
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
}

textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 5px;
    box-sizing: border-box;
    font-family: inherit;
    font-size: 1em;
}

/* Action buttons in tables */
.actions-cell {
    display: flex;
    gap: 10px;
}

.btn-edit {
    background-color: #ffc107; /* Yellow */
}
.btn-edit:hover {
    background-color: #e0a800;
}

.btn-delete {
    background-color: #dc3545; /* Red */
}
.btn-delete:hover {
    background-color: #c82333;
}



/* Form Actions (for buttons like Save and Cancel) */
.form-actions {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

/* Make buttons in form-actions not full-width */
.form-actions .btn {
    width: auto;
    padding: 12px 20px;
}

.btn-secondary {
    background-color: #6c757d; /* Gray */
}

.btn-secondary:hover {
    background-color: #5a6268;
}


/* Styling for grouped sections in admin */
.section-group {
    margin-top: 40px;
}

.section-group h3 {
    padding-bottom: 10px;
    border-bottom: 2px solid #0056b3;
    color: #0056b3;
}



/* Public Section List Styling */
.section-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 25px;
    margin-top: 30px;
}

.section-card {
    display: block;
    background-color: #fff;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    text-decoration: none;
    color: inherit;
    transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
}

.section-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.section-card h2 {
    margin-top: 0;
    color: #0056b3;
}


/* Breadcrumb Navigation */
.breadcrumb {
    margin-bottom: 20px;
    font-size: 0.9em;
    color: #666;
}
.breadcrumb a {
    color: #0056b3;
    text-decoration: none;
}
.breadcrumb a:hover {
    text-decoration: underline;
}

/* Entry List Styling */
.entry-list {
    list-style-type: none;
    padding: 0;
    margin-top: 20px;
}
.entry-list li a {
    display: block;
    padding: 15px;
    background-color: #fff;
    border: 1px solid #ddd;
    margin-bottom: -1px; /* Creates a stacked look */
    text-decoration: none;
    color: #333;
    font-size: 1.1em;
    transition: background-color 0.2s;
}
.entry-list li a:hover {
    background-color: #f7f7f7;
    color: #0056b3;
}



/* Single Entry Content Styling */
.entry-content {
    background-color: #fff;
    padding: 30px 40px;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.entry-content h1 {
    margin-top: 0;
}

.entry-meta {
    font-size: 0.9em;
    color: #888;
    margin-bottom: 20px;
}

.entry-content hr {
    border: 0;
    height: 1px;
    background-color: #eee;
    margin: 20px 0;
}

.entry-content div {
    line-height: 1.7;
    font-size: 1.1em;
}



/* Search Container Styling */
.search-container {
    background-color: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 30px;
    border: 1px solid #dee2e6;
}

.search-container form {
    display: flex;
    gap: 10px;
}

.search-input {
    flex-grow: 1; /* Allows the input to take up available space */
    padding: 10px 15px;
    font-size: 1em;
    border-radius: 5px;
    border: 1px solid #ccc;
}

.btn-search {
    padding: 10px 20px;
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1em;
}
.btn-search:hover {
    background-color: #0056b3;
}



/* --- New Header & Navigation Styling --- */

/* --- Mobile Menu Link Styling Fix --- */

/* Target the cloned elements inside the mobile menu */
.mobile-menu .main-nav,
.mobile-menu .auth-links {
    display: block; /* Override the desktop 'display: flex' */
    text-align: center; /* Center the links */
}

/* Style the UL inside the mobile menu */
.mobile-menu .nav-links {
    display: block;
    margin-bottom: 20px;
}

/* Style each link item inside the mobile menu */
.mobile-menu .nav-links li {
    margin-bottom: 15px;
}

/* Style the auth buttons inside the mobile menu */
.mobile-menu .auth-links a {
    display: block; /* Make buttons full-width */
    margin-bottom: 10px;
}

.main-header {
    background-color: #ffffff;
    padding: 15px 0;
    border-bottom: 1px solid #e7e7e7;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    position: sticky; /* Keeps the header at the top on scroll */
    top: 0;
    z-index: 1000;
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5em;
    font-weight: bold;
    color: #004085;
    text-decoration: none;
}

.main-nav .nav-links {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 25px;
}

.main-nav .nav-links a {
    text-decoration: none;
    color: #333;
    font-weight: 500;
    position: relative;
    padding-bottom: 5px;
}

/* Underline effect on hover */
.main-nav .nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: #0056b3;
    transition: width 0.3s ease;
}

.main-nav .nav-links a:hover::after {
    width: 100%;
}

.auth-links {
    display: flex;
    gap: 10px;
}

.auth-links .btn {
    padding: 8px 16px;
    border-radius: 5px;
    color: white;
    text-decoration: none;
    font-size: 0.9em;
    border: none;
}

.btn-login { background-color: #28a745; }
.btn-dashboard { background-color: #17a2b8; }
.btn-logout { background-color: #dc3545; }


/* --- Hamburger and Mobile Menu --- */
.hamburger {
    display: none; /* Hidden by default on desktop */
    font-size: 2em;
    background: none;
    border: none;
    cursor: pointer;
}

.mobile-menu {
    display: none; /* Also hidden by default */
    background-color: #f8f9fa;
    padding: 20px;
    border-bottom: 1px solid #e7e7e7;
}

/* --- Media Query for Mobile Devices --- */
@media (max-width: 850px) {
    .main-nav, .auth-links {
        display: none; /* Hide desktop nav and auth buttons */
    }

    .hamburger {
        display: block; /* Show the hamburger button */
    }

    .mobile-menu.active {
        display: block; /* Show the mobile menu when it has the 'active' class */
    }
}





/* --- New Footer Styling --- */

.main-footer {
    background-color: #343a40; /* Dark background */
    color: #a9a9a9; /* Light gray text */
    padding-top: 40px;
    position: relative;
    bottom: 0;
    width: 100%;
}

.footer-content {
    display: flex;
    flex-wrap: wrap; /* Allows sections to wrap on smaller screens */
    justify-content: space-between;
    margin-bottom: 30px;
}

.footer-section {
    flex: 1;
    padding: 0 20px;
    min-width: 250px; /* Prevents sections from getting too squished */
}

.footer-section h2 {
    color: #ffffff; /* White headings */
    margin-bottom: 15px;
}

.logo-text {
    font-size: 1.5em;
    font-weight: bold;
}

.footer-section p {
    line-height: 1.6;
}

.footer-section.links ul {
    list-style-type: none;
    padding: 0;
}

.footer-section.links ul a {
    display: block;
    margin-bottom: 10px;
    color: #a9a9a9;
    text-decoration: none;
    transition: color 0.3s;
}

.footer-section.links ul a:hover {
    color: #ffffff;
}

.footer-bottom {
    background-color: #23272b; /* Even darker background */
    color: #6c757d;
    height: 50px;
    line-height: 50px; /* Vertically centers the text */
    text-align: center;
    width: 100%;
}

/* Adjust footer layout for mobile */
@media (max-width: 768px) {
    .footer-content {
        flex-direction: column;
        text-align: center;
    }
    .footer-section {
        margin-bottom: 30px;
    }
}






/* Status Labels */
.status-approved, .status-pending {
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.8em;
    font-weight: bold;
    color: white;
}
.status-approved {
    background-color: #28a745; /* Green */
}
.status-pending {
    background-color: #ffc107; /* Yellow */
    color: #333;
}




.form-group-row {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
}
.form-group-row .form-group {
    flex: 1; /* Each group takes up equal space */
    margin-bottom: 0;
}

/* On smaller screens, stack the form groups */
@media (max-width: 768px) {
    .form-group-row {
        flex-direction: column;
        gap: 0;
    }
    .form-group-row .form-group {
        margin-bottom: 20px;
    }
}




/* Pending Submissions Page Styling */
.pending-list {
    margin-top: 30px;
}

.pending-card {
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    margin-bottom: 25px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.pending-card h3 {
    margin: 0;
    padding: 15px 20px;
    background-color: #f7f7f7;
    border-bottom: 1px solid #ddd;
}

.pending-meta {
    display: flex;
    gap: 20px;
    font-size: 0.9em;
    padding: 10px 20px;
    background-color: #fafafa;
    border-bottom: 1px solid #ddd;
    color: #555;
}

.pending-content {
    padding: 20px;
    line-height: 1.6;
}

.pending-actions {
    display: flex;
    gap: 10px;
    padding: 15px 20px;
    background-color: #f7f7f7;
    border-top: 1px solid #ddd;
}

.btn-approve {
    background-color: #28a745;
}
.btn-approve:hover {
    background-color: #218838;
}

.btn-reject {
    background-color: #dc3545;
}
.btn-reject:hover {
    background-color: #c82333;
}


/* --- Pure Rich Text Editor Styling --- */
.editor-toolbar {
    background-color: #f7f7f7;
    padding: 8px;
    border: 1px solid #ccc;
    border-bottom: none;
    border-radius: 5px 5px 0 0;
}

.editor-btn {
    background-color: #fff;
    border: 1px solid #ccc;
    border-radius: 3px;
    cursor: pointer;
    width: 30px;
    height: 30px;
    margin-right: 5px;
    font-size: 1em;
}
.editor-btn:hover {
    background-color: #e9e9e9;
}

.editable-area {
    width: 100%;
    min-height: 250px; /* Set a minimum height */
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 0 0 5px 5px;
    box-sizing: border-box;
    line-height: 1.6;
    background-color: #fff;
    overflow-y: auto; /* Add a scrollbar if content is long */
}
.editable-area:focus {
    outline: none;
    border-color: #007bff;
}


/* Styling for the new status types */
.status-active {
    background-color: #28a745; /* Green */
}
.status-pending-approval,
.status-pending-update {
    background-color: #ffc107; /* Yellow */
    color: #333;
}
.status-deleted {
    background-color: #6c757d; /* Gray */
}

/* Styling for the 'updated by' byline */
.updated-by {
    display: block;
    font-size: 0.8em;
    color: #888;
    margin-top: 4px;
}


/* Styling for the Restore button */
.btn-restore {
    background-color: #28a745; /* Green */
}
.btn-restore:hover {
    background-color: #218838;
}



/* --- Dynamic Homepage Styling --- */
.homepage-welcome {
    background-color: #fff;
    padding: 30px 40px;
    margin: 20px 0 40px 0;
    text-align: center;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.homepage-welcome .lead {
    font-size: 1.2em;
    color: #555;
    line-height: 1.7;
}

.homepage-latest h2 {
    text-align: center;
    margin-bottom: 30px;
    font-size: 2em;
}

.latest-entries-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.latest-entry-card {
    display: block;
    background-color: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    text-decoration: none;
    color: inherit;
    transition: transform 0.2s, box-shadow 0.2s;
    border-left: 5px solid #17a2b8; /* A nice teal color */
}

.latest-entry-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.card-category {
    display: inline-block;
    background-color: #f0f0f0;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.8em;
    font-weight: bold;
    margin-bottom: 10px;
    color: #555;
}

.latest-entry-card h4 {
    margin: 0;
    color: #333;
}



/* --- 404 Page Styling --- */
.not-found-container {
    text-align: center;
    padding: 60px 20px;
}
.not-found-container h1 {
    font-size: 8em;
    font-weight: bold;
    color: #ccc;
    margin: 0;
}
.not-found-container h2 {
    font-size: 2em;
    margin-top: 0;
}
.not-found-container .btn {
    display: inline-block;
    width: auto;
    margin-top: 20px;
}


.btn-profile { background-color: #6c757d; } /* Gray */


/* --- Styling for the Header Image on Guide Pages --- */

.entry-header-image {
    /* --- Responsiveness --- */
    max-width: 50%;  /* This is the most important rule. The image will never be wider than its container. */
    height: auto;     /* This makes the height adjust automatically to keep the image's proportions correct. */
    display: block;   /* Removes any extra space below the image. */

    /* --- Visual Polish --- */
    margin: 0 auto 25px auto; /* Centers the image and adds 25px of space below it. */
    border-radius: 8px;       /* Adds nice rounded corners. */
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1); /* Adds a subtle shadow for depth. */
}

