/* TTS Starter CSS - Dark Theme */

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

body {
    background-color: #1a1a1a;
    color: #e0e0e0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    min-height: 100vh;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

header {
    text-align: center;
    margin-bottom: 30px;
    padding: 20px 0;
}

header h1 {
    color: #ffffff;
    font-size: 2.5em;
    margin-bottom: 10px;
    font-weight: 300;
}

header p {
    color: #b0b0b0;
    font-size: 1.1em;
}

main {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 25px;
}

/* Input Section */
.input-section {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.input-section label {
    font-size: 1.1em;
    font-weight: 500;
    color: #ffffff;
}

#text-input {
    background-color: #2d2d2d;
    border: 2px solid #404040;
    border-radius: 8px;
    color: #ffffff;
    font-size: 16px;
    padding: 15px;
    resize: vertical;
    min-height: 120px;
    font-family: inherit;
    transition: border-color 0.3s ease;
}

#text-input:focus {
    outline: none;
    border-color: #007acc;
}

#text-input::placeholder {
    color: #888;
}

/* Controls Section */
.controls-section {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.control-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.control-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.control-group label {
    font-size: 1em;
    font-weight: 500;
    color: #ffffff;
}

select, input[type="range"] {
    background-color: #2d2d2d;
    border: 2px solid #404040;
    border-radius: 6px;
    color: #ffffff;
    font-size: 14px;
    padding: 10px;
    transition: border-color 0.3s ease;
}

select:focus {
    outline: none;
    border-color: #007acc;
}

select option {
    background-color: #2d2d2d;
    color: #ffffff;
}

/* Range Sliders */
input[type="range"] {
    background: #404040;
    height: 6px;
    border-radius: 3px;
    padding: 0;
    cursor: pointer;
}

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

input[type="range"]::-moz-range-thumb {
    width: 20px;
    height: 20px;
    background: #007acc;
    border-radius: 50%;
    border: none;
    cursor: pointer;
}

/* Action Section */
.action-section {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
    margin: 20px 0;
}

/* Buttons */
.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 100px;
}

.btn.primary {
    background-color: #007acc;
    color: #ffffff;
}

.btn.primary:hover:not(:disabled) {
    background-color: #005a9e;
    transform: translateY(-2px);
}

.btn.secondary {
    background-color: #404040;
    color: #ffffff;
}

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

.btn:disabled {
    background-color: #333;
    color: #666;
    cursor: not-allowed;
    transform: none;
}

/* Audio Section */
.audio-section {
    display: flex;
    justify-content: center;
    margin: 20px 0;
}

#audio-player {
    width: 100%;
    max-width: 400px;
    background-color: #2d2d2d;
    border-radius: 6px;
}

/* Status and Error Messages */
.status {
    text-align: center;
    font-size: 1em;
    color: #b0b0b0;
    min-height: 20px;
}

.error {
    background-color: #4a1a1a;
    border: 1px solid #8a3333;
    border-radius: 6px;
    color: #ff6b6b;
    padding: 15px;
    text-align: center;
    margin: 10px 0;
}

/* Loading Animation */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #333;
    border-radius: 50%;
    border-top-color: #007acc;
    animation: spin 1s ease-in-out infinite;
    margin-left: 10px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Responsive Design */
@media (max-width: 600px) {
    .container {
        padding: 15px;
    }
    
    header h1 {
        font-size: 2em;
    }
    
    .control-row {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .action-section {
        flex-direction: column;
        align-items: center;
    }
    
    .btn {
        width: 100%;
        max-width: 200px;
    }
}