/* style.css */

/* --- 基础样式 --- */
body {
    background-color: #1e1e1e;
    color: #d4d4d4;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    text-align: center;
    padding: 20px;
    margin: 0;
}

header {
    margin-bottom: 30px;
}

header h1 {
    color: #569cd6;
    margin-bottom: 10px;
}

header p {
    color: #9cdcfe;
    max-width: 500px;
    margin: 0 auto;
}

.calculator {
    background-color: #252526;
    padding: 25px;
    border-radius: 8px;
    display: inline-block;
    border: 1px solid #3c3c3c;
    max-width: 600px;
    width: 90%;
}

.input-section {
    padding-bottom: 20px;
    border-bottom: 1px solid #3c3c3c;
}

.input-group {
    margin-bottom: 15px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
}

.input-group label {
    width: 100px;
    text-align: right;
    margin-right: 10px;
    flex-shrink: 0;
}

/* 原有的 <select> 样式 */
.input-group select {
    width: 220px;
    padding: 10px;
    border-radius: 5px;
    border: 1px solid #3c3c3c;
    background-color: #3c3c3c;
    color: #d4d4d4;
    font-size: 16px;
}

.result-section {
    display: flex;
    justify-content: space-around;
    flex-wrap: wrap;
    padding-top: 20px;
}

.result-box {
    background-color: #1e1e1e;
    padding: 15px 25px;
    border-radius: 5px;
    margin: 10px;
}

.result-box h2 {
    font-size: 16px;
    color: #9cdcfe;
    margin: 0 0 5px 0;
    font-weight: normal;
}

.result-box p {
    font-size: 28px;
    color: #4ec9b0;
    font-weight: bold;
    margin: 0;
}


/* --- 全新的自定义下拉菜单样式 --- */

.custom-select-wrapper {
    position: relative;
    display: inline-block;
    width: 220px;
    font-size: 16px;
    text-align: left; /* 让选项内容靠左对齐 */
}

.custom-select-trigger {
    position: relative;
    display: flex;
    align-items: center;
    padding: 10px;
    background-color: #3c3c3c;
    border: 1px solid #3c3c3c;
    border-radius: 5px;
    cursor: pointer;
    overflow: hidden;
}

.custom-select-trigger::after {
    content: '▼';
    font-size: 10px;
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
}

.custom-options {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background-color: #3c3c3c;
    border: 1px solid #3c3c3c;
    border-top: 0;
    border-radius: 0 0 5px 5px;
    z-index: 2;
    max-height: 200px;
    overflow-y: auto;
    display: none;
}

.custom-select-wrapper.open .custom-options {
    display: block;
}

.custom-option {
    display: flex;
    align-items: center;
    padding: 10px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.custom-option:hover {
    background-color: #569cd6;
}

.custom-option .option-icon,
.custom-select-trigger .selected-icon {
    width: 24px;
    height: 24px;
    margin-right: 10px;
    object-fit: contain;
    flex-shrink: 0;
}

/* style.css (在文件末尾添加这些新样式) */

/* --- New Mutation Section Styles --- */

.mutation-section {
    padding-top: 20px;
    margin-top: 20px;
    border-top: 1px solid #3c3c3c;
}

.mutation-section h2 {
    font-size: 16px;
    color: #9cdcfe;
    margin: 0 0 15px 0;
    text-align: left;
}

.mutation-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 10px;
    text-align: left;
}

.mutation-item {
    display: flex;
    align-items: center;
    background-color: #3c3c3c;
    border-radius: 5px;
    padding: 8px;
    cursor: pointer;
    transition: background-color 0.2s;
    -webkit-user-select: none; /* Safari */
    -ms-user-select: none; /* IE 10+ */
    user-select: none; /* Standard syntax */
}

.mutation-item:hover {
    background-color: #4f5358;
}

.mutation-item input[type="checkbox"] {
    margin-right: 10px;
    width: 18px;
    height: 18px;
    accent-color: #569cd6; /* Style the checkmark color */
}

.mutation-item label {
    color: #d4d4d4;
    flex-grow: 1;
}

/* style.css (在文件末尾添加这些新样式) */

/* --- Search and Sort Controls Styles --- */

.mutation-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 20px;
}

#mutation-search {
    flex-grow: 1;
    padding: 10px;
    border-radius: 5px;
    border: 1px solid #3c3c3c;
    background-color: #3c3c3c;
    color: #d4d4d4;
    font-size: 14px;
    min-width: 200px;
}

.sort-buttons button {
    padding: 10px 15px;
    margin-left: 10px;
    border: 1px solid #3c3c3c;
    background-color: #4f5358;
    color: #d4d4d4;
    font-size: 14px;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.sort-buttons button:hover {
    background-color: #569cd6;
}

/* 一个用于隐藏元素的辅助类 */
.hidden {
    display: none !important;
}

/* style.css (在文件末尾添加这些新样式) */

/* --- Global Settings Styles --- */

.global-settings {
    padding-top: 15px;
    margin-top: 15px;
    border-top: 1px solid #3c3c3c;
    display: flex;
    justify-content: space-around;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.global-settings .input-group {
    margin-bottom: 0;
}

/* Specific styling for number inputs */
.global-settings input[type="number"] {
    width: 80px;
}

/* Specific styling for the checkbox group */
.checkbox-group {
    display: flex;
    align-items: center;
    justify-content: center;
}

.checkbox-group label {
    width: auto; /* Override default width */
    text-align: left;
    margin-right: 0;
    order: 2; /* Make label appear after checkbox */
}

.checkbox-group input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin-right: 8px;
    order: 1; /* Make checkbox appear before label */
    accent-color: #569cd6;
}

/* style.css (在文件末尾添加这些新样式) */

/* --- Guide Page Styles --- */

.guide-page header {
    border-bottom: 1px solid #3c3c3c;
    padding-bottom: 20px;
}

a.back-link {
    display: inline-block;
    margin-top: 20px;
    color: #9cdcfe;
    text-decoration: none;
    background-color: #252526;
    padding: 10px 15px;
    border-radius: 5px;
    border: 1px solid #3c3c3c;
    transition: background-color 0.2s;
}

a.back-link:hover {
    background-color: #4f5358;
}

.guide-container {
    max-width: 800px;
    margin: 20px auto;
    text-align: left;
}

.guide-section {
    background-color: #252526;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.guide-section h3 {
    color: #569cd6;
    border-bottom: 1px solid #3c3c3c;
    padding-bottom: 10px;
    margin-top: 0;
}

.guide-section dl {
    margin: 0;
}

.guide-section dt {
    font-weight: bold;
    color: #d4d4d4;
    margin-top: 15px;
}

.guide-section dd {
    margin-left: 20px;
    color: #9cdcfe;
}

/* Style for the new link on the main page */
a.guide-link {
    font-size: 14px;
    font-weight: normal;
    color: #9cdcfe;
    text-decoration: none;
    margin-left: 10px;
}

a.guide-link:hover {
    text-decoration: underline;
}

/* style.css (在文件末尾添加这些新样式) */

/* --- Data Table Styles (for Pet Guide) --- */

.table-wrapper {
    overflow-x: auto; /* Ensures table is responsive on mobile */
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
}

.data-table th,
.data-table td {
    padding: 12px 15px;
    border: 1px solid #3c3c3c;
    text-align: left;
}

.data-table thead th {
    background-color: #4f5358;
    color: #d4d4d4;
    font-weight: bold;
}

.data-table tbody tr:nth-of-type(even) {
    background-color: #2c2f33;
}

.data-table td:first-child {
    font-weight: bold;
    color: #9cdcfe;
}

/* style.css (在文件末尾添加这些新样式) */

/* --- Footer Styles --- */
.site-footer {
    border-top: 1px solid #3c3c3c;
    margin-top: 40px;
    padding-top: 20px;
    padding-bottom: 20px;
    color: #99aab5;
    font-size: 14px;
}

.site-footer p {
    margin: 0 0 10px 0;
}

.site-footer nav a {
    color: #99aab5;
    text-decoration: none;
    margin: 0 10px;
    transition: color 0.2s;
}

.site-footer nav a:hover {
    color: #ffffff;
}

/* style.css (在文件末尾添加这些新样式) */

/* --- Best Crops Page Styles --- */

.data-table .table-icon {
    width: 24px;
    height: 24px;
    margin-right: 10px;
    vertical-align: middle;
}

.sort-buttons button.active {
    background-color: #569cd6;
    color: #ffffff;
    border-color: #569cd6;
}

/* style.css (在文件末尾添加这些新样式) */

/* --- Add to List Button Styles --- */
.add-to-list-section {
    padding: 20px 0;
    text-align: center;
}

#add-to-list-btn {
    width: 80%;
    max-width: 400px;
    padding: 15px;
    font-size: 18px;
    font-weight: bold;
    background-color: #4ec9b0;
    color: #1e1e1e;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.2s;
}

#add-to-list-btn:hover {
    background-color: #61d4bb;
}

/* --- Garden Value List Styles --- */
.garden-list-container {
    max-width: 650px;
    margin: 20px auto;
    padding: 20px;
    background-color: #252526;
    border-radius: 8px;
    border: 1px solid #3c3c3c;
}

.garden-list-container h2 {
    text-align: center;
    color: #569cd6;
    margin-top: 0;
}

#garden-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

#garden-list li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #3c3c3c;
    padding: 10px 15px;
    border-radius: 5px;
    margin-bottom: 10px;
    font-size: 14px;
}

#garden-list .item-name {
    font-weight: bold;
    flex-grow: 1;
}

#garden-list .item-value {
    color: #4ec9b0;
    font-weight: bold;
    margin: 0 20px;
}

#garden-list .remove-btn {
    background-color: #e64545;
    color: white;
    border: none;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    font-weight: bold;
    cursor: pointer;
    line-height: 24px;
    text-align: center;
}

.garden-list-total {
    border-top: 1px solid #3c3c3c;
    margin-top: 20px;
    padding-top: 20px;
    text-align: right;
}

.garden-list-total h3 {
    margin: 0;
    font-weight: normal;
    display: inline-block;
}

.garden-list-total p {
    display: inline-block;
    font-size: 28px;
    font-weight: bold;
    color: #4ec9b0;
    margin: 0 0 0 15px;
}

.garden-list-total button {
    margin-top: 15px;
    background: none;
    border: 1px solid #99aab5;
    color: #99aab5;
    padding: 5px 10px;
    border-radius: 5px;
    cursor: pointer;
}

/* style.css (在文件末尾添加这些新样式) */

/* --- Recommendation Box Styles --- */
.recommendation-box {
    background-color: #2c3e50; /* A distinct, premium background */
    border: 1px solid #3498db;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 30px;
}

.recommendation-box h3 {
    margin: 0 0 15px 0;
    color: #ffffff;
    text-align: center;
    font-size: 18px;
}

#recommendation-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    justify-content: space-around;
    gap: 15px;
}

#recommendation-list li {
    background-color: #34495e;
    border-radius: 5px;
    padding: 10px;
    text-align: center;
    flex-grow: 1;
    cursor: pointer;
    transition: background-color 0.2s, transform 0.2s;
}

#recommendation-list li:hover {
    background-color: #4e6a85;
    transform: translateY(-2px);
}

#recommendation-list .rec-name {
    font-weight: bold;
    font-size: 16px;
    color: #ffffff;
    display: block;
}

#recommendation-list .rec-value {
    font-size: 14px;
    color: #4ec9b0;
    display: block;
    margin-top: 5px;
}

/* style.css (在文件末尾添加这些新样式) */

/* --- Code Styles for Codes Page --- */
.code-text {
    font-family: 'Courier New', Courier, monospace;
    font-weight: bold;
    background-color: #1e1e1e;
    padding: 8px 12px !important;
    border-radius: 4px;
    color: #ce9178;
}