* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Microsoft YaHei', '微软雅黑', Arial, sans-serif;
}

body {
    background-color: #fafafa;
    color: #2c3e50;
    line-height: 1.7;
}

.container {
    max-width: 900px;
    margin: 30px auto;
    padding: 30px;
    background-color: #fff;
    border-radius: 6px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

h1 {
    text-align: center;
    color: #2c3e50;
    margin-bottom: 24px;
    font-size: 32px;
    font-weight: 600;
    letter-spacing: -0.5px;
}

h2 {
    color: #34495e;
    margin: 24px 0 16px 0;
    font-size: 22px;
    font-weight: 600;
    border-bottom: 2px solid #ecf0f1;
    padding-bottom: 8px;
}

h3 {
    color: #34495e;
    margin: 16px 0 8px 0;
    font-size: 18px;
    font-weight: 600;
}

.intro-section {
    margin-bottom: 32px;
    padding: 20px;
    background-color: #f8f9fa;
    border-left: 4px solid #95a5a6;
    border-radius: 4px;
}

.intro-text {
    margin-bottom: 12px;
    color: #555;
    font-size: 15px;
    line-height: 1.8;
}

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

.input-area {
    margin-bottom: 28px;
}

.input-label {
    display: block;
    margin-bottom: 8px;
    color: #34495e;
    font-weight: 500;
    font-size: 15px;
}

textarea {
    width: 100%;
    height: 160px;
    padding: 14px;
    border: 1px solid #ddd;
    border-radius: 4px;
    resize: vertical;
    font-size: 16px;
    font-family: inherit;
    line-height: 1.6;
    color: #2c3e50;
    transition: border-color 0.2s;
}

textarea:focus {
    outline: none;
    border-color: #7f8c8d;
}

.file-upload-area {
    margin-top: 16px;
    padding: 16px;
    background-color: #f8f9fa;
    border: 2px dashed #bdc3c7;
    border-radius: 4px;
    text-align: center;
    transition: all 0.3s ease;
}

.file-upload-area:hover {
    border-color: #7f8c8d;
    background-color: #f1f3f5;
}

.file-upload-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background-color: #34495e;
    color: white;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: background-color 0.2s, transform 0.1s;
}

.file-upload-label:hover {
    background-color: #2c3e50;
    transform: translateY(-1px);
}

.file-upload-label:active {
    transform: translateY(0);
}

.file-upload-label svg {
    width: 18px;
    height: 18px;
}

.file-info {
    display: block;
    margin-top: 10px;
    font-size: 13px;
    color: #7f8c8d;
}

.button-group {
    margin-top: 12px;
    display: flex;
    gap: 10px;
}

button {
    background-color: #34495e;
    color: white;
    border: none;
    padding: 11px 20px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 15px;
    font-weight: 500;
    transition: background-color 0.2s, transform 0.1s;
}

button:hover {
    background-color: #2c3e50;
    transform: translateY(-1px);
}

button:active {
    transform: translateY(0);
}

#clear-btn {
    background-color: #95a5a6;
}

#clear-btn:hover {
    background-color: #7f8c8d;
}

.output-area {
    background-color: #f8f9fa;
    padding: 20px;
    border-radius: 4px;
    border: 1px solid #e9ecef;
    min-height: 120px;
    margin-bottom: 32px;
}

#pinyin-output {
    font-size: 16px;
    line-height: 2;
    word-wrap: break-word;
    color: #2c3e50;
}

.pinyin-item {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    margin-right: 8px;
    margin-bottom: 8px;
    padding: 6px 10px;
    background-color: #fff;
    border: 1px solid #e9ecef;
    border-radius: 4px;
    vertical-align: top;
    min-width: 50px;
}

.pinyin {
    color: #7f8c8d;
    font-size: 13px;
    display: block;
    margin-bottom: 4px;
    line-height: 1.2;
    text-align: center;
}

.hanzi {
    font-weight: 600;
    color: #2c3e50;
    font-size: 18px;
    display: block;
    margin-bottom: 6px;
    text-align: center;
    line-height: 1.2;
}

.speak-btn {
    background-color: #ecf0f1;
    border: 1px solid #bdc3c7;
    color: #34495e;
    cursor: pointer;
    font-size: 12px;
    padding: 4px 8px;
    border-radius: 3px;
    transition: all 0.2s;
    font-weight: 500;
}

.speak-btn:hover {
    background-color: #d5dbdb;
    border-color: #95a5a6;
}

.speak-all-btn {
    background-color: #34495e;
    color: white;
    border: none;
    padding: 10px 18px;
    margin-top: 16px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: background-color 0.2s, transform 0.1s;
    display: inline-block;
}

.speak-all-btn:hover {
    background-color: #2c3e50;
    transform: translateY(-1px);
}

.speak-all-btn:active {
    transform: translateY(0);
}

.download-btn {
    background-color: #27ae60;
    color: white;
    border: none;
    padding: 10px 18px;
    margin-top: 16px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: background-color 0.2s, transform 0.1s;
    display: inline-block;
}

.download-btn:hover {
    background-color: #229954;
    transform: translateY(-1px);
}

.download-btn:active {
    transform: translateY(0);
}

.examples-section {
    margin: 32px 0;
    padding: 24px;
    background-color: #f8f9fa;
    border-radius: 4px;
}

.example-item {
    margin-bottom: 24px;
    padding: 16px;
    background-color: #fff;
    border-left: 3px solid #95a5a6;
    border-radius: 4px;
}

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

.example-item h3 {
    margin-top: 0;
    color: #34495e;
    font-size: 16px;
}

.example-input,
.example-output {
    margin: 8px 0;
    font-size: 14px;
    line-height: 1.8;
}

.example-input code,
.example-output code {
    background-color: #f1f3f5;
    padding: 2px 6px;
    border-radius: 3px;
    font-family: 'Consolas', 'Monaco', monospace;
    color: #e83e8c;
    font-size: 14px;
}

.example-desc {
    margin-top: 8px;
    color: #7f8c8d;
    font-size: 13px;
    font-style: italic;
}

.usage-guide {
    margin: 32px 0;
    padding: 24px;
    background-color: #f8f9fa;
    border-radius: 4px;
}

.usage-guide h2 {
    margin-top: 0;
    border-bottom-color: #bdc3c7;
}

.usage-guide ol {
    padding-left: 24px;
    margin-bottom: 0;
}

.usage-guide li {
    margin-bottom: 12px;
    color: #555;
    line-height: 1.8;
}

.usage-guide ul {
    padding-left: 24px;
    margin-top: 8px;
}

.usage-guide ul li {
    margin-bottom: 6px;
}

.faq-section {
    margin: 32px 0;
    padding: 24px;
    background-color: #f8f9fa;
    border-radius: 4px;
}

.faq-section h2 {
    margin-top: 0;
    border-bottom-color: #bdc3c7;
}

.faq-item {
    margin-bottom: 20px;
    padding: 16px;
    background-color: #fff;
    border-radius: 4px;
    border-left: 3px solid #95a5a6;
}

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

.faq-item h3 {
    margin-top: 0;
    color: #34495e;
    font-size: 16px;
}

.faq-item p {
    margin-top: 8px;
    color: #555;
    font-size: 14px;
    line-height: 1.7;
}

footer {
    text-align: center;
    margin-top: 40px;
    padding-top: 24px;
    border-top: 1px solid #e9ecef;
    color: #7f8c8d;
    font-size: 13px;
}

@media (max-width: 768px) {
    .container {
        margin: 20px 12px;
        padding: 20px;
    }
    
    h1 {
        font-size: 26px;
    }
    
    h2 {
        font-size: 20px;
    }
    
    textarea {
        height: 140px;
    }
    
    .file-upload-area {
        padding: 12px;
    }
    
    .file-upload-label {
        width: 100%;
        justify-content: center;
    }
    
    .button-group {
        flex-direction: column;
    }
    
    button {
        width: 100%;
    }
    
    .examples-section,
    .usage-guide,
    .faq-section {
        padding: 18px;
    }
}