/* Reset styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Arial', sans-serif;
}

body {
display: flex;
justify-content: center;
align-items: flex-start; /* يسمح بالتمرير لأعلى ولأسفل */
background: linear-gradient(-45deg, #1e3c72, #2a5298, #1e90ff, #87ceeb);
background-size: 400% 400%;
animation: gradientBG 10s infinite ease-in-out;
color: #fff;
text-align: center;
overflow-y: auto; /* يسمح بالتمرير الرأسي */
height: auto; /* يتيح تمدد المحتوى حسب الحاجة */
}

@keyframes gradientBG {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.container {
background-color: rgba(255, 255, 255, 0.1);
backdrop-filter: blur(10px);
border-radius: 15px;
padding: 30px 40px;
box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
max-width: 750px;
width: 100%;
position: relative;
margin-top: 20px; /* أضف هامش لإبعاد الحاوية عن الأعلى */
margin-bottom: 40px;
}


@media (min-width: 768px) {
    .container {
        width: 750px;
    }
}

.tabs {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 10px;
    margin-top: 40px;
}

.tab {
    padding: 10px 20px;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    transition: background 0.3s;
}

.tab.active {
    background: #28a745;
    color: #fff;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

h1 {
    font-size: 28px;
    margin-bottom: 20px;
    color: #fff;
    text-transform: uppercase;
    letter-spacing: 1px;
}

input[type="text"], select {
    width: 100%;
    padding: 12px;
    margin: 10px 0;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    outline: none;
}

.file-upload {
    position: relative;
    display: inline-block;
    margin: 15px 0;
}

.file-upload input[type="file"] {
    position: absolute;
    left: 0;
    top: 0;
    opacity: 0;
    cursor: pointer;
    z-index: 10;
}

.file-upload label {
    background-color: #28a745;
    color: #fff;
    padding: 12px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    font-weight: bold;
    text-transform: uppercase;
    display: inline-block;
    transition: all 0.3s ease;
}

.file-upload label:hover {
    background-color: #218838;
    transform: scale(1.05);
}

.preview-container {
    display: none;
    margin: 15px 0;
    text-align: center;
}

.preview-container img {
    max-width: 100px;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

button {
    background-color: #28a745;
    color: white;
    border: none;
    border-radius: 8px;
    padding: 12px 20px;
    cursor: pointer;
    font-size: 18px;
    font-weight: bold;
    text-transform: uppercase;
    transition: all 0.3s ease;
}

button:hover {
    background-color: #218838;
    transform: scale(1.05);
}

.dropdown-group {
    margin: 10px 0;
    text-align: left;
    color: #fff;
}

.dropdown-group label {
    font-weight: bold;
    font-size: 14px;
    display: block;
    margin-bottom: 5px;
}

.spinner {
    display: none;
    border: 6px solid rgba(255, 255, 255, 0.3);
    border-top: 6px solid #28a745;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
    margin: 20px auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}


/* Progress Bar */
.progress-container {
    display: none;
    margin-top: 20px;
    width: 100%;
    height: 20px;
    background-color: #ddd;
    border-radius: 10px;
    overflow: hidden;
}

.progress-bar {
    width: 0%;
    height: 100%;
    background-color: #28a745;
    text-align: center;
    line-height: 20px;
    color: white;
    font-weight: bold;
    transition: width 0.5s ease;
}


.container-wrapper {
display: flex;
flex-direction: column;
gap: 20px; /* إضافة مسافة بين الحاويتين */
}

    /* تحسين الشكل الأساسي */
.tab-content {
    max-width: 800px;
}



#transcriptionBtn:hover {
    background-color: #0056b3;
    transform: scale(1.05);
}




/* المجموعة الأساسية */
.checkbox-group {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 20px 0px;
    position: relative; /* لضبط tooltip مع المجموعة */
}

/* النص بجانب السويتش */
.checkbox-label {
    font-size: 16px;
    color: #fff;
    font-weight: bold;
    cursor: pointer;
}

/* تصميم السويتش */
.switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 25px;
}

/* إخفاء الـ checkbox */
.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

/* شريط السويتش */
.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
    border-radius: 25px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

input:checked + .slider {
    background-color: #28a745;
}

input:checked + .slider:before {
    transform: translateX(25px);
}

/* أيقونة المعلومات */
.info-icon {
    position: relative;
    font-size: 18px;
    color: #00d4ff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s ease;
}

.info-icon:hover {
    transform: scale(1.1);
}

/* تصميم الـ Tooltip */
.tooltip {
    position: absolute;
    bottom: 150%;
    left: 50%;
    transform: translateX(-50%);
    background-color: rgba(0, 0, 0, 0.8);
    color: #fff;
    padding: 10px;
    border-radius: 8px;
    font-size: 14px;
    width: 250px;
    text-align: center;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    z-index: 10;
}

/* سهم صغير في الـ Tooltip */
.tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border-width: 8px;
    border-style: solid;
    border-color: rgba(0, 0, 0, 0.8) transparent transparent transparent;
}

/* إظهار الـ Tooltip عند التمرير */
.info-icon:hover .tooltip,
.info-icon:focus .tooltip {
    opacity: 1;
    visibility: visible;
}


.error-message {
display: flex;
align-items: center;
justify-content: space-between;
background: linear-gradient(135deg, #ff4d4d, #ff6666);
color: white;
font-weight: bold;
font-size: 16px;
border-radius: 8px;
padding: 15px 20px;
margin-top: 20px;
box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
position: relative;
animation: fadeIn 0.5s ease-in-out;
}

.error-icon {
font-size: 24px;
margin-right: 10px;
}

.error-message span {
flex-grow: 0;
margin-right: 10px;
}

.close-button {
background: rgba(255, 255, 255, 0.2);
color: white;
border: none;
font-size: 18px;
font-weight: bold;
cursor: pointer;
border-radius: 50%;
padding: 5px 10px;
transition: background 0.3s ease;
}

.close-button:hover {
background: rgba(255, 255, 255, 0.4);
}

@keyframes fadeIn {
from {
    opacity: 0;
    transform: translateY(-20px);
}
to {
    opacity: 1;
    transform: translateY(0);
}
}


.spinner {
display: none;
width: 50px;
height: 50px;
position: relative;
margin: 20px auto;
}

.double-bounce1,
.double-bounce2 {
width: 100%;
height: 100%;
border-radius: 50%;
background-color: #28a745;
opacity: 0.6;
position: absolute;
top: 0;
left: 0;
animation: bounce 2s infinite ease-in-out;
}

.double-bounce2 {
animation-delay: -1s;
}

@keyframes bounce {
0%, 100% {
transform: scale(0);
} 
50% {
transform: scale(1);
}
}


/* زر إضافة */
.btn-add {
background-color: #28a745;
color: #fff;
font-size: 16px;
font-weight: bold;
padding: 12px 30px;
border: none;
border-radius: 50px;
cursor: pointer;
display: inline-flex;
align-items: center;
justify-content: center;
gap: 10px;
transition: background-color 0.3s ease, transform 0.2s ease;
box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
margin-bottom: 20px;
}

.btn-add i {
font-size: 18px;
}

.btn-add:hover {
background-color: #218838;
transform: scale(1.1);
}

.btn-add:active {
transform: scale(0.95);
box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}


/* زر إزالة */

.btn-add:active,
.btn-remove:active {
transform: scale(0.95);
box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}


/* تخطيط عناصر الزوج */
.language-voice-pair {
margin-bottom: 20px;
display: flex;
flex-direction: column;
gap: 15px;
}

.options-container {
display: flex;
justify-content: space-between;
align-items: center;
gap: 10px;
}

.checkbox-group {
display: flex;
align-items: center;
gap: 10px;
}

.btn-remove {
background-color: #dc3545;
color: #fff;
font-size: 14px;
font-weight: bold;
padding: 8px 15px;
border: none;
border-radius: 50px;
cursor: pointer;
display: inline-flex;
align-items: center;
gap: 8px;
transition: background-color 0.3s ease, transform 0.2s ease;
box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.btn-remove i {
font-size: 16px;
}

.btn-remove:hover {
background-color: #c82333;
transform: scale(1.05);
}

/* حاوية الإدخال */
.input-container {
display: flex;
gap: 10px;
margin-bottom: 20px;
}

.input-container input {
flex: 1;
transition: box-shadow 0.3s;
}

.input-container input:focus {
box-shadow: 0 0 10px rgba(40, 167, 69, 0.7);
}

.btn-copy {
display: inline-block;
margin-bottom: 10px;
padding: 10px 20px;
background-color: #007bff;
color: white;
border: none;
border-radius: 8px;
cursor: pointer;
font-size: 16px;
font-weight: bold;
transition: background-color 0.3s ease, transform 0.2s ease;
}

.btn-copy:hover {
background-color: #0056b3;
transform: scale(1.05);
}


#transcriptionTextContainer {
font-size: 16px;
line-height: 1.6;
color: #000000;
white-space: pre-wrap;
}

.input-container input[type="text"], select {
margin: 0px;

}

#transcriptionForm {
padding-top: 10px;
}

#transcriptionTextContainer {
margin: 0px;
margin-top: 15px;
background: rgb(255 255 255 / 95%);
padding: 20px;
border-radius: 10px;
box-shadow: 0 8px 20px rgb(0 0 0 / 41%);
animation: fadeIn 0.5s ease-in-out;
word-wrap: break-word;
}

@media screen and (min-width: 1000px) {
.table {
width: 800px !important; /* تغيير العرض عند الشاشات الأكبر من 800px */
margin: auto; /* للتوسيط إذا كنت تحتاجه */
}
}


.source-selector {
display: flex;
justify-content: center;
gap: 20px;
margin-bottom: 20px;
flex-wrap: wrap;
}

.card-option input {
display: none;
}

.card {
border: 2px solid #ccc;
border-radius: 12px;
padding: 20px;
text-align: center;
width: 180px;
transition: all 0.3s ease;
cursor: pointer;
color: #4CAF50;
background-color: #fff;
}

.card i {
font-size: 28px;
margin-bottom: 10px;
color: #4CAF50;
}

.card-option input:checked + .card {
border-color: #4CAF50;
background-color: #f0fff0;
}


.file-upload-wrapper {
margin: 20px 0;
text-align: center;
}

.file-drop-area {
border: 2px dashed #999;
border-radius: 10px;
padding: 30px;
cursor: pointer;
background-color: #f9f9f9;
transition: 0.3s ease;
}

.file-drop-area:hover {
background-color: #eef2f5;
border-color: #333;
}

.file-icon {
font-size: 36px;
margin-bottom: 10px;
}

.file-message {
font-size: 16px;
color: #444;
}


.file-icon i {
font-size: 36px;
color: #555;
}

.file-upload-wrapper {
margin-top: 10px;
text-align: center;
}

.file-drop-area {
border: 2px dashed #4a90e2;
border-radius: 12px;
padding: 30px;
cursor: pointer;
background-color: #f8f9fa;
transition: background-color 0.2s;
}

.file-drop-area:hover,
.file-drop-area.dragover {
background-color: #e9f0fa;
}

.file-icon {
font-size: 40px;
color: #4a90e2;
margin-bottom: 10px;
}

.file-message {
font-size: 16px;
color: #555;
}
