:root {
    --primary-color: #4361ee;
    --primary-hover: #3730a3;
    --text-color: #2d3748;
    --border-color: #e2e8f0;
    --background-color: #f7fafc;
    --success-color: #0ca678;
    --error-color: #e53e3e;
    --warning-color: #f6ad55;
    --info-color: #4299e1;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    line-height: 1.5;
    color: var(--text-color);
    background: linear-gradient(135deg, #e0f2fe 0%, #bfdbfe 100%);
    min-height: 100vh;
}

.main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

.hero {
    text-align: center;
    padding: 3rem 0;
    margin-bottom: 2rem;
}

.hero h1 {
    font-size: 2.75rem;
    color: var(--text-color);
    margin-bottom: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.025em;
}

.hero p {
    font-size: 1.2rem;
    color: #4a5568;
    max-width: 800px;
    margin: 0 auto 2rem;
    line-height: 1.7;
}

.hero-features {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 2rem;
}

.feature {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1.5rem;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 12px;
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    transition: transform 0.2s, box-shadow 0.2s;
}

.feature:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.feature .icon {
    width: 1.5rem;
    height: 1.5rem;
    color: var(--primary-color);
}

.converter-container {
    display: flex;
    gap: 2rem;
    background: white;
    padding: 2.5rem;
    border-radius: 16px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    margin-bottom: 3rem;
    border: 1px solid rgba(226, 232, 240, 0.8);
}

.text-editor-section {
    width: 800px;
    min-width: 0;
}

.voice-selector-section {
    width: 300px;
    flex: none;
    background: var(--background-color);
    padding: 1.5rem;
    border-radius: 12px;
    border: 1px solid var(--border-color);
}

.features-section {
    padding: 4rem 0;
    background: white;
    margin: 3rem auto;
    max-width: 1200px;
    border-radius: 20px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(226, 232, 240, 0.8);
}

.features-section h2 {
    text-align: center;
    font-size: 2.25rem;
    margin-bottom: 3rem;
    color: var(--text-color);
    font-weight: 700;
    letter-spacing: -0.025em;
}

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

.feature-card {
    padding: 2.5rem;
    background: var(--background-color);
    border-radius: 16px;
    transition: all 0.3s ease;
    border: 1px solid var(--border-color);
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 20px rgba(0, 0, 0, 0.08);
}

.feature-card h3 {
    font-size: 1.35rem;
    margin-bottom: 1.25rem;
    color: var(--text-color);
    font-weight: 600;
}

.feature-card p {
    color: #4a5568;
    line-height: 1.7;
    font-size: 1.05rem;
}

/* Button Styles */
button {
    padding: 0.75rem 1.5rem;
    border-radius: 10px;
    border: none;
    background: var(--primary-color);
    color: white;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    box-shadow: 0 2px 4px rgba(67, 97, 238, 0.1);
}

button:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(67, 97, 238, 0.2);
}

button:active {
    transform: translateY(0);
    box-shadow: 0 1px 2px rgba(67, 97, 238, 0.1);
}

/* Action buttons */
.action-button {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
}

.action-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.1);
    transform: translateX(-100%);
    transition: transform 0.3s ease;
}

.action-button:hover::before {
    transform: translateX(0);
}

.action-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.action-button:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.action-button svg {
    width: 1.25rem;
    height: 1.25rem;
    transition: transform 0.3s ease;
}

.action-button:hover svg {
    transform: translateY(2px);
}

/* Download button specific styles */
.download-button {
    background: var(--success-color);
    color: white;
    margin-right: 0.5rem;
}

.download-button:hover {
    background: #099268;
}

.subtitle-button {
    background: var(--primary-color);
}

.subtitle-button:hover {
    background: var(--primary-hover);
}

.download-buttons {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
}

/* Input Styles */
input, select, textarea {
    padding: 0.75rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    background: white;
    width: 100%;
    font-size: 1rem;
    transition: all 0.2s ease;
}

input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(66, 153, 225, 0.15);
}

/* 响应式设计 */
@media (max-width: 1024px) {
    .main {
        padding: 1.5rem;
    }

    .converter-container {
        flex-direction: column;
    }

    .voice-selector-section {
        width: 100%;
    }
}

@media (max-width: 768px) {
    .hero h1 {
        font-size: 2.25rem;
    }

    .hero-features {
        flex-direction: column;
        align-items: center;
    }

    .features-grid {
        grid-template-columns: 1fr;
        padding: 0 1.5rem;
    }

    .converter-container {
        padding: 1.5rem;
    }

    .download-buttons {
        flex-direction: row;
        justify-content: flex-start;
    }
}

@media (max-width: 480px) {
    .main {
        padding: 1rem;
    }

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

    .converter-container {
        padding: 1rem;
    }
}

/* Audio controls */
.audio-controls {
    display: flex;
    flex-direction: column;
    width: 100%;
    margin-top: 1rem;
}

.audio-player {
    width: 100%;
    margin-bottom: 1rem;
}

/* Download buttons container */
.download-buttons {
    display: flex;
    gap: 0.5rem;
    justify-content: flex-start;
}

/* Download button styles */
.download-button {
    min-width: 120px;
    background: var(--success-color);
    color: white;
    padding: 0.5rem 1rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.subtitle-button {
    min-width: 120px;
    background: var(--primary-color);
    padding: 0.5rem 1rem;
}

.download-button:hover,
.subtitle-button:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
}
