/* style.css - التصميم الكامل لـ Black Moon */

/* ================ متغيرات الألوان ================ */
:root {
  --primary-color: #4caf50;
  --primary-hover: #45a049;
  --bg-dark: #0a0a0a;
  --bg-section: #1a1a1a;
  --bg-card: #222;
  --border-color: #333;
  --text-light: #fff;
  --text-muted: #888;
  --danger-color: #f44336;
  --danger-hover: #d32f2f;
  --success-color: #4caf50;
  --shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
  --transition: all 0.3s ease;
}

/* ================ إعادة تعيين ================ */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Open Sans", sans-serif;
  background-color: var(--bg-dark);
  color: var(--text-light);
  line-height: 1.6;
  direction: ltr; /* أو rtl حسب اللغة، نستخدم ltr لأن النصوص إنجليزية */
}

/* ================ السيدبار (القائمة الجانبية) ================ */
aside {
  position: fixed;
  top: 0;
  left: 0;
  width: 250px;
  height: 100vh;
  background-color: var(--bg-section);
  border-right: 1px solid var(--border-color);
  overflow-y: auto;
  z-index: 100;
}

aside .logo {
  padding: 20px;
  text-align: center;
  border-bottom: 1px solid var(--border-color);
}

aside .logo h1 {
  color: var(--primary-color);
  font-size: 24px;
  font-weight: 700;
  letter-spacing: 1px;
}

aside .connected-profile {
  display: flex;
  align-items: center;
  padding: 20px;
  border-bottom: 1px solid var(--border-color);
  gap: 15px;
}

aside .connected-profile img {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--primary-color);
}

aside .connected-profile .text {
  flex: 1;
}

aside .connected-profile .text h2 {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 5px;
  color: var(--text-light);
}

aside .connected-profile .text p {
  font-size: 12px;
  color: var(--text-muted);
}

aside .start,
aside .action {
  padding: 15px 20px;
  border-bottom: 1px solid var(--border-color);
}

aside .start p,
aside .action p {
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* ================ شريط المصادقة العلوي ================ */
.auth-header {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding: 10px 20px;
  background: var(--bg-section);
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 99;
  margin-left: 250px; /* عرض السيدبار */
  flex-wrap: wrap;
  gap: 15px;
}

.auth-header #auth-status {
  margin-right: auto;
  color: var(--primary-color);
  font-weight: bold;
  background: transparent;
  border: none;
  padding: 0;
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 5px;
}

.auth-buttons {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.auth-buttons button {
  background: #333;
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: var(--transition);
}

.auth-buttons button i {
  font-size: 16px;
}

.auth-buttons button:hover {
  background: var(--primary-color);
}

/* ================ المحتوى الرئيسي ================ */
.start-section,
.start-section-2 {
  margin-left: 250px;
  padding: 20px;
}

.start-section {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  margin-top: 70px; /* لتعويض الـ auth-header */
}

/* ================ بطاقات الحساب وإعدادات ماينكرافت ================ */
.account,
.minecraft-properties {
  background: var(--bg-section);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 25px;
  flex: 1 1 300px;
  box-shadow: var(--shadow);
}

.account img {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  object-fit: cover;
  margin-bottom: 15px;
  border: 3px solid var(--primary-color);
}

.account #liveOwnerText {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 20px;
}

.account .text p {
  color: var(--text-muted);
  margin-bottom: 5px;
}

.account .text p span {
  color: var(--danger-color);
  font-size: 12px;
}

.account input,
.minecraft-properties input {
  width: 100%;
  padding: 12px;
  margin-bottom: 15px;
  border: 1px solid var(--border-color);
  background: var(--bg-dark);
  color: var(--text-light);
  border-radius: 6px;
  transition: var(--transition);
}

.account input:focus,
.minecraft-properties input:focus {
  outline: none;
  border-color: var(--primary-color);
}

.account button,
.minecraft-properties button {
  width: 100%;
  padding: 12px;
  background: var(--primary-color);
  color: white;
  border: none;
  border-radius: 6px;
  font-weight: bold;
  cursor: pointer;
  transition: var(--transition);
}

.account button:hover,
.minecraft-properties button:hover {
  background: var(--primary-hover);
}

#result,
#result2 {
  margin-top: 10px;
  color: var(--text-muted);
  font-size: 14px;
}

/* ================ قسم إدارة الأوامر ================ */
.start-section-2 main {
  background: var(--bg-section);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 25px;
  box-shadow: var(--shadow);
}

.start-section-2 main > div:first-child {
  display: flex;
  gap: 15px;
  flex-wrap: wrap;
  align-items: center;
  margin-bottom: 25px;
}

/* ================ اختيار البروفايل ================ */
.action-select {
  position: relative;
  width: 200px;
  cursor: pointer;
  background: var(--bg-dark);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  color: var(--text-light);
}

.action-select .selected {
  padding: 10px 15px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.action-select .selected .label {
  color: var(--text-muted);
}

.action-select .selected #current-profile-label {
  color: var(--primary-color);
  font-weight: bold;
}

.action-select .options {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-top: none;
  border-radius: 0 0 6px 6px;
  max-height: 200px;
  overflow-y: auto;
  z-index: 10;
}

.action-select.open .options {
  display: block;
}

.action-select .options li {
  padding: 10px 15px;
  list-style: none;
  cursor: pointer;
  transition: var(--transition);
}

.action-select .options li:hover,
.action-select .options li.selected-li {
  background: var(--primary-color);
  color: white;
}

/* ================ أزرار الإجراءات ================ */
.delete-all-btn,
.add-btn {
  padding: 10px 20px;
  border: none;
  border-radius: 6px;
  font-weight: bold;
  cursor: pointer;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.delete-all-btn {
  background: var(--danger-color);
  color: white;
}

.delete-all-btn:hover {
  background: var(--danger-hover);
}

.add-btn {
  background: var(--primary-color);
  color: white;
}

.add-btn:hover {
  background: var(--primary-hover);
}

/* ================ بطاقة إضافة/تعديل الأمر ================ */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 25px;
  margin-bottom: 25px;
  box-shadow: var(--shadow);
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 600px;
  height: 800px;
  overflow-y: auto;
  z-index: 2000;
}

.card input[type="text"],
.card input[type="number"],
.card input[type="url"],
.card textarea,
.card select {
  width: 100%;
  padding: 10px;
  margin: 10px 0;
  border: 1px solid var(--border-color);
  background: var(--bg-dark);
  color: var(--text-light);
  border-radius: 4px;
}

.card textarea {
  min-height: 80px;
  resize: vertical;
}

.card label {
  color: var(--text-muted);
  font-size: 14px;
  margin-top: 10px;
  display: block;
}

.card .actions {
  display: flex;
  gap: 15px;
  margin-top: 20px;
}

.card .confirm-btn,
.card .cancel-btn {
  padding: 10px 25px;
  border: none;
  border-radius: 6px;
  font-weight: bold;
  cursor: pointer;
  transition: var(--transition);
}

.card .confirm-btn {
  background: var(--primary-color);
  color: white;
}

.card .confirm-btn:hover {
  background: var(--primary-hover);
}

.card .cancel-btn {
  background: #555;
  color: white;
}

.card .cancel-btn:hover {
  background: #777;
}

/* ================ القوائم المنسدلة للهدايا والصوت ================ */
.gift-dropdown {
  position: relative;
  width: 100%;
  margin: 10px 0;
  background: var(--bg-dark);
  border: 1px solid var(--border-color);
  border-radius: 4px;
  cursor: pointer;
}

.gift-dropdown .selected {
  padding: 10px;
}

.gift-dropdown .options {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-top: none;
  border-radius: 0 0 4px 4px;
  max-height: 300px;
  overflow-y: auto;
  z-index: 20;
}

.gift-dropdown.open .options {
  display: block;
}

.gift-dropdown .option {
  padding: 10px;
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  transition: var(--transition);
  border-bottom: 1px solid var(--border-color);
}

.gift-dropdown .option:hover {
  background: var(--primary-color);
  color: white;
}

.gift-dropdown .option img {
  width: 35px;
  height: 35px;
  object-fit: cover;
  border-radius: 4px;
}

/* ================ الجدول ================ */
table {
  width: 100%;
  border-collapse: collapse;
  background: var(--bg-dark);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: var(--shadow);
}

thead {
  background: var(--bg-card);
}

th {
  padding: 12px 8px;
  text-align: left;
  color: var(--primary-color);
  font-weight: 600;
  border-bottom: 2px solid var(--border-color);
  text-align: center;
}

td {
  padding: 8px;
  border-bottom: 1px solid var(--border-color);
  vertical-align: middle;
}

tr:last-child td {
  border-bottom: none;
}

td input[type="text"],
td input[type="number"],
td textarea {
  width: 100%;
  padding: 5px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-light);
  border-radius: 4px;
  font-size: 13px;
}

td textarea {
  min-height: 30px;
  resize: none;
}

td .options {
  display: flex;
  gap: 5px;
}

td .options button {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  transition: var(--transition);
  padding: 5px;
  border-radius: 4px;
}

td .options button:hover {
  background: var(--primary-color);
  color: white;
}

td .fathertd {
  display: flex;
  align-items: center;
  gap: 5px;
}

td .numvolume {
  min-width: 30px;
  color: var(--primary-color);
}

/* ================ مربع الاختيار (checkbox) ================ */
input[type="checkbox"] {
  width: 18px;
  height: 18px;
  cursor: pointer;
  accent-color: var(--primary-color);
}

/* ================ شريط التمرير ================ */
input[type="range"] {
  width: 100px;
  height: 5px;
  background: var(--border-color);
  border-radius: 5px;
  -webkit-appearance: none;
}

input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background: var(--primary-color);
  cursor: pointer;
}

/* ================ رسالة التنبيه ================ */
#message {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background: var(--primary-color);
  color: white;
  padding: 12px 24px;
  border-radius: 8px;
  box-shadow: var(--shadow);
  opacity: 0;
  visibility: hidden;
  transition: var(--transition);
  z-index: 1000;
}

#message.show {
  opacity: 1;
  visibility: visible;
}

/* ================ المودالات ================ */
.modal {
  display: none;
  position: fixed;
  z-index: 100000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.8);
  align-items: center;
  justify-content: center;
}

.modal-content {
  position: relative;
  background: var(--bg-section);
  padding: 30px;
  border-radius: 12px;
  width: 90%;
  max-width: 400px;
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow);
  color: var(--text-light);
  z-index: 10000;
}

.modal-content h2 {
  color: var(--primary-color);
  margin-bottom: 20px;
  text-align: center;
}

.modal-content input {
  width: 100%;
  padding: 12px;
  margin: 10px 0;
  border: 1px solid var(--border-color);
  background: var(--bg-dark);
  color: white;
  border-radius: 6px;
}

.modal-content button {
  width: 100%;
  padding: 12px;
  background: var(--primary-color);
  border: none;
  color: white;
  font-weight: bold;
  border-radius: 6px;
  cursor: pointer;
  margin-top: 10px;
}

.modal-content button:hover {
  background: var(--primary-hover);
}

.close-modal {
  float: right;
  font-size: 28px;
  font-weight: bold;
  cursor: pointer;
  color: #888;
}

.close-modal:hover {
  color: white;
}

/* ================ تحسينات للشاشات الصغيرة ================ */
@media (max-width: 768px) {
  aside {
    width: 100%;
    height: auto;
    position: relative;
    border-right: none;
    border-bottom: 1px solid var(--border-color);
  }

  .auth-header,
  .start-section,
  .start-section-2 {
    margin-left: 0;
  }

  .start-section {
    margin-top: 0;
    padding: 20px;
  }

  .auth-header {
    flex-direction: column;
    align-items: stretch;
  }

  .auth-header #auth-status {
    margin-right: 0;
    text-align: center;
  }

  .auth-buttons {
    justify-content: center;
  }

  table {
    display: block;
    overflow-x: auto;
  }
}

/* إضافات للأزرار الجديدة */
.clear-btn {
  background: #f44336;
  color: white;
  border: none;
  padding: 5px 10px;
  border-radius: 4px;
  cursor: pointer;
  margin-top: 5px;
  font-size: 12px;
}
.clear-btn:hover {
  background: #d32f2f;
}
.audio-section,
.video-section {
  margin-top: 15px;
  padding: 10px;
  border: 1px solid var(--border-color);
  border-radius: 6px;
}
/* تنسيق لحالة الاتصال */
#connect-text {
  transition: color 0.3s;
}
.connecting {
  color: orange !important;
}
.connected {
  color: #4caf50 !important;
}
.disconnected {
  color: red !important;
}
/* تنسيق زر تعديل اسم البروفايل */
.profile-edit-btn {
  background: transparent;
  border: none;
  color: #888;
  cursor: pointer;
  margin-left: 5px;
  font-size: 14px;
  padding: 2px 5px;
  border-radius: 3px;
}
.profile-edit-btn:hover {
  color: #4caf50;
  background: #333;
}
.profile-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 5px 10px;
}
.profile-name {
  flex: 1;
  cursor: pointer;
}
.profile-name-input {
  background: #333;
  color: white;
  border: 1px solid #4caf50;
  border-radius: 3px;
  padding: 2px 5px;
  width: 100px;
}
/* إضافة لعرض اسم البروفايل في المحدد الرئيسي */
#current-profile-name-display {
  margin-left: 5px;
  color: #4caf50;
  font-weight: bold;
}
/* أزرار إدارة البروفايلات */
.profile-actions {
  display: flex;
  gap: 10px;
  margin-left: 15px;
}
.profile-action-btn {
  background: #333;
  color: white;
  border: none;
  padding: 6px 12px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 13px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.profile-action-btn:hover {
  background: #4caf50;
}

/* إضافات للأزرار الجديدة */
.clear-btn {
  background: #f44336;
  color: white;
  border: none;
  padding: 5px 10px;
  border-radius: 4px;
  cursor: pointer;
  margin-top: 5px;
  font-size: 12px;
}
.clear-btn:hover {
  background: #d32f2f;
}
.audio-section,
.video-section {
  margin-top: 15px;
  padding: 10px;
  border: 1px solid var(--border-color);
  border-radius: 6px;
}
.upload-audio-btn {
  background: #2196f3;
  color: white;
  border: none;
  padding: 5px 10px;
  border-radius: 4px;
  cursor: pointer;
  margin-top: 5px;
  font-size: 12px;
}
.upload-audio-btn:hover {
  background: #0b7dda;
}
#connect-text {
  transition: color 0.3s;
}
.connecting {
  color: orange !important;
}
.connected {
  color: #4caf50 !important;
}
.disconnected {
  color: red !important;
}
.profile-edit-btn {
  background: transparent;
  border: none;
  color: #888;
  cursor: pointer;
  margin-left: 5px;
  font-size: 14px;
  padding: 2px 5px;
  border-radius: 3px;
}
.profile-edit-btn:hover {
  color: #4caf50;
  background: #333;
}
.profile-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 5px 10px;
}
.profile-name {
  flex: 1;
  cursor: pointer;
}
.profile-name-input {
  background: #333;
  color: white;
  border: 1px solid #4caf50;
  border-radius: 3px;
  padding: 2px 5px;
  width: 100px;
}
#current-profile-name-display {
  margin-left: 5px;
  color: #4caf50;
  font-weight: bold;
}
.profile-actions {
  display: flex;
  gap: 10px;
  margin-left: 15px;
}
.profile-action-btn {
  background: #333;
  color: white;
  border: none;
  padding: 6px 12px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 13px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.profile-action-btn:hover {
  background: #4caf50;
}
.command-table-modal {
  width: 90vw !important;
  max-width: 1400px !important;
  height: 80vh !important;
}
.command-table {
  width: 100%;
  border-collapse: collapse;
  background: #1e1e1e;
  color: #fff;
  font-size: 14px;
}
.command-table th {
  background: #333;
  padding: 8px;
  position: sticky;
  top: 0;
  z-index: 2;
  text-align: center;
}
.command-table td {
  padding: 6px;
  border-bottom: 1px solid #444;
  vertical-align: middle;
  text-align: center;
}
.command-table td:first-child,
.command-table th:first-child {
  text-align: center;
}
.command-table input[type="checkbox"] {
  width: 18px;
  height: 18px;
  cursor: pointer;
}
.duplicate-group {
  background: #2a2a2a;
  border: 1px solid #4caf50;
  border-radius: 6px;
  padding: 10px;
  margin-top: 10px;
}
.duplicate-header {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-bottom: 8px;
  font-weight: bold;
  color: #4caf50;
}
.modal-actions {
  display: flex;
  gap: 10px;
  margin-top: 15px;
  justify-content: flex-end;
}
.webhook-field {
  margin: 10px 0;
}
.webhook-field label {
  display: block;
  margin-bottom: 5px;
  color: #aaa;
}
.webhook-field input {
  width: 100%;
  padding: 8px;
  background: #333;
  border: 1px solid #555;
  color: #fff;
  border-radius: 4px;
}
.progress-container {
  margin-top: 5px;
  display: flex;
  align-items: center;
  gap: 10px;
}
progress {
  flex: 1;
  height: 8px;
  border-radius: 4px;
}
.progress-percent {
  min-width: 40px;
  font-size: 12px;
  color: #4caf50;
}
tr.disabled-row {
  background-color: #3a2a2a;
  color: #ffaaaa;
  opacity: 0.7;
}
tr.disabled-row button {
  opacity: 0.5;
  pointer-events: none;
}
.command-limit-warning {
  background: #ff9800;
  color: #000;
  padding: 10px;
  border-radius: 6px;
  margin-bottom: 10px;
  display: none;
}
.plan-card {
  transition: all 0.2s ease;
  cursor: pointer;
}
.plan-card:hover {
  transform: translateY(-3px);
  border-color: #4caf50 !important;
}
.plan-card.selected {
  border-color: #4caf50 !important;
  background: #2a2a2a;
}
#paypal-button-container {
  margin-top: 15px;
  min-height: 45px;
}
.notification-bar {
  width: 80%;
  position: fixed;
  top: 70px;
  left: 300px;
  right: 20px;
  z-index: 1000;
  background: #ff9800;
  color: white;
  padding: 12px 20px;
  border-radius: 8px;
  text-align: center;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
  font-size: 14px;
  direction: rtl;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.notification-bar button {
  background: none;
  border: none;
  color: white;
  font-size: 20px;
  cursor: pointer;
  margin-right: 10px;
}

#countdown-timer {
  font-family: monospace;
  font-size: 1.2em;
  letter-spacing: 1px;
  direction: ltr;
  display: inline-block;
  background: #00000080;
  padding: 2px 8px;
  border-radius: 20px;
}

@media (max-width: 600px) {
  .notification-bar {
    top: 60px;
    left: 10px;
    right: 10px;
    font-size: 12px;
    padding: 8px 12px;
  }
  #countdown-timer {
    font-size: 1em;
  }
}
.keyboard-selector {
  background: #0f151e;
  border-radius: 16px;
  padding: 16px;
  border: 1px solid #2a3440;
  margin: 15px 0;
}
.selected-key-display {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  font-size: 1.1rem;
}
.key-badge {
  background: #2a3a4a;
  padding: 10px 20px;
  border-radius: 12px;
  font-family: monospace;
  font-size: 22px;
  font-weight: bold;
  border: 2px solid #4caf50;
}
.keyboard-grid {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.keyboard-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: center;
}
.key-btn {
  background: #1e2a36;
  border: 1px solid #2a3440;
  color: #e0e0e0;
  padding: 10px 14px;
  border-radius: 8px;
  font-family: monospace;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  min-width: 55px;
  text-align: center;
  transition: all 0.15s;
}
.key-btn.special {
  min-width: 75px;
}
.key-btn:hover {
  background: #2a3a4a;
  border-color: #4caf50;
}
.key-btn.selected {
  background: #4caf50;
  color: white;
}
.modifier-group {
  display: flex;
  gap: 20px;
  margin: 16px 0;
  justify-content: center;
}
.modifier-group label {
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  background: #1e2a36;
  padding: 8px 16px;
  border-radius: 30px;
}
.flex-between {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.mt-4 {
  margin-top: 20px;
}
/* ================ مودال اختيار الصوت (Fixed) ================ */
#audioModal {
  display: none;
  position: fixed;
  z-index: 10050; /* أعلى من الكارد (9999) وأقل من مودال التأكيد (10000) */
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.85);
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(4px);
}

#audioModal .modal-content {
  background: #1e1e1e;
  border-radius: 20px;
  width: 90%;
  max-width: 600px;
  max-height: 80vh;
  display: flex;
  flex-direction: column;
  padding: 0;
  border: 1px solid #4caf50;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
}

#audioModal .modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 20px;
  border-bottom: 1px solid #333;
  background: #2a2a2a;
  border-radius: 20px 20px 0 0;
}

#audioModal .modal-header h3 {
  margin: 0;
  color: #4caf50;
  font-size: 1.2rem;
}

#audioModal .modal-header .close-audio-modal {
  font-size: 28px;
  font-weight: bold;
  cursor: pointer;
  color: #aaa;
  transition: 0.2s;
}

#audioModal .modal-header .close-audio-modal:hover {
  color: #f44336;
}

#audioModal .modal-body {
  flex: 1;
  overflow-y: hidden;
  padding: 15px;
}

#audioModal .modal-footer {
  padding: 10px 15px;
  border-top: 1px solid #333;
  text-align: center;
  background: #1a1a1a;
  border-radius: 0 0 20px 20px;
}

/* شريط البحث داخل المودال */
#audioModal .audio-search-input {
  width: 100%;
  padding: 10px 15px;
  margin-bottom: 15px;
  background: #0a0a0a;
  border: 1px solid #555;
  color: white;
  border-radius: 30px;
  font-size: 14px;
}

/* حاوية خيارات الأصوات */
#audioModal .audio-options-container {
  max-height: 600px;
  overflow-y: scroll;
  display: flex;
  flex-direction: column;
  gap: 8px;
  overflow-x: hidden;
}

/* خيار الصوت الواحد داخل المودال */
#audioModal .audio-option {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 15px;
  background: #2a2a2a;
  border-radius: 12px;
  cursor: pointer;
  transition: 0.2s;
  border: 1px solid #444;
}

#audioModal .audio-option:hover {
  background: #3a3a3a;
  border-color: #4caf50;
}

#audioModal .audio-option.selected {
  background: #4caf50;
  color: white;
  border-color: #4caf50;
}

#audioModal .audio-left {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
}

#audioModal .audio-icon {
  font-size: 1.6rem;
  color: #4caf50;
}

#audioModal .audio-name {
  font-weight: bold;
  font-size: 1rem;
}

#audioModal .audio-owner {
  font-size: 0.7rem;
  color: #ccc;
  margin-top: 3px;
}

#audioModal .audio-right {
  display: flex;
  gap: 8px;
}

#audioModal .play-audio-btn,
#audioModal .delete-audio-btn {
  background: #444;
  border: none;
  color: white;
  padding: 6px 12px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.75rem;
  transition: 0.2s;
}

#audioModal .play-audio-btn:hover {
  background: #4caf50;
}
#audioModal .delete-audio-btn:hover {
  background: #f44336;
}
/* التأكد من أن مودال التأكيد فوق كل العناصر */
#confirmModal {
  z-index: 11000 !important;
  background-color: rgba(0, 0, 0, 0.8) !important;
}
#confirmModal .modal-content {
  z-index: 11001 !important;
  position: relative;
}
/* خلفية مظلمة تغطي الصفحة */
.overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.75);
  z-index: 9998;
  backdrop-filter: blur(3px);
  transition: all 0.3s ease;
}

/* بطاقة الإضافة/التعديل تظهر فوق الـ overlay */
#addCard {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 90%;
  max-width: 700px;
  max-height: 85vh;
  overflow-y: auto;
  z-index: 9999;
  background: #1e1e1e;
  border-radius: 16px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  padding: 20px;
  display: none; /* يختفي افتراضياً */
}

/* تحسين ظهور الكارد على الشاشات الصغيرة */
@media (max-width: 768px) {
  #addCard {
    width: 95%;
    max-height: 90vh;
    padding: 15px;
  }
}
.modal-content {
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
}