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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.container {
    background: white;
    border-radius: 20px;
    padding: 40px;
    max-width: 700px;
    width: 100%;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

h1 {
    color: #333;
    margin-bottom: 30px;
    text-align: center;
    font-size: 2rem;
}

.language-selector {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
    justify-content: flex-end;
}

.language-selector label {
    font-size: 1.5rem;
}

.language-selector select {
    padding: 8px 12px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
    cursor: pointer;
    background: white;
    transition: border-color 0.3s;
}

.language-selector select:focus {
    outline: none;
    border-color: #667eea;
}

.text-container {
    margin-bottom: 25px;
}

#textInput {
    width: 100%;
    padding: 15px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 16px;
    font-family: inherit;
    resize: vertical;
    transition: border-color 0.3s, background-color 0.3s;
}

#textInput[readonly] {
    background-color: #f8f9fa;
    cursor: default;
}

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

.controls {
    display: flex;
    gap: 10px;
    margin-bottom: 25px;
    flex-wrap: wrap;
}

.btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    flex: 1;
    min-width: 120px;
    justify-content: center;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

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

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

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

.btn-secondary:hover:not(:disabled) {
    background: #5a6268;
    transform: translateY(-2px);
}

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

.btn-danger:hover:not(:disabled) {
    background: #c82333;
    transform: translateY(-2px);
}

.settings {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 20px;
}

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

.setting-group:last-child {
    margin-bottom: 0;
}

.setting-group label {
    display: block;
    margin-bottom: 8px;
    color: #495057;
    font-weight: 600;
    font-size: 14px;
}

.setting-group select,
.setting-group input[type="range"] {
    width: 100%;
    padding: 8px;
    border: 1px solid #ced4da;
    border-radius: 5px;
    font-size: 14px;
}

.setting-group select {
    cursor: pointer;
    background: white;
}

.setting-group input[type="range"] {
    cursor: pointer;
    height: 8px;
    -webkit-appearance: none;
    appearance: none;
    background: #dee2e6;
    outline: none;
    border: none;
}

.setting-group input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    background: #667eea;
    cursor: pointer;
    border-radius: 50%;
}

.setting-group input[type="range"]::-moz-range-thumb {
    width: 20px;
    height: 20px;
    background: #667eea;
    cursor: pointer;
    border-radius: 50%;
    border: none;
}

.status {
    text-align: center;
    padding: 12px;
    border-radius: 8px;
    font-weight: 500;
    min-height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.status.speaking {
    background: #d4edda;
    color: #155724;
}

.status.paused {
    background: #fff3cd;
    color: #856404;
}

.status.error {
    background: #f8d7da;
    color: #721c24;
}

@media (max-width: 600px) {
    .container {
        padding: 25px;
    }
    
    h1 {
        font-size: 1.5rem;
    }
    
    .controls {
        flex-direction: column;
    }
    
    .btn {
        min-width: 100%;
    }
}
