/* --- Global Resets and Font Imports --- */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap');

:root {
    --primary-color: #1A472A; /* Deep Forest Green */
    --secondary-color: #5A8F7B; /* Muted Accent Green */
    --background-color: #F8F9FA;
    --text-color: #212529;
    --light-text-color: #6c757d;
    --white-color: #FFFFFF;
    --border-color: #dee2e6;
    --shadow: 0 4px 12px rgba(0,0,0,0.08);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Poppins', sans-serif;
    background-color: var(--background-color);
    color: var(--text-color);
    line-height: 1.6;
}

body, html {
    margin: 0;
    padding: 0;
}

/* --- Header & Navigation --- */
header {
    background: var(--primary-color); /* Unified deep green background */
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    width: 100%;
    color: var(--white-color); /* Set text color to white for entire header */
    margin: 0;
    padding: 0;
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap; /* Allow items to wrap on smaller screens */
}

header h1 {
    font-size: 1.5rem;
    font-weight: 600;
}

header h1 a {
    text-decoration: none;
    color: var(--white-color); /* Set link color to white */
}

nav {
    background-color: transparent; /* Remove separate nav background */
    padding: 1rem 0;
    box-shadow: none; /* Remove nav shadow */
}

nav ul {
    list-style: none;
    display: flex;
    gap: 1.5rem; /* Reduced gap for better fit with longer text */
}

nav ul li a {
    text-decoration: none;
    color: var(--white-color);
    font-weight: 500;
    transition: color 0.3s ease;
    position: relative;
    padding-bottom: 5px;
}

nav ul li a:hover {
    color: var(--secondary-color); /* Muted Accent Green for hover */
}

nav ul li a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -5px;
    left: 0;
    background-color: var(--primary-color);
    transition: width 0.3s ease;
}

nav ul li a:hover::after {
    width: 100%;
}

.language-selector {
    z-index: 1001; /* Ensure language selector is above other elements */
}

.language-selector select {
    padding: 5px 10px;
    border-radius: 5px;
    border: 1px solid var(--border-color); /* Light grey border */
    background-color: var(--white-color); /* Pure white background */
    color: var(--primary-color); /* Primary color text for high contrast */
    cursor: pointer;
    font-family: 'Poppins', sans-serif;
    font-size: 0.9em;
    appearance: none; /* Remove default browser styling */
    background-image: url('data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22292.4%22%20height%3D%22292.4%22%3E%3Cpath%20fill%3D%22%231A472A%22%20d%3D%22M287%2C114.7L159.2%2C242.5c-4.1%2C4.1-9.9%2C6.2-15.6%2C6.2c-5.8%2C0-11.6-2.1-15.6-6.2L5.4%2C114.7c-4.1-4.1-6.2-9.9-6.2-15.6s2.1-11.6%2C6.2-15.6l12.8-12.8c4.1-4.1%2C9.9-6.2%2C15.6-6.2s11.6%2C2.1%2C15.6%2C6.2l100.8%2C100.8L243.8%2C86.3c4.1-4.1%2C9.9-6.2%2C15.6-6.2s11.6%2C2.1%2C15.6%2C6.2l12.8%2C12.8c4.1%2C4.1%2C6.2%2C9.9%2C6.2%2C15.6S291.1%2C110.6%2C287%2C114.7z%22%2F%3E%3C%2Fsvg%3E'); /* Primary color arrow for contrast */
    background-repeat: no-repeat;
    background-position: right 8px center;
    background-size: 12px auto;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1); /* Subtle shadow for depth */
}
.language-selector select option {
    color: var(--text-color); /* Ensure options are dark for readability */
    background-color: var(--white-color); /* Explicitly set white background for options */
}


/* --- Main Content & Container --- */
.container {
    max-width: 900px;
    margin: 2.5rem auto;
    padding: 0 2rem;
}

main > section {
    background: var(--white-color);
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 2.5rem;
    box-shadow: var(--shadow);
    border: 1px solid #f0f0f0;
}

h2 {
    font-size: 2rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--primary-color);
}

.subtitle {
    color: var(--light-text-color);
    margin-bottom: 2rem;
}

/* --- Calculator Form --- */
.form-row {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.input-group {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.input-group label {
    margin-bottom: 0.5rem;
    font-weight: 500;
    font-size: 0.95rem;
}

.input-group input[type="number"] {
    padding: 0.75rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
    font-family: 'Poppins', sans-serif;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.input-group input[type="number"]:focus {
    outline: none;
    border-color: var(--secondary-color);
    box-shadow: 0 0 0 3px rgba(90, 143, 123, 0.15);
}

.unit {
    display: none; /* Placeholder is sufficient */
}

button[type="submit"] {
    background: var(--primary-color);
    color: var(--white-color);
    padding: 0.8rem 1.5rem;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1.1rem;
    font-weight: 500;
    width: 100%;
    transition: background-color 0.3s ease, transform 0.2s ease;
    font-family: 'Poppins', sans-serif;
}

button[type="submit"]:hover {
    background: #10301C; /* Darker green */
    transform: translateY(-2px);
}

/* --- Result Section --- */
.result-section {
    margin-top: 2rem;
    padding: 1.5rem;
    background-color: #E8F5E9; /* Light green background */
    border-radius: 8px;
    text-align: center;
    font-size: 1.25rem;
    font-weight: 500;
    color: #1E4620; /* Dark green text */
    border-left: 5px solid var(--secondary-color);
}

.result-section h3 {
    margin: 0;
}

#map-value {
    font-weight: 700;
    font-size: 1.5rem;
}

/* --- About & FAQ Sections --- */
#about p, #faq p {
    color: var(--light-text-color);
}

strong {
    color: var(--text-color);
    font-weight: 600;
}

.faq-item {
    border-bottom: 1px solid var(--border-color);
    padding: 1rem 0;
}
.faq-item:last-child {
    border-bottom: none;
}

.faq-question {
    cursor: pointer;
    font-weight: 600;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: color 0.3s ease;
}

.faq-question:hover {
    color: var(--primary-color);
}

.faq-question::after {
    content: '+';
    font-size: 1.5rem;
    transition: transform 0.3s ease;
    color: var(--light-text-color);
}

.faq-item.active .faq-question::after {
    transform: rotate(45deg);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease, padding 0.4s ease;
    padding: 0 1rem;
}

.faq-item.active .faq-answer {
    padding: 1rem 1rem 0 1rem;
}

/* --- Footer --- */
footer {
    background: #1c1c1c;
    color: var(--light-text-color);
    text-align: center;
    padding: 2.5rem 0;
    margin-top: 3rem;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.footer-container p {
    margin: 0;
}

.disclaimer {
    font-size: 0.85rem;
    margin-top: 0.5rem;
    opacity: 0.7;
}

/* --- Responsive Adjustments --- */
@media (max-width: 768px) {
    .header-container {
        flex-direction: column;
        gap: 1rem;
    }

    nav ul {
        gap: 1.5rem;
        padding: 0.5rem 0;
    }

    .form-row {
        flex-direction: column;
        gap: 1rem;
    }
    
    h2 {
        font-size: 1.8rem;
    }
}

/* 隐藏未填充的Google AdSense自动放置广告 */
.google-auto-placed > ins[data-ad-status="unfilled"] {
    display: none !important;
    height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* 确保body和html没有默认的margin/padding */
body, html {
    margin: 0;
    padding: 0;
} 