body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f4f4f4;
    transition: background-color 0.3s, color 0.3s;
}

body.dark-mode {
    background-color: #121212;
    color: #e0e0e0;
}

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 20px;
    background-color: #333;
    color: #fff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: background-color 0.3s;
}

header.dark-mode {
    background-color: #1e1e1e;
}

nav ul {
    list-style-type: none;
    margin: 0;
    padding: 0;
    display: flex;
}

nav ul li {
    margin-right: 20px;
    cursor: pointer;
    padding: 5px 10px;
    color: #fff;
    transition: background-color 0.3s;
}

nav ul li.active, nav ul li:hover {
    background-color: #444;
    border-radius: 5px;
}

button {
    padding: 5px 10px;
    background-color: #007BFF;
    color: #fff;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s;
}

button:hover {
    background-color: #0056b3;
}

button.dark-mode {
    background-color: #444;
}

.content-section {
    display: none;
    padding: 20px;
    background-color: #fff;
    margin: 20px;
    border-radius: 10px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: background-color 0.3s, color 0.3s;
}

.content-section.dark-mode {
    background-color: #1e1e1e;
    color: #e0e0e0;
}

.image {
    max-width: 100%;
    max-height: 300px;
    width: auto;
    height: auto;
    margin: 20px;
    border: 2px solid #ddd;
    border-radius: 10px;
}

h1, h2, h3 {
    color: #333;
}

.dark-mode h1, .dark-mode h2, .dark-mode h3 {
    color: #e0e0e0;
}

h1 {
    display: flex;
    align-items: center;
    gap: 15px;
}

h1 img {
    height: 48px;
    width: 48px;
}

h2 {
    font-size: 1.5em;
    margin-top: 20px;
    margin-bottom: 10px;
    padding-bottom: 5px;
    border-bottom: 2px solid #ddd;
}

.dark-mode h2 {
    border-bottom: 2px solid #444;
}

.sub-nav {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #ddd;
}

.dark-mode .sub-nav {
    border-bottom: 2px solid #444;
}

.sub-nav-item {
    padding: 8px 15px;
    background-color: #e9e9e9;
    color: #333;
    border: 1px solid #ccc;
    cursor: pointer;
    border-radius: 5px;
    font-weight: bold;
    transition: background-color 0.3s, color 0.3s;
}

.dark-mode .sub-nav-item {
    background-color: #2a2a2a;
    color: #e0e0e0;
    border-color: #555;
}

.sub-nav-item:hover {
    background-color: #dcdcdc;
}

.dark-mode .sub-nav-item:hover {
    background-color: #3a3a3a;
}

.sub-nav-item.active {
    background-color: #007BFF;
    color: #fff;
    border-color: #007BFF;
}

.dark-mode .sub-nav-item.active {
    background-color: #0056b3;
    border-color: #0056b3;
}

.sub-content-section {
    display: none; /* Hidden by default, JS will manage visibility */
}

/* NEW STYLES for Celestial Harvesting */

.upgrade-category {
    margin-bottom: 25px;
    padding-left: 10px;
    border-left: 3px solid #007BFF;
}

.dark-mode .upgrade-category {
    border-left: 3px solid #0056b3;
}

.upgrade-category h3 {
    margin-top: 0;
    display: flex;
    align-items: center;
    gap: 10px;
    border-bottom: none;
}

.upgrade-category h3 img {
    width: 24px;
    height: 24px;
}

.mission-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 15px;
}

.mission-card {
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 15px;
    text-align: center;
    background-color: #f9f9f9;
}

.dark-mode .mission-card {
    border-color: #444;
    background-color: #2a2a2a;
}

.mission-card img {
    width: 128px;
    height: 128px;
    object-fit: contain;
    margin-bottom: 10px;
}

.mission-card h4 {
    margin: 0 0 5px 0;
    font-size: 1.1em;
}