.tts-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
    position: relative;
    z-index: 1;
    min-height: 100vh;
}

.tts-header {
    text-align: center;
    margin-bottom: 3rem;
    position: relative;
}

.back-link {
    position: absolute;
    left: 0;
    top: 0;
    color: #ff6b6b;
    text-decoration: none;
    font-size: 1rem;
    transition: opacity 0.3s ease;
}

.back-link:hover {
    opacity: 0.8;
}

.tts-header h1 {
    font-size: 3rem;
    margin-bottom: 0.5rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
    color: #ff6b6b;
}

.main-content {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.input-section {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 10px;
    padding: 2rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.input-section h3 {
    color: #ff6b6b;
    margin-bottom: 1rem;
    font-size: 1.3rem;
}

#text-input {
    width: 100%;
    min-height: 200px;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    color: #ffffff;
    font-size: 1rem;
    font-family: inherit;
    resize: vertical;
    outline: none;
    transition: all 0.3s ease;
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

#text-input::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

#text-input:focus {
    background: rgba(255, 255, 255, 0.2);
    border-color: #ff6b6b;
}

.controls-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 2rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.voice-controls {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.voice-controls label {
    color: #ffffff;
    font-weight: bold;
    white-space: nowrap;
}

.voice-select {
    padding: 0.5rem 1rem;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 5px;
    color: #ffffff;
    font-size: 0.9rem;
    outline: none;
    min-width: 200px;
}

.voice-select option {
    background: #2a2a2a;
    color: #ffffff;
}

.speed-slider {
    width: 80px;
    margin: 0 0.5rem;
}

#speed-value {
    color: #ff6b6b;
    font-weight: bold;
    min-width: 40px;
}

.action-buttons {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.btn {
    padding: 0.75rem 1.25rem;
    border: none;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

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

.btn-primary:hover:not(:disabled) {
    background: #ff5252;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(255, 107, 107, 0.3);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.15);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.btn-secondary:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.25);
    transform: translateY(-1px);
}

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

.status-bar {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-top: 1rem;
}

#status-text {
    color: #ffffff;
    font-weight: bold;
    min-width: 120px;
}

.progress-bar {
    flex: 1;
    height: 8px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #ff6b6b, #ff8a80);
    width: 0%;
    transition: width 0.3s ease;
    border-radius: 4px;
}

.features-section, .tips-section {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 10px;
    padding: 2rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.features-section h3, .tips-section h3 {
    color: #ff6b6b;
    margin-bottom: 1.5rem;
    font-size: 1.3rem;
    text-align: center;
}

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

.feature-card {
    background: rgba(255, 255, 255, 0.05);
    padding: 1.5rem;
    border-radius: 8px;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.feature-card:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
}

.feature-icon {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.feature-card h4 {
    color: #ff6b6b;
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

.feature-card p {
    color: #ffffff;
    font-size: 0.9rem;
    line-height: 1.4;
}

.tips-list {
    list-style: none;
    padding: 0;
}

.tips-list li {
    color: #ffffff;
    margin-bottom: 1rem;
    padding-left: 1.5rem;
    position: relative;
    line-height: 1.6;
}

.tips-list li:before {
    content: "💡";
    position: absolute;
    left: 0;
    top: 0;
}

.tips-list strong {
    color: #ff6b6b;
}

/* Animations */
@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

.speaking .btn-primary {
    animation: pulse 2s infinite;
}

/* Responsive Design */
@media (max-width: 768px) {
    .tts-container {
        padding: 1rem;
    }
    
    .tts-header h1 {
        font-size: 2rem;
    }
    
    .controls-row {
        flex-direction: column;
        align-items: stretch;
        gap: 1rem;
    }
    
    .voice-controls {
        flex-direction: column;
        align-items: stretch;
        gap: 0.5rem;
    }
    
    .action-buttons {
        justify-content: center;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
    }
    
    .status-bar {
        flex-direction: column;
        align-items: stretch;
        gap: 0.5rem;
    }
    
    #status-text {
        text-align: center;
        min-width: auto;
    }
}