/* ==========================================================================
   NEXUS AI - 100% FREE ULTRA 4K IMAGE & VIDEO ENHANCER
   Simple, Clean, Modern UI with Built-in AdSense Slots
   ========================================================================== */

:root {
  --bg-dark: #0a0d14;
  --bg-card: #121826;
  --bg-card-hover: #182032;
  --bg-surface: #171f33;
  --bg-glass: rgba(18, 24, 38, 0.85);

  --primary: #7c3aed;
  --primary-light: #9333ea;
  --cyan: #06b6d4;
  --emerald: #10b981;
  --amber: #f59e0b;

  --text-main: #ffffff;
  --text-body: #d1d5db;
  --text-muted: #9ca3af;
  --text-dark: #6b7280;

  --border: rgba(255, 255, 255, 0.1);
  --border-focus: rgba(124, 58, 237, 0.5);

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-full: 9999px;

  --font-heading: 'Outfit', sans-serif;
  --font-body: 'Plus Jakarta Sans', sans-serif;
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-body);
  background-color: var(--bg-dark);
  color: var(--text-body);
  line-height: 1.6;
  overflow-x: hidden;
  background-image: 
    radial-gradient(circle at 20% 15%, rgba(124, 58, 237, 0.15) 0%, transparent 40%),
    radial-gradient(circle at 80% 30%, rgba(6, 182, 212, 0.12) 0%, transparent 45%);
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: var(--bg-dark);
}
::-webkit-scrollbar-thumb {
  background: #252e46;
  border-radius: var(--radius-full);
}

.container {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Header */
.site-header {
  position: sticky;
  top: 12px;
  z-index: 100;
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 16px;
}

.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 24px;
  background: var(--bg-glass);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-heading);
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--text-main);
  text-decoration: none;
}

.brand-icon {
  width: 38px;
  height: 38px;
  background: linear-gradient(135deg, var(--primary), var(--cyan));
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  box-shadow: 0 0 15px rgba(124, 58, 237, 0.4);
}

.free-forever-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.4);
  color: #34d399;
  font-size: 0.82rem;
  font-weight: 700;
  padding: 6px 14px;
  border-radius: var(--radius-full);
}

.pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--emerald);
  box-shadow: 0 0 8px var(--emerald);
}

/* Ad Banners (Clean, High CTR) */
.ad-container-top {
  margin: 18px auto;
  text-align: center;
  max-width: 970px;
}

.ad-slot-banner {
  background: #101524;
  border: 1px dashed rgba(255, 255, 255, 0.18);
  border-radius: var(--radius-md);
  padding: 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 90px;
  position: relative;
}

.ad-label {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-dark);
  margin-bottom: 4px;
}

.ad-demo-content {
  color: var(--text-muted);
  font-size: 0.88rem;
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Hero Section */
.hero {
  text-align: center;
  padding: 30px 0 20px;
}

.hero-title {
  font-size: clamp(2.2rem, 5vw, 3.8rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  color: white;
  margin-bottom: 14px;
}

.hero-title span {
  background: linear-gradient(135deg, #a78bfa, #38bdf8);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-subtitle {
  font-size: 1.15rem;
  color: var(--text-muted);
  max-width: 680px;
  margin: 0 auto 24px;
}

/* Main Studio Card */
.studio-box {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6);
  overflow: hidden;
  margin-bottom: 40px;
}

/* Mode Switcher Tabs */
.tool-modes {
  display: flex;
  background: #0d121e;
  border-bottom: 1px solid var(--border);
  padding: 10px 16px;
  gap: 10px;
}

.mode-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 22px;
  border-radius: var(--radius-md);
  color: var(--text-muted);
  font-size: 0.95rem;
  font-weight: 700;
  border: none;
  background: transparent;
  cursor: pointer;
  transition: all 0.2s ease;
}

.mode-btn:hover {
  color: white;
  background: rgba(255, 255, 255, 0.05);
}

.mode-btn.active {
  background: var(--primary);
  color: white;
  box-shadow: 0 4px 15px rgba(124, 58, 237, 0.4);
}

/* Studio Layout (Main Tool + Side Ad) */
.studio-grid {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 0;
}

@media (max-width: 1024px) {
  .studio-grid {
    grid-template-columns: 1fr;
  }
}

.studio-main-panel {
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  border-right: 1px solid var(--border);
}

/* Dropzone (Big & Simple) */
.simple-dropzone {
  border: 2px dashed rgba(124, 58, 237, 0.4);
  background: rgba(124, 58, 237, 0.03);
  border-radius: var(--radius-lg);
  padding: 32px 20px;
  text-align: center;
  cursor: pointer;
  transition: all 0.25s ease;
  position: relative;
}

.simple-dropzone:hover, .simple-dropzone.dragover {
  border-color: var(--cyan);
  background: rgba(6, 182, 212, 0.06);
  transform: translateY(-2px);
}

.dropzone-icon {
  width: 56px;
  height: 56px;
  background: rgba(124, 58, 237, 0.15);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 14px;
  color: #a78bfa;
}

.dropzone-text h3 {
  font-size: 1.25rem;
  color: white;
  margin-bottom: 6px;
}

.dropzone-text p {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.demo-buttons-row {
  margin-top: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
}

.demo-btn {
  padding: 6px 14px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  color: var(--text-body);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.demo-btn:hover {
  background: var(--cyan);
  color: black;
  border-color: var(--cyan);
}

/* Split Viewer Container */
.viewer-wrapper {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.viewer-header-info {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}

.quality-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  font-weight: 700;
  color: #38bdf8;
  background: rgba(6, 182, 212, 0.12);
  padding: 5px 12px;
  border-radius: var(--radius-full);
  border: 1px solid rgba(6, 182, 212, 0.3);
}

.compare-box {
  position: relative;
  width: 100%;
  min-height: 480px;
  height: 520px;
  background: #05070c;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--border);
  user-select: none;
}

/* Image Elements in Split View */
.img-after-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #05070c;
}

.before-mask-box {
  position: absolute;
  top: 0;
  left: 0;
  width: 50%;
  height: 100%;
  overflow: hidden;
  border-right: 3px solid #ffffff;
  box-shadow: 2px 0 16px rgba(0, 0, 0, 0.9);
  z-index: 10;
  background: #05070c;
}

.img-before-raw {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  object-fit: contain;
  background: #05070c;
}

/* Floating Compare Labels */
.float-label {
  position: absolute;
  top: 16px;
  padding: 6px 14px;
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  z-index: 20;
  backdrop-filter: blur(8px);
}

.label-left {
  left: 16px;
  background: rgba(239, 68, 68, 0.25);
  border: 1px solid rgba(239, 68, 68, 0.5);
  color: #fca5a5;
}

.label-right {
  right: 16px;
  background: rgba(16, 185, 129, 0.25);
  border: 1px solid rgba(16, 185, 129, 0.5);
  color: #6ee7b7;
}

/* Slider Handle */
.slider-splitter {
  position: absolute;
  top: 0;
  left: 50%;
  width: 40px;
  height: 100%;
  transform: translateX(-50%);
  z-index: 30;
  cursor: ew-resize;
  display: flex;
  align-items: center;
  justify-content: center;
}

.slider-splitter .line {
  position: absolute;
  width: 2px;
  top: 0;
  bottom: 0;
  background: #ffffff;
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.8);
}

.slider-splitter .circle-handle {
  position: relative;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #111827;
  border: 3px solid #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.8), 0 0 10px var(--cyan);
  color: white;
}

/* Video Player in Split View */
.video-stage-container {
  display: none;
  width: 100%;
  height: 100%;
  position: absolute;
  top: 0;
  left: 0;
  background: #000;
}

.video-grid-preview {
  width: 100%;
  height: 100%;
  display: grid;
  grid-template-columns: 1fr 1fr;
  position: relative;
}

.video-half {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #030509;
}

.video-half:first-child {
  border-right: 2px solid rgba(255, 255, 255, 0.2);
}

.video-element {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.video-half.enhanced-side .video-element {
  /* Dynamic visual enhancement: crisp contrast, saturation, unsharp edge filter */
  filter: contrast(114%) saturate(112%) brightness(102%);
}

.video-half.original-side .video-element {
  filter: blur(2px) contrast(88%) saturate(85%);
}

/* Action Controls Bar */
.action-controls-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px;
  padding: 16px 20px;
  background: #0d1320;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
}

.controls-left-options {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.pill-option-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
  color: var(--text-body);
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.pill-option-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: white;
}

.pill-option-btn.active {
  background: rgba(124, 58, 237, 0.2);
  border-color: var(--primary);
  color: #c084fc;
}

.wink-preset-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 18px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
  color: var(--text-body);
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
}

.wink-preset-btn:hover {
  background: rgba(16, 185, 129, 0.15);
  border-color: var(--emerald);
  color: #34d399;
}

.wink-preset-btn.active {
  background: rgba(16, 185, 129, 0.2);
  border-color: #10b981;
  color: #34d399;
  box-shadow: 0 0 15px rgba(16, 185, 129, 0.3);
}

/* Fine-Tuning Slider Bar */
.fine-tune-panel {
  display: flex;
  align-items: center;
  gap: 20px;
  background: #0d121f;
  padding: 12px 18px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  flex-wrap: wrap;
}

.tune-control {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  min-width: 220px;
}

.tune-label {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-body);
  white-space: nowrap;
}

.tune-range {
  flex: 1;
  accent-color: var(--primary);
  cursor: pointer;
}

.tune-val {
  font-size: 0.82rem;
  font-weight: 700;
  color: #38bdf8;
  min-width: 36px;
}

.btn-big-download {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 28px;
  background: linear-gradient(135deg, #10b981, #059669);
  color: white;
  border-radius: var(--radius-full);
  font-size: 1rem;
  font-weight: 800;
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 20px rgba(16, 185, 129, 0.4);
  transition: all 0.2s ease;
}

.btn-enhance-cloud {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 13px 28px;
  background: linear-gradient(135deg, var(--primary), #3b82f6);
  color: white;
  border-radius: var(--radius-full);
  font-size: 1rem;
  font-weight: 800;
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 20px rgba(124, 58, 237, 0.5);
  transition: all 0.2s ease;
}

.btn-enhance-cloud:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(124, 58, 237, 0.7);
  background: linear-gradient(135deg, #9333ea, #2563eb);
}

/* Cloud AI Modal */
.modal-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(12px);
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-card {
  background: #111827;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-lg);
  padding: 30px;
  max-width: 520px;
  width: 100%;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.9);
}

.modal-title {
  font-size: 1.35rem;
  font-weight: 800;
  color: white;
  margin-bottom: 8px;
}

.modal-input {
  width: 100%;
  padding: 12px 16px;
  background: #090d16;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--radius-md);
  color: white;
  font-size: 0.95rem;
  margin: 14px 0 20px;
  outline: none;
}

.modal-input:focus {
  border-color: var(--cyan);
}

.modal-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
}

.btn-big-download:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(16, 185, 129, 0.6);
  background: linear-gradient(135deg, #34d399, #10b981);
}

/* Side Column for High-Performing Ad */
.studio-side-panel {
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  background: #0f1523;
}

.side-ad-box {
  background: #0a0e1a;
  border: 1px dashed rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-md);
  padding: 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 380px;
  text-align: center;
  color: var(--text-muted);
}

.benefits-box {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.benefit-row {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.88rem;
  color: var(--text-body);
}

.benefit-row svg {
  color: var(--emerald);
  flex-shrink: 0;
}

/* Processing Progress Overlay */
.progress-container {
  display: none;
  margin: 10px 0;
  padding: 14px;
  background: #0c111d;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
}

.progress-labels {
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
  color: #38bdf8;
  font-weight: 700;
  margin-bottom: 8px;
}

.progress-track {
  width: 100%;
  height: 8px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.progress-fill {
  width: 0%;
  height: 100%;
  background: linear-gradient(90deg, var(--primary), var(--cyan));
  box-shadow: 0 0 10px var(--cyan);
  transition: width 0.25s ease;
}

/* Features Grid */
.features-section {
  padding: 50px 0;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}

.feature-box {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 24px;
}

.feature-box h4 {
  font-size: 1.15rem;
  color: white;
  margin: 10px 0 6px;
}

.feature-box p {
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* Footer */
.simple-footer {
  background: #06080e;
  border-top: 1px solid var(--border);
  padding: 40px 0 24px;
  text-align: center;
  color: var(--text-dark);
  font-size: 0.88rem;
}

.footer-links {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  margin: 16px 0;
  list-style: none;
}

.footer-links a {
  color: var(--text-muted);
  text-decoration: none;
}

.footer-links a:hover {
  color: white;
}

/* Toast */
.toast-msg {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: #1f2937;
  color: white;
  padding: 12px 20px;
  border-radius: var(--radius-md);
  border: 1px solid var(--emerald);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  z-index: 999;
}

/* ==========================================================================
   ENHANCED STYLES: 2 MASTER OPTIONS, ANNOUNCEMENT BAR & ADMIN LINK
   ========================================================================== */

/* Top Announcement Bar */
.announcement-bar {
  background: linear-gradient(90deg, #10b981, #06b6d4, #7c3aed);
  color: #ffffff;
  text-align: center;
  padding: 6px 16px;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.3px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.4);
}

/* Admin Link in Navbar */
.admin-link-pill {
  color: #94a3b8;
  border-color: rgba(255, 255, 255, 0.15);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.82rem;
  padding: 6px 12px;
}
.admin-link-pill:hover {
  color: white;
  border-color: #34d399;
  background: rgba(16, 185, 129, 0.15);
}

/* 2 Master Modes Switcher (Prominent & Clean) */
.master-modes-two {
  display: grid;
  grid-template-columns: 1fr 1fr;
  padding: 8px;
  background: #090d16;
  border-bottom: 1px solid var(--border);
  gap: 8px;
}

.master-modes-two .mode-btn {
  justify-content: center;
  padding: 14px 20px;
  font-size: 1.05rem;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  transition: all 0.25s ease;
}

.master-modes-two .mode-btn:hover {
  background: rgba(255, 255, 255, 0.06);
}

.master-modes-two .mode-btn.active {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.25), rgba(6, 182, 212, 0.25));
  border: 1px solid #10b981;
  color: #34d399;
  box-shadow: 0 4px 20px rgba(16, 185, 129, 0.3);
}

/* Video Stage Playback Controls */
.video-playback-controls {
  position: absolute;
  bottom: 14px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 30;
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(10, 15, 28, 0.85);
  backdrop-filter: blur(10px);
  padding: 6px 12px;
  border-radius: var(--radius-full);
  border: 1px solid rgba(255, 255, 255, 0.15);
}

/* Bottom Pre-Download Ad Container */
.ad-container-bottom {
  width: 100%;
}

