/* General Body and Container Styles */
/* Removed @import url for Google Fonts */

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"; /* System font stack */
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    min-height: 100vh;
    background: #f0f2f5;
    margin: 0;
    color: #333;
    line-height: 1.6;
    overflow-x: hidden;
    padding-top: 80px;
}

.container {
    background-color: #ffffff;
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.1);
    width: 960px;
    max-width: 98%;
    margin-top: 40px;
    text-align: left;
    border-top: 3px solid #e3eafc;
    margin-bottom: 40px; /* Add margin to bottom to separate from footer */
}

.container h1 {
    color: #1a73e8;
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
    text-align: center;
    letter-spacing: 0.8px;
}

.container h2 {
    color: #1976d2;
    font-size: 1.8rem;
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.container p {
    color: #495057;
    font-size: 1.05rem;
    line-height: 1.7;
    margin-bottom: 1rem;
}

@media (max-width: 768px) {
    .container {
        padding: 25px;
        margin-top: 30px;
        width: 95%;
    }

    .container h1 {
        font-size: 2rem;
        margin-bottom: 1rem;
    }

    .container h2 {
        font-size: 1.5rem;
        margin-top: 1.5rem;
        margin-bottom: 0.8rem;
    }

    .container p {
        font-size: 0.95rem;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 20px;
        margin-top: 20px;
        border-radius: 15px;
    }

    .container h1 {
        font-size: 1.8rem;
        margin-bottom: 0.8rem;
    }

    .container h2 {
        font-size: 1.3rem;
        margin-top: 1rem;
        margin-bottom: 0.6rem;
    }

    .container p {
        font-size: 0.85rem;
    }
}

.calculator-container {
    background-color: #ffffff;
    padding: 40px 36px 32px 36px;
    border-radius: 20px;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.1);
    width: 960px;
    max-width: 98%;
    text-align: center;
    margin-top: 40px;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease-in-out;
    border-top: 3px solid #e3eafc;
}

.calculator-container:hover {
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.15);
    transform: translateY(-3px);
}

.top-menu {
    width: 100%;
    background: linear-gradient(to right, #1a73e8, #0056b3);
    padding: 20px 0;
    box-shadow: 0 5px 24px rgba(26, 115, 232, 0.13), 0 1.5px 0 #e9ecef;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1000;
    transition: box-shadow 0.3s;
}

.top-menu nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 40px;
}

.top-menu nav .language-selector {
    margin-left: auto;
}

.top-menu ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 8px;
}

.top-menu ul li {
    margin-right: 32px;
    position: relative;
}

.top-menu ul li:last-child {
    margin-right: 0;
}

.top-menu ul li a {
    color: white;
    text-decoration: none;
    font-weight: 500;
    font-size: 1.15rem;
    padding: 6px 14px;
    border-radius: 6px;
    transition: color 0.3s, background 0.3s, box-shadow 0.2s, transform 0.2s;
    position: relative;
    display: inline-block;
}

.top-menu ul li a.active,
.top-menu ul li a:focus,
.top-menu ul li a:hover {
    color: #fff;
    background: rgba(255,255,255,0.13);
    box-shadow: 0 2px 8px rgba(26,115,232,0.08);
    text-decoration: none;
    transform: translateY(-2px) scale(1.04);
}

.top-menu ul li a.active::after {
    content: '';
    display: block;
    margin: 0 auto;
    width: 60%;
    height: 2.5px;
    background: #fff;
    border-radius: 2px;
    margin-top: 3px;
}

.top-menu ul li a::after {
    transition: width 0.3s;
}

.top-menu ul li a:active {
    background: rgba(255,255,255,0.18);
    color: #e0f2ff;
}

.language-selector select {
    padding: .6rem 1.2rem;
    border-radius: .4rem;
    border: 1px solid rgba(255, 255, 255, 0.4);
    background-color: rgba(255, 255, 255, 0.15);
    color: #333;
    font-size: 1rem;
    cursor: pointer;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    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%22white%22%20d%3D%22M287%2C114.7L159.2%2C242.5c-4.5%2C4.5-11.8%2C4.5-16.3%2C0L5.3%2C114.7c-4.5-4.5-4.5-11.8%2C0-16.3l11.8-11.8c4.5-4.5%2C11.8-4.5%2C16.3%2C0l110.8%2C110.8c4.5%2C4.5%2C11.8%2C4.5%2C16.3%2C0l110.8-110.8c4.5-4.5%2C11.8-4.5%2C16.3%2C0l11.8%2C11.8C291.5%2C102.9%2C291.5%2C110.2%2C287%2C114.7z%22%2F%3E%3C%2Fsvg%3E');
    background-repeat: no-repeat;
    background-position: right 15px center;
    background-size: 0.9rem;
    padding-right: 2.5rem;
    transition: background-color 0.3s ease-in-out;
}

.language-selector select option {
    color: #333 !important;
    background-color: white !important;
}

.language-selector select:hover {
    background-color: rgba(255, 255, 255, 0.25);
}

h2 {
    color: #1a73e8;
    margin-bottom: 2.5rem;
    font-size: 2.5rem;
    font-weight: 700;
    letter-spacing: 0.8px;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.05);
}

.input-group {
    margin-bottom: 1.2rem;
    text-align: left;
    display: flex;
    flex-direction: column;
}

.input-group label {
    display: block;
    margin-bottom: 0.7rem;
    color: #495057;
    font-weight: 500;
    font-size: 1.05rem;
}

.input-with-unit {
    display: flex;
    align-items: center;
    width: 100%;
    border: 1.5px solid #b3d9ff;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: .5rem;
    background: #f7fbff;
    box-shadow: 0 2px 8px rgba(26,115,232,0.04);
    transition: border-color 0.3s, box-shadow 0.3s;
}

.input-with-unit:focus-within {
    border-color: #1a73e8;
    box-shadow: 0 0 0 3px rgba(26, 115, 232, 0.13);
}

.input-with-unit input[type="number"] {
    flex-grow: 1;
    padding: .6rem 1rem;
    border: none;
    outline: none;
    box-sizing: border-box;
    font-size: 1.1rem;
    color: #333;
    background-color: #fcfdff;
    border-radius: 10px 0 0 10px;
    transition: box-shadow 0.2s;
}

.input-with-unit select {
    padding: .6rem 1rem;
    font-size: 1rem;
    border: none;
    background-color: #e6f2ff;
    border-left: 1px solid #b3d9ff;
    border-radius: 0 10px 10px 0;
    cursor: pointer;
    transition: background 0.2s;
}

.input-with-unit select:hover {
    background-color: #d9edf7;
}

.norm-display {
    font-size: 0.95rem;
    color: #6c757d;
    margin-top: .6rem;
    display: block;
    opacity: 0.9;
}

button {
    background: linear-gradient(90deg, #1a73e8 0%, #4fc3f7 100%);
    color: white;
    padding: 0.8rem 2rem;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1.2rem;
    margin-top: 1.5rem;
    transition: all 0.2s cubic-bezier(.4,2,.6,1), box-shadow 0.2s;
    font-weight: 600;
    width: 100%;
    box-shadow: 0 4px 16px rgba(26, 115, 232, 0.10);
}

button:hover, button:focus {
    background: linear-gradient(90deg, #1976d2 0%, #29b6f6 100%);
    box-shadow: 0 8px 24px rgba(26, 115, 232, 0.18);
    transform: translateY(-2px) scale(1.03);
}

button:active {
    transform: scale(0.98);
    box-shadow: 0 2px 8px rgba(26, 115, 232, 0.10);
}

.result-group {
    margin-top: 2rem;
    padding-top: 1.2rem;
    border-top: 1px solid #e9ecef;
    display: flex;
    align-items: center;
    justify-content: center;
}

.result-group h3 {
    color: #343a40;
    margin: 0;
    font-size: 1.8rem;
    font-weight: 600;
    line-height: 1.2;
}

.result-group p {
    font-size: 1.8rem;
    color: #1a73e8;
    font-weight: 700;
    line-height: 1.2;
    margin: 0;
    margin-top: -6px;
}

/* FAQ Section Styles */
.faq-section {
    background-color: #ffffff;
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.1);
    width: 960px;
    max-width: 98%;
    margin-top: 40px;
    text-align: left;
    border-top: 3px solid #e3eafc;
}

.faq-section h2 {
    color: #1a73e8;
    font-size: 2rem;
    margin-bottom: 2.5rem;
    text-align: center;
    letter-spacing: 1px;
}

.faq-item {
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid #e9ecef;
    position: relative;
    transition: background 0.2s;
}

.faq-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.faq-item h3 {
    color: #1976d2;
    font-size: 1.25rem;
    margin-bottom: 0.8rem;
    cursor: pointer;
    position: relative;
    padding-left: 32px;
    transition: color 0.2s;
}

.faq-item h3::before {
    content: "❓";
    position: absolute;
    left: 0;
    top: 0;
    font-size: 1.2em;
    color: #4fc3f7;
}

.faq-item h3:hover {
    color: #0d47a1;
}

.faq-item p {
    color: #6c757d;
    font-size: 1rem;
    line-height: 1.8;
    margin-top: 0.5rem;
    transition: max-height 0.3s, opacity 0.3s;
}

/* FAQ手风琴动画（仅CSS，JS可进一步增强） */
.faq-item.collapsed p {
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    margin: 0;
    padding: 0;
}
.faq-item p {
    max-height: 500px;
    opacity: 1;
    overflow: hidden;
}

/* Media Queries for FAQ Section */
@media (max-width: 768px) {
    .faq-section {
        padding: 25px;
        margin-top: 30px;
        width: 95%;
    }

    .faq-section h2 {
        font-size: 1.5rem;
        margin-bottom: 2rem;
    }

    .faq-item {
        margin-bottom: 1.5rem;
        padding-bottom: 1rem;
    }

    .faq-item h3 {
        font-size: 1.1rem;
        margin-bottom: 0.6rem;
    }

    .faq-item p {
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .faq-section {
        padding: 20px;
        margin-top: 20px;
        border-radius: 15px;
    }

    .faq-section h2 {
        font-size: 1.3rem;
        margin-bottom: 1.5rem;
    }

    .faq-item {
        margin-bottom: 1rem;
        padding-bottom: 0.8rem;
    }

    .faq-item h3 {
        font-size: 1rem;
        margin-bottom: 0.5rem;
    }

    .faq-item p {
        font-size: 0.85rem;
    }
}

@media (max-width: 768px) {
    .calculator-container {
        padding: 25px;
        margin-top: 80px;
        width: 95%;
    }

    .top-menu nav {
        flex-direction: column;
        align-items: flex-start;
        padding: 0 15px;
    }

    .top-menu ul {
        width: 100%;
        justify-content: space-around;
        margin-bottom: 10px;
    }

    .top-menu ul li {
        margin-right: 0;
    }

    .top-menu ul li a {
        font-size: 0.95rem;
    }

    .language-selector {
        width: 100%;
        text-align: center;
    }

    .language-selector select {
        width: calc(100% - 30px);
        font-size: 0.85rem;
        padding: .5rem 1rem;
    }

    h2 {
        font-size: 1.8rem;
        margin-bottom: 2rem;
    }

    .input-group {
        margin-bottom: 1.5rem;
    }

    .input-group label {
        font-size: 0.95rem;
        margin-bottom: 0.8rem;
    }

    .input-with-unit input[type="number"] {
        padding: .5rem .9rem;
        font-size: 1rem;
    }

    .input-with-unit select {
        width: 105px;
        padding: .5rem .8rem;
        font-size: 0.9rem;
        background-position: right 7px center;
        background-size: 0.55rem;
        padding-right: 1.8rem;
    }

    .norm-display {
        font-size: 0.85rem;
        margin-top: 0.5rem;
    }

    button {
        font-size: 1.1rem;
        padding: .7rem 1.8rem;
        margin-top: 2rem;
    }

    .result-group {
        margin-top: 2.5rem;
        padding-top: 2rem;
    }

    .result-group h3 {
        font-size: 1.8rem;
        margin: 0;
    }

    .result-group p {
        font-size: 1.8rem;
        margin: 0;
        margin-top: -4px;
    }
}

@media (max-width: 480px) {
    .calculator-container {
        padding: 20px;
        margin-top: 70px;
        border-radius: 15px;
    }

    .top-menu {
        padding: 15px 0;
    }

    .top-menu nav {
        padding: 0 10px;
    }

    .top-menu ul {
        flex-wrap: wrap;
        justify-content: center;
        margin-bottom: 5px;
    }

    .top-menu ul li {
        margin: 0 8px 5px;
    }

    .top-menu ul li a {
        font-size: 0.85rem;
    }

    .language-selector select {
        width: calc(100% - 20px);
        font-size: 0.75rem;
        padding: .4rem .8rem;
    }

    h2 {
        font-size: 1.5rem;
        margin-bottom: 1.5rem;
    }

    .input-group {
        margin-bottom: 1.2rem;
    }

    .input-group label {
        font-size: 0.85rem;
        margin-bottom: 0.6rem;
    }

    .input-with-unit input[type="number"] {
        padding: .4rem .8rem;
        font-size: 0.9rem;
    }

    .input-with-unit select {
        width: 90px;
        padding: .4rem .7rem;
        font-size: 0.8rem;
        background-position: right 5px center;
        background-size: 0.45rem;
        padding-right: 1.4rem;
    }

    .norm-display {
        font-size: 0.75rem;
        margin-top: 0.4rem;
    }

    button {
        font-size: 1rem;
        padding: .6rem 1.5rem;
        margin-top: 1.5rem;
    }

    .result-group {
        margin-top: 2rem;
        padding-top: 1.5rem;
    }

    .result-group h3 {
        font-size: 1.8rem;
        margin: 0;
    }

    .result-group p {
        font-size: 1.8rem;
        margin: 0;
        margin-top: -4px;
    }
}

.site-footer {
    width: 100%;
    background: #e3eafc;
    color: #4a5a6a;
    text-align: center;
    padding: 28px 0 18px 0;
    font-size: 1.05rem;
    border-top: 2.5px solid #b3d9ff;
    margin-top: 56px;
    letter-spacing: 0.5px;
    box-shadow: 0 -2px 16px rgba(26,115,232,0.04);
}

.site-footer .footer-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 16px;
}

@media (max-width: 768px) {
    .site-footer {
        font-size: 0.95rem;
        padding: 18px 0 12px 0;
        margin-top: 32px;
    }
}

@media (max-width: 480px) {
    .site-footer {
        font-size: 0.85rem;
        padding: 12px 0 8px 0;
        margin-top: 20px;
    }
}

.formula-section {
    background: #f7fbff;
    border-radius: 20px;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.1);
    width: 960px;
    max-width: 98%;
    margin: 48px auto 32px auto;
    padding: 36px 32px 28px 32px;
    text-align: left;
    border-top: 3px solid #e3eafc;
}
.formula-title {
    color: #1a73e8;
    font-size: 1.7rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    letter-spacing: 0.5px;
    text-align: center;
}
.formula-content p {
    color: #4a5a6a;
    font-size: 1.08rem;
    margin-bottom: 1.2rem;
}
.formula-box {
    background: #e3eafc;
    border-radius: 10px;
    padding: 16px 18px;
    margin-bottom: 1.1rem;
    font-size: 1.08rem;
    box-shadow: 0 2px 8px rgba(26,115,232,0.04);
    border-left: 4px solid #1a73e8;
}
.formula-math {
    font-family: 'Consolas', 'Menlo', 'Monaco', monospace;
    color: #1976d2;
    font-size: 1.13rem;
    display: block;
    margin-top: 6px;
    margin-bottom: 2px;
    letter-spacing: 0.2px;
}
.formula-note {
    color: #888;
    font-size: 0.98rem;
    margin-top: 0.5rem;
    font-style: italic;
}
@media (max-width: 900px) {
    .formula-section {
        width: 98%;
        padding: 22px 8px 18px 8px;
    }
}

.seo-intro {
    background: #e3eafc;
    border-radius: 14px;
    box-shadow: 0 2px 8px rgba(26,115,232,0.04);
    margin: 32px auto 24px auto;
    padding: 18px 28px 14px 28px;
    width: 900px;
    max-width: 96%;
    color: #355;
    font-size: 1.08rem;
    line-height: 1.7;
    text-align: left;
    border-left: 4px solid #1a73e8;
}
.seo-intro strong {
    color: #1976d2;
    font-weight: 600;
}
@media (max-width: 1000px) {
    .seo-intro { width: 98%; padding: 12px 8px 10px 12px; }
}

.about-section {
    background-color: #f7fbff;
    padding: 40px 36px 32px 36px;
    border-radius: 20px;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.1);
    width: 960px;
    max-width: 98%;
    margin-top: 40px;
    text-align: left;
    border-top: 3px solid #e3eafc;
    border-left: 4px solid #1a73e8;
}

.about-section h2 {
    color: #1a73e8;
    font-size: 2rem;
    margin-bottom: 1.5rem;
    text-align: left;
    letter-spacing: 1px;
}

.about-section p {
    color: #6c757d;
    font-size: 1.08rem;
    line-height: 1.8;
    margin-bottom: 1.2rem;
}

.about-section p:last-child {
    margin-bottom: 0;
}

/* Media Queries for About Section */
@media (max-width: 768px) {
    .about-section {
        padding: 25px 20px 20px 20px;
        margin-top: 30px;
        width: 95%;
    }

    .about-section h2 {
        font-size: 1.5rem;
        margin-bottom: 1rem;
    }

    .about-section p {
        font-size: 0.95rem;
    }
}

@media (max-width: 480px) {
    .about-section {
        padding: 20px 15px 15px 15px;
        margin-top: 20px;
        border-radius: 15px;
    }

    .about-section h2 {
        font-size: 1.3rem;
        margin-bottom: 0.8rem;
    }

    .about-section p {
        font-size: 0.85rem;
    }
}

.literature-section {
    background-color: #f7fbff;
    padding: 40px 36px 32px 36px;
    border-radius: 20px;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.1);
    width: 960px;
    max-width: 98%;
    margin-top: 40px;
    text-align: left;
    border-top: 3px solid #e3eafc;
    border-left: 4px solid #1a73e8;
}

.literature-section h2 {
    color: #1a73e8;
    font-size: 2rem;
    margin-bottom: 1.5rem;
    text-align: center;
    letter-spacing: 1px;
}

.literature-section h3 {
    color: #1976d2;
    font-size: 1.25rem;
    margin-top: 1.5rem;
    margin-bottom: 0.8rem;
}

.literature-section p {
    color: #6c757d;
    font-size: 1.05rem;
    line-height: 1.8;
    margin-bottom: 1rem;
}

.literature-section p:last-of-type {
    margin-bottom: 0;
}

/* Media Queries for Literature Section */
@media (max-width: 768px) {
    .literature-section {
        padding: 25px 20px 20px 20px;
        margin-top: 30px;
        width: 95%;
    }

    .literature-section h2 {
        font-size: 1.5rem;
        margin-bottom: 1rem;
    }

    .literature-section h3 {
        font-size: 1.1rem;
        margin-top: 1rem;
        margin-bottom: 0.6rem;
    }

    .literature-section p {
        font-size: 0.95rem;
    }
}

@media (max-width: 480px) {
    .literature-section {
        padding: 20px 15px 15px 15px;
        margin-top: 20px;
        border-radius: 15px;
    }

    .literature-section h2 {
        font-size: 1.3rem;
        margin-bottom: 0.8rem;
    }

    .literature-section h3 {
        font-size: 1rem;
        margin-top: 0.8rem;
        margin-bottom: 0.5rem;
    }

    .literature-section p {
        font-size: 0.85rem;
    }
} 