* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  background: #f5f3f0;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Cairo', sans-serif;
  padding: 20px;
  position: relative;
}

/* خلفية ناعمة */
body::before {
  content: '';
  position: fixed;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(252,86,31,0.05) 0%, rgba(253,0,1,0.02) 100%);
  border-radius: 50%;
  bottom: -150px;
  left: -150px;
  z-index: 0;
}

body::after {
  content: '';
  position: fixed;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(82,80,81,0.04) 0%, transparent 70%);
  border-radius: 50%;
  top: -100px;
  right: -100px;
  z-index: 0;
}

/* الحاوية الرئيسية */
.robot-card {
  max-width: 880px;
  width: 100%;
  background: #ffffff;
  border-radius: 48px;
  box-shadow: 0 30px 55px -15px rgba(0, 0, 0, 0.25);
  overflow: hidden;
  position: relative;
  z-index: 2;
  border: 1px solid rgba(82,80,81,0.12);
}

/* رأس الروبوت */
.robot-header {
  background: linear-gradient(135deg, #000000 0%, #2a2a2a 100%);
  padding: 24px 34px 22px 34px;
  position: relative;
  overflow: hidden;
}

.robot-header::before {
  content: '';
  position: absolute;
  top: -30%;
  right: -10%;
  width: 250px;
  height: 250px;
  background: radial-gradient(circle, rgba(252,86,31,0.18) 0%, transparent 70%);
  border-radius: 50%;
}

.robot-header::after {
  content: '';
  position: absolute;
  bottom: -30%;
  left: -5%;
  width: 180px;
  height: 180px;
  background: radial-gradient(circle, rgba(253,0,1,0.12) 0%, transparent 70%);
  border-radius: 50%;
}

.robot-avatar-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 20px;
  position: relative;
  z-index: 2;
}

.robot-avatar {
  display: flex;
  align-items: center;
  gap: 18px;
  background: rgba(255,255,255,0.08);
  backdrop-filter: blur(10px);
  padding: 8px 28px 8px 28px;
  border-radius: 80px;
  border: 1px solid rgba(255,255,255,0.15);
}

.robot-svg {
  width: 74px;
  height: 74px;
  filter: drop-shadow(0 4px 12px rgba(0,0,0,0.3));
  animation: subtleFloat 2.5s infinite alternate ease-in-out;
}

@keyframes subtleFloat {
  0% { transform: translateY(0px); }
  100% { transform: translateY(-3px); }
}

.robot-text {
  color: #ffffff;
  font-weight: 700;
  font-size: 1.2rem;
}

.robot-text small {
  font-size: 0.73rem;
  font-weight: 400;
  opacity: 0.85;
  display: block;
  margin-top: 4px;
}

.title-badge {
  background: linear-gradient(120deg, #fc561f, #fd0001);
  padding: 10px 26px;
  border-radius: 60px;
  color: #ffffff;
  font-weight: 800;
  font-size: 1rem;
  box-shadow: 0 6px 16px rgba(252,86,31,0.35);
  letter-spacing: 0.5px;
}

/* المحتوى */
.content-area {
  padding: 34px 34px 44px;
  background: #ffffff;
}

.instruction {
  text-align: center;
  color: #525051;
  margin-bottom: 32px;
  font-weight: 600;
  background: #faf8f7;
  width: fit-content;
  margin-left: auto;
  margin-right: auto;
  padding: 8px 30px;
  border-radius: 60px;
  font-size: 0.85rem;
  border: 1px solid #e8e4e0;
}

/* حاوية الملفات */
.file-wrapper {
  background: #fefcfb;
  border-radius: 28px;
  padding: 12px 22px 12px 22px;
  margin-bottom: 22px;
  transition: all 0.25s ease;
  border: 1.5px solid #e8e2dd;
  cursor: pointer;
}

.file-wrapper:hover {
  border-color: #fc561f;
  box-shadow: 0 6px 16px rgba(252,86,31,0.12);
  background: #fffaf7;
}

.file-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px;
  cursor: pointer;
  width: 100%;
}

.left-icon-area {
  display: flex;
  align-items: center;
  gap: 18px;
  flex: 2;
}

.file-icon {
  background: #ffffff;
  width: 54px;
  height: 54px;
  border-radius: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.25s ease;
  border: 1.5px solid #e0d9d4;
  box-shadow: 0 2px 6px rgba(0,0,0,0.02);
}

.file-icon svg {
  width: 28px;
  height: 28px;
  stroke: #525051;
  stroke-width: 1.5;
  fill: none;
}

.file-icon.active-success {
  background: linear-gradient(135deg, #fc561f, #fd0001);
  border: none;
  box-shadow: 0 4px 12px rgba(252,86,31,0.3);
}

.file-icon.active-success svg {
  stroke: #ffffff;
}

.file-info {
  flex: 3;
}

.file-name {
  font-weight: 600;
  color: #000000;
  background: #ffffff;
  padding: 7px 18px;
  border-radius: 40px;
  font-size: 0.9rem;
  display: inline-block;
  max-width: 270px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  border: 1px solid #e0d9d4;
}

.status-icon {
  width: 44px;
  height: 44px;
  background: #ffffff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: 0.2s;
  border: 1.5px solid #e0d9d4;
}

.status-icon svg {
  width: 24px;
  height: 24px;
}

/* زر البدء */
.match-btn {
  width: 100%;
  background: linear-gradient(135deg, #1a1a1a 0%, #0d0d0d 100%);
  border: none;
  padding: 18px 12px;
  font-size: 1.2rem;
  font-weight: 800;
  font-family: 'Cairo', sans-serif;
  border-radius: 60px;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: 36px;
  cursor: pointer;
  box-shadow: 0 10px 25px -8px rgba(0,0,0,0.5), 0 0 0 1px rgba(252,86,31,0.3);
  letter-spacing: 0.5px;
}

.match-btn:active {
  transform: scale(0.98);
}

.match-btn.loading {
  opacity: 0.8;
  cursor: wait;
}

/* مؤشر التحميل */
.loading-spinner {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 3px solid rgba(255,255,255,0.3);
  border-radius: 50%;
  border-top-color: #fc561f;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* رسائل التنبيه */
.warning-message {
  background: #fff4f2;
  border-radius: 28px;
  padding: 14px;
  margin-top: 22px;
  text-align: center;
  color: #fd0001;
  font-weight: 700;
  font-size: 0.9rem;
  border-right: 5px solid #fc561f;
}

.success-message {
  background: #e8f5e9;
  border-radius: 28px;
  padding: 14px;
  margin-top: 22px;
  text-align: center;
  color: #2e7d32;
  font-weight: 700;
  font-size: 0.9rem;
  border-right: 5px solid #4caf50;
}

/* إخفاء input file */
input[type="file"] {
  display: none;
}

/* تجاوب مع الجوال */
@media (max-width: 650px) {
  .robot-card {
    margin: 12px;
  }
  .content-area {
    padding: 24px 20px 32px;
  }
  .robot-avatar-container {
    flex-direction: column;
    align-items: flex-start;
  }
  .file-name {
    max-width: 150px;
    font-size: 0.75rem;
  }
  .left-icon-area {
    flex-wrap: wrap;
  }
}