* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
}

body {
    background-color: #f5f7fa;
    color: #333;
    line-height: 1.6;
    padding: 20px;
}

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

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

h1 {
    color: #2c3e50;
    margin-bottom: 10px;
}

.app-description {
    color: #7f8c8d;
    font-size: 16px;
}

.translation-container {
    display: flex;
    gap: 20px;
}

@media (max-width: 768px) {
    .translation-container {
        flex-direction: column;
    }
}

.input-panel, .output-panel {
    flex: 1;
    padding: 20px;
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.panel-title {
    margin-bottom: 15px;
    color: #34495e;
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
}

.text-input {
    width: 100%;
    height: 200px;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
    resize: vertical;
    margin-bottom: 15px;
}

.translate-btn {
    background-color: #3498db;
    color: white;
    border: none;
    padding: 10px 15px;
    border-radius: 4px;
    font-size: 16px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.translate-btn:hover {
    background-color: #2980b9;
}

.translate-btn:disabled {
    background-color: #95a5a6;
    cursor: not-allowed;
}

.output-box {
    background-color: #f8f9fa;
    border: 1px solid #eee;
    border-radius: 4px;
    padding: 15px;
    margin-bottom: 20px;
    min-height: 80px;
}

.arabic-text {
    font-size: 22px;
    direction: rtl;
    text-align: right;
    color: #333;
}

.transliteration-text {
    font-size: 16px;
    color: #7f8c8d;
}

.output-label {
    margin-bottom: 10px;
    color: #34495e;
    font-weight: 600;
}

.loading {
    display: none;
    text-align: center;
    margin-top: 20px;
    color: #7f8c8d;
}

.spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(0,0,0,0.1);
    border-radius: 50%;
    border-top-color: #3498db;
    animation: spin 1s ease infinite;
    margin-right: 10px;
    vertical-align: middle;
}

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

.error-message {
    color: #e74c3c;
    margin-top: 10px;
    display: none;
}

.output-container {
position: relative;
display: flex;
}

.output-box {
flex: 1;
}

.audio-btn {
background: none;
border: none;
color: #3498db;
cursor: pointer;
padding: 8px;
display: flex;
align-items: center;
justify-content: center;
border-radius: 50%;
margin-left: 10px;
transition: background-color 0.2s;
height: 40px;
width: 40px;
}

.audio-btn:hover {
background-color: #f0f0f0;
}

.audio-btn:disabled {
color: #ccc;
cursor: not-allowed;
}

.audio-btn.playing {
color: #e74c3c;
}


.language-selector {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
}

.language-selector label {
    margin-right: 10px;
    font-weight: 500;
    color: #34495e;
}

.language-dropdown {
    padding: 8px 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    background-color: white;
    cursor: pointer;
}

.language-dropdown:focus {
    outline: none;
    border-color: #3498db;
}