/* Name Compatibility Calculator - حاسبة التوافق بين الأسماء */

.nc-widget {
  font-family: 'Tajawal', sans-serif;
  direction: rtl;
  background: #0a0e1a;
  color: #f1f5f9;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 24px;
  position: relative;
  overflow: hidden;
  border-radius: 24px;
  min-height: 500px;
}

.nc-widget *, .nc-widget *::before, .nc-widget *::after {
  box-sizing: border-box;
}

/* --- Ambient Orbs --- */
.nc-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.3;
  animation: ncOrbFloat 12s ease-in-out infinite;
  pointer-events: none;
}
.nc-orb-1 {
  width: 400px; height: 400px;
  background: #f43f5e;
  top: -100px; right: -100px;
}
.nc-orb-2 {
  width: 350px; height: 350px;
  background: #8b5cf6;
  bottom: -80px; left: -80px;
  animation-delay: -4s;
}
.nc-orb-3 {
  width: 200px; height: 200px;
  background: #ec4899;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  animation-delay: -8s;
  opacity: 0.15;
}

@keyframes ncOrbFloat {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(30px, -20px) scale(1.05); }
  66% { transform: translate(-20px, 30px) scale(0.95); }
}

/* --- Stars --- */
.nc-stars {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.nc-star {
  position: absolute;
  width: 2px; height: 2px;
  background: white;
  border-radius: 50%;
  animation: ncTwinkle 3s ease-in-out infinite;
}

@keyframes ncTwinkle {
  0%, 100% { opacity: 0.2; }
  50% { opacity: 0.8; }
}

/* --- Card --- */
.nc-card {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 520px;
  background: #111827;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 28px;
  padding: 48px 36px;
  box-shadow:
    0 0 0 1px rgba(244,63,94,0.05),
    0 25px 50px -12px rgba(0,0,0,0.5),
    0 0 100px rgba(139,92,246,0.08);
  backdrop-filter: blur(20px);
  margin: 0 auto;
}
.nc-card::before {
  content: '';
  position: absolute;
  top: -1px; left: 50%;
  transform: translateX(-50%);
  width: 120px; height: 4px;
  background: linear-gradient(90deg, #f43f5e, #8b5cf6, #ec4899);
  border-radius: 0 0 4px 4px;
}

/* --- Header --- */
.nc-header {
  text-align: center;
  margin-bottom: 36px;
}
.nc-icon-wrap {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 72px; height: 72px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(244,63,94,0.15), rgba(139,92,246,0.15));
  border: 1px solid rgba(244,63,94,0.2);
  margin-bottom: 20px;
  font-size: 32px;
  animation: ncPulse 3s ease-in-out infinite;
}

@keyframes ncPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(244,63,94,0.2); }
  50% { box-shadow: 0 0 0 12px rgba(244,63,94,0); }
}

.nc-title {
  font-family: 'Amiri', serif !important;
  font-size: 28px !important;
  font-weight: 700 !important;
  background: linear-gradient(135deg, #f1f5f9, #ec4899);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin: 0 0 8px 0 !important;
  padding: 0 !important;
  line-height: 1.4 !important;
  border: none !important;
}
.nc-subtitle {
  color: #94a3b8;
  font-size: 15px;
  font-weight: 400;
  margin: 0;
}

/* --- Form --- */
.nc-form-group {
  margin-bottom: 20px;
  position: relative;
}
.nc-widget label {
  display: block;
  font-size: 14px;
  font-weight: 500;
  color: #94a3b8;
  margin-bottom: 8px;
  padding-right: 4px;
}
.nc-input {
  width: 100%;
  padding: 16px 20px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 14px;
  color: #f1f5f9;
  font-family: 'Tajawal', sans-serif;
  font-size: 17px;
  font-weight: 500;
  outline: none;
  transition: all 0.3s ease;
  direction: rtl;
}
.nc-input::placeholder {
  color: #64748b;
  font-weight: 400;
}
.nc-input:focus {
  border-color: rgba(244,63,94,0.4);
  background: rgba(255,255,255,0.06);
  box-shadow: 0 0 0 4px rgba(244,63,94,0.08);
}
.nc-hearts-divider {
  text-align: center;
  margin: 8px 0;
  font-size: 20px;
  opacity: 0.4;
  letter-spacing: 8px;
}

/* --- Button --- */
.nc-btn {
  width: 100%;
  padding: 17px;
  border: none;
  border-radius: 14px;
  background: linear-gradient(135deg, #f43f5e, #ec4899, #8b5cf6);
  color: white;
  font-family: 'Tajawal', sans-serif;
  font-size: 18px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  margin-top: 8px;
}
.nc-btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.15), transparent);
  opacity: 0;
  transition: opacity 0.3s;
}
.nc-btn:hover::before { opacity: 1; }
.nc-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(244,63,94,0.3);
}
.nc-btn:active { transform: translateY(0); }

/* --- Error --- */
.nc-error {
  color: #f43f5e;
  font-size: 13px;
  margin-top: 6px;
  display: none;
  padding-right: 4px;
}
.nc-error.nc-show { display: block; }

@keyframes ncShake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-6px); }
  40% { transform: translateX(6px); }
  60% { transform: translateX(-4px); }
  80% { transform: translateX(4px); }
}
.nc-shake { animation: ncShake 0.4s ease; }

/* --- Result --- */
.nc-result-area {
  margin-top: 32px;
  display: none;
  animation: ncFadeUp 0.6s ease;
}
.nc-result-area.nc-active { display: block; }

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

.nc-result-box {
  background: linear-gradient(135deg, rgba(244,63,94,0.06), rgba(139,92,246,0.06));
  border: 1px solid rgba(244,63,94,0.12);
  border-radius: 20px;
  padding: 32px 24px;
  text-align: center;
}
.nc-result-names {
  font-size: 16px;
  color: #94a3b8;
  margin-bottom: 20px;
  font-weight: 500;
}
.nc-result-names span {
  color: #ec4899;
  font-weight: 700;
}

/* --- Circle Progress --- */
.nc-circle-wrap {
  position: relative;
  width: 160px; height: 160px;
  margin: 0 auto 20px;
}
.nc-circle-wrap svg {
  transform: rotate(-90deg);
}
.nc-circle-bg {
  fill: none;
  stroke: rgba(255,255,255,0.06);
  stroke-width: 8;
}
.nc-circle-progress {
  fill: none;
  stroke: url(#ncProgressGrad);
  stroke-width: 8;
  stroke-linecap: round;
  stroke-dasharray: 440;
  stroke-dashoffset: 440;
  transition: stroke-dashoffset 1.5s ease;
}
.nc-circle-text {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.nc-percent-value {
  font-size: 48px;
  font-weight: 900;
  background: linear-gradient(135deg, #f43f5e, #f59e0b);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1;
}
.nc-percent-sign {
  font-size: 20px;
  color: #64748b;
  font-weight: 500;
}

.nc-result-emoji {
  font-size: 36px;
  margin-bottom: 12px;
  display: block;
}
.nc-result-msg {
  font-family: 'Amiri', serif !important;
  font-size: 20px !important;
  font-weight: 700 !important;
  margin-bottom: 10px !important;
  line-height: 1.5;
}
.nc-result-desc {
  font-size: 14px;
  color: #94a3b8;
  line-height: 1.8;
  max-width: 380px;
  margin: 0 auto;
}

/* --- Actions --- */
.nc-action-row {
  display: flex;
  gap: 12px;
  margin-top: 20px;
  justify-content: center;
  flex-wrap: wrap;
}
.nc-btn-secondary {
  padding: 10px 24px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.04);
  color: #94a3b8;
  font-family: 'Tajawal', sans-serif;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s;
}
.nc-btn-secondary:hover {
  background: rgba(255,255,255,0.08);
  color: #f1f5f9;
  border-color: rgba(255,255,255,0.15);
}

/* --- Floating Hearts --- */
.nc-floating-hearts {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}
.nc-float-heart {
  position: absolute;
  font-size: 18px;
  animation: ncFloatUp 3s ease-out forwards;
  opacity: 0;
}

@keyframes ncFloatUp {
  0% { opacity: 1; transform: translateY(0) scale(0.5) rotate(0deg); }
  100% { opacity: 0; transform: translateY(-300px) scale(1.2) rotate(30deg); }
}

/* --- Mobile --- */
@media (max-width: 480px) {
  .nc-widget { padding: 24px 12px; }
  .nc-card { padding: 36px 20px; border-radius: 22px; }
  .nc-title { font-size: 22px !important; }
  .nc-circle-wrap { width: 140px; height: 140px; }
  .nc-circle-wrap svg { width: 140px; height: 140px; }
  .nc-percent-value { font-size: 40px; }
}
