.btn {
    display: inline-block;
    padding: 14px 30px;
    border-radius: 50px;
    text-decoration: none;
    background: linear-gradient(135deg, #6c4cff, #8d6bff);
    color: white;
    font-weight: bold;
    transition: all 0.3s ease;
    box-shadow: 0 0 20px rgba(108, 76, 255, 0.4);
}

.btn:hover {
    transform: translateY(-4px) scale(1.05);
    box-shadow: 0 0 35px rgba(108, 76, 255, 0.8);
}.card {
    transition: all 0.4s ease;
    border: 1px solid rgba(255,255,255,0.08);
}

.card:hover {
    transform: translateY(-10px);
    box-shadow: 0 0 40px rgba(108,76,255,0.45);
}.services {
    padding: 80px 8%;
}

.section-title {
    text-align: center;
    font-size: 42px;
    margin-bottom: 50px;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
}

.service-card {
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 25px;
    padding: 30px;
    transition: 0.35s;
    box-shadow: 0 0 20px rgba(108,76,255,.15);
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 0 40px rgba(108,76,255,.45);
}

.service-card h3 {
    margin-bottom: 15px;
}

.service-card p {
    color: #d7d7d7;
}/* ===== Stats Section ===== */

.stats{
    padding:80px 8%;
    text-align:center;
}

.stats h2{
    font-size:48px;
    margin-bottom:50px;
    color:#fff;
}

.stats-grid{
    display:grid;
    grid-template-columns:repeat(4,1fr);
    gap:25px;
}

.stat-card{
    background:rgba(255,255,255,.07);
    border:1px solid rgba(255,255,255,.12);
    border-radius:22px;
    padding:35px 20px;
    transition:.3s;
    box-shadow:0 0 25px rgba(108,76,255,.25);
}

.stat-card:hover{
    transform:translateY(-8px);
    box-shadow:0 0 40px rgba(108,76,255,.55);
}

.stat-card h3{
    font-size:42px;
    color:#8d6bff;
    margin-bottom:12px;
}

.stat-card p{
    color:#ddd;
    margin:0;
    font-size:18px;
}/* ===== Dashboard ===== */

.dashboard-layout{
    display:flex;
    min-height:100vh;
}

.sidebar{
    width:260px;
    background:#111827;
    padding:30px;
    display:flex;
    flex-direction:column;
    gap:20px;
}

.sidebar .logo{
    font-size:30px;
    font-weight:bold;
    margin-bottom:20px;
}

.sidebar a{
    color:white;
    text-decoration:none;
    padding:12px;
    border-radius:12px;
    transition:.3s;
}

.sidebar a:hover{
    background:#6c4cff;
}

.dashboard-main{
    flex:1;
    padding:50px;
}

.dashboard-main h1{
    margin-bottom:10px;
}

.dashboard-cards{
    display:grid;
    grid-template-columns:repeat(3,1fr);
    gap:25px;
    margin-top:40px;
}

.dash-card{
    background:rgba(255,255,255,.08);
    border-radius:20px;
    padding:30px;
    box-shadow:0 0 20px rgba(108,76,255,.25);
    transition:.3s;
}

.dash-card:hover{
    transform:translateY(-8px);
}.topbar{
    display:flex;
    justify-content:space-between;
    align-items:center;
    margin-bottom:40px;
}

.search-box{
    width:55%;
    padding:15px 20px;
    border-radius:16px;
    border:1px solid rgba(255,255,255,.15);
    background:rgba(255,255,255,.08);
    color:white;
    outline:none;
}

.user-box{
    background:rgba(255,255,255,.08);
    padding:14px 20px;
    border-radius:16px;
    box-shadow:0 0 20px rgba(108,76,255,.2);
}/* Features Section */

.features {
    padding: 80px 10%;
    text-align: center;
}

.features h2 {
    font-size: 40px;
    margin-bottom: 50px;
    color: #ffffff;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px,1fr));
    gap: 25px;
}

.feature-card {
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 20px;
    padding: 35px;
    transition: 0.3s;
    backdrop-filter: blur(10px);
}

.feature-card:hover {
    transform: translateY(-10px);
    border-color: #8b5cf6;
    box-shadow: 0 15px 40px rgba(139,92,246,.35);
}

.feature-card h3 {
    color: #8b5cf6;
    margin-bottom: 15px;
}

.feature-card p {
    color: #cccccc;
    line-height: 1.7;
}/* About Section */

.about {
    padding: 100px 8%;
}

.about-content {
    max-width: 800px;
}

.section-label {
    display: inline-block;
    color: #8b5cf6;
    font-size: 14px;
    font-weight: bold;
    text-transform: uppercase;
    margin-bottom: 15px;
    letter-spacing: 2px;
}

.about h2 {
    font-size: 48px;
    margin-bottom: 20px;
    color: #ffffff;
}

.about p {
    font-size: 20px;
    color: #bfbfbf;
    line-height: 1.8;
}.about {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 40px;
  padding: 60px 5%;
}

.nexa-card {
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(139,92,246,.3);
  border-radius: 20px;
  padding: 35px;
  width: 340px;
  backdrop-filter: blur(10px);
  box-shadow: 0 0 30px rgba(139,92,246,.25);
}

.nexa-card h3{
  color:#8b5cf6;
  margin-bottom:20px;
}

.nexa-card p{
  color:#ddd;
  margin:12px 0;
}

.nexa-btn{
  display:inline-block;
  margin-top:20px;
  padding:12px 24px;
  background:#8b5cf6;
  color:#fff;
  border-radius:12px;
  text-decoration:none;
  transition:.3s;
}

.nexa-btn:hover{
  background:#a855f7;
  transform:translateY(-2px);
}.why-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 25px;
  margin-top: 40px;

  flex: 0 0 100%;
  width: 100%;
}

.why-card {
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 20px;
  padding: 30px;
  transition: 0.3s;
}

.why-card:hover {
  transform: translateY(-8px);
  border-color: #8b5cf6;
  box-shadow: 0 15px 40px rgba(139,92,246,0.3);
}

.why-card h3 {
  color: #8b5cf6;
  margin-bottom: 15px;
}

.why-card p {
  color: #cccccc;
  line-height: 1.7;
}.nexa-preview {
  padding: 100px 10%;
  background: #0f172a;
  text-align: center;
}

.nexa-container {
  max-width: 800px;
  margin: auto;
}

.nexa-preview h2 {
  font-size: 42px;
  color: white;
  margin: 20px 0;
}

.nexa-preview p {
  color: #cbd5e1;
  font-size: 18px;
  line-height: 1.8;
  margin-bottom: 35px;
}

.nexa-btn {
  display: inline-block;
  background: #7c3aed;
  color: white;
  padding: 15px 35px;
  border-radius: 12px;
  text-decoration: none;
  font-weight: bold;
  transition: 0.3s;
}

.nexa-btn:hover {
  background: #6d28d9;
  transform: translateY(-3px);
}
/* Nexa Chat Page */

.nexa-chat {
  min-height: 100vh;
  background: linear-gradient(135deg, #0f172a, #1e1b4b);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 40px;
}

.chat-header {
  text-align: center;
  margin-bottom: 25px;
}

.chat-header h1 {
  color: white;
  font-size: 42px;
  margin-bottom: 10px;
}

.chat-header p {
  color: #cbd5e1;
  font-size: 18px;
}

.chat-box {
  width: 100%;
  max-width: 700px;
  height: 380px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 20px;
  padding: 25px;
  color: white;
  margin-bottom: 20px;
}

.message.ai {
  background: rgba(124,58,237,0.25);
  padding: 18px;
  border-radius: 16px;
  line-height: 1.6;
}

.chat-input {
  width: 100%;
  max-width: 700px;
  display: flex;
  gap: 10px;
}

.chat-input input {
  flex: 1;
  padding: 16px;
  border: none;
  border-radius: 12px;
  outline: none;
  font-size: 16px;
}

.chat-input button {
  background: #7c3aed;
  color: white;
  border: none;
  padding: 16px 30px;
  border-radius: 12px;
  cursor: pointer;
  font-weight: bold;
}

.chat-input button:hover {
  background: #6d28d9;
}

.message.user {
  background: rgba(255, 255, 255, 0.12);
  padding: 14px 18px;
  border-radius: 16px;
  margin-top: 12px;
  margin-left: auto;
  max-width: 80%;
  width: fit-content;
  line-height: 1.5;
}

/* Nexa chat sidebar layout */
.nexa-chat {
  width: min(1200px, 96%);
  height: 88vh;
  margin: 30px auto;
  display: grid;
  grid-template-columns: 270px minmax(0, 1fr);
  grid-template-rows: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: stretch;
}

.nexa-chat .chat-header {
  grid-column: 1;
  grid-row: 1 / 3;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  text-align: left;
  padding: 22px 16px;
  border-radius: 22px;
  overflow: hidden;
  background: rgba(18, 24, 55, 0.82);
  border: 1px solid rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(14px);
}

.nexa-chat .chat-header h1 {
  margin: 0 0 8px;
  text-align: center;
}

.nexa-chat .chat-header p {
  margin: 0 0 20px;
  text-align: center;
  opacity: 0.8;
}

#newChatButton {
  width: 100%;
  margin-bottom: 14px;
  padding: 12px 14px;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  font-weight: 700;
}

.conversation-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  overflow-y: auto;
  padding-right: 4px;
  max-height: 220px;
min-height: 0;
}

.conversation-item {
    width: 100%;
    padding: 10px 12px;
    border: none;
    border-radius: 10px;
    text-align: left;
    cursor: pointer;
    background: transparent;
    color: white;
}
.conversation-title {
    font-size: 14px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.conversation-preview {
    margin-top: 4px;
    font-size: 12px;
    color: #9ca3af;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

body.light-theme .conversation-item {
  background: #f3f4f6 !important;
  color: #111827 !important;
  border: 1px solid #e5e7eb !important;
}

body.light-theme .conversation-title {
  color: #111827 !important;
}

body.light-theme .conversation-preview {
  color: #6b7280 !important;
}

body.light-theme .conversation-time,
body.light-theme .conversation-date {
  color: #6b7280 !important;
}

body.light-theme .conversation-item.active {
  background: linear-gradient(135deg, #4f46e5, #7c3aed) !important;
  color: white !important;
}

body.light-theme .conversation-item.active .conversation-title,
body.light-theme .conversation-item.active .conversation-preview,
body.light-theme .conversation-item.active .conversation-time,
body.light-theme .conversation-item.active .conversation-date {
  color: white !important;
}

.nexa-chat .chat-box {
  grid-column: 2;
  grid-row: 1;
  width: 100%;
  height: 100%;
  min-height: 0;
  overflow-y: auto;
  margin: 0;
}

.nexa-chat .chat-input {
  grid-column: 2;
  grid-row: 2;
  width: 100%;
  margin: 0;
}

@media (max-width: 760px) {
  .nexa-chat {
    height: auto;
    grid-template-columns: 1fr;
    grid-template-rows: auto minmax(55vh, 1fr) auto;
  }

  .nexa-chat .chat-header {
    grid-column: 1;
    grid-row: 1;
    max-height: 260px;
  }

  .nexa-chat .chat-box {
    grid-column: 1;
    grid-row: 2;
    min-height: 55vh;
  }

  .nexa-chat .chat-input {
    grid-column: 1;
    grid-row: 3;
  }

  .conversation-list {
    max-height: 140px;
  }
}
.chat-header {
    overflow-y: auto;
}

.conversation-list {
    max-height: 180px;
    overflow-y: auto;
}

.chat-input input {
    font-size: 16px;
}
.conversation-item.active {
  background: linear-gradient(
    135deg,
    rgba(139, 92, 246, 0.95),
    rgba(99, 102, 241, 0.95)
  );
  color: white;
  box-shadow: 0 8px 20px rgba(99, 102, 241, 0.25);
}
.conversation-list .conversation-item.active {
  background: linear-gradient(
    135deg,
    #8b5cf6,
    #6366f1
  ) !important;
  color: white !important;
  border: 1px solid rgba(255, 255, 255, 0.35) !important;
  box-shadow: 0 8px 20px rgba(99, 102, 241, 0.35) !important;
}
.conversation-row {
  display: flex;
  align-items: center;
  gap: 6px;
}

.conversation-row .conversation-item {
  flex: 1;
}

.delete-conversation {
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  background: rgba(239, 68, 68, 0.14);
  color: white;
  transition: 0.2s ease;
}

.delete-conversation:hover {
  background: rgba(239, 68, 68, 0.85);
  transform: scale(1.04);
}
.typing-dots span {
  display: inline-block;
  animation: typingDot 1.2s infinite;
}

.typing-dots span:nth-child(2) {
  animation-delay: 0.2s;
}

.typing-dots span:nth-child(3) {
  animation-delay: 0.4s;
}

@keyframes typingDot {
  0%, 60%, 100% {
    opacity: 0.25;
    transform: translateY(0);
  }

  30% {
    opacity: 1;
    transform: translateY(-3px);
  }
}
.typing-dots {
    display: inline-flex;
    gap: 3px;
    margin-left: 4px;
}

.typing-dots span {
    animation: typingBounce 1.4s infinite;
    opacity: 0.3;
}

.typing-dots span:nth-child(2) {
    animation-delay: 0.2s;
}

.typing-dots span:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes typingBounce {
    0%, 80%, 100% {
        opacity: 0.3;
        transform: translateY(0);
    }

    40% {
        opacity: 1;
        transform: translateY(-4px);
    }
}
.typing-dots {
  display: inline-flex !important;
  align-items: center;
  gap: 5px;
  margin-left: 6px;
}

.typing-dots i {
  display: block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
  animation: nexaTyping 1s infinite ease-in-out;
}

.typing-dots i:nth-child(2) {
  animation-delay: 0.15s;
}

.typing-dots i:nth-child(3) {
  animation-delay: 0.3s;
}

@keyframes nexaTyping {
  0%,
  60%,
  100% {
    opacity: 0.25;
    transform: translateY(0);
  }

  30% {
    opacity: 1;
    transform: translateY(-6px);
  }
}
.conversation-item {
  transition:
    background 0.2s ease,
    border-color 0.2s ease,
    transform 0.2s ease,
    box-shadow 0.2s ease;
}

.conversation-item:hover {
  transform: translateX(2px);
}

.conversation-item.active {
  background: linear-gradient(
    135deg,
    rgba(124, 58, 237, 0.95),
    rgba(79, 70, 229, 0.95)
  );

  color: white;
  border-color: rgba(255, 255, 255, 0.45);

  box-shadow:
    0 6px 18px rgba(91, 33, 182, 0.35),
    inset 3px 0 0 rgba(255, 255, 255, 0.75);
}
/* Mobile layout improvements */
@media (max-width: 760px) {
  body {
    overflow-x: hidden;
  }

  .nexa-chat {
    width: 100%;
    min-height: 100dvh;
    height: auto;
    padding: 12px;
    gap: 12px;

    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto minmax(55vh, 1fr) auto;
  }

  .nexa-chat .chat-header {
    grid-column: 1;
    grid-row: 1;

    width: 100%;
    max-height: none;
    margin: 0;
    padding: 14px;
    overflow: visible;
  }

  .chat-header h1 {
    font-size: 30px;
    margin-bottom: 6px;
  }

  .chat-header p {
    font-size: 15px;
    margin-bottom: 12px;
  }

  #newChatButton,
  #logoutButton,
  #conversationSearch {
    width: 100%;
  }

  .conversation-list {
  width: 100%;
  height: calc(100vh - 260px);
  max-height: none;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding-right: 4px;
}

  .conversation-row {
    width: 100%;
    min-width: 0;
    overflow: hidden;
}

  .conversation-row .conversation-item {
    min-width: 0;
    flex: 1;
  }

  .rename-conversation,
  .delete-conversation {
    width: 36px;
    height: 36px;
    flex: 0 0 36px;
  }
.conversation-list {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 8px;
}

.conversation-row {
    position: static !important;
    display: flex !important;
    flex: 0 0 auto;
    width: 100%;
    min-width: 0;
    overflow: hidden;
}
  .nexa-chat .chat-box {
    grid-column: 1;
    grid-row: 2;

    width: 100%;
    min-width: 0;
    min-height: 55vh;
    max-height: 65vh;
    margin: 0;
    padding: 14px;
    overflow-y: auto;
  }

  .message {
    max-width: 90%;
    overflow-wrap: anywhere;
  }
  .nexa-chat .chat-box {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.nexa-chat .message {
  max-width: 85%;
  padding: 12px 14px;
  border-radius: 16px;
  line-height: 1.6;
  font-size: 14px;
  overflow-wrap: anywhere;
}

.nexa-chat .message.user {
  align-self: flex-end;
  margin-left: auto;
}

.nexa-chat .message.assistant,
.nexa-chat .message.bot {
  align-self: flex-start;
  margin-right: auto;
}

.nexa-chat .message-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.nexa-chat .message-actions button {
  padding: 5px 9px;
  border-radius: 8px;
  font-size: 11px;
  cursor: pointer;
}

.nexa-chat .typing-indicator,
.nexa-chat .thinking-indicator {
  align-self: flex-start;
  margin: 4px 0 8px;
}

  .nexa-chat .chat-input {
    grid-column: 1;
    grid-row: 3;

    display: flex;
    align-items: flex-end;
    width: 100%;
    gap: 8px;
    margin: 0;
  }

  .chat-input input,
  .chat-input textarea {
    flex: 1;
    min-width: 0;
    width: 100%;
    font-size: 16px;
  }

  .chat-input button {
    flex: 0 0 auto;
    min-height: 48px;
    padding: 0 18px;
  }
}
@media (max-width: 760px) {
  .nexa-chat .chat-input {
    position: sticky;
    bottom: 0;
    z-index: 20;

    width: 100%;
    padding: 10px;
    margin: 0;

    background: rgba(15, 23, 42, 0.96);
    backdrop-filter: blur(10px);
    border-top: 1px solid rgba(255, 255, 255, 0.12);
  }

  .nexa-chat .chat-box {
    padding-bottom: 85px;
  }
}
.typing-dots {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-left: 6px;
}

.typing-dots span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: white;
  display: inline-block;
  animation: typingDot 1.2s infinite ease-in-out;
}

.typing-dots span:nth-child(2) {
  animation-delay: 0.2s;
}

.typing-dots span:nth-child(3) {
  animation-delay: 0.4s;
}

@keyframes typingDot {
  0%,
  60%,
  100% {
    transform: translateY(0);
    opacity: 0.35;
  }

  30% {
    transform: translateY(-5px);
    opacity: 1;
  }
}
.copy-message {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;

  margin-top: 10px;
  padding: 7px 11px;

  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 8px;

  background: rgba(255, 255, 255, 0.12);
  color: white;

  font-size: 14px;
  cursor: pointer;
  opacity: 1;
}

.copy-message:hover {
  background: rgba(124, 58, 237, 0.65);
}

.message.user .copy-message {
  display: none;
}

/* ===== Nexa Chat Layout Upgrade ===== */

body.nexa-page {
  margin: 0;
  padding: 0;
  min-height: 100vh;
  overflow: hidden;
  background: #0b1020;
}

.nexa-page .nexa-chat {
  width: 100%;
  height: 100vh;
  max-width: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  grid-template-rows: minmax(0, 1fr) auto;
  background:
    radial-gradient(circle at top right, rgba(108, 76, 255, 0.18), transparent 35%),
    #0b1020;
  overflow: hidden;
}

/* القائمة الجانبية */

.nexa-page .chat-header {
  grid-column: 1;
  grid-row: 1 / 3;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 12px;
  min-width: 0;
  padding: 24px 18px;
  background: rgba(15, 22, 43, 0.97);
  border-right: 1px solid rgba(255, 255, 255, 0.09);
  overflow: hidden;
}

.nexa-page .chat-header h1 {
  margin: 0;
  font-size: 32px;
  line-height: 1.2;
  color: #ffffff;
}

.nexa-page .chat-header p {
  margin: 0 0 10px;
  color: #aeb6cf;
  font-size: 15px;
}

.nexa-page #newChatButton,
.nexa-page #logoutButton {
  width: 100%;
  min-height: 46px;
  padding: 11px 14px;
  border: 0;
  border-radius: 13px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
}

.nexa-page #newChatButton {
  color: #ffffff;
  background: linear-gradient(135deg, #6c4cff, #8d6bff);
  box-shadow: 0 10px 24px rgba(108, 76, 255, 0.25);
}

.nexa-page #logoutButton {
  color: #dbe0ef;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.09);
}

.nexa-page #conversationSearch {
  width: 100%;
  min-height: 43px;
  padding: 10px 13px;
  padding-right: 42px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.nexa-page #conversationSearch::placeholder {
  color: #8992aa;
}

.nexa-page #conversationSearch:focus {
  border-color: #7c5cff;
  box-shadow: 0 0 0 3px rgba(124, 92, 255, 0.14);
}

.nexa-page .conversation-list {
  flex: 1;
  min-height: 220px;
  max-height: calc(100vh - 300px);
  padding-right: 4px;
  overflow-y: auto;
  overflow-x: hidden;

  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* منطقة الرسائل */

.nexa-page .chat-box {
  grid-column: 2;
  grid-row: 1;
  width: auto;
  min-width: 0;
  min-height: 0;
  margin: 0;
  padding: 32px clamp(24px, 6vw, 90px);
  overflow-y: auto;
  background: transparent;
}

/* مربع الكتابة */

.nexa-page .chat-input {
  grid-column: 2;
  grid-row: 2;
  width: auto;
  margin: 0;
  padding: 16px clamp(24px, 6vw, 90px) 22px;
  display: flex;
  align-items: flex-end;
  gap: 12px;
  background: linear-gradient(
    to top,
    rgba(11, 16, 32, 1),
    rgba(11, 16, 32, 0.94)
  );
  border-top: 1px solid rgba(255, 255, 255, 0.07);
}

.nexa-page #userInput {
  flex: 1;
  width: auto;
  min-height: 52px;
  max-height: 160px;
  padding: 14px 17px;
  resize: none;
  outline: none;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 17px;
  background: rgba(255, 255, 255, 0.07);
  color: #ffffff;
  font-size: 16px;
  line-height: 1.45;
}

.nexa-page #userInput:focus {
  border-color: #7c5cff;
  box-shadow: 0 0 0 3px rgba(124, 92, 255, 0.14);
}

.nexa-page #sendButton {
  min-width: 92px;
  min-height: 52px;
  padding: 12px 20px;
  border: 0;
  border-radius: 16px;
  background: linear-gradient(135deg, #6c4cff, #8d6bff);
  color: #ffffff;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
}

/* الجوال والشاشات الصغيرة */

@media (max-width: 760px) {
  body.nexa-page {
    overflow: auto;
  }

  .nexa-page .nexa-chat {
    height: auto;
    min-height: 100vh;
    grid-template-columns: 1fr;
    grid-template-rows: auto minmax(55vh, 1fr) auto;
    overflow: visible;
  }

  .nexa-page .chat-header {
    grid-column: 1;
    grid-row: 1;
    max-height: 340px;
    padding: 18px;
    border-right: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.09);
  }

  .nexa-page .chat-box {
    grid-column: 1;
    grid-row: 2;
    padding: 22px 16px;
  }

  .nexa-page .chat-input {
    grid-column: 1;
    grid-row: 3;
    position: sticky;
    bottom: 0;
    padding: 12px;
  }

  .nexa-page #sendButton {
    min-width: 74px;
  }
}
html,
body {
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
}

* {
  max-width: 100%;
}

.chat-container,
.chat-wrapper,
main {
  width: 100%;
  max-width: 100vw;
  overflow-x: hidden;
}
@media (max-width: 760px) {
  .nexa-page .nexa-sidebar {
    display: flex !important;
    flex-direction: column !important;
    height: 100vh !important;
    overflow: hidden !important;
  }

  .nexa-page .conversation-list {
    display: flex !important;
    flex-direction: column !important;
    flex: 0 0 auto !important;
    width: 100% !important;
    height: calc(100vh - 290px) !important;
    min-height: 300px !important;
    max-height: calc(100vh - 290px) !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    gap: 8px !important;
  }

  .nexa-page .conversation-row {
    position: static !important;
    display: flex !important;
    flex: 0 0 auto !important;
    width: 100% !important;
  }
}
/* Image preview above the message box */
#selectedFilePreview {
  display: none;
  align-items: center;
  gap: 10px;
  margin: 8px 0;
  padding: 8px;
  border: 1px solid #d9d9e3;
  border-radius: 12px;
  background: #ffffff;
}

#selectedFilePreview.active {
  display: flex;
}

#imagePreview {
  width: 58px;
  height: 58px;
  object-fit: cover;
  border-radius: 10px;
  display: block;
  border: 1px solid #e5e5ea;
}

#selectedFileName {
  flex: 1;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
/* Force the selected image thumbnail to appear */
#selectedFilePreview.active {
  display: flex !important;
  align-items: center;
  gap: 10px;
}

#imagePreviewContainer {
  display: block !important;
  width: 60px;
  height: 60px;
  flex-shrink: 0;
}

#imagePreview {
  display: block !important;
  width: 60px !important;
  height: 60px !important;
  min-width: 60px;
  object-fit: cover;
  border-radius: 10px;
  border: 1px solid #d9d9e3;
}
/* Final fix for image thumbnail */
#selectedFilePreview.active {
  display: flex !important;
  visibility: visible !important;
  opacity: 1 !important;
  height: auto !important;
  min-height: 76px !important;
  max-height: none !important;
  overflow: visible !important;
  align-items: center !important;
}

#imagePreviewContainer {
  display: flex !important;
  visibility: visible !important;
  opacity: 1 !important;
  width: 64px !important;
  height: 64px !important;
  min-width: 64px !important;
  min-height: 64px !important;
  overflow: visible !important;
}

#imagePreview {
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
  width: 64px !important;
  height: 64px !important;
  min-width: 64px !important;
  min-height: 64px !important;
  max-width: 64px !important;
  max-height: 64px !important;
  object-fit: cover !important;
  position: static !important;
}
@media (max-width: 768px) {
  .services-container,
  .services-grid,
  .services-cards {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    width: 100% !important;
    max-width: 100% !important;
    gap: 24px !important;
  }

  .service-card {
    width: calc(100% - 32px) !important;
    max-width: 360px !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
  }

  body {
    overflow-x: hidden !important;
  }
}
@media (max-width: 768px) {
  .about {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    width: 100% !important;
    max-width: 100% !important;
    padding-left: 20px !important;
    padding-right: 20px !important;
    box-sizing: border-box !important;
    gap: 28px !important;
  }

  .about-content,
  .nexa-card {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
  }

  .nexa-card {
    margin: 0 !important;
  }
}
@media (max-width: 768px) {
  .dashboard-layout {
    display: block !important;
    min-height: 100vh !important;
    width: 100% !important;
  }

  .sidebar {
    width: 100% !important;
    min-width: 0 !important;
    padding: 18px !important;
    box-sizing: border-box !important;
    flex-direction: row !important;
    flex-wrap: wrap !important;
    gap: 10px !important;
  }

  .sidebar a {
    flex: 1 1 45% !important;
    text-align: center !important;
    padding: 10px !important;
    box-sizing: border-box !important;
  }

  .dashboard-main {
    width: 100% !important;
    max-width: 100% !important;
    padding: 20px !important;
    box-sizing: border-box !important;
  }

  .dashboard-cards {
    grid-template-columns: 1fr !important;
    gap: 16px !important;
    margin-top: 20px !important;
  }

  .dash-card {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }
}
@media (max-width: 760px) {
  .nexa-page .chat-input {
    flex-wrap: wrap !important;
  }

  .nexa-page #selectedFilePreview {
    order: -1;
    flex: 0 0 100% !important;
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 0 8px 0 !important;
    box-sizing: border-box;
  }

  .nexa-page #selectedFilePreview.active {
    display: flex !important;
  }

  .nexa-page #selectedFileName {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
}
.chat-video {
  display: block;
  width: 100%;
  max-width: 320px;
  max-height: 420px;
  object-fit: contain;
  border-radius: 14px;
  margin-bottom: 8px;
  background: #000;
}

.message.user .chat-video {
  margin-left: auto;
  margin-right: 0;
}

@media (max-width: 600px) {
  .chat-video {
  width: 260px !important;
  max-width: 260px !important;
  height: auto !important;
  max-height: 340px !important;
  object-fit: contain !important;
}
}
.waitlist-breakdown {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.waitlist-breakdown div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 13px;
  color: #b8b9c6;
}

.waitlist-breakdown strong {
  color: #ffffff;
  font-size: 14px;
  font-weight: 700;
}