/* تنسيقات صفحة البث المباشر للمباراة */
body {
  font-family: 'Arial', sans-serif;
  background-color: #121212;
  color: white;
  margin: 0;
  padding: 0;
  direction: rtl;
}


.container {
  display: flex;
  flex-direction: column;
  padding: 20px;
}

.video-section {
  position: relative;
  width: 100%;
  height: 100%;
}

.live-label {
  position: absolute;
  top: 10px;
  right: 10px;
  background-color: red;
  color: white;
  padding: 5px 10px;
  font-weight: bold;
  border-radius: 4px;
}

.live-video {
  width: 100%;
  border-radius: 10px;
}

.controls {
  margin-top: 10px;
  display: flex;
  gap: 10px;
}

.controls button {
  background-color: #333;
  color: white;
  border: none;
  padding: 8px 12px;
  border-radius: 4px;
  cursor: pointer;
}

.sidebar {
  margin-top: 20px;
  background-color: #1e1e1e;
  padding: 15px;
  border-radius: 10px;
}

.highlights, .stats {
  margin-bottom: 20px;
}

.highlight-item {
  background-color: #2a2a2a;
  padding: 10px;
  margin-top: 10px;
  border-radius: 5px;
}

.chat-section {
  margin-top: 30px;
  background-color: #1e1e1e;
  padding: 15px;
  border-radius: 10px;
}

.chat-box {
  height: 150px;
  background-color: #2a2a2a;
  overflow-y: auto;
  padding: 10px;
  margin-bottom: 10px;
  border-radius: 5px;
}

.chat-bubble {
  background-color: #2a2a2a;
  color: white;
  padding: 10px 15px;
  border-radius: 15px 15px 0 15px;
  margin-bottom: 10px;
  max-width: 80%;
  align-self: flex-start;
  animation: slideIn 0.4s ease;
  box-shadow: 0 2px 5px rgba(0,0,0,0.3);
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(15px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.chat-box {
  display: flex;
  flex-direction: column;
  height: 200px;
  background-color: #2a2a2a;
  overflow-y: auto;
  padding: 10px;
  border-radius: 5px;
  margin-bottom: 10px;
}

#chat-input {
  width: calc(100% - 70px);
  padding: 8px;
  border: none;
  border-radius: 4px;
  margin-left: 10px;
}

.chat-section button {
  background-color: #007acc;
  color: white;
  border: none;
  padding: 8px 14px;
  border-radius: 4px;
  cursor: pointer;
}

.highlight-button {
  background-color: #007acc !important;
  color: #000;
  font-weight: bold;
  border: none;
  padding: 12px;
  width: 100%;
  border-radius: 6px;
  margin-top: 15px;
  cursor: pointer;
  font-size: 16px;
  text-align: center;
}

.icon-btn {
  background-color: rgba(0, 0, 0, 0.6);
  color: white;
  border: none;
  font-size: 20px;
  padding: 10px 14px;
  border-radius: 6px;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.icon-btn:hover {
  background-color: rgba(255, 255, 255, 0.2);
}


.match-stats {
  display: flex;
  justify-content: space-between;
  background-color: #2a2a2a;
  padding: 20px;
  border-radius: 10px;
  margin-top: 10px;
  gap: 20px;
}

.team-block {
  background-color: #3a3a3a;
  flex: 1;
  padding: 15px;
  border-radius: 10px;
  color: #e0e0e0;
}

.team-name {
  color: #f5c518; /* أصفر */
  margin-top: 0;
  margin-bottom: 10px;
  font-size: 18px;
}



.highlight-btn {
  background-color: #f5c518 !important;
  color: #000;
  border: none;
  padding: 14px 20px;
  width: 100%;
  font-size: 18px;
  font-weight: bold;
  border-radius: 8px;
  margin-top: 15px;
  cursor: pointer;
  transition: 0.3s;
}



.audio-comment-box {
  background-color: #1e1e1e;
  margin-top: 15px;
  padding: 15px;
  border-radius: 10px;
  color: #ddd;
}

.record-icon {
  background-color: #007acc;
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  margin-bottom: 10px;
}

.pulse {
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(0, 122, 204, 0.7);
  }
  70% {
    transform: scale(1.1);
    box-shadow: 0 0 0 10px rgba(0, 122, 204, 0);
  }
  100% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(0, 122, 204, 0);
  }
}


.text-comment-btn {
  background-color: #2a2a2a;
  color: white;
  border: none;
  padding: 8px 14px;
  border-radius: 6px;
  margin-top: 10px;
  cursor: pointer;
}

.comment-type {
  margin-top: 10px;
  font-size: 14px;
  color: #aaa;
}

.commentator-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background-color: #1e1e1e;
  padding: 12px 16px;
  border-radius: 10px;
  margin-bottom: 15px;
  box-shadow: 0 0 10px rgba(0,0,0,0.2);
}

.commentator-img {
  width: 45px;
  height: 45px;
  border-radius: 6px;
  object-fit: cover;
  margin-left: 12px;
}

.commentator-info {
  flex-grow: 1;
  text-align: right;
}

.commentator-name {
  margin: 0;
  font-size: 16px;
  font-weight: bold;
  color: white;
}

.commentator-role {
  margin: 2px 0 0;
  font-size: 13px;
  color: #bbb;
}

.play-audio {
  display: flex;
  align-items: center;
  gap: 5px;
}

.play-audio .label {
  font-size: 14px;
  color: #bbb;
}

.play-button {
  background-color: #007acc;
  border: none;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;

}

.play-button .play-icon {
  width: 0;
  height: 0;
  border-left: 8px solid white;
  border-top: 5px solid transparent;
  border-bottom: 5px solid transparent;
}

@keyframes pulse {
  0% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(0, 122, 204, 0.7);
  }
  70% {
    transform: scale(1.1);
    box-shadow: 0 0 0 10px rgba(0, 122, 204, 0);
  }
  100% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(0, 122, 204, 0);
  }
}

.play-button.pulsing {
  animation: pulse 1s ease-out;
}

.stats-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 15px;
  margin-top: 15px;
}

.stat-card {
  background-color: #2a2a2a;
  padding: 15px;
  border-radius: 10px;
  text-align: center;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  animation: fadeInUp 0.8s ease;
}

.stat-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 4px 12px rgba(0, 122, 204, 0.3);
}

.stat-card h4 {
  margin-bottom: 8px;
  color: #007acc;
}

@keyframes fadeInUp {
  0% {
    opacity: 0;
    transform: translateY(20px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}


.overlay-box {
  position: absolute;
  bottom: 10%;
  right: 2%;
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(10px);
  color: white;
  padding: 10px;
  border-radius: 12px;
  width: 200px;
  text-align: center;
  z-index: 998;
}

.overlay-box img {
  width: 90px;
  border-radius: 10px;
}

.overlay-box textarea {
  width: 100%;
  height: 40px;
  border-radius: 6px;
  padding: 5px;
  border: none;
  resize: none;
  margin-top: 5px;
}

.overlay-box .send-button {
  width: 100%;
  background-color: var(--primary-color);
  color: black;
  border: none;
  padding: 8px;
  margin-top: 10px;
  font-weight: bold;
  border-radius: 8px;
  cursor: pointer;
  transition: background-color 0.3s;
}

.overlay-box .send-button:hover {
  background-color: var(--accent-color);
}


.dropdown {
  position: relative;
  display: inline-block;
}

.icon-btn {
  font-size: 20px;
  padding: 10px 20px;
  cursor: pointer;
  background-color: #ddd;
  border: none;
  border-radius: 8px;
}

.dropdown-menu {
  display: none;
  position: absolute;
  top: 100%;
  right: 0;
  background-color: #1b1b1b;
  border: 1px solid #ccc;
  border-radius: 10px;
  min-width: 250px;
  padding: 10px;
  box-shadow: 0 8px 16px rgba(0,0,0,0.2);
  z-index: 999;
}

.menu-item {
  background-color:#2a2a2a;
  padding: 10px;
  margin-bottom: 5px;
  border-radius: 6px;
  cursor: pointer;
}

.sub-options {
  display: none;
  padding-right: 15px;
  margin-top: 5px;
}

.sub-options li {
  list-style: none;
  padding: 5px 0;
}
/* صندوق إدخال التعليق النصي */
#text-comment-box textarea {
  background-color: #1e1e1e;
  color: #fff;
  border: 1px solid #444;
  border-radius: 10px;
  padding: 10px;
  font-family: inherit;
  resize: vertical;
  width: 100%;
  transition: border-color 0.3s ease;
  margin-top: 10px;
}

#text-comment-box textarea:focus {
  outline: none;
  border-color: #f5c518;
}

/* زر إرسال */
#text-comment-box button {
  background-color: #f5c518;
  color: #000;
  border: none;
  padding: 8px 16px;
  border-radius: 8px;
  margin-top: 10px;
  cursor: pointer;
  font-weight: bold;
  transition: background-color 0.3s ease;
}

#text-comment-box button:hover {
  background-color: #e0b700;
}
/*  مربع الإدخال واضح وغامق */
textarea#userInput {
  width: 100%;
  min-height: 60px;
  background-color: rgba(20, 20, 20, 0.467); /* غامق جدًا وشفاف شوي */
  color: #ffffff; /* النص أبيض تمامًا */
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 10px;
  padding: 10px;
  font-size: 14px;
  line-height: 1.6;
  resize: vertical;
  box-shadow: inset 0 1px 3px rgba(0,0,0,0.5);
  transition: 0.3s ease;
}

textarea#userInput::placeholder {
  color: rgba(255, 255, 255, 0.788);
}

textarea#userInput:focus {
  outline: none;
  background-color: rgba(30, 30, 30, 0.392); /* أغمق عند التركيز */
  border-color: #f89c1f;
}


.octo-button {
  flex: 1;
  background-color: rgb(33, 33, 33);
  color: white;
  border: none;
  padding: 8px 12px;
  font-size: 13px;
  border-radius: 8px;
  cursor: pointer;
  text-align: center;
  transition: background-color 0.3s, transform 0.2s;
  white-space: nowrap;
}

/* تأثير عند المرور */
.octo-button:hover {
  background-color: rgba(255, 255, 255, 0.2);
  transform: scale(1.02);
}


/*  صف الأزرار: تفعيل النطق + وضع المطور */
.octo-tools {
  display: flex;
  justify-content: space-between;
  width: 100%;
  gap: 8px;
  margin-bottom: 10px;
}

/* زر النطق  */
#toggleSpeech,
#devToggle {
  flex: 1;
  background-color: rgb(33, 33, 33);
  color: rgb(255, 255, 255);
  border: none;
  padding: 8px 10px;
  font-size: 13px;
  border-radius: 8px;
  cursor: pointer;
  text-align: center;
  transition: background-color 0.3s, transform 0.2s;
  white-space: nowrap;
}

/* تأثير عند المرور */
#toggleSpeech:hover,
#devToggle:hover {
  background-color: rgba(255, 255, 255, 0.25);
  transform: scale(1.02);
}

/*  الترجمة التفاعلية  */
.popup-line {
  position: absolute;
  bottom: 18%; 
  right: 50%;
  transform: translateX(50%);
  background: rgba(0, 0, 0, 0.6);
  color: #ffffff;
  font-weight: 500;
  padding: 12px 24px;
  font-size: 18px;
  border-radius: 12px;
  backdrop-filter: blur(4px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
  opacity: 0;
  transition: opacity 0.5s ease-in-out;
  z-index: 10;
  max-width: 90%;
  text-align: center;
  direction: rtl;
}

.popup-line.show {
  opacity: 1;
}


/* 🟦 بطاقة تحليلية راقية - رسمي وأنيق */
.popup-card {
  position: absolute;
  top: 20%;
  left: 5%;
  background: linear-gradient(135deg, #1d355754, #457b9d72); /* 🟦 تدرج أزرق رسمي */
  color: #f1f1f1;
  padding: 20px 24px;
  border-radius: 14px;
  font-size: 16.5px;
  line-height: 1.8;
  max-width: 380px;
  z-index: 999;
  opacity: 0;
  transform: translateY(-30px);
  animation: fadeSlideIn 0.6s ease-out forwards;
  box-shadow: 0 12px 25px rgba(0, 0, 0, 0.35);
}

/* أنيميشن دخول ناعم */
@keyframes fadeSlideIn {
  from {
    opacity: 0;
    transform: translateY(-30px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}
#reloadSummaryBtn {
  position: absolute;
  top: 20px;
  right: 20px;
  background-color: #ffc107; /* 🟡 أصفر واضح */
  border: none;
  color: #000; /* أسود واضح */
  padding: 6px 16px;
  font-size: 15px;
  font-weight: bold;
  border-radius: 8px;
  cursor: pointer;
  z-index: 999;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
  transition: all 0.3s ease-in-out;
}

#reloadSummaryBtn:hover {
  background-color: #ffca2c;
  transform: scale(1.05);
}

/* تحليل المبرايات المسجله  */
.subtitle-overlay {
  position: absolute;
  bottom: 90px;
  left: 50%;
  transform: translateX(-50%);
  background-color: rgba(0, 0, 0, 0.2); /* خلفية شفافة سوداء */
  color: white;
  padding: 10px 20px;
  border-radius: 12px;
  font-size: 18px;
  line-height: 1.6;
  max-width: 90%;
  text-align: center;
  z-index: 999;
  display: block; /* يظهر فقط أثناء الترجمة */
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.35);
}

