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

:root {
  --bg: #f7f9fc;
  --surface: #ffffff;
  --surface-hover: #f4f6fb;
  --border: #e6e9f2;
  --text: #0b1220;
  --text-muted: #6b7280;
  --accent: #4f46e5;
  --accent-hover: #4338ca;
  --success: #16a34a;
  --danger: #ef4444;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.5;
}

/* Page layout */
.page-layout {
  display: grid;
  grid-template-columns: 160px minmax(0, 1fr) 160px;
  gap: 16px;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 16px 24px;
}

.sidebar {
  position: sticky;
  top: 16px;
  height: fit-content;
}

.ad-slot {
  background: #fbfcff;
  border: 1px dashed #d9deea;
  border-radius: 12px;
  padding: 12px;
  text-align: center;
  font-size: 12px;
  color: var(--text-muted);
}

.ad-top,
.ad-bottom {
  max-width: 1100px;
  margin: 16px auto;
  padding: 0 16px;
}

.ad-top .ad-slot,
.ad-bottom .ad-slot {
  height: 90px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ad-left .ad-slot,
.ad-right .ad-slot {
  height: 600px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Container */
.container {
  max-width: 680px;
  margin: 0 auto;
  padding: 20px 0;
}

/* Header */
.header {
  text-align: center;
  padding: 30px 0;
}

.logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  background: #eef2ff;
  border-radius: 14px;
  margin-bottom: 16px;
}

.logo svg {
  width: 32px;
  height: 32px;
  color: var(--accent);
}

.header h1 {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 8px;
}

.header p {
  color: var(--text-muted);
  font-size: 14px;
}

.apology-gif {
  display: block;
  width: 200px;
  max-width: 70vw;
  height: auto;
  margin: 12px auto 0;
  border-radius: 10px;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.08);
}

/* Platform icons */
.platforms {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-top: 20px;
}

.platform {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 12px;
  transition: all 0.2s;
}

.platform:hover {
  background: var(--surface-hover);
  transform: translateY(-2px);
}

.platform svg {
  width: 22px;
  height: 22px;
}

.platform.youtube svg { color: #ff0000; }
.platform.tiktok svg { color: #111827; }
.platform.instagram svg { color: #e4405f; }
.platform.twitter svg { color: #1da1f2; }
.platform.facebook svg { color: #1877f2; }

/* Card */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 28px;
  margin-bottom: 16px;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.06);
}

/* Form */
.form-group {
  margin-bottom: 16px;
}

.form-group label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.input-wrapper {
  position: relative;
}

.input-wrapper svg {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 20px;
  height: 20px;
  color: var(--text-muted);
}

input[type="url"] {
  width: 100%;
  padding: 14px 14px 14px 44px;
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 12px;
  color: var(--text);
  font-size: 15px;
  transition: border-color 0.2s;
}

input[type="url"]:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.12);
}

input[type="url"]::placeholder {
  color: #555;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 14px 20px;
  background: var(--accent);
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: 0 8px 20px rgba(79, 70, 229, 0.2);
}

.btn:hover {
  background: var(--accent-hover);
  transform: translateY(-1px);
}

.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.btn svg {
  width: 20px;
  height: 20px;
}

.btn-secondary {
  background: #fff;
  color: var(--text);
  border: 1px solid var(--border);
  box-shadow: none;
}

.btn-secondary:hover {
  background: #333;
}

.btn-success {
  background: var(--success);
}

.btn-success:hover {
  background: #00b348;
}

/* Spinner */
.spinner {
  width: 18px;
  height: 18px;
  border: 2px solid transparent;
  border-top-color: currentColor;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Video preview */
.video-preview {
  display: flex;
  gap: 14px;
  padding: 16px;
  background: #f3f6ff;
  border-radius: 12px;
  margin-bottom: 20px;
}

.video-thumb {
  width: 120px;
  height: 68px;
  object-fit: cover;
  border-radius: 8px;
  background: #222;
}

.video-info {
  flex: 1;
  min-width: 0;
}

.video-title {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 4px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.video-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 12px;
  color: var(--text-muted);
}

.video-meta span {
  display: flex;
  align-items: center;
  gap: 4px;
}

.video-meta svg {
  width: 14px;
  height: 14px;
}

/* Ad section */
.ad-section {
  text-align: center;
  padding: 20px;
  background: #f4f7ff;
  border-radius: 12px;
  border: 1px dashed var(--border);
}

.ad-section p {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.ad-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  background: var(--accent);
  color: white;
  font-size: 14px;
  font-weight: 600;
  border-radius: 10px;
  text-decoration: none;
  transition: transform 0.2s, box-shadow 0.2s;
}

.ad-link:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(37, 99, 235, 0.2);
}

.ad-link svg {
  width: 18px;
  height: 18px;
}

/* Success state */
.success-state {
  text-align: center;
  padding: 20px 0;
}

.success-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  background: rgba(22, 163, 74, 0.12);
  border-radius: 50%;
  margin-bottom: 16px;
}

.success-icon svg {
  width: 32px;
  height: 32px;
  color: var(--success);
}

.success-state h3 {
  font-size: 18px;
  margin-bottom: 8px;
}

.success-state p {
  color: var(--text-muted);
  font-size: 14px;
  margin-bottom: 20px;
}

.btn-group {
  display: flex;
  gap: 12px;
}

.btn-group .btn {
  flex: 1;
}

/* Steps indicator */
.steps {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-bottom: 24px;
}

.step-dot {
  width: 8px;
  height: 8px;
  background: var(--border);
  border-radius: 50%;
  transition: all 0.3s;
}

.step-dot.active {
  width: 24px;
  background: var(--accent);
  border-radius: 4px;
}

/* Mini ad banner */
.ad-banner { display: none; }

/* How it works */
.how-it-works {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-top: 24px;
}

.how-step {
  text-align: center;
  padding: 16px 8px;
  background: #f3f6ff;
  border-radius: 12px;
}

.how-step-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: #ffffff;
  border-radius: 10px;
  margin-bottom: 10px;
  border: 1px solid var(--border);
}

.how-step-icon svg {
  width: 20px;
  height: 20px;
  color: var(--accent);
}

.how-step span {
  display: block;
  font-size: 12px;
  color: var(--text-muted);
}

/* Footer */
.footer {
  text-align: center;
  padding: 24px 0;
  font-size: 12px;
  color: var(--text-muted);
}

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

/* Policy section */
.policy {
  margin-top: 20px;
  padding: 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.05);
}

.policy h3 {
  font-size: 14px;
  margin-bottom: 8px;
}

.policy p {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.6;
}

/* Cookie banner */
.cookie-banner {
  position: fixed;
  left: 16px;
  right: 16px;
  bottom: 16px;
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px 16px;
  display: none;
  gap: 12px;
  align-items: center;
  z-index: 9999;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.12);
}

.cookie-text {
  font-size: 12px;
  color: var(--text-muted);
}

.cookie-actions {
  display: flex;
  gap: 8px;
  margin-left: auto;
}

.cookie-btn {
  padding: 8px 12px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: #fff;
  color: var(--text);
  font-size: 12px;
  cursor: pointer;
}

.cookie-btn.primary {
  background: var(--accent);
  color: #fff;
  border: none;
}

/* Error state */
.error-msg {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px;
  background: rgba(255, 71, 87, 0.1);
  border: 1px solid rgba(255, 71, 87, 0.2);
  border-radius: 8px;
  font-size: 13px;
  color: var(--danger);
  margin-top: 12px;
}

.error-msg svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

/* Animations */
.fade-in {
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Responsive */
@media (max-width: 480px) {
  .page-layout {
    grid-template-columns: 1fr;
  }

  .sidebar {
    display: none;
  }
  .container {
    padding: 16px 12px;
  }
  
  .card {
    padding: 20px 16px;
  }
  
  .video-preview {
    flex-direction: column;
  }
  
  .video-thumb {
    width: 100%;
    height: auto;
    aspect-ratio: 16/9;
  }
  
  .how-it-works {
    grid-template-columns: 1fr;
    gap: 8px;
  }
  
  .how-step {
    display: flex;
    align-items: center;
    gap: 12px;
    text-align: left;
    padding: 12px;
  }
  
  .how-step-icon {
    margin-bottom: 0;
  }

  .cookie-banner {
    left: 10px;
    right: 10px;
    bottom: 10px;
    flex-direction: column;
    align-items: flex-start;
  }

  .cookie-actions {
    width: 100%;
  }

  .cookie-actions .cookie-btn {
    flex: 1;
  }
}

