/* Fonts */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&display=swap');

:root {
  --primary: #0f172a;
  /* Dark Navy */
  --accent: #ff4f00;
  /* Intense Orange */
  --text-main: #0f172a;
  --text-muted: #64748b;
  --bg-main: #ffffff;
  --border: rgba(15, 23, 42, 0.08);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow-card: 0 10px 30px -10px rgba(0, 0, 0, 0.08);
  --radius: 12px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background-color: var(--bg-main);
  background-image:
    linear-gradient(rgba(15, 23, 42, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(15, 23, 42, 0.03) 1px, transparent 1px);
  background-size: 40px 40px;
  color: var(--text-main);
  min-height: 100vh;
  line-height: 1.5;
  overflow-x: hidden;
}

/* Animations */
@keyframes float {

  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-10px);
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hidden {
  display: none !important;
}

/* Hero Section */
.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  position: relative;
  padding: 2rem;
  overflow: hidden;
}

/* Floating Elements */
.floating-tag {
  position: absolute;
  padding: 0.5rem 1rem;
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(0, 0, 0, 0.05);
  border-radius: 8px;
  font-family: monospace;
  font-weight: 600;
  color: #10b981;
  /* Default green */
  font-size: 0.85rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  pointer-events: none;
  animation: float 4s ease-in-out infinite;
}

.tag-orange {
  color: var(--accent);
}

.tag-blue {
  color: #3b82f6;
}

.tag-purple {
  color: #8b5cf6;
}

.tag-yellow {
  color: #eab308;
}

.pos-1 {
  top: 15%;
  left: 10%;
  animation-delay: 0s;
}

.pos-2 {
  top: 20%;
  right: 15%;
  animation-delay: 1.5s;
}

.pos-3 {
  bottom: 20%;
  left: 15%;
  animation-delay: 0.5s;
}

.pos-4 {
  bottom: 15%;
  right: 10%;
  animation-delay: 2s;
}

.pos-5 {
  top: 40%;
  left: 5%;
  animation-delay: 2.5s;
}

/* Blurred Blobs */
.blob {
  position: absolute;
  width: 300px;
  height: 300px;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.08;
  z-index: -1;
  pointer-events: none;
}

.blob-red {
  background: var(--accent);
  top: -10%;
  right: -5%;
}

.blob-blue {
  background: #3b82f6;
  bottom: -10%;
  left: -5%;
}


/* Hero Content */
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 1rem;
  background: white;
  border: 1px solid var(--border);
  border-radius: 50px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin-bottom: 2rem;
  box-shadow: var(--shadow-sm);
}

.dot {
  width: 6px;
  height: 6px;
  background: var(--accent);
  border-radius: 50%;
}

.hero-title {
  font-size: 4rem;
  font-weight: 900;
  line-height: 1;
  margin: 0 0 1.5rem;
  letter-spacing: -0.04em;
  color: var(--primary);
  max-width: 900px;
}

.hero-highlight {
  color: var(--accent);
  display: inline-block;
  position: relative;
}

.scratched {
  font-family: 'Brush Script MT', cursive;
  /* Fallback */
  text-decoration: line-through;
  text-decoration-color: var(--accent);
  text-decoration-thickness: 4px;
  opacity: 0.5;
  margin-right: 0.5rem;
}

.hero-subtitle {
  font-size: 1.25rem;
  color: var(--text-muted);
  max-width: 600px;
  margin: 0 auto 3rem;
  font-weight: 400;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
}

.btn-hero-primary {
  background: var(--primary);
  color: white;
  padding: 1rem 2rem;
  border-radius: 8px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: transform 0.2s;
}

.btn-hero-primary:hover {
  transform: translateY(-2px);
}

.btn-hero-secondary {
  background: white;
  color: var(--text-main);
  padding: 1rem 2rem;
  border-radius: 8px;
  font-weight: 600;
  border: 1px solid var(--border);
  cursor: pointer;
  transition: background 0.2s;
}

.btn-hero-secondary:hover {
  background: #f8fafc;
}


/* App Layout */
.app {
  max-width: 1000px;
  margin: 0 auto;
  padding: 2rem;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.header {
  text-align: center;
  margin-bottom: 3rem;
  position: relative;
}

.nav-back {
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  background: white;
  border: 1px solid var(--border);
  color: var(--text-muted);
  padding: 0.5rem 1rem;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.85rem;
}

.header h1 {
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin: 0;
}

/* Drop Zone */
.drop-zone {
  background: white;
  border: 2px dashed rgba(15, 23, 42, 0.15);
  border-radius: var(--radius);
  padding: 4rem;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
}

.drop-zone:hover {
  border-color: var(--accent);
  background: rgba(255, 79, 0, 0.02);
}

.drop-content .icon {
  font-size: 3rem;
  opacity: 0.5;
  margin-bottom: 1rem;
}

.drop-text {
  font-size: 1.25rem;
  font-weight: 700;
  margin: 0;
}

.link-btn {
  background: none;
  border: none;
  color: var(--accent);
  font-weight: 700;
  cursor: pointer;
  text-decoration: underline;
  padding: 0;
  font-size: 1rem;
}


/* Workspace */
.workspace {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.preview-container {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 1.5rem;
  align-items: center;
}

.preview-box {
  background: white;
  border: 1px solid var(--border);
  padding: 1rem;
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
}

.label {
  font-size: 0.7rem;
  font-weight: 800;
  color: var(--text-muted);
  text-transform: uppercase;
  display: block;
  margin-bottom: 0.5rem;
  letter-spacing: 0.05em;
}

.media-wrapper {
  background: #000;
  border-radius: 6px;
  overflow: hidden;
  height: 240px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.preview-media {
  max-width: 100%;
  max-height: 100%;
  display: block;
}

.arrow-divider {
  font-size: 1.5rem;
  color: var(--border);
}

.file-name {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-family: monospace;
  text-align: center;
  margin-top: 0.5rem;
}

/* Controls */
.controls {
  background: white;
  border: 1px solid var(--border);
  padding: 1.5rem;
  border-radius: var(--radius);
}

.rotation-options {
  display: flex;
  gap: 1rem;
  justify-content: center;
  margin-bottom: 1.5rem;
}

.radio-card {
  flex: 1;
  cursor: pointer;
  max-width: 150px;
}

.radio-card input {
  display: none;
}

.card-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  border: 2px solid var(--border);
  padding: 1rem;
  border-radius: 8px;
  transition: all 0.2s;
  color: var(--text-muted);
  font-weight: 600;
}

.radio-card input:checked+.card-content {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(255, 79, 0, 0.03);
}

.card-content .icon {
  font-size: 1.5rem;
}

.action-area {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.btn {
  width: 100%;
  max-width: 300px;
  padding: 1rem;
  border: none;
  font-weight: 700;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-primary {
  background: var(--primary);
  color: white;
}

.btn-primary:hover:not(:disabled) {
  background: #1e293b;
}

.btn-success {
  background: #10b981;
  color: white;
}

.btn-success:hover {
  background: #059669;
}

.status-text {
  font-size: 0.9rem;
  color: var(--text-muted);
  font-weight: 500;
}

/* Detection Info */
.detection-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 0.5rem;
  padding: 0.5rem;
  border: 1px solid rgba(255, 79, 0, 0.2);
  background: rgba(255, 79, 0, 0.05);
  border-radius: 6px;
}

.badge {
  color: var(--accent);
  font-weight: 700;
  font-size: 0.8rem;
}

.btn-sm {
  font-size: 0.75rem;
  border: 1px solid var(--accent);
  color: var(--accent);
  background: transparent;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  cursor: pointer;
  font-weight: 600;
}

.btn-sm:hover {
  background: var(--accent);
  color: white;
}

@media (max-width: 768px) {
  .hero-title {
    font-size: 2.5rem;
  }

  .preview-container {
    grid-template-columns: 1fr;
  }

  .arrow-divider {
    transform: rotate(90deg);
    margin: 0.5rem 0;
  }
}