/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f5f5f7;
}

a {
    text-decoration: none;
    color: #0066cc;
}

ul {
    list-style: none;
}

/* Header styles */
header {
    background-color: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 2rem;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: #333;
    display: flex;
    align-items: center;
    background: linear-gradient(to right, #1e3c72, #2a5298);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    letter-spacing: -0.5px;
}

.logo-icon {
    width: 24px;
    height: 24px;
    margin-right: 8px;
    position: relative;
    top: -1px;
    /* ??????λ??????????????????? */
}

nav ul {
    display: flex;
    gap: 2rem;
}

nav ul li a {
    color: #333;
    font-weight: 500;
    transition: color 0.3s ease;
}

nav ul li a:hover {
    color: #0066cc;
}

/* Hero section */
.hero {
    background: linear-gradient(135deg, #1e3c72, #2a5298);
    color: white;
    padding: 1.5rem 2rem;
    /* 进一步减小上下内边距 */
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero::after {
    content: '';
    position: absolute;
    bottom: -50px;
    left: 0;
    width: 100%;
    height: 100px;
    background: linear-gradient(to bottom, rgba(255, 255, 255, 0), rgba(255, 255, 255, 1));
    z-index: 1;
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    height: 100%;
}

.hero-text {
    text-align: center;
    width: 100%;
}

.hero h1 {
    font-size: 2.8rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    line-height: 1.2;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    background: linear-gradient(to right, #ffffff, #e0e0e0);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    letter-spacing: -0.5px;
}

.hero p {
    font-size: 1.1rem;
    opacity: 0.9;
    max-width: 600px;
    margin: 0 auto;
}

/* Calculator section */
.calculator-section {
    padding: 2rem 2rem 4rem;
    background-color: white;
    margin-top: -30px;
    /* 调整上移距离，与更小的hero区域匹配 */
    position: relative;
    z-index: 10;
    border-radius: 24px 24px 0 0;
    box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.1);
}

.calculator-container {
    max-width: 900px;
    margin: 0 auto;
}

.calculator-section h2 {
    text-align: center;
    margin-bottom: 2rem;
    font-size: 2rem;
    font-weight: 600;
}

.highlight {
    background: linear-gradient(to right, #1e3c72, #2a5298);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    padding: 0 10px;
    position: relative;
}

.highlight::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(to right, #1e3c72, #2a5298);
    border-radius: 3px;
}

.calculator {
    background-color: #f5f5f7;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    margin-bottom: 2rem;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
}

.input-group {
    display: flex;
    flex-direction: column;
}

label {
    font-weight: 500;
    margin-bottom: 0.5rem;
    color: #333;
}

input {
    padding: 0.75rem 1rem;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

input:focus {
    outline: none;
    border-color: #0066cc;
    box-shadow: 0 0 0 2px rgba(0, 102, 204, 0.2);
}

.button-group {
    grid-column: 1 / -1;
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 1rem;
}

button {
    background-color: #0066cc;
    color: white;
    border: none;
    border-radius: 8px;
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

button:hover {
    background-color: #004c99;
}

.clear-btn {
    background-color: #6c757d;
}

.clear-btn:hover {
    background-color: #5a6268;
}

/* Results section */
.results {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.result-card {
    background-color: #f5f5f7;
    border-radius: 12px;
    padding: 1.5rem;
    text-align: center;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.result-card:hover {
    transform: translateY(-5px);
}

.highlight-result {
    animation: highlight-pulse 1s ease;
}

@keyframes highlight-pulse {
    0% {
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    }

    50% {
        box-shadow: 0 4px 25px rgba(0, 102, 204, 0.3);
        background-color: #e6f0ff;
    }

    100% {
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    }
}

.result-card h3 {
    font-size: 1.1rem;
    color: #666;
    margin-bottom: 0.5rem;
}

.result-card p {
    font-size: 1.5rem;
    font-weight: 600;
    color: #333;
}

/* How to use section */
.how-to-use {
    padding: 4rem 2rem;
    background-color: #f5f5f7;
}

.how-to-use h2 {
    text-align: center;
    margin-bottom: 3rem;
    font-size: 2rem;
    font-weight: 600;
}

.steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.step {
    background-color: white;
    border-radius: 12px;
    padding: 2rem;
    text-align: center;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    position: relative;
}

.step-number {
    background-color: #0066cc;
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    position: absolute;
    top: -20px;
    left: 50%;
    transform: translateX(-50%);
}

.step h3 {
    margin: 1rem 0;
    font-size: 1.25rem;
}

/* SEO Content section */
.seo-content {
    padding: 4rem 2rem;
    max-width: 900px;
    margin: 0 auto;
}

.seo-content h2 {
    font-size: 2rem;
    margin-bottom: 1.5rem;
    color: #333;
}

.seo-content h3 {
    font-size: 1.5rem;
    margin: 2rem 0 1rem;
    color: #333;
}

.seo-content p {
    margin-bottom: 1.5rem;
    color: #555;
}

.seo-content ul {
    margin-bottom: 1.5rem;
    padding-left: 1.5rem;
}

.seo-content ul li {
    margin-bottom: 0.5rem;
    list-style-type: disc;
    color: #555;
}

.seo-content ul ul {
    margin: 0.5rem 0 0.5rem 1.5rem;
}

/* FAQ section */
.faq-section {
    padding: 4rem 2rem;
    background-color: #f5f5f7;
}

.faq-section h2 {
    text-align: center;
    margin-bottom: 3rem;
    font-size: 2rem;
    font-weight: 600;
}

.faq-container {
    max-width: 900px;
    margin: 0 auto;
}

.faq-item {
    background-color: white;
    border-radius: 12px;
    padding: 1.5rem 2rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

.faq-item h3 {
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
    color: #333;
}

.faq-item p {
    color: #555;
}

/* Footer */
footer {
    background-color: #1d1d1f;
    color: #f5f5f7;
    padding: 4rem 2rem 2rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
    margin-bottom: 2rem;
}

.footer-section h3 {
    font-size: 1.25rem;
    margin-bottom: 1.5rem;
    color: white;
}

.footer-section p {
    color: #a1a1a6;
}

.footer-section ul li {
    margin-bottom: 0.75rem;
}

.footer-section ul li a {
    color: #a1a1a6;
    transition: color 0.3s ease;
}

.footer-section ul li a:hover {
    color: white;
}

.copyright {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid #333;
    color: #a1a1a6;
}

/* Responsive styles */
@media (max-width: 768px) {
    nav {
        flex-direction: column;
        padding: 1rem;
    }

    nav ul {
        margin-top: 1rem;
        gap: 1rem;
    }

    .hero {
        padding: 4rem 1rem;
    }

    .hero h1 {
        font-size: 2.5rem;
    }

    .calculator,
    .results {
        grid-template-columns: 1fr;
    }

    .step {
        padding: 1.5rem;
    }
}