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

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

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

header {
    text-align: center;
    margin-bottom: 40px;
    color: white;
}

header h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

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

.card {
    background: white;
    border-radius: 15px;
    padding: 30px;
    margin-bottom: 25px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    border: 1px solid rgba(255,255,255,0.2);
}

.card h3 {
    color: #667eea;
    margin-bottom: 20px;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.form-group {
    margin-bottom: 20px;
}

label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #555;
}

.input-field, .textarea-field {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    font-size: 16px;
    transition: all 0.3s ease;
}

.input-field:focus, .textarea-field:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.textarea-field {
    resize: vertical;
    min-height: 120px;
    font-family: 'Consolas', 'Monaco', monospace;
    line-height: 1.5;
}

.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

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

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

.btn-secondary {
    background: #6c757d;
    color: white;
}

.btn-success {
    background: #28a745;
    color: white;
}

.btn-danger {
    background: #dc3545;
    color: white;
}

.btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 3px 10px rgba(0,0,0,0.2);
}

.sentence-item {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    padding: 15px;
    margin-bottom: 10px;
    background: #f8f9fa;
    border-radius: 10px;
    border-left: 4px solid #667eea;
}

.sentence-item .timestamp {
    min-width: 80px;
    font-family: monospace;
    font-weight: bold;
    color: #667eea;
    padding: 5px 10px;
    background: white;
    border-radius: 5px;
    text-align: center;
}

.sentence-item .content {
    flex: 1;
    line-height: 1.5;
}

.sentence-item .controls {
    display: flex;
    gap: 5px;
}

.sentence-item .btn-small {
    padding: 5px 10px;
    font-size: 12px;
}

.translation-item {
    padding: 15px;
    margin-bottom: 10px;
    background: #e8f5e8;
    border-radius: 10px;
    border-left: 4px solid #28a745;
}

.translation-item .original {
    color: #666;
    font-style: italic;
    margin-bottom: 5px;
    font-size: 0.9rem;
}

.translation-item .translated {
    font-weight: 600;
    color: #2d5a2d;
}

.setup-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 30px;
}

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

.controls-section {
    position: sticky;
    bottom: 20px;
    z-index: 100;
}

input[type="range"] {
    width: 200px;
    margin: 0 10px;
}

#speed-value, #pitch-value {
    font-weight: bold;
    color: #667eea;
    min-width: 30px;
    display: inline-block;
    text-align: center;
}

.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

@media (max-width: 768px) {
    .container {
        padding: 10px;
    }
    
    header h1 {
        font-size: 2rem;
    }
    
    .setup-section {
        grid-template-columns: 1fr;
    }
    
    .sentence-item {
        flex-direction: column;
        align-items: stretch;
    }
    
    .sentence-item .timestamp {
        align-self: flex-start;
        margin-bottom: 10px;
    }
}