/* 🪄 AI PHOTO ENHANCER CSS */

.pe-modal {
  position: fixed;
  inset: 0;
  z-index: 9999999;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.95);
}

.pe-modal.open {
  display: flex;
}

.pe-container {
  position: relative;
  width: 95%;
  max-width: 500px;
  max-height: 90vh;
  overflow-y: auto;
  background: linear-gradient(165deg, #1a1a2e 0%, #0f0f1a 100%);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 24px;
  box-shadow: 0 25px 80px rgba(0, 0, 0, 0.8);
}

.pe-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.pe-header-left {
  display: flex;
  align-items: center;
  gap: 14px;
}

.pe-logo {
  font-size: 32px;
}

.pe-header-text h2 {
  font-size: 18px;
  font-weight: 700;
  color: #fff;
  margin: 0 0 2px 0;
}

.pe-header-text p {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.5);
  margin: 0;
}

.pe-close {
  width: 36px;
  height: 36px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  color: rgba(255, 255, 255, 0.6);
  font-size: 18px;
  cursor: pointer;
}

.pe-close:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.pe-content {
  padding: 24px;
}

.pe-compare {
  position: relative;
  width: 100%;
  aspect-ratio: 1;
  border-radius: 16px;
  overflow: hidden;
  background: #000;
}

.pe-before, .pe-after {
  position: absolute;
  inset: 0;
}

.pe-before img, .pe-after img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.pe-after {
  clip-path: inset(0 50% 0 0);
}

.pe-label {
  position: absolute;
  bottom: 12px;
  padding: 6px 14px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  border-radius: 20px;
}

.pe-label-before {
  left: 12px;
  background: rgba(0, 0, 0, 0.7);
  color: rgba(255, 255, 255, 0.8);
}

.pe-label-after {
  right: 12px;
  background: linear-gradient(135deg, #8b5cf6, #a78bfa);
  color: #fff;
}

.pe-slider-handle {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: ew-resize;
  z-index: 10;
}

.pe-slider-line {
  width: 3px;
  height: 100%;
  background: linear-gradient(180deg, transparent 0%, #a78bfa 20%, #a78bfa 80%, transparent 100%);
}

.pe-slider-grip {
  position: absolute;
  width: 44px;
  height: 44px;
  background: linear-gradient(135deg, #8b5cf6, #a78bfa);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  color: #fff;
  box-shadow: 0 4px 20px rgba(139, 92, 246, 0.5);
}

.pe-issues {
  margin-top: 20px;
}

.pe-issues-title {
  font-size: 13px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.6);
  margin-bottom: 12px;
}

.pe-issue {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.2);
  border-radius: 10px;
  margin-bottom: 8px;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.8);
}

.pe-issue-dot {
  width: 6px;
  height: 6px;
  background: #ef4444;
  border-radius: 50%;
}

.pe-progress {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 40px 20px;
}

.pe-progress-ring {
  position: relative;
  width: 100px;
  height: 100px;
  margin-bottom: 20px;
}

.pe-progress-ring svg {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.pe-progress-bg {
  fill: none;
  stroke: rgba(139, 92, 246, 0.15);
  stroke-width: 8;
}

.pe-progress-bar {
  fill: none;
  stroke: #a78bfa;
  stroke-width: 8;
  stroke-linecap: round;
  stroke-dasharray: 264;
  stroke-dashoffset: 264;
  transition: stroke-dashoffset 0.5s ease;
}

.pe-progress-icon {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
}

.pe-progress-title {
  font-size: 18px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 6px;
  text-align: center;
}

.pe-progress-sub {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.5);
  text-align: center;
}

.pe-improvements {
  margin-top: 20px;
}

.pe-success-badge {
  display: inline-flex;
  padding: 10px 18px;
  background: rgba(74, 222, 128, 0.15);
  border: 1px solid rgba(74, 222, 128, 0.3);
  border-radius: 30px;
  font-size: 14px;
  font-weight: 600;
  color: #4ade80;
  margin-bottom: 16px;
}

.pe-improvements-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.pe-improvement {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.8);
}

.pe-error {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 16px;
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.2);
  border-radius: 12px;
  color: #ef4444;
  font-size: 14px;
}

.pe-footer {
  padding: 20px 24px 24px;
}

.pe-btn-enhance {
  width: 100%;
  padding: 18px 32px;
  background: linear-gradient(135deg, #8b5cf6, #a78bfa);
  border: none;
  border-radius: 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.pe-btn-enhance:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(139, 92, 246, 0.4);
}

.pe-btn-glow { display: none; }

.pe-btn-content {
  display: flex;
  align-items: center;
  gap: 10px;
}

.pe-btn-icon {
  font-size: 22px;
}

.pe-btn-text {
  font-size: 16px;
  font-weight: 700;
  color: #fff;
}

.pe-footer-note {
  margin-top: 12px;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.4);
  text-align: center;
}

.pe-footer-done {
  display: flex;
  gap: 12px;
  padding: 20px 24px 24px;
}

.pe-btn-download, .pe-btn-compare {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 16px;
  border-radius: 14px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

.pe-btn-download {
  background: linear-gradient(135deg, #4ade80, #22c55e);
  border: none;
  color: #fff;
}

.pe-btn-compare {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #fff;
}

/* TRIGGER BUTTON */
.pe-trigger {
  margin-top: 16px;
}

.pe-trigger-btn {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 20px;
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.15), rgba(139, 92, 246, 0.05));
  border: 1px solid rgba(139, 92, 246, 0.3);
  border-radius: 16px;
  cursor: pointer;
  transition: all 0.3s;
}

.pe-trigger-btn:hover {
  border-color: rgba(139, 92, 246, 0.5);
  transform: translateY(-2px);
}

.pe-trigger-icon {
  font-size: 28px;
}

.pe-trigger-text {
  flex: 1;
  text-align: left;
}

.pe-trigger-text strong {
  display: block;
  font-size: 15px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 3px;
}

.pe-trigger-text small {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.5);
}

.pe-trigger-badge {
  padding: 6px 12px;
  background: linear-gradient(135deg, #8b5cf6, #a78bfa);
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
  color: #fff;
}

/* OPTIONS */
.pe-options {
  margin-top: 20px;
  padding: 16px;
  background: rgba(139, 92, 246, 0.05);
  border: 1px solid rgba(139, 92, 246, 0.15);
  border-radius: 14px;
}

.pe-options-title {
  font-size: 14px;
  font-weight: 600;
  color: #fff;
  margin-bottom: 12px;
}

.pe-option {
  margin-bottom: 8px;
}

.pe-option-label {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  cursor: pointer;
  padding: 10px;
  border-radius: 10px;
  transition: background 0.2s;
}

.pe-option-label:hover {
  background: rgba(255, 255, 255, 0.03);
}

.pe-checkbox {
  display: none;
}

.pe-option-check {
  width: 22px;
  height: 22px;
  min-width: 22px;
  border: 2px solid rgba(139, 92, 246, 0.4);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.pe-checkbox:checked + .pe-option-check {
  background: linear-gradient(135deg, #8b5cf6, #a78bfa);
  border-color: #8b5cf6;
}

.pe-checkbox:checked + .pe-option-check::after {
  content: '✓';
  color: #fff;
  font-size: 14px;
  font-weight: bold;
}

.pe-option-text {
  flex: 1;
}

.pe-option-text strong {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: #fff;
  margin-bottom: 2px;
}

.pe-option-text small {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.5);
}

.pe-option-info {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  font-size: 12px;
  color: rgba(255, 255, 255, 0.4);
  line-height: 1.5;
}

.pe-option-info span {
  font-size: 14px;
}

/* Coming Soon Badge */
.pe-coming-soon {
  display: inline-block;
  padding: 2px 8px;
  background: rgba(255, 193, 7, 0.2);
  border: 1px solid rgba(255, 193, 7, 0.3);
  border-radius: 10px;
  font-size: 10px;
  font-weight: 600;
  color: #ffc107;
  margin-left: 8px;
  text-transform: uppercase;
}

.pe-option-disabled {
  opacity: 0.5;
  pointer-events: none;
}
