@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

:root {
  /* Core Colors */
  --bg: #0a0c10;
  --surface: #13171f;
  --surface-hover: #1a202b;
  --elev: #161b24;
  --line: #2a3241;
  --text: #e8eef8;
  --muted: #94a3b8;
  --text-subtle: #64748b;

  /* Brand Colors */
  --brand1: #7aa2ff;
  --brand2: #5ef0c1;
  --brand-gradient: linear-gradient(135deg, var(--brand1), var(--brand2));
  --brand-glow: rgba(122, 162, 255, 0.25);

  /* Functional Colors */
  --danger: #ff6b7a;
  --success: #5ef0c1;

  /* UI Elements */
  --shadow: 0 10px 40px -10px rgba(0, 0, 0, 0.5);
  --radius: 20px;
  --radius-sm: 12px;
  --radius-xs: 8px;

  /* Animation */
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
}

* {
  box-sizing: border-box;
}

html, body {
  height: 100%;
}

body {
  margin: 0;
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  color: var(--text);
  background-color: var(--bg);
  background-image:
    radial-gradient(circle at 15% 0%, rgba(90, 130, 255, 0.08), transparent 40%),
    radial-gradient(circle at 85% 0%, rgba(80, 255, 210, 0.05), transparent 40%);
  background-attachment: fixed;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s;
}

a:hover {
  color: var(--brand1);
}

/* Layout */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Header */
header {
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(16px) saturate(180%);
  background: rgba(10, 12, 16, 0.7);
  border-bottom: 1px solid var(--line);
  padding: 12px 0;
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 700;
  font-size: 1.1rem;
  letter-spacing: -0.02em;
}

.logo {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  background: conic-gradient(from 140deg, var(--brand1), var(--brand2));
  box-shadow: inset 0 0 0 2px var(--bg);
  position: relative;
}

.logo::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  box-shadow: 0 8px 24px var(--brand-glow);
  opacity: 0.5;
}

.pill {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--muted);
  border: 1px solid var(--line);
  padding: 4px 10px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.03);
  transition: all 0.2s var(--ease);
}

.pill:hover {
  border-color: var(--muted);
  color: var(--text);
}

/* Hero */
.hero {
  padding: 60px 0 40px;
  text-align: center;
  max-width: 800px;
  margin: 0 auto;
}

.hero h1 {
  margin: 0 0 16px;
  font-size: clamp(32px, 5vw, 48px);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.1;
  background: linear-gradient(to bottom, #fff, #a0aec0);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero p {
  margin: 0;
  color: var(--muted);
  font-size: 1.1rem;
  max-width: 600px;
  margin: 0 auto;
  line-height: 1.6;
}

/* Main Layout */
.layout {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 32px;
  padding-bottom: 60px;
}

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

/* Cards */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease);
}

.card-pad {
  padding: 24px;
}

/* Ads */
.ad-728x90, .ad-300x600 {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: var(--text-subtle);
  background: var(--elev);
  border: 1px dashed var(--line);
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
}

.ad-728x90 {
  min-height: 90px;
  padding: 10px;
}

.ad-300x600 {
  height: 600px;
  position: sticky;
  top: 100px;
}

@media (max-width: 1024px) {
  .ad-300x600 {
    height: 250px;
    position: static;
  }
}

/* Uploader */
.uploader {
  border: 2px dashed var(--line);
  border-radius: var(--radius);
  padding: 32px;
  background: rgba(12, 16, 22, 0.5);
  transition: all 0.2s var(--ease);
  text-align: center;
}

.uploader:hover, .uploader.dragover {
  border-color: var(--brand1);
  background: rgba(122, 162, 255, 0.05);
}

.drop {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.drop.has-file {
  flex-direction: row;
  justify-content: space-between;
}

.drop-left {
  display: flex;
  align-items: center;
  gap: 16px;
}

.file-label {
  cursor: pointer;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 12px 20px;
  background: var(--elev);
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  transition: all 0.2s var(--ease);
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.file-label:hover {
  border-color: var(--brand1);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

input[type="file"] {
  display: none;
}

/* Buttons */
.btn {
  appearance: none;
  border: 0;
  border-radius: var(--radius-sm);
  padding: 12px 24px;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all 0.2s var(--ease);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: inherit;
}

.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  filter: grayscale(0.5);
}

.btn-primary {
  background: var(--brand-gradient);
  color: #0b0e13;
  box-shadow: 0 4px 12px var(--brand-glow);
}

.btn-primary:hover:not(:disabled) {
  filter: brightness(1.1);
  transform: translateY(-1px);
  box-shadow: 0 6px 16px var(--brand-glow);
}

.btn-primary:active:not(:disabled) {
  transform: translateY(0);
}

.btn-ghost {
  background: transparent;
  border: 1px solid var(--line);
  color: var(--text);
}

.btn-ghost:hover {
  background: var(--elev);
  border-color: var(--muted);
}

/* Inputs */
.input, textarea, select {
  width: 100%;
  border: 1px solid var(--line);
  background: var(--elev);
  color: var(--text);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  font-family: inherit;
  font-size: 0.95rem;
  transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
  appearance: none;
}

.input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: var(--brand1);
  box-shadow: 0 0 0 3px rgba(122, 162, 255, 0.1);
}

textarea {
  min-height: 120px;
  resize: vertical;
  line-height: 1.5;
}

select {
  background-image: url("data:image/svg+xml,%3Csvg width='24' height='24' viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M6 9L12 15L18 9' stroke='%2394a3b8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 40px;
}

/* Form Layout */
.row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.grid2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

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

.label {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--muted);
  margin-bottom: 8px;
  display: block;
}

.small {
  font-size: 0.85rem;
  color: var(--text-subtle);
}

/* Preview Area */
.pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

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

.caption {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  padding: 0 4px;
}

.caption strong {
  font-weight: 600;
  color: var(--text);
}

.caption span {
  color: var(--muted);
  font-size: 0.85rem;
}

.thumb {
  display: block;
  width: 100%;
  height: auto;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: #0b0f15 url("data:image/svg+xml,%3Csvg width='20' height='20' viewBox='0 0 20 20' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Crect width='20' height='20' fill='%230f1218'/%3E%3Crect width='10' height='10' fill='%2313171f'/%3E%3Crect x='10' y='10' width='10' height='10' fill='%2313171f'/%3E%3C/svg%3E") repeat;
  box-shadow: inset 0 0 20px rgba(0,0,0,0.2);
}

/* Progress */
.progress {
  height: 6px;
  background: var(--elev);
  border-radius: 999px;
  overflow: hidden;
  margin-top: 16px;
}

.bar {
  height: 100%;
  width: 0;
  background: var(--brand-gradient);
  transition: width 0.3s var(--ease);
  box-shadow: 0 0 12px var(--brand-glow);
}

/* Toast */
.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--text);
  padding: 12px 24px;
  border-radius: 999px;
  box-shadow: var(--shadow);
  z-index: 200;
  font-weight: 500;
  animation: slideUp 0.3s var(--ease);
}

.toast.error {
  border-color: var(--danger);
  color: #ffb4bc;
}

@keyframes slideUp {
  from { opacity: 0; transform: translate(-50%, 20px); }
  to { opacity: 1; transform: translate(-50%, 0); }
}

/* Consent Banner */
.cmp {
  position: fixed;
  left: 24px;
  right: 24px;
  bottom: 24px;
  z-index: 9999;
  display: none;
  animation: slideUp 0.4s var(--ease);
}

.cmp-inner {
  max-width: 900px;
  margin: 0 auto;
  background: rgba(19, 23, 31, 0.95);
  backdrop-filter: blur(10px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px;
  display: flex;
  gap: 24px;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
}

.cmp p {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
  flex: 1;
  min-width: 280px;
}

.cmp .actions {
  display: flex;
  gap: 12px;
}

.cmp .actions button {
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  border: 0;
  transition: all 0.2s;
}

.cmp .accept {
  background: var(--text);
  color: var(--bg);
}

.cmp .accept:hover {
  background: #fff;
}

.cmp .reject {
  background: transparent;
  border: 1px solid var(--line);
  color: var(--muted);
}

.cmp .reject:hover {
  border-color: var(--text);
  color: var(--text);
}

/* Range Input */
input[type="range"] {
  -webkit-appearance: none;
  width: 100%;
  background: transparent;
  padding: 0;
  border: none;
}

input[type="range"]::-webkit-slider-runnable-track {
  width: 100%;
  height: 6px;
  cursor: pointer;
  background: var(--elev);
  border-radius: 999px;
}

input[type="range"]::-webkit-slider-thumb {
  height: 18px;
  width: 18px;
  border-radius: 50%;
  background: var(--brand1);
  cursor: pointer;
  -webkit-appearance: none;
  margin-top: -6px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.3);
  border: 2px solid var(--bg);
}

input[type="range"]:focus::-webkit-slider-thumb {
  transform: scale(1.1);
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}
::-webkit-scrollbar-track {
  background: var(--bg);
}
::-webkit-scrollbar-thumb {
  background: var(--line);
  border-radius: 5px;
  border: 2px solid var(--bg);
}
::-webkit-scrollbar-thumb:hover {
  background: var(--text-subtle);
}
