/* PhotoRestore styles */

.platform-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0 16px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 24px;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 1.1rem;
}

.brand-badge {
  background: var(--green);
  color: #fff;
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 0.9rem;
}

.nav-divider {
  color: var(--muted);
}

.tool-active-name {
  color: var(--text);
}

.nav-tools {
  display: flex;
  gap: 8px;
}

.nav-tool-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 8px;
  font-size: 0.9rem;
  color: var(--muted);
  text-decoration: none;
  border: 1px solid transparent;
  transition: all 0.15s ease;
}

.nav-tool-link:hover {
  background: var(--surface);
  color: var(--text);
  border-color: var(--line);
}

.nav-tool-link.is-current {
  background: var(--surface);
  color: var(--green-dark);
  font-weight: 600;
  border-color: var(--green);
  box-shadow: 0 2px 6px rgba(31, 116, 86, 0.1);
}

.nav-icon {
  width: 16px;
  height: 16px;
}

.subheading-tag {
  background: var(--surface-subtle);
  color: var(--muted);
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 0.85rem;
  margin-left: 8px;
}

/* Auth Banner */
.auth-banner {
  display: flex;
  align-items: center;
  gap: 16px;
  background: #fff8e6;
  border: 1px solid #ffd591;
  border-radius: 10px;
  padding: 16px 20px;
  margin-bottom: 24px;
}

.banner-icon {
  font-size: 1.8rem;
}

.banner-content strong {
  display: block;
  color: #d46b08;
  margin-bottom: 4px;
}

.banner-content p {
  margin: 0;
  font-size: 0.9rem;
  color: #873800;
}

/* Upload Card */
.upload-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 24px;
  box-shadow: var(--shadow);
  margin-bottom: 24px;
}

.drop-zone {
  border: 2px dashed var(--line);
  border-radius: 10px;
  padding: 36px 20px;
  text-align: center;
  cursor: pointer;
  background: var(--bg);
  transition: all 0.2s ease;
  position: relative;
  outline: none;
}

.drop-zone:hover,
.drop-zone.is-dragover {
  border-color: var(--green);
  background: #f0f7f3;
}

.upload-icon {
  font-size: 2.5rem;
  margin-bottom: 12px;
}

.drop-prompt h3 {
  margin: 0 0 6px;
  font-size: 1.15rem;
}

.drop-prompt p {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.image-preview-wrap {
  position: relative;
  display: inline-block;
  max-width: 100%;
}

.image-preview-wrap img {
  max-height: 280px;
  max-width: 100%;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  display: block;
}

.remove-btn {
  position: absolute;
  top: -10px;
  right: -10px;
  width: 28px;
  height: 28px;
  min-height: 28px;
  border-radius: 50%;
  background: #20231f;
  color: #fff;
  border: 2px solid #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  padding: 0;
  cursor: pointer;
}

.options-group {
  margin-top: 24px;
}

.options-title {
  margin: 0 0 16px;
  font-size: 1.05rem;
}

.options-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 12px;
  margin-bottom: 24px;
}

.option-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  cursor: pointer;
  background: var(--surface);
  transition: border-color 0.15s ease;
}

.option-item:hover {
  border-color: var(--green);
}

.option-item input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin-top: 2px;
  cursor: pointer;
  accent-color: var(--green);
}

.option-text strong {
  display: block;
  font-size: 0.95rem;
  margin-bottom: 4px;
}

.option-text span {
  display: block;
  font-size: 0.82rem;
  color: var(--muted);
  line-height: 1.4;
}

.action-bar {
  display: flex;
  justify-content: flex-end;
}

.restore-btn {
  font-size: 1.05rem;
  padding: 12px 28px;
  min-height: 48px;
  font-weight: 600;
}

/* Progress Card */
.progress-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 24px;
  box-shadow: var(--shadow);
  margin-bottom: 24px;
}

.progress-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 16px;
}

.progress-info h3 {
  margin: 0 0 6px;
  font-size: 1.15rem;
  color: var(--green-dark);
}

.progress-info p {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.percent-badge {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--green);
}

.progress-bar-wrap {
  width: 100%;
  margin-bottom: 16px;
}

.progress-bar {
  height: 12px;
  background: var(--surface-subtle);
  border-radius: 6px;
  overflow: hidden;
}

.progress-bar-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--green), #34a87a);
  transition: width 0.3s ease;
}

.queue-notice {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: #f0f7f3;
  border-radius: 6px;
  color: var(--green-dark);
  font-size: 0.9rem;
  font-weight: 500;
}

.pulse-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--green);
  animation: pulse 1.5s infinite;
}

@keyframes pulse {
  0% { transform: scale(0.95); opacity: 0.8; }
  50% { transform: scale(1.3); opacity: 0.3; }
  100% { transform: scale(0.95); opacity: 0.8; }
}

/* Result Card */
.result-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 24px;
  box-shadow: var(--shadow);
  margin-bottom: 24px;
}

.result-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 12px;
}

.result-header h2 {
  margin: 0;
  font-size: 1.25rem;
}

.result-actions {
  display: flex;
  gap: 10px;
}

/* Split Comparison Slider */
.compare-container {
  position: relative;
  width: 100%;
  max-width: 900px;
  margin: 0 auto;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
  user-select: none;
  background: #111;
  aspect-ratio: 4 / 3;
}

.compare-img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.compare-overlay {
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  width: 50%;
  overflow: hidden;
  z-index: 2;
}

.compare-overlay .compare-img {
  width: 100%;
  height: 100%;
}

.compare-handle {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 40px;
  margin-left: -20px;
  cursor: ew-resize;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: center;
}

.handle-line {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 2px;
  margin-left: -1px;
  background: #ffffff;
  box-shadow: 0 0 6px rgba(0, 0, 0, 0.5);
}

.handle-knob {
  position: relative;
  width: 36px;
  height: 36px;
  background: #ffffff;
  border-radius: 50%;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  color: #333;
  font-size: 0.65rem;
  font-weight: 700;
}

.badge-label {
  position: absolute;
  bottom: 12px;
  padding: 4px 10px;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 600;
  background: rgba(0, 0, 0, 0.65);
  color: #fff;
  backdrop-filter: blur(4px);
  z-index: 3;
}

.badge-before {
  right: 12px;
}

.badge-after {
  left: 12px;
}

@media (max-width: 640px) {
  .platform-nav {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
  .compare-container {
    aspect-ratio: 1 / 1;
  }
}
