:root {
    --primary-color: #00a1d6;
    --secondary-color: #fb7299;
    --success-color: #4caf50;
    --text-color: #333;
    --text-light: #666;
    --bg-color: #f5f7fa;
    --card-bg: #ffffff;
    --border-color: #e0e0e0;
    --shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    --shadow-hover: 0 4px 16px rgba(0, 0, 0, 0.15);
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, 'Noto Sans', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: var(--text-color);
    line-height: 1.6;
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 900px;
    margin: 0 auto;
    background: var(--card-bg);
    border-radius: 16px;
    box-shadow: var(--shadow);
    overflow: hidden;
}

header {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    padding: 40px 30px;
    text-align: center;
}

header h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    font-weight: 700;
}

.subtitle {
    font-size: 1.1rem;
    opacity: 0.95;
}

main {
    padding: 40px 30px;
}

section {
    margin-bottom: 30px;
}

.input-section {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.input-group {
    flex: 1;
    min-width: 250px;
}

label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--text-color);
    font-size: 0.95rem;
}

input[type="text"] {
    width: 100%;
    padding: 14px 18px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s ease;
    outline: none;
}

input[type="text"]:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(0, 161, 214, 0.1);
}

.btn-primary {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 14px 32px;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 10px;
    white-space: nowrap;
}

.btn-primary:hover {
    background: #0088b8;
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
}

.btn-primary:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
}

.loader {
    width: 16px;
    height: 16px;
    border: 2px solid #ffffff;
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.video-preview {
    background: var(--bg-color);
    border-radius: 12px;
    padding: 20px;
    margin-top: 20px;
}

.video-info {
    display: flex;
    gap: 20px;
    align-items: flex-start;
}

.video-thumbnail {
    width: 200px;
    height: auto;
    border-radius: 8px;
    object-fit: cover;
}

.video-details h3 {
    font-size: 1.3rem;
    margin-bottom: 10px;
    color: var(--text-color);
}

.video-details p {
    margin: 5px 0;
    color: var(--text-light);
}

.progress-section h2 {
    margin-bottom: 20px;
    color: var(--text-color);
}

.progress-bar {
    width: 100%;
    height: 12px;
    background: var(--border-color);
    border-radius: 6px;
    overflow: hidden;
    margin-bottom: 30px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    transition: width 0.5s ease;
    width: 0;
}

.steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 15px;
}

.step {
    text-align: center;
    padding: 15px;
    background: var(--bg-color);
    border-radius: 8px;
    transition: all 0.3s ease;
}

.step.active {
    background: rgba(0, 161, 214, 0.1);
    border: 2px solid var(--primary-color);
}

.step.completed {
    background: rgba(76, 175, 80, 0.1);
}

.step-number {
    width: 40px;
    height: 40px;
    background: white;
    border: 2px solid var(--border-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 10px;
    font-weight: 700;
    transition: all 0.3s ease;
}

.step.active .step-number {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.step.completed .step-number {
    background: var(--success-color);
    color: white;
    border-color: var(--success-color);
}

.step.completed .step-number::before {
    content: '✓';
}

.step-label {
    font-size: 0.9rem;
    color: var(--text-light);
}

.result-section {
    background: var(--bg-color);
    border-radius: 12px;
    padding: 25px;
    margin-top: 20px;
}

.result-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 10px;
}

.result-header h2 {
    color: var(--text-color);
    font-size: 1.5rem;
}

.btn-secondary {
    background: white;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
    padding: 10px 20px;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-secondary:hover {
    background: var(--primary-color);
    color: white;
}

.result-content {
    background: white;
    padding: 20px;
    border-radius: 8px;
    max-height: 500px;
    overflow-y: auto;
    line-height: 1.8;
    color: var(--text-color);
}

.summary-content {
    font-size: 1.05rem;
}

.export-section {
    background: var(--bg-color);
    border-radius: 12px;
    padding: 25px;
    margin-top: 20px;
}

.export-section h2 {
    margin-bottom: 20px;
    color: var(--text-color);
}

.export-buttons {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.btn-export {
    flex: 1;
    min-width: 150px;
    background: white;
    color: var(--text-color);
    border: 2px solid var(--border-color);
    padding: 12px 20px;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-export:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

footer {
    background: var(--bg-color);
    padding: 20px 30px;
    text-align: center;
    color: var(--text-light);
    font-size: 0.9rem;
}

footer p {
    margin: 5px 0;
}

@media (max-width: 768px) {
    header h1 {
        font-size: 2rem;
    }

    .subtitle {
        font-size: 1rem;
    }

    main {
        padding: 20px 15px;
    }

    .input-section {
        flex-direction: column;
    }

    .btn-primary {
        width: 100%;
        justify-content: center;
    }

    .video-info {
        flex-direction: column;
    }

    .video-thumbnail {
        width: 100%;
    }

    .steps {
        grid-template-columns: repeat(2, 1fr);
    }

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

    .btn-export {
        width: 100%;
    }
}

.result-content::-webkit-scrollbar {
    width: 8px;
}

.result-content::-webkit-scrollbar-track {
    background: var(--bg-color);
    border-radius: 4px;
}

.result-content::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 4px;
}

.result-content::-webkit-scrollbar-thumb:hover {
    background: var(--text-light);
}