/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

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

.container {
    max-width: 900px;
    margin: 0 auto;
    padding: 20px;
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    margin-top: 40px;
    margin-bottom: 40px;
}

/* Header */
header {
    text-align: center;
    margin-bottom: 40px;
    padding-bottom: 20px;
    border-bottom: 2px solid #f0f0f0;
}

header h1 {
    font-size: 2.5rem;
    color: #2c3e50;
    margin-bottom: 10px;
}

header p {
    font-size: 1.1rem;
    color: #7f8c8d;
}

/* Step sections */
.step {
    margin-bottom: 40px;
    padding: 30px;
    background: #f8f9fa;
    border-radius: 15px;
    border-left: 5px solid #667eea;
}

.step h2 {
    color: #2c3e50;
    margin-bottom: 15px;
    font-size: 1.5rem;
}

.step-description {
    color: #7f8c8d;
    margin-bottom: 20px;
}

/* Example section */
.example-section {
    margin-bottom: 30px;
}

.example-section h3 {
    color: #2c3e50;
    margin-bottom: 15px;
    font-size: 1.2rem;
}

.example-options {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.example-card {
    background: white;
    border: 2px solid #ecf0f1;
    border-radius: 10px;
    padding: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: left;
}

.example-card:hover {
    border-color: #667eea;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.2);
}

.example-card h4 {
    color: #2c3e50;
    margin-bottom: 8px;
    font-size: 1.1rem;
}

.example-card p {
    color: #7f8c8d;
    margin-bottom: 10px;
    font-size: 0.9rem;
}

.example-card .example-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8rem;
    color: #95a5a6;
}

.example-card .example-duration {
    background: #ecf0f1;
    padding: 2px 8px;
    border-radius: 12px;
}

/* Divider */
.divider {
    text-align: center;
    margin: 30px 0;
    position: relative;
}

.divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: #ecf0f1;
}

.divider span {
    background: #f8f9fa;
    padding: 0 20px;
    color: #7f8c8d;
    font-size: 0.9rem;
    position: relative;
}

/* Upload area */
.upload-area {
    border: 3px dashed #bdc3c7;
    border-radius: 15px;
    padding: 60px 20px;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
    background: white;
}

.upload-area:hover {
    border-color: #667eea;
    background: #f8f9ff;
}

.upload-area.drag-over {
    border-color: #667eea;
    background: #e8f0fe;
    transform: scale(1.02);
}

.upload-icon {
    font-size: 4rem;
    margin-bottom: 20px;
}

.upload-content p {
    font-size: 1.2rem;
    color: #2c3e50;
    margin-bottom: 10px;
}

.upload-content small {
    color: #7f8c8d;
    font-size: 0.9rem;
}

/* Progress */
.progress-container {
    margin-top: 20px;
}

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

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

#progress-text {
    text-align: center;
    color: #7f8c8d;
    font-weight: 500;
    margin-bottom: 15px;
}

.progress-details {
    background: white;
    border-radius: 10px;
    padding: 15px;
    margin-top: 15px;
}

.progress-step {
    padding: 8px 0;
    color: #95a5a6;
    font-size: 0.9rem;
    transition: color 0.3s ease;
}

.progress-step.active {
    color: #667eea;
    font-weight: 500;
}

.progress-step.completed {
    color: #27ae60;
}

/* Transcription */
.transcription-container {
    background: white;
    border-radius: 10px;
    padding: 20px;
}

#transcription-text {
    width: 100%;
    border: 2px solid #ecf0f1;
    border-radius: 10px;
    padding: 15px;
    font-size: 1rem;
    line-height: 1.6;
    resize: vertical;
    font-family: inherit;
    transition: border-color 0.3s ease;
}

#transcription-text:focus {
    outline: none;
    border-color: #667eea;
}

.transcription-info {
    margin-top: 10px;
    text-align: right;
    color: #7f8c8d;
    font-size: 0.9rem;
}

/* Commentator selection */
.commentator-options {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 30px;
}

@media (max-width: 768px) {
    .commentator-options {
        grid-template-columns: 1fr;
    }
}

.commentator-card {
    cursor: pointer;
    display: block;
}

.commentator-card input[type="radio"] {
    display: none;
}

.card-content {
    background: white;
    border: 2px solid #ecf0f1;
    border-radius: 15px;
    padding: 25px;
    transition: all 0.3s ease;
    height: 100%;
}

.commentator-card:hover .card-content {
    border-color: #667eea;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.2);
}

.commentator-card input[type="radio"]:checked + .card-content {
    border-color: #667eea;
    background: linear-gradient(135deg, #f8f9ff, #e8f0fe);
    box-shadow: 0 5px 20px rgba(102, 126, 234, 0.3);
}

.card-content h3 {
    color: #2c3e50;
    margin-bottom: 10px;
    font-size: 1.3rem;
}

.card-content p {
    color: #7f8c8d;
    margin-bottom: 15px;
    font-size: 0.95rem;
}

.tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tag {
    background: #667eea;
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
}

/* Buttons */
.primary-btn, .secondary-btn {
    padding: 15px 30px;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    margin-right: 10px;
    margin-bottom: 10px;
}

.primary-btn {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
}

.primary-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

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

.secondary-btn {
    background: white;
    color: #667eea;
    border: 2px solid #667eea;
}

.secondary-btn:hover {
    background: #667eea;
    color: white;
    transform: translateY(-2px);
}

/* Comment display */
.comment-container {
    background: white;
    border-radius: 15px;
    padding: 25px;
    border-left: 5px solid #27ae60;
}

.comment-header h3 {
    color: #2c3e50;
    margin-bottom: 15px;
    font-size: 1.3rem;
}

.comment-content {
    margin-bottom: 20px;
}

#comment-text {
    font-size: 1.1rem;
    line-height: 1.7;
    color: #2c3e50;
    white-space: pre-line;
}

.comment-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

/* Audio player */
.audio-player {
    margin-top: 20px;
    padding: 20px;
    background: white;
    border-radius: 10px;
    text-align: center;
}

#comment-audio {
    width: 100%;
    max-width: 400px;
}

/* Loading spinner */
.loading {
    text-align: center;
    padding: 40px;
}

.spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #667eea;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal-content {
    background: white;
    padding: 30px;
    border-radius: 15px;
    max-width: 500px;
    width: 90%;
    text-align: center;
}

.modal-content h3 {
    color: #e74c3c;
    margin-bottom: 15px;
    font-size: 1.3rem;
}

.modal-content p {
    color: #7f8c8d;
    margin-bottom: 20px;
    line-height: 1.6;
}

/* Footer */
footer {
    text-align: center;
    padding: 20px;
    color: #7f8c8d;
    font-size: 0.9rem;
    border-top: 1px solid #ecf0f1;
    margin-top: 20px;
}

/* Utility classes */
.hidden {
    display: none !important;
}

.text-center {
    text-align: center;
}

/* Responsive design */
@media (max-width: 768px) {
    .container {
        margin: 20px;
        padding: 15px;
        border-radius: 15px;
    }
    
    header h1 {
        font-size: 2rem;
    }
    
    .step {
        padding: 20px;
    }
    
    .upload-area {
        padding: 40px 15px;
    }
    
    .upload-icon {
        font-size: 3rem;
    }
    
    .comment-actions {
        flex-direction: column;
    }
    
    .primary-btn, .secondary-btn {
        width: 100%;
        margin-right: 0;
    }
}
