* {
    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;
    padding: 20px;
    color: #333;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
}

header {
    text-align: center;
    color: white;
    margin-bottom: 30px;
}

header h1 {
    font-size: 2.5em;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.2);
}

.subtitle {
    font-size: 1.1em;
    opacity: 0.95;
}

.main-grid {
    display: grid;
    gap: 20px;
}

.panel {
    background: white;
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

.panel h2 {
    color: #667eea;
    margin-bottom: 15px;
    font-size: 1.4em;
    border-bottom: 2px solid #f0f0f0;
    padding-bottom: 10px;
}

.controls, .voice-controls {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.control-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
    flex: 1;
    min-width: 200px;
}

label {
    font-weight: 600;
    color: #555;
    font-size: 0.95em;
}

select, textarea {
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1em;
    font-family: inherit;
    transition: border-color 0.3s;
}

select:focus, textarea:focus {
    outline: none;
    border-color: #667eea;
}

textarea {
    width: 100%;
    min-height: 200px;
    resize: vertical;
    font-family: 'Segoe UI', sans-serif;
    line-height: 1.6;
}

.char-count {
    text-align: right;
    color: #888;
    font-size: 0.9em;
    margin-top: 5px;
}

input[type="range"] {
    width: 100%;
    height: 6px;
    border-radius: 3px;
    background: #e0e0e0;
    outline: none;
    -webkit-appearance: none;
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #667eea;
    cursor: pointer;
}

input[type="range"]::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #667eea;
    cursor: pointer;
    border: none;
}

.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 1em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    color: white;
}

.btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea, #764ba2);
}

.btn-success {
    background: linear-gradient(135deg, #11998e, #38ef7d);
}

.btn-secondary {
    background: linear-gradient(135deg, #4b6cb7, #182848);
}

.btn-download {
    background: linear-gradient(135deg, #f093fb, #f5576c);
}

.audio-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 15px;
}

.status {
    margin-top: 15px;
    padding: 12px;
    border-radius: 8px;
    font-weight: 500;
    display: none;
}

.status.show {
    display: block;
}

.status.info {
    background: #e3f2fd;
    color: #1976d2;
    border-left: 4px solid #1976d2;
}

.status.success {
    background: #e8f5e9;
    color: #388e3c;
    border-left: 4px solid #388e3c;
}

.status.error {
    background: #ffebee;
    color: #c62828;
    border-left: 4px solid #c62828;
}

footer {
    text-align: center;
    color: white;
    margin-top: 30px;
    opacity: 0.9;
}

/* Loading animation */
.loading {
    position: relative;
    pointer-events: none;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 3px solid rgba(255,255,255,0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Responsive */
@media (max-width: 768px) {
    header h1 { font-size: 1.8em; }
    .panel { padding: 15px; }
    .btn { padding: 10px 16px; font-size: 0.9em; }
}

/* RTL support untuk Arabic */
[dir="rtl"] textarea {
    direction: rtl;
    text-align: right;
}