/* 基础样式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* 全局变量 - 简洁克制的配色 */
:root {
    --primary-color: #2563eb;
    --text-primary: #1f2937;
    --text-secondary: #6b7280;
    --border-color: #e5e7eb;
    --bg-white: #ffffff;
    --bg-gray: #f9fafb;
    --bg-light: #f3f4f6;
    --success-color: #10b981;
    --error-color: #ef4444;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--bg-gray);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 头部 */
.header {
    background-color: var(--bg-white);
    border-bottom: 1px solid var(--border-color);
    padding: 30px 0;
    margin-bottom: 30px;
}

.header-content {
    text-align: center;
}

.site-title {
    font-size: 28px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.site-subtitle {
    font-size: 16px;
    color: var(--text-secondary);
    font-weight: 400;
}

/* 介绍区域 */
.intro-section {
    background-color: var(--bg-white);
    border-radius: var(--radius-lg);
    padding: 30px;
    margin-bottom: 30px;
    border: 1px solid var(--border-color);
}

.intro-content h2 {
    font-size: 22px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 16px;
}

.intro-content p {
    font-size: 15px;
    line-height: 1.8;
    color: var(--text-secondary);
    margin-bottom: 12px;
}

.intro-content p:last-child {
    margin-bottom: 0;
}

/* 主工作区 */
.main-workspace {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 30px;
}

.input-section,
.stats-section {
    background-color: var(--bg-white);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    padding: 20px;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border-color);
}

.section-header h3 {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
}

.toolbar {
    display: flex;
    gap: 8px;
}

.tool-button {
    padding: 6px 14px;
    font-size: 14px;
    color: var(--text-primary);
    background-color: var(--bg-light);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.2s;
}

.tool-button:hover {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.tool-button:active {
    transform: scale(0.98);
}

/* 文本输入框 */
.text-input {
    width: 100%;
    height: 400px;
    padding: 16px;
    font-size: 15px;
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--bg-white);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    resize: vertical;
    font-family: inherit;
    transition: border-color 0.2s;
}

.text-input:focus {
    outline: none;
    border-color: var(--primary-color);
}

.text-input::placeholder {
    color: var(--text-secondary);
}

/* 统计结果网格 */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.stat-item {
    padding: 20px;
    background-color: var(--bg-light);
    border-radius: var(--radius-md);
    text-align: center;
}

.stat-label {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.stat-value {
    font-size: 32px;
    font-weight: 600;
    color: var(--primary-color);
    font-variant-numeric: tabular-nums;
}

/* 使用说明 */
.guide-section {
    background-color: var(--bg-white);
    border-radius: var(--radius-lg);
    padding: 30px;
    margin-bottom: 30px;
    border: 1px solid var(--border-color);
}

.guide-section h2 {
    font-size: 22px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 20px;
}

.guide-content {
    display: grid;
    gap: 20px;
}

.guide-step {
    padding: 20px;
    background-color: var(--bg-light);
    border-radius: var(--radius-md);
    border-left: 3px solid var(--primary-color);
}

.guide-step h3 {
    font-size: 17px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 10px;
}

.guide-step p {
    font-size: 15px;
    line-height: 1.7;
    color: var(--text-secondary);
}

/* 功能特点 */
.features-section {
    background-color: var(--bg-white);
    border-radius: var(--radius-lg);
    padding: 30px;
    margin-bottom: 30px;
    border: 1px solid var(--border-color);
}

.features-section h2 {
    font-size: 22px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 20px;
}

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

.feature-item {
    padding: 20px;
    background-color: var(--bg-light);
    border-radius: var(--radius-md);
}

.feature-item h3 {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.feature-item p {
    font-size: 14px;
    line-height: 1.6;
    color: var(--text-secondary);
}

/* 使用示例 */
.examples-section {
    background-color: var(--bg-white);
    border-radius: var(--radius-lg);
    padding: 30px;
    margin-bottom: 30px;
    border: 1px solid var(--border-color);
}

.examples-section h2 {
    font-size: 22px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 20px;
}

.example-item {
    padding: 20px;
    background-color: var(--bg-light);
    border-radius: var(--radius-md);
    margin-bottom: 16px;
}

.example-item:last-child {
    margin-bottom: 0;
}

.example-item h3 {
    font-size: 17px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 10px;
}

.example-item p {
    font-size: 15px;
    line-height: 1.7;
    color: var(--text-secondary);
}

/* 常见问题 */
.faq-section {
    background-color: var(--bg-white);
    border-radius: var(--radius-lg);
    padding: 30px;
    margin-bottom: 30px;
    border: 1px solid var(--border-color);
}

.faq-section h2 {
    font-size: 22px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 20px;
}

.faq-list {
    display: grid;
    gap: 16px;
}

.faq-item {
    padding: 20px;
    background-color: var(--bg-light);
    border-radius: var(--radius-md);
}

.faq-item h3 {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.faq-item p {
    font-size: 15px;
    line-height: 1.7;
    color: var(--text-secondary);
}

/* 适用场景 */
.scenarios-section {
    background-color: var(--bg-white);
    border-radius: var(--radius-lg);
    padding: 30px;
    margin-bottom: 30px;
    border: 1px solid var(--border-color);
}

.scenarios-section h2 {
    font-size: 22px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 20px;
}

.scenarios-list {
    list-style: none;
    padding: 0;
}

.scenarios-list li {
    padding: 12px 0;
    font-size: 15px;
    line-height: 1.7;
    color: var(--text-secondary);
    border-bottom: 1px solid var(--border-color);
}

.scenarios-list li:last-child {
    border-bottom: none;
}

.scenarios-list strong {
    color: var(--text-primary);
    font-weight: 600;
}

/* 相关工具推荐 */
.related-tools-section {
    background-color: var(--bg-white);
    border-radius: var(--radius-lg);
    padding: 30px;
    margin-bottom: 30px;
    border: 1px solid var(--border-color);
}

.related-tools-section h2 {
    font-size: 22px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 12px;
}

.section-desc {
    font-size: 15px;
    color: var(--text-secondary);
    margin-bottom: 24px;
}

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

.tool-card {
    display: block;
    padding: 20px;
    background-color: var(--bg-light);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    text-decoration: none;
    transition: all 0.2s;
}

.tool-card:hover {
    border-color: var(--primary-color);
    background-color: var(--bg-white);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.tool-card h3 {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.tool-card p {
    font-size: 14px;
    line-height: 1.6;
    color: var(--text-secondary);
    margin: 0;
}

/* 页脚 */
.footer {
    background-color: var(--bg-white);
    border-top: 1px solid var(--border-color);
    padding: 30px 0;
    margin-top: 40px;
}

.footer-content {
    text-align: center;
}

.footer-content p {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 12px;
}

.footer-links {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    font-size: 14px;
}

.footer-links a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.2s;
}

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

.footer-links span {
    color: var(--text-secondary);
}

/* 通知系统 */
.notification-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.notification {
    background-color: var(--bg-white);
    padding: 16px 20px;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
    border-left: 4px solid var(--success-color);
    max-width: 350px;
    font-size: 14px;
    color: var(--text-primary);
    animation: slideIn 0.3s ease-out;
}

.notification.error {
    border-left-color: var(--error-color);
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* 响应式设计 */
@media (max-width: 768px) {
    .main-workspace {
        grid-template-columns: 1fr;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .features-grid {
        grid-template-columns: 1fr;
    }
    
    .site-title {
        font-size: 24px;
    }
    
    .text-input {
        height: 300px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 16px;
    }
    
    .toolbar {
        flex-wrap: wrap;
    }
    
    .tool-button {
        font-size: 13px;
        padding: 5px 10px;
    }
    
    .stat-value {
        font-size: 28px;
    }
    
    .notification-container {
        left: 16px;
        right: 16px;
    }
    
    .notification {
        max-width: 100%;
    }
}

/* 打印样式 */
@media print {
    .header,
    .toolbar,
    .footer,
    .notification-container {
        display: none;
    }
    
    .main-workspace {
        grid-template-columns: 1fr;
    }
    
    body {
        background-color: white;
    }
}
