/* Root Variables */
:root {
    --primary: #667eea;
    --primary-dark: #5568d3;
    --secondary: #764ba2;
    --success: #10b981;
    --error: #ef4444;
    --warning: #f59e0b;
    --text-primary: #1f2937;
    --text-secondary: #6b7280;
    --text-tertiary: #9ca3af;
    --bg-primary: #ffffff;
    --bg-secondary: #f9fafb;
    --bg-tertiary: #f3f4f6;
    --border: #e5e7eb;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    --radius: 12px;
    --radius-lg: 16px;
}

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

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

.container {
    max-width: 800px;
    margin: 0 auto;
}

/* Header */
.header {
    text-align: center;
    margin-bottom: 40px;
    animation: fadeInDown 0.6s ease;
}

.logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 8px;
}

.logo h1 {
    font-size: 32px;
    font-weight: 700;
    color: white;
    margin: 0;
}

.subtitle {
    color: rgba(255, 255, 255, 0.9);
    font-size: 16px;
    font-weight: 500;
}

/* Card */
.card {
    background: var(--bg-primary);
    border-radius: var(--radius-lg);
    padding: 32px;
    box-shadow: var(--shadow-xl);
    margin-bottom: 24px;
    animation: fadeInUp 0.6s ease;
}

.card h2 {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.card h3 {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 16px;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 8px;
}

.description {
    color: var(--text-secondary);
    margin-bottom: 24px;
    font-size: 15px;
}

/* Input Group */
.input-group {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
}

input[type="text"] {
    flex: 1;
    padding: 14px 16px;
    border: 2px solid var(--border);
    border-radius: var(--radius);
    font-size: 15px;
    font-family: inherit;
    transition: all 0.2s ease;
    background: var(--bg-secondary);
}

input[type="text"]:focus {
    outline: none;
    border-color: var(--primary);
    background: white;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

input[type="text"]::placeholder {
    color: var(--text-tertiary);
}

/* Buttons */
.btn {
    padding: 14px 24px;
    border: none;
    border-radius: var(--radius);
    font-size: 15px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(102, 126, 234, 0.3);
}

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

.btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.btn-secondary {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

.btn-secondary:hover {
    background: var(--border);
}

.btn-icon {
    padding: 8px;
    background: transparent;
    color: var(--text-secondary);
}

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

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

/* Advanced Options */
.advanced-options {
    margin-bottom: 20px;
}

.advanced-options summary {
    cursor: pointer;
    color: var(--primary);
    font-weight: 500;
    user-select: none;
    padding: 8px 0;
    list-style: none;
}

.advanced-options summary::-webkit-details-marker {
    display: none;
}

.advanced-options summary::before {
    content: '▶';
    display: inline-block;
    margin-right: 8px;
    transition: transform 0.2s;
}

.advanced-options[open] summary::before {
    transform: rotate(90deg);
}

.options-content {
    padding: 20px;
    background: var(--bg-secondary);
    border-radius: var(--radius);
    margin-top: 12px;
}

.option-item {
    margin-bottom: 20px;
}

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

.option-item label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--text-primary);
    font-size: 14px;
}

.tooltip {
    display: inline-block;
    width: 16px;
    height: 16px;
    background: var(--text-tertiary);
    color: white;
    border-radius: 50%;
    text-align: center;
    font-size: 11px;
    cursor: help;
    margin-left: 4px;
}

.slider {
    width: 100%;
    height: 6px;
    border-radius: 3px;
    background: var(--border);
    outline: none;
    -webkit-appearance: none;
}

.slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--primary);
    cursor: pointer;
    box-shadow: var(--shadow-sm);
}

.slider::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--primary);
    cursor: pointer;
    border: none;
    box-shadow: var(--shadow-sm);
}

.range-labels {
    display: flex;
    justify-content: space-between;
    margin-top: 8px;
    font-size: 12px;
    color: var(--text-tertiary);
}

.checkbox-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-weight: 400 !important;
}

.checkbox-label input[type="checkbox"] {
    margin-right: 8px;
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: var(--primary);
}

/* Platforms */
.platforms {
    padding: 20px;
    background: var(--bg-secondary);
    border-radius: var(--radius);
}

.platforms-grid-info {
    display: grid;
    gap: 20px;
}

.info-section {
    margin-bottom: 0;
}

.info-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 12px;
}

.platform-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
}

.badge {
    padding: 6px 12px;
    background: white;
    color: var(--primary);
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    border: 1px solid var(--border);
}

.language-list {
    color: var(--text-secondary);
    font-size: 14px;
    line-height: 1.6;
}

/* Progress Section */
.progress-bar {
    width: 100%;
    height: 8px;
    background: var(--bg-tertiary);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 16px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    border-radius: 4px;
    transition: width 0.3s ease;
    width: 0%;
}

.status-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.status-text {
    font-weight: 500;
    color: var(--text-primary);
}

.progress-percent {
    font-weight: 600;
    color: var(--primary);
}

.status-details {
    color: var(--text-secondary);
    font-size: 14px;
}

/* Result Section */
.result-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.transcript-preview {
    background: var(--bg-secondary);
    border-radius: var(--radius);
    padding: 20px;
    margin-bottom: 20px;
    max-height: 400px;
    overflow-y: auto;
}

.preview-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.preview-header h4 {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 0;
}

.transcript-content {
    color: var(--text-primary);
    line-height: 1.8;
    white-space: pre-wrap;
    word-wrap: break-word;
}

/* Error Section */
.error-section {
    text-align: center;
}

.error-icon {
    margin-bottom: 16px;
}

.error-message {
    color: var(--text-secondary);
    margin-bottom: 20px;
    padding: 16px;
    background: var(--bg-secondary);
    border-radius: var(--radius);
    border-left: 4px solid var(--error);
}

/* Footer */
.footer {
    text-align: center;
    color: rgba(255, 255, 255, 0.9);
    padding: 20px 0;
    font-size: 14px;
}

.footer p {
    margin-bottom: 8px;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 12px;
    align-items: center;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    transition: color 0.2s;
}

.footer-links a:hover {
    color: white;
    text-decoration: underline;
}

/* Toast Notification */
.toast {
    position: fixed;
    bottom: 24px;
    right: 24px;
    background: var(--text-primary);
    color: white;
    padding: 16px 24px;
    border-radius: var(--radius);
    box-shadow: var(--shadow-xl);
    transform: translateY(100px);
    opacity: 0;
    transition: all 0.3s ease;
    z-index: 1000;
    max-width: 400px;
}

.toast.show {
    transform: translateY(0);
    opacity: 1;
}

.toast.success {
    background: var(--success);
}

.toast.error {
    background: var(--error);
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

.loading {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* Spinner animation */
@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

.btn-primary:disabled svg {
    animation: spin 1s linear infinite;
}

/* Responsive Design */
@media (max-width: 768px) {
    body {
        padding: 12px;
    }

    .card {
        padding: 20px;
    }

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

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

    .result-header {
        flex-direction: column;
        gap: 12px;
        align-items: stretch;
    }

    .logo h1 {
        font-size: 24px;
    }

    .toast {
        left: 12px;
        right: 12px;
        bottom: 12px;
    }
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-tertiary);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: var(--text-tertiary);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-secondary);
}

/* SEO Content Sections */
.hero-description {
    color: rgba(255, 255, 255, 0.95);
    font-size: 16px;
    max-width: 600px;
    margin: 16px auto 0;
    line-height: 1.6;
}

.seo-content {
    background: white;
    padding: 60px 20px;
}

.content-section {
    max-width: 900px;
    margin: 0 auto 60px;
}

.content-section h2 {
    font-size: 32px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 24px;
    text-align: center;
}

.content-section > p {
    font-size: 18px;
    color: var(--text-secondary);
    text-align: center;
    margin-bottom: 40px;
    line-height: 1.8;
}

/* Features Grid */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
    margin-top: 32px;
}

.feature-item {
    background: var(--bg-secondary);
    padding: 24px;
    border-radius: var(--radius);
    border: 1px solid var(--border);
}

.feature-item h3 {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 12px;
}

.feature-item p {
    color: var(--text-secondary);
    line-height: 1.6;
}

/* Steps */
.steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 32px;
    margin-top: 32px;
}

.step {
    text-align: center;
}

.step-number {
    display: inline-block;
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    border-radius: 50%;
    font-size: 24px;
    font-weight: 700;
    line-height: 48px;
    margin-bottom: 16px;
}

.step h3 {
    font-size: 20px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 12px;
}

.step p {
    color: var(--text-secondary);
    line-height: 1.6;
}

/* Use Cases */
.use-cases {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 24px;
    margin-top: 32px;
}

.use-case {
    background: var(--bg-secondary);
    padding: 24px;
    border-radius: var(--radius);
    border-left: 4px solid var(--primary);
}

.use-case h3 {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 12px;
}

.use-case p {
    color: var(--text-secondary);
    line-height: 1.6;
}

/* FAQ */
.faq {
    max-width: 700px;
    margin: 32px auto 0;
}

.faq-item {
    background: var(--bg-secondary);
    padding: 24px;
    border-radius: var(--radius);
    margin-bottom: 16px;
    border: 1px solid var(--border);
}

.faq-item h3 {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 12px;
}

.faq-item p {
    color: var(--text-secondary);
    line-height: 1.7;
}

/* CTA Section */
.cta-section {
    text-align: center;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    padding: 48px;
    border-radius: var(--radius-lg);
}

.cta-section h2 {
    color: white;
    margin-bottom: 16px;
}

.cta-section p {
    color: rgba(255, 255, 255, 0.95);
    margin-bottom: 32px;
}

.cta-button {
    display: inline-block;
    padding: 16px 32px;
    background: white;
    color: var(--primary);
    border-radius: var(--radius);
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s ease;
}

.cta-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
}

/* Responsive SEO Content */
@media (max-width: 768px) {
    .hero-description {
        font-size: 14px;
    }
    
    .seo-content {
        padding: 40px 20px;
    }
    
    .content-section h2 {
        font-size: 24px;
    }
    
    .content-section > p {
        font-size: 16px;
    }
    
    .content-section {
        margin-bottom: 40px;
    }
}
