/* Clone.maszatai.com Dashboard Styles */

:root {
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --success: #22c55e;
    --warning: #f59e0b;
    --danger: #ef4444;
    --background: #0f172a;
    --surface: #1e293b;
    --surface-hover: #334155;
    --text: #f1f5f9;
    --text-muted: #94a3b8;
    --border: #334155;
    --radius: 12px;
}

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: var(--background);
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
}

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

/* Header */
header {
    text-align: center;
    margin-bottom: 2rem;
}

header h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

header p {
    color: var(--text-muted);
}

/* Language Selector */
.lang-selector {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 2rem;
}

.lang-btn {
    padding: 0.5rem 1.5rem;
    border: 2px solid var(--border);
    background: var(--surface);
    color: var(--text);
    border-radius: 2rem;
    cursor: pointer;
    transition: all 0.3s;
}

.lang-btn:hover {
    border-color: var(--primary);
}

.lang-btn.active {
    background: var(--primary);
    border-color: var(--primary);
}

/* Sections */
section {
    background: var(--surface);
    border-radius: var(--radius);
    padding: 2rem;
    margin-bottom: 2rem;
    border: 1px solid var(--border);
}

section h2 {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
}

/* Upload Area */
.upload-area {
    border: 2px dashed var(--border);
    border-radius: var(--radius);
    padding: 3rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
}

.upload-area:hover,
.upload-area.dragover {
    border-color: var(--primary);
    background: rgba(99, 102, 241, 0.1);
}

.upload-icon {
    font-size: 3rem;
    display: block;
    margin-bottom: 1rem;
}

/* Audio Preview */
.audio-preview {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: var(--surface-hover);
    border-radius: var(--radius);
    margin-top: 1rem;
}

.audio-preview audio {
    flex: 1;
}

/* Voice Name Input */
.voice-name-input {
    margin-top: 1.5rem;
}

.voice-name-input label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-muted);
}

.voice-name-input input {
    width: 100%;
    padding: 0.75rem;
    background: var(--background);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text);
    font-size: 1rem;
}

/* Engine Selection */
.engine-selection {
    margin-top: 1.5rem;
}

.engine-selection label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-muted);
}

.engines {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
}

.engine-option {
    display: flex;
    flex-direction: column;
    padding: 1rem;
    background: var(--background);
    border: 2px solid var(--border);
    border-radius: var(--radius);
    cursor: pointer;
    transition: all 0.3s;
}

.engine-option:hover {
    border-color: var(--primary);
}

.engine-option input[type="radio"] {
    display: none;
}

.engine-option:has(input:checked) {
    border-color: var(--primary);
    background: rgba(99, 102, 241, 0.1);
}

.engine-option span {
    font-weight: 600;
}

.engine-option small {
    color: var(--text-muted);
    font-size: 0.85rem;
}

/* Buttons */
.btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: var(--radius);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-primary {
    background: var(--primary);
    color: white;
    width: 100%;
    margin-top: 1.5rem;
}

.btn-primary:hover {
    background: var(--primary-dark);
}

.btn-secondary {
    background: var(--surface-hover);
    color: var(--text);
}

.btn-secondary:hover {
    background: var(--border);
}

.btn-small {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

.btn-link {
    background: transparent;
    color: var(--primary);
    text-decoration: none;
    display: inline-block;
}

.btn-link:hover {
    text-decoration: underline;
}

/* Progress */
.progress {
    margin-top: 1.5rem;
}

.progress-bar {
    height: 8px;
    background: var(--background);
    border-radius: 4px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: var(--primary);
    transition: width 0.3s;
}

.progress-text {
    text-align: center;
    margin-top: 0.5rem;
    color: var(--text-muted);
}

/* Voices Grid */
.voices-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1rem;
}

.voice-card {
    background: var(--background);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1rem;
}

.voice-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.voice-card h3 {
    font-size: 1.1rem;
}

.voice-card-tag {
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
    background: var(--primary);
    border-radius: 1rem;
}

.voice-card-actions {
    display: flex;
    gap: 0.5rem;
}

.voice-card-actions button {
    flex: 1;
    padding: 0.5rem;
    font-size: 0.875rem;
}

/* Test Section */
.voice-select {
    width: 100%;
    padding: 0.75rem;
    background: var(--background);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text);
    margin-bottom: 1rem;
}

#testText {
    width: 100%;
    min-height: 100px;
    padding: 0.75rem;
    background: var(--background);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text);
    resize: vertical;
    margin-bottom: 1rem;
    font-family: inherit;
}

/* Status Grid */
.status-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
}

.status-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background: var(--background);
    border-radius: var(--radius);
}

.status-indicator {
    font-size: 1.5rem;
}

.status-online {
    color: var(--success);
}

.status-offline {
    color: var(--danger);
}

/* Responsive */
@media (max-width: 768px) {
    .container {
        padding: 1rem;
    }

    header h1 {
        font-size: 1.75rem;
    }

    .engines {
        grid-template-columns: 1fr;
    }
}
