* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background: linear-gradient(135deg, #6e8efb, #a777e3);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.container {
    width: 100%;
    max-width: 500px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 20px;
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.2);
    overflow: hidden;
    padding: 30px;
    transition: transform 0.3s ease;
}

.container:hover {
    transform: translateY(-5px);
}

.header {
    text-align: center;
    margin-bottom: 30px;
}

.header h1 {
    color: #333;
    font-size: 28px;
    margin-bottom: 10px;
    background: linear-gradient(90deg, #6e8efb, #a777e3);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.header p {
    color: #666;
    font-size: 16px;
}

.service-status {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    padding: 12px 15px;
    border-radius: 10px;
    background: #f8f9ff;
    border-left: 4px solid #ccc;
}

.status-info {
    display: flex;
    align-items: center;
}

.status-indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    margin-right: 10px;
    background: #ccc;
}

.status-indicator.active {
    background: #2ecc71;
    box-shadow: 0 0 8px #2ecc71;
}

.status-indicator.inactive {
    background: #e74c3c;
    box-shadow: 0 0 8px #e74c3c;
}

.status-text {
    font-size: 14px;
    font-weight: 500;
}

.check-status-btn {
    padding: 6px 12px;
    background: #6e8efb;
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 12px;
    cursor: pointer;
    transition: background 0.3s;
}

.check-status-btn:hover {
    background: #5a7ce2;
}

.check-status-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
}

.input-group {
    margin-bottom: 25px;
    display: none;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.input-group.visible {
    display: block;
    opacity: 1;
    transform: translateY(0);
}

.input-group label {
    display: block;
    margin-bottom: 8px;
    color: #555;
    font-weight: 500;
}

textarea {
    width: 100%;
    min-height: 150px;
    padding: 15px;
    border: 2px solid #ddd;
    border-radius: 10px;
    font-size: 16px;
    resize: vertical;
    transition: border-color 0.3s;
}

textarea:focus {
    outline: none;
    border-color: #6e8efb;
    box-shadow: 0 0 0 2px rgba(110, 142, 251, 0.2);
}

.char-count {
    text-align: right;
    font-size: 14px;
    color: #888;
    margin-top: 5px;
}

.validation-info {
    font-size: 14px;
    color: #e67e22;
    margin-top: 8px;
    display: none;
}

.btn {
    display: block;
    width: 100%;
    padding: 15px;
    background: linear-gradient(90deg, #6e8efb, #a777e3);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 5px 15px rgba(110, 142, 251, 0.4);
    display: none;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.btn.visible {
    display: block;
    opacity: 1;
    transform: translateY(0);
}

.btn:disabled {
    background: #ccc;
    cursor: not-allowed;
    box-shadow: none;
    transform: none;
}

.btn:not(:disabled):hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(110, 142, 251, 0.6);
}

.btn:not(:disabled):active {
    transform: translateY(1px);
}

.result-container {
    margin-top: 30px;
    display: none;
    animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.result-box {
    background: #f8f9ff;
    border-radius: 10px;
    padding: 20px;
    text-align: center;
    border: 2px dashed #6e8efb;
}

.result-box h3 {
    color: #555;
    margin-bottom: 15px;
}

.audio-player {
    width: 100%;
    margin: 15px 0;
    border-radius: 5px;
}

.download-btn {
    display: inline-block;
    padding: 10px 20px;
    background: #6e8efb;
    color: white;
    text-decoration: none;
    border-radius: 5px;
    font-weight: 500;
    transition: background 0.3s;
    margin-top: 10px;
}

.download-btn:hover {
    background: #5a7ce2;
}

.loading {
    display: none;
    text-align: center;
    margin: 20px 0;
}

.spinner {
    width: 40px;
    height: 40px;
    margin: 0 auto 15px;
    border: 4px solid rgba(110, 142, 251, 0.3);
    border-radius: 50%;
    border-top-color: #6e8efb;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.error-message {
    color: #e74c3c;
    text-align: center;
    margin-top: 15px;
    display: none;
    animation: shake 0.5s;
    padding: 15px;
    background: rgba(231, 76, 60, 0.1);
    border-radius: 8px;
    border-left: 4px solid #e74c3c;
}

.error-code {
    font-weight: bold;
    margin-bottom: 5px;
}

.error-details {
    font-size: 14px;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

.success-message {
    color: #2ecc71;
    text-align: center;
    margin-top: 15px;
    font-weight: 500;
    display: none;
    padding: 15px;
    background: rgba(46, 204, 113, 0.1);
    border-radius: 8px;
    border-left: 4px solid #2ecc71;
}

.download-info {
    font-size: 14px;
    color: #777;
    margin-top: 15px;
    text-align: center;
}

.service-info {
    text-align: center;
    margin: 20px 0;
    color: #666;
    font-size: 14px;
}

/* 响应式设计 */
@media (max-width: 600px) {
    .container {
        padding: 20px;
        border-radius: 15px;
    }
    
    .header h1 {
        font-size: 24px;
    }
    
    textarea {
        min-height: 120px;
    }
    
    .btn {
        padding: 12px;
        font-size: 16px;
    }
    
    .service-status {
        flex-direction: column;
        gap: 10px;
        align-items: flex-start;
    }
    
    .check-status-btn {
        align-self: flex-end;
    }
}

/* 页脚样式 */
.footer {
    margin-top: 30px;
    padding: 20px 0;
    text-align: center;
    border-top: 1px solid #eee;
    color: #666;
    font-size: 14px;
}

.footer a {
    color: #6e8efb;
    text-decoration: none;
}

.footer a:hover {
    text-decoration: underline;
}