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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    background: white;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    overflow: hidden;
}

header {
    background: #4a5568;
    color: white;
    padding: 30px;
    text-align: center;
}

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

header p {
    font-size: 1.1rem;
    opacity: 0.9;
}

main {
    padding: 30px;
}

.upload-section {
    margin-bottom: 30px;
}

.file-input-wrapper {
    position: relative;
    margin-bottom: 20px;
}

#audio-file {
    display: none;
}

.file-label {
    display: block;
    padding: 40px 20px;
    border: 2px dashed #cbd5e0;
    border-radius: 8px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background-color: #f8fafc;
}

.file-label:hover,
.file-label.drag-over {
    border-color: #667eea;
    background-color: #edf2f7;
}

.file-label-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.upload-icon {
    font-size: 2rem;
}

.url-input {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}

#audio-url {
    flex: 1;
    padding: 12px;
    border: 1px solid #cbd5e0;
    border-radius: 4px;
    font-size: 1rem;
}

#load-url,
.sample-audio button {
    padding: 12px 20px;
    background: #4a5568;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
    transition: background 0.3s;
}

#load-url:hover,
.sample-audio button:hover {
    background: #2d3748;
}

.audio-preview {
    margin-top: 15px;
    padding: 10px;
    background: #e2e8f0;
    border-radius: 4px;
    font-size: 0.9rem;
}

.controls {
    margin-bottom: 30px;
}

#transcribe-btn {
    width: 100%;
    padding: 15px;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s;
    margin-bottom: 20px;
}

#transcribe-btn:hover:not(:disabled) {
    background: #5a67d8;
}

#transcribe-btn:disabled {
    background: #a0aec0;
    cursor: not-allowed;
}

.options {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.options label {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 0.9rem;
}

.progress-container {
    margin-bottom: 30px;
}

.progress-bar {
    width: 100%;
    height: 10px;
    background: #e2e8f0;
    border-radius: 5px;
    overflow: hidden;
    margin-bottom: 10px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #667eea, #764ba2);
    width: 0%;
    transition: width 0.3s ease;
}

.progress-text {
    text-align: center;
    font-size: 0.9rem;
    color: #4a5568;
}

.result-section {
    background: #f8fafc;
    border-radius: 8px;
    padding: 20px;
}

.result-section h2 {
    margin-bottom: 15px;
    color: #4a5568;
}

.transcription-text {
    background: white;
    padding: 20px;
    border-radius: 4px;
    margin-bottom: 20px;
    font-size: 1.1rem;
    line-height: 1.7;
    border: 1px solid #e2e8f0;
    white-space: pre-wrap;
}

.chunks-list {
    margin-bottom: 20px;
}

.chunk-item {
    display: flex;
    padding: 10px;
    border-bottom: 1px solid #e2e8f0;
}

.chunk-item:last-child {
    border-bottom: none;
}

.timestamp {
    font-weight: 600;
    color: #667eea;
    min-width: 100px;
    margin-right: 15px;
}

.chunk-text {
    flex: 1;
}

#copy-btn {
    padding: 12px 20px;
    background: #48bb78;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
    transition: background 0.3s;
}

#copy-btn:hover {
    background: #38a169;
}

footer {
    background: #edf2f7;
    padding: 20px;
    text-align: center;
    font-size: 0.9rem;
    color: #4a5568;
}

footer a {
    color: #667eea;
    text-decoration: none;
}

footer a:hover {
    text-decoration: underline;
}

/* Responsive design */
@media (max-width: 768px) {
    body {
        padding: 10px;
    }
    
    header {
        padding: 20px;
    }
    
    header h1 {
        font-size: 2rem;
    }
    
    main {
        padding: 20px;
    }
    
    .url-input {
        flex-direction: column;
    }
    
    .options {
        flex-direction: column;
        gap: 10px;
    }
    
    .chunk-item {
        flex-direction: column;
        gap: 5px;
    }
    
    .timestamp {
        min-width: auto;
    }
}