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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background-color: #f5f5f5;
    color: #333;
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding: 20px;
}

.container {
    width: 100%;
    max-width: 600px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    overflow: hidden;
}

header {
    background: linear-gradient(135deg, #1890ff 0%, #096dd9 100%);
    color: white;
    text-align: center;
    padding: 24px 20px;
}

header h1 {
    font-size: 24px;
    font-weight: 600;
    letter-spacing: -0.5px;
}

main {
    padding: 24px 20px;
}

.input-section {
    margin-bottom: 24px;
}

textarea {
    width: 100%;
    min-height: 120px;
    padding: 14px 16px;
    border: 2px solid #e8e8e8;
    border-radius: 8px;
    font-size: 15px;
    font-family: inherit;
    resize: vertical;
    transition: all 0.3s ease;
    outline: none;
    line-height: 1.6;
}

textarea:focus {
    border-color: #1890ff;
    box-shadow: 0 0 0 3px rgba(24, 144, 255, 0.12);
}

textarea::placeholder {
    color: #bfbfbf;
}

.status {
    margin-top: 10px;
    font-size: 13px;
    color: #8c8c8c;
    transition: all 0.3s ease;
}

.status.error {
    color: #ff4d4f;
    background-color: #fff2f0;
    padding: 10px 14px;
    border-radius: 6px;
    border-left: 3px solid #ff4d4f;
}

.status.success {
    color: #52c41a;
    background-color: #f6ffed;
    padding: 10px 14px;
    border-radius: 6px;
    border-left: 3px solid #52c41a;
}

.preview-section {
    margin-bottom: 24px;
    animation: fadeIn 0.3s ease;
}

.preview-content {
    background: #fafafa;
    border-radius: 8px;
    padding: 20px;
    border: 1px solid #e8e8e8;
}

.preview-cover {
    width: 100%;
    aspect-ratio: 9/16;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 16px;
    background: #e8e8e8;
    max-height: 400px;
}

.preview-info h3 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 8px;
    color: #262626;
    line-height: 1.4;
    word-break: break-word;
}

.preview-info .author {
    font-size: 14px;
    color: #8c8c8c;
    margin-bottom: 16px;
}

.download-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.btn {
    flex: 1;
    min-width: 140px;
    padding: 12px 20px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: inherit;
}

.btn-primary {
    background: linear-gradient(135deg, #1890ff 0%, #096dd9 100%);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(24, 144, 255, 0.35);
}

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

.btn-secondary {
    background: linear-gradient(135deg, #52c41a 0%, #389e0d 100%);
    color: white;
}

.btn-secondary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(82, 196, 26, 0.35);
}

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

.progress-section {
    margin-bottom: 24px;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: #f0f0f0;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 8px;
}

.progress-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #1890ff 0%, #52c41a 100%);
    border-radius: 4px;
    transition: width 0.3s ease;
}

.progress-text {
    font-size: 13px;
    color: #8c8c8c;
    text-align: center;
    display: block;
}

footer {
    text-align: center;
    padding: 16px 20px;
    background: #fafafa;
    border-top: 1px solid #e8e8e8;
    font-size: 12px;
    color: #bfbfbf;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 480px) {
    body {
        padding: 10px;
    }

    header {
        padding: 18px 16px;
    }

    header h1 {
        font-size: 20px;
    }

    main {
        padding: 18px 16px;
    }

    textarea {
        min-height: 100px;
        padding: 12px 14px;
        font-size: 14px;
    }

    .preview-content {
        padding: 16px;
    }

    .btn {
        padding: 10px 16px;
        font-size: 13px;
        min-width: 120px;
    }

    .download-buttons {
        flex-direction: column;
    }

    .download-buttons .btn {
        width: 100%;
    }
}