@import url("https://fonts.googleapis.com/css2?family=Tajawal:wght@300;400;500;700&display=swap");
@import url("./Unils/splashScreen.css");

:root {
  --primary: #6c63ff;
  --secondary: #ff6584;
  --light: #f8f9fa;
  --dark: #343a40;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Tajawal", sans-serif;
}

body {
  background-color: #f5f7fa;
  min-height: 100vh;
}

.navbar {
  display: none;
  background: linear-gradient(to right, var(--primary), var(--secondary));
  color: white;
  padding: 15px 20px;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
  position: sticky;
  top: 0;
  z-index: 100;
  animation: slideIn 0.8s forwards;
}

.logo {
  font-size: 24px;
  font-weight: bold;
  display: flex;
  align-items: center;
}

.logo i {
  margin-left: 10px;
  font-size: 28px;
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: all 0.3s;
}

a:hover {
  opacity: 0.8;
}

.user-profile {
  display: flex;
  align-items: center;
}

.user-profile img {
  width: 40px;
  height: 40px;
  object-fit: cover;
  border-radius: 50%;
  margin: 0px 10px 0px 10px;
  border: 2px solid white;
}

.container {
  display: none;
  max-width: 1200px;
  margin: 30px auto;
  padding: 0 20px;
}

.welcome-card {
  background: white;
  border-radius: 15px;
  padding: 30px;
  margin-bottom: 30px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
  position: relative;
  overflow: hidden;
  animation: slideIn 0.8s forwards;
}

.welcome-card h2 {
  color: var(--dark);
  margin-bottom: 15px;
}

.welcome-card p {
  color: #6c757d;
  line-height: 1.6;
  margin-bottom: 20px;
}

.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
  margin-bottom: 30px;
}

.stat-card {
  background: white;
  border-radius: 15px;
  padding: 25px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
  text-align: center;
  transition: all 0.3s;
  cursor: pointer;
}

.stat-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.stat-card i {
  font-size: 40px;
  margin-bottom: 15px;
  color: var(--primary);
}

.stat-card h3 {
  color: var(--dark);
  margin-bottom: 10px;
}

.stat-card p {
  color: #6c757d;
  font-size: 14px;
}

.recent-messages {
  background: white;
  border-radius: 15px;
  padding: 30px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.section-title {
  color: var(--dark);
  margin-bottom: 20px;
  padding-bottom: 10px;
  border-bottom: 2px solid #f1f1f1;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.message {
  padding: 20px;
  border-radius: 10px;
  background-color: #f8f9fa;
  margin-bottom: 15px;
  transition: all 0.3s;
  animation: fadeIn 0.5s forwards;
  opacity: 0;
}

.message:hover {
  background-color: #e9ecef;
}

.message-sender {
  font-weight: bold;
  color: var(--primary);
}

.message-date {
  color: #6c757d;
  font-size: 14px;
}

.message-content {
  color: var(--dark);
  line-height: 1.6;
  white-space: pre-warp;
}

.btn {
  background: linear-gradient(to right, var(--primary), var(--secondary));
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 8px;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.3s;
  display: inline-flex;
  align-items: center;
}

.btn i {
  margin-left: 8px;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(108, 99, 255, 0.4);
}

.floating-btn {
  position: fixed;
  bottom: 30px;
  left: 30px;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: linear-gradient(to right, var(--primary), var(--secondary));
  color: white;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 24px;
  box-shadow: 0 5px 20px rgba(108, 99, 255, 0.4);
  cursor: pointer;
  transition: all 0.3s;
  z-index: 90;
  animation: pulse 2s infinite;
}

.floating-btn:hover {
  transform: scale(1.1);
}

.floating-bubbles {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  overflow: hidden;
}

.bubble {
  position: absolute;
  background: rgba(108, 99, 255, 0.1);
  border-radius: 50%;
  animation: float linear infinite;
}

/*-----------*/
.message-actions {
  display: flex;
  gap: 8px;
  left: 15px;
  top: 15px;
}

.action-btn {
  background: none;
  border: none;
  color: #6c757d;
  cursor: pointer;
  padding: 5px;
  transition: all 0.3s;
}

.action-btn:hover {
  color: var(--primary);
}

.dropdown-menu {
  display: none;
  position: absolute;
  background: white;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  border-radius: 8px;
  padding: 10px;
  right: 0;
  top: 30px;
  min-width: 150px;
}

.dropdown-menu.show {
  display: block;
  animation: slideDown 0.3s ease;
}

.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1000;
  justify-content: center;
  align-items: center;
}

.modal-content {
  background: white;
  padding: 20px;
  border-radius: 10px;
  width: 90%;
  max-width: 400px;
  animation: modalEntry 0.3s cubic-bezier(0.18, 0.89, 0.32, 1.28);
}

.report-option {
  padding: 10px;
  margin: 8px 0;
  border: 1px solid #eee;
  border-radius: 6px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--primary);
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/*------------------*/

@keyframes slideIn {
  from {
    transform: translateX(-50px);
    opacity: 0;
  }

  to {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes fadeIn {
  to {
    opacity: 1;
  }
}

@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(108, 99, 255, 0.7);
  }

  70% {
    box-shadow: 0 0 0 15px rgba(108, 99, 255, 0);
  }

  100% {
    box-shadow: 0 0 0 0 rgba(108, 99, 255, 0);
  }
}

@keyframes float {
  0% {
    transform: translateY(0) rotate(0deg);
    opacity: 1;
  }

  100% {
    transform: translateY(-1000px) rotate(720deg);
    opacity: 0;
  }
}

/* Delay animations for messages */
.message:nth-child(1) {
  animation-delay: 0.2s;
}

.message:nth-child(2) {
  animation-delay: 0.4s;
}

.message:nth-child(3) {
  animation-delay: 0.6s;
}

/* CSS محسن */
.message-header {
  display: flex;
  justify-content: space-between;
  position: relative;

  align-items: center;
  flex-wrap: wrap;
}

.reply-button,
.menu-button {
  background: none;
  border: none;
  color: #666;
  cursor: pointer;
  padding: 4px 8px;
  transition: all 0.3s ease;
  border-radius: 4px;
}

.reply-button:hover,
.menu-button:hover {
  background-color: #f5f5f5;
}

.menu-button {
  position: relative;
}

.dropdown {
  position: relative;
  display: inline-block;
}

.dropdown-content {
  display: none;
  position: absolute;
  top: 100%;
  right: 0;
  background-color: white;
  min-width: 140px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  z-index: 100;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid #eee;
  animation: fadeIn 0.2s ease-out;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.dropdown-item {
  width: 100%;
  padding: 10px 16px;
  text-align: right;
  border: none;
  background: none;
  cursor: pointer;
  color: #333;
  font-size: 14px;
  transition: background 0.2s;
  direction: rtl;
  display: block;
}

.dropdown-item:hover {
  background-color: #f8f8f8;
}

.dropdown-item:active {
  background-color: #f0f0f0;
}

.delete-btn {
  color: #ff4444;
  font-weight: 500;
}

.report-btn {
  color: #ff9800;
}

.show {
  display: block;
}

/* تأثيرات للزر عند النقر */
.menu-button:active {
  transform: scale(0.95);
}

/* فصل العناصر بقائمة */
.dropdown-item:not(:last-child) {
  border-bottom: 1px solid #f0f0f0;
}

/* القائمة المنسدلة الأساسية */
.dropdown {
  position: relative;
  display: inline-block;
}

.dropdown-content {
  display: none;
  position: absolute;
  right: 0;
  background-color: white;
  min-width: 140px;
  box-shadow: 0 2px 15px rgba(0, 0, 0, 0.15);
  z-index: 1000;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid #e0e0e0;
  animation: fadeIn 0.2s ease-out;
}

/* تأثير الظهور */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(-5px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* عناصر القائمة */
.dropdown-item {
  width: 100%;
  padding: 12px 16px;
  text-align: right;
  border: none;
  background: none;
  cursor: pointer;
  color: #333;
  font-size: 14px;
  transition: background 0.2s;
  direction: rtl;
  display: block;
}

.dropdown-item:hover {
  background-color: #f5f5f5;
}

.delete-btn {
  color: #e53935;
  font-weight: 500;
}

.report-btn {
  color: #fb8c00;
}

.show {
  display: block;
}

/* تحسينات للرسائل */
.message {
  position: relative;
  margin-bottom: 15px;
}

/* أنماط الـ Toast */
.toast {
  position: fixed;
  bottom: 20px;
  right: 20px;
  padding: 12px 20px;
  background: #333;
  color: white;
  border-radius: 8px;
  display: flex;
  align-items: center;
  gap: 10px;
  z-index: 1000;
  animation: fadeInUp 0.3s;
}

.toast.success {
  background: #4caf50;
}

.toast.error {
  background: #f44336;
}

.toast-close {
  background: none;
  border: none;
  color: white;
  font-size: 18px;
  cursor: pointer;
  padding: 0 0 0 10px;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.reply-modal {
  border-radius: 16px;
  background: #ffffff;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
  border: 1px solid #eee;
}

.modal-header {
  padding: 1.5rem;
  background: linear-gradient(45deg, var(--primary), var(--secondary));
  color: white;
  border-radius: 16px 16px 0 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.header-content {
  display: flex;
  align-items: center;
  gap: 12px;
}

.header-content .icon {
  font-size: 1.5em;
}

.close-reply {
  background: rgba(255, 255, 255, 0.1);
  border: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  color: white;
  cursor: pointer;
  transition: all 0.3s;
}

.close-reply:hover {
  background: rgba(255, 255, 255, 0.2);
}

.message-card {
  background: #f8f9fa;
  border-radius: 12px;
  padding: 1rem;
  margin-bottom: 1.5rem;
  border-left: 4px solid var(--primary);
}

.reply-section {
  position: relative;
}

.reply-input {
  width: 100%;
  padding: 1rem;
  border: 2px solid #e0e0e0;
  border-radius: 10px;
  resize: vertical;
  min-height: 120px;
  font-family: "Tajawal", sans-serif;
  transition: border-color 0.3s;
}

.reply-input:focus {
  border-color: var(--primary);
  outline: none;
  box-shadow: 0 0 0 3px rgba(108, 99, 255, 0.1);
}

.char-counter {
  font-size: 0.85em;
  color: #666;
}

.modal-footer {
  padding: 1.5rem;
  display: flex;
  gap: 1rem;
  justify-content: flex-end;
}

.send-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  transition: transform 0.2s;
}

.send-btn:hover {
  transform: translateY(-1px);
}

@keyframes modalEntry {
  0% {
    transform: translateY(20px) scale(0.95);
    opacity: 0;
  }

  100% {
    transform: translateY(0) scale(1);
    opacity: 1;
  }
}

/* أنماط نافذة الرد الجديدة */
.reply-modal {
  border-radius: 12px;
  max-width: 600px;
  background: #fff;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.modal-header {
  padding: 1.2rem;
  background: linear-gradient(135deg, #6c63ff, #8b82ff);
  color: white;
  border-radius: 12px 12px 0 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.header-content {
  display: flex;
  align-items: center;
  gap: 10px;
}

.header-content h3 {
  margin: 0;
  font-weight: 700;
}

.close-reply {
  background: rgba(255, 255, 255, 0.1);
  border: none;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  color: white;
  cursor: pointer;
  transition: all 0.3s;
}

.close-reply:hover {
  background: rgba(255, 255, 255, 0.2);
}

.original-message-card {
  background: #f8f9fa;
  border-radius: 8px;
  padding: 1rem;
  margin: 1rem 0;
  border-left: 4px solid #6c63ff;
}

.original-message-text {
  color: #444;
  line-height: 1.6;
  font-size: 0.95rem;
}

textarea {
  width: 100%;
  padding: 1rem;
  border: 2px solid #e0e0e0;
  border-radius: 8px;
  resize: vertical;
  overflow: auto;

  transition: border-color 0.3s;
}

textarea:focus {
  border-color: #6c63ff;
  outline: none;
  box-shadow: 0 0 0 3px rgba(108, 99, 255, 0.1);
}

#customReasonContainer {
  flex-direction: column;
}

.editor {
  width: 100%;
  padding: 1rem;
  border: 2px solid #e0e0e0;
  border-radius: 8px;
  min-height: 100px;
  max-height: 200px;
  resize: vertical;
  overflow: auto;

  transition: border-color 0.3s;
}

.editor:focus {
  border-color: #6c63ff;
  outline: none;
  box-shadow: 0 0 0 3px rgba(108, 99, 255, 0.1);
}

.editor:empty::before {
  content: "اكتب ردك هنا...";
  color: #999;
  pointer-events: none;
}

.input-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 0.8rem;
}

.char-counter {
  font-size: 0.85rem;
  color: #666;
}

.modal-footer {
  padding: 1rem;
  display: flex;
  gap: 1rem;
  justify-content: flex-end;
  border-top: 1px solid #eee;
}

.btn.primary {
  background: linear-gradient(135deg, #6c63ff, #8b82ff);
  color: white;
}

.btn.cancel {
  background: #f0f0f0;
  color: #666;
}

blockquote {
  border-right: 3px solid #ccc;
  margin: 5px 0;
  padding-right: 10px;
  color: #666;
}

.formatting-tools {
  display: flex;
  gap: 3px;
  margin: 8px 0px 8px 0px;
}

.formatting-tools button {
  border: none;
  background-color: white;
  width: 32px;
  height: 32px;
  border-radius: 6px;
  color: #6c63ff;
  cursor: pointer;
  transition: all 0.2s;
}

.formatting-tools button:hover {
  background: #eee;
}

.formatting-tools button.active {
  background: rgba(108, 99, 255, 0.1);
  border: none;
  width: 32px;
  height: 32px;
  border-radius: 6px;
  color: #6c63ff;
  cursor: pointer;
  transition: all 0.2s;
}

.format-btn-ZY {
  display: none;
}

.public-reply-note {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: #555;
  margin-bottom: 10px;
}

.reply {
  margin-top: 10px;
  padding: 12px;
  background-color: #f1f3f5;
  border-right: 4px solid var(--primary);
  border-radius: 8px;
  animation: fadeIn 0.4s ease-in-out;
}

.reply-content {
  color: var(--dark);
  line-height: 1.6;
  align-self: start;
}

.segmented-control {
  display: flex;
  border-radius: 16px;
  padding: 6px;
  position: relative;
  width: 100%;
  max-width: 280px;
  overflow: hidden;
}

.segment {
  flex: 1;
  padding: 14px 0;
  text-align: center;
  font-weight: 600;
  font-size: 15px;
  color: #777;
  cursor: pointer;
  transition: all 0.35s cubic-bezier(0.165, 0.84, 0.44, 1);
  z-index: 2;
  position: relative;
  border-radius: 12px;
  letter-spacing: 0.2px;
  overflow: hidden;
}

.segment::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(to right, #6c63ff, #ff6584);
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: -1;
}

.segment.active {
  color: white;
}

.segment.active::before {
  opacity: 1;
}

/* تم إزالة تغيير الخلفية عند التمرير */
.segment:hover:not(.active) {
  color: #555;
}

.slider {
  position: absolute;
  top: 6px;
  height: calc(100% - 12px);
  border-radius: 12px;
  transition: all 0.45s cubic-bezier(0.165, 0.84, 0.44, 1);
  z-index: 1;
  background: linear-gradient(to right, #6c63ff, #ff6584);
  box-shadow: 0 3px 8px rgba(108, 99, 255, 0.15),
    0 0 8px rgba(255, 101, 132, 0.1);
}

#share-link {
  flex: 1;
  padding: 10px;
  border: 1px solid #ccc;
  border-radius: 8px;
}

.delete-button {
  background-color: #ff4d4f;
  color: white;
  border: none;
  border-radius: 5px;
  padding: 8px 16px;
  font-size: small;
  cursor: pointer;
  transition: background-color 0.3s ease, transform 0.2s ease;
}

.delete-button:hover {
  background-color: #d9363e;
  transform: scale(1.02);
}

.delete-button:active {
  transform: scale(0.96);
}

/* إضافة استعلامات الوسائط للهواتف */
@media (max-width: 480px) {
  .navbar {
    padding: 15px;
    text-align: center;
  }

  .logo {
    font-size: 20px;
  }

  .logo i {
    font-size: 24px;
  }

  .nav-links {
    margin: 15px 0;
    justify-content: center;
  }

  .nav-links li {
    margin: 0 10px;
  }

  .container {
    margin: 15px auto;
    padding: 0 10px;
  }

  .welcome-card {
    padding: 20px;
  }

  .welcome-card h2 {
    font-size: 20px;
  }

  .welcome-card p {
    font-size: 14px;
  }

  .stats {
    grid-template-columns: 1fr 1fr;
  }

  .stat-card {
    padding: 15px;
  }

  .stat-card i {
    font-size: 30px;
  }

  .stat-card h3 {
    font-size: 18px;
  }

  .stat-card p {
    font-size: 12px;
  }

  .message-date {
    font-size: x-small;
  }

  .recent-messages {
    padding: 20px;
  }

  .message-content {
    font-size: 14px;
  }

  .floating-btn {
    width: 50px;
    height: 50px;
    font-size: 20px;
    bottom: 20px;
    left: 20px;
  }

  .message {
    padding: 12px;
    margin-bottom: 10px;
  }

  .dropdown-item {
    padding: 14px 20px;
    /* زيادة المساحة للنقر */
  }

  .dropdown-content {
    position: fixed;
    right: 20px;
    left: auto;
    min-width: 160px;
    transform: none !important;
  }

  .dropdown-item {
    padding: 14px 18px;
    font-size: 15px;
  }

  .report-option span,
  .report-option i {
    font-size: 14px;
  }

  h3 {
    font-size: medium;
  }

  .editor {
    font-size: small;
    min-height: 75px;
  }

  .form-group * {
    font-size: small;
  }

  .toast {
    right: 1rem;
    left: 1rem;
    bottom: 1rem;
    max-width: unset;
    font-size: 0.85rem;
    padding: 0.75rem;
  }

  .format-btn-ZY {
    display: block;
  }

  .public-reply-note {
    font-size: x-small;
  }

  .section-title {
    display: block;
    text-align: center;
  }

  .segmented-control {
    max-width: 260px;
  }

  .segment {
    font-size: small;
    padding: 12px 0;
  }

  .reply-content {
    font-size: small;
  }

  .formatting-tools {
    justify-content: space-evenly;
  }

  #share-link {
    position: absolute;
    left: -9999px;
  }

  .delete-button{
    font-size: x-small;
  }
}
