* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background: linear-gradient(135deg, #1a237e 0%, #4a148c 100%);
    color: #333;
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
}

header {
    text-align: center;
    margin-bottom: 30px;
    color: white;
    padding: 20px;
}

h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    text-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
}

.subtitle {
    font-size: 1.1rem;
    opacity: 0.9;
    max-width: 800px;
    margin: 0 auto;
    line-height: 1.5;
}

.card {
    background-color: white;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    overflow: hidden;
    margin-bottom: 30px;
}

.controls {
    padding: 25px;
    background-color: #f8f9fa;
    border-bottom: 1px solid #eaeaea;
}

.controls-row {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    align-items: center;
    margin-bottom: 15px;
}

.control-group {
    flex: 1;
    min-width: 200px;
}

label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #444;
}

select, input, button {
    width: 100%;
    padding: 12px 15px;
    border-radius: 8px;
    border: 1px solid #ddd;
    font-size: 1rem;
    transition: all 0.3s;
}

select:focus, input:focus {
    outline: none;
    border-color: #5c6bc0;
    box-shadow: 0 0 0 3px rgba(92, 107, 192, 0.2);
}

button {
    background-color: #5c6bc0;
    color: white;
    border: none;
    cursor: pointer;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

button:hover {
    background-color: #3f51b5;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

button:disabled {
    background-color: #9fa8da;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.test-controls {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

.text-input-group {
    flex: 2;
}

.button-group {
    flex: 1;
}

.button-container {
    display: flex;
    gap: 10px;
}

.small-btn {
    flex: 1;
    padding: 10px 12px;
    font-size: 0.9rem;
}

.table-container {
    overflow-x: auto;
    padding: 0 25px 25px;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
}

th {
    background-color: #5c6bc0;
    color: white;
    text-align: left;
    padding: 16px 12px;
    font-weight: 600;
    position: sticky;
    top: 0;
}

tr:nth-child(even) {
    background-color: #f8f9fa;
}

tr:hover {
    background-color: #e8eaf6;
}

td {
    padding: 14px 12px;
    border-bottom: 1px solid #eaeaea;
}

.voice-name {
    font-weight: 600;
    color: #333;
}

.voice-language {
    color: #555;
}

.voice-gender {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
}

.gender-male {
    background-color: #bbdefb;
    color: #1565c0;
}

.gender-female {
    background-color: #f8bbd0;
    color: #880e4f;
}

.gender-unknown {
    background-color: #e0e0e0;
    color: #424242;
}

.test-btn {
    padding: 8px 15px;
    background-color: #4caf50;
    color: white;
    border-radius: 5px;
    border: none;
    cursor: pointer;
    font-weight: 600;
    transition: background-color 0.2s;
}

.test-btn:hover {
    background-color: #388e3c;
}

.loading {
    text-align: center;
    padding: 40px;
    color: #666;
}

.loading i {
    font-size: 2rem;
    margin-bottom: 15px;
    color: #5c6bc0;
}

.error {
    text-align: center;
    padding: 40px;
    color: #d32f2f;
    background-color: #ffebee;
    border-radius: 10px;
    margin: 20px;
}

.error i {
    font-size: 2rem;
    margin-bottom: 15px;
}

.no-voices {
    text-align: center;
    padding: 40px;
    color: #666;
}

.stats {
    display: flex;
    justify-content: space-between;
    background-color: #e8eaf6;
    padding: 15px 25px;
    border-top: 1px solid #ddd;
    color: #333;
    font-weight: 600;
}

footer {
    text-align: center;
    color: rgba(255, 255, 255, 0.7);
    margin-top: 30px;
    padding: 20px;
    font-size: 0.9rem;
}

.highlight {
    background-color: #fff9c4;
}

@media (max-width: 768px) {
    .controls-row {
        flex-direction: column;
    }

    .control-group {
        width: 100%;
    }

    h1 {
        font-size: 2rem;
    }

    .table-container {
        padding: 0 15px 15px;
    }

    th, td {
        padding: 10px 8px;
        font-size: 0.9rem;
    }
}
