/* 全局样式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* 基础变量定义 */
:root {
    --primary-color: #2563eb;
    --primary-light: #3b82f6;
    --primary-dark: #1d4ed8;
    --secondary-color: #64748b;
    --bg-light: #f8fafc;
    --bg-dark: #0f172a;
    --text-dark: #1e293b;
    --text-light: #f8fafc;
    --gray-light: #e2e8f0;
    --gray: #94a3b8;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --radius: 8px;
    --transition: all 0.3s ease;
}

/* 通用样式 */
body {
    color: var(--text-dark);
    background-color: #fff;
    line-height: 1.6;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

ul {
    list-style: none;
}

.container {
    width: 100%;
    padding: 0 1rem;
    margin: 0 auto;
    /* 响应式容器宽度 */
    max-width: 1200px;
}

.section-title {
    font-size: 2rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 2.5rem;
    color: var(--text-dark);
    position: relative;
}

.section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 4px;
    background-color: var(--primary-color);
    margin: 0.8rem auto 0;
    border-radius: 2px;
}

.btn {
    display: inline-block;
    padding: 0.8rem 1.8rem;
    border-radius: var(--radius);
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    text-align: center;
}

.primary-btn {
    background-color: var(--primary-color);
    color: var(--text-light);
}

.primary-btn:hover {
    background-color: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.secondary-btn {
    background-color: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
    margin-left: 1rem;
}

.secondary-btn:hover {
    background-color: var(--primary-light);
    color: var(--text-light);
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

/* 导航栏样式 */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background-color: #fff;
    z-index: 999;
    transition: var(--transition);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.header.scrolled {
    background-color: rgba(255, 255, 255, 0.95);
    box-shadow: var(--shadow);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
}

/* 移动端菜单按钮 */
.menu-toggle {
    display: none;
    background: transparent;
    border: none;
    font-size: 1.5rem;
    color: var(--text-dark);
    cursor: pointer;
}

/* 导航菜单 */
.nav-list {
    display: flex;
    gap: 2rem;
}

.nav-link {
    font-weight: 600;
    color: var(--text-dark);
    padding: 0.5rem 0;
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary-color);
    transition: var(--transition);
}

.nav-link:hover::after {
    width: 100%;
}

/* 英雄区样式 */
.hero {
    padding: 8rem 0 4rem;
    margin-top: 70px;
    background-color: var(--bg-light);
}

.hero-content {
    max-width: 600px;
    margin-bottom: 2rem;
}

.hero h1 {
    font-size: 2.5rem;
    line-height: 1.2;
    margin-bottom: 1.5rem;
    color: var(--text-dark);
}

.hero p {
    font-size: 1.1rem;
    color: var(--secondary-color);
    margin-bottom: 2rem;
}

.hero-img {
    margin-top: 2rem;
}

.hero-img img {
    width: 100%;
    height: auto;
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
}

/* 工具分类区样式 */
.tools {
    padding: 6rem 0;
}

.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.tool-card {
    background-color: #fff;
    padding: 2rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.tool-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.tool-icon {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
}

.tool-card h3 {
    font-size: 1.3rem;
    margin-bottom: 1rem;
    color: var(--text-dark);
}

.tool-card p {
    color: var(--secondary-color);
    margin-bottom: 1.5rem;
}

.card-link {
    display: inline-flex;
    align-items: center;
    font-weight: 600;
    color: var(--primary-color);
    gap: 0.5rem;
}

.card-link:hover {
    color: var(--primary-dark);
    gap: 0.8rem;
}

/* 核心特性区样式 */
.features {
    padding: 6rem 0;
    background-color: var(--bg-light);
}

.features-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.feature-item {
    display: flex;
    align-items: flex-start;
    gap: 1.5rem;
}

.feature-icon {
    font-size: 2rem;
    color: var(--primary-color);
    margin-top: 0.3rem;
}

.feature-text h3 {
    font-size: 1.3rem;
    margin-bottom: 1rem;
    color: var(--text-dark);
}

.feature-text p {
    color: var(--secondary-color);
}

/* 关于我们样式 */
.about {
    padding: 6rem 0;
}

.about-content {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.about-content p {
    font-size: 1.1rem;
    color: var(--secondary-color);
    margin-bottom: 1.5rem;
}

/* 联系我们样式 */
.contact {
    padding: 6rem 0;
    background-color: var(--bg-light);
}

.contact-content {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.contact-content p {
    font-size: 1.1rem;
    color: var(--secondary-color);
    margin-bottom: 2rem;
}

.contact-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    align-items: center;
}

.contact-list li {
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 0.8rem;
    color: var(--text-dark);
}

.contact-list i {
    color: var(--primary-color);
    font-size: 1.2rem;
}

/* 页脚样式 */
.footer {
    padding: 3rem 0;
    background-color: var(--bg-dark);
    color: var(--text-light);
}

.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
}

.footer-links {
    display: flex;
    gap: 2rem;
}

.footer-links a {
    color: var(--gray);
}

.footer-links a:hover {
    color: var(--text-light);
}

/* 响应式适配 - 平板（768px以下） */
@media (max-width: 768px) {
    .menu-toggle {
        display: block;
    }

    .nav {
        position: fixed;
        top: 70px;
        left: 0;
        width: 100%;
        background-color: #fff;
        box-shadow: var(--shadow);
        transform: translateY(-150%);
        transition: var(--transition);
        z-index: 998;
    }

    .nav.active {
        transform: translateY(0);
    }

    .nav-list {
        flex-direction: column;
        padding: 2rem 1rem;
        gap: 1.5rem;
    }

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

    .section-title {
        font-size: 1.8rem;
    }

    .btn {
        display: block;
        width: 100%;
        margin-bottom: 1rem;
    }

    .secondary-btn {
        margin-left: 0;
    }
}

/* 响应式适配 - 手机（480px以下） */
@media (max-width: 480px) {
    .hero {
        padding: 6rem 0 2rem;
    }

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

    .section-title {
        font-size: 1.6rem;
    }

    .tools, .features, .about, .contact {
        padding: 4rem 0;
    }

    .footer-links {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
}

/* 大屏适配（1200px以上） */
@media (min-width: 1200px) {
    .hero {
        padding: 10rem 0 6rem;
    }

    .hero-content {
        margin-bottom: 0;
    }

    .hero .container {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 4rem;
    }

    .hero-img {
        flex: 1;
        margin-top: 0;
    }

    .hero-content {
        flex: 1;
    }
}
/* 工具页统一样式 */
.tool-page-section {
    padding: 120px 0 60px;
    min-height: calc(100vh - 280px);
    display: flex;
    align-items: center;
    background-color: #f8fafc;
}
.tool-card-wrapper {
    max-width: 700px;
    margin: 0 auto;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 10px 25px -5px rgba(0,0,0,0.05);
    padding: 25px 30px;
}
.tool-header {
    text-align: center;
    margin-bottom: 15px;
}
.tool-header h1 {
    font-size: 26px;
    margin-bottom: 8px;
    color: #1e293b;
}
.tool-header p {
    color: #64748b;
    font-size: 15px;
}
.form-group {
    margin-bottom: 20px;
}
.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #334155;
}
.tool-input,
.tool-textarea {
    width: 100%;
    padding: 14px 16px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 16px;
    outline: none;
    transition: all 0.3s;
}
.tool-input:focus,
.tool-textarea:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37,99,235,0.1);
}
.tool-textarea {
    min-height: 120px;
    resize: none;
}
.tool-btn-group {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
}
.block-btn {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}
@media (max-width:768px) {
    .tool-card-wrapper {
        padding: 30px 20px;
    }
    .tool-btn-group {
        flex-direction: column;
    }
}
/* 数字大小写工具增强样式 */
.radio-group {
    display: flex;
    gap: 20px;
    margin-top: 5px;
}
.radio-item {
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    font-weight: 500;
}
.result-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 15px;
    background: #f8fafc;
    border-radius: 8px;
    margin-bottom: 10px;
    gap: 10px;
}
.result-text {
    flex: 1;
    word-break: break-all;
    font-size: 15px;
}
.copy-btn {
    padding: 6px 12px;
    font-size: 14px;
    background: #2563eb;
    color: #fff;
    white-space: nowrap;
}
.tool-info-card {
    background: #fff;
    border-radius: 12px;
    padding: 25px 30px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.04);
}
.tool-info-card h3 {
    font-size: 18px;
    margin-bottom: 15px;
    color: #1e293b;
}
.info-content p {
    margin-bottom: 8px;
    color: #475569;
    line-height: 1.6;
}
.faq-item {
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px dashed #e2e8f0;
}
.faq-item:last-child {
    border-bottom: none;
}
.faq-item strong {
    color: #1e293b;
    display: block;
    margin-bottom: 5px;
}
.faq-item p {
    color: #64748b;
    margin: 0;
}
@media (max-width:768px) {
    .result-item {
        flex-direction: column;
        align-items: flex-start;
    }
    .copy-btn {
        width: 100%;
    }
    .tool-info-card {
        padding: 20px;
    }
}