/* =============================================
   RESET & BASE
   ============================================= */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --bg: #0A0A0F;
  --card-bg: #13131A;
  --border: #1E1E2E;
  --gradient: linear-gradient(135deg, #7C3AED, #EC4899);
  --text-primary: #F8F8FF;
  --text-secondary: #8888AA;
  --purple: #7C3AED;
  --pink: #EC4899;
  --radius-card: 16px;
  --radius-btn: 12px;
  --transition: 0.2s ease;
}

html {
  font-family: 'Inter', sans-serif;
  font-size: 16px;
  background: var(--bg);
  color: var(--text-primary);
  min-height: 100vh;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0 16px 60px;
  background: var(--bg);
}

/* =============================================
   GRADIENT TEXT
   ============================================= */
.gradient-text {
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* =============================================
   HEADER
   ============================================= */
.header {
  width: 100%;
  max-width: 680px;
  padding: 48px 0 36px;
  text-align: center;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 12px;
  position: relative;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
}

.logo-icon {
  font-size: 32px;
  filter: drop-shadow(0 0 12px rgba(124, 58, 237, 0.6));
}

.logo-text {
  font-size: 32px;
  font-weight: 900;
  letter-spacing: -0.5px;
}

.badge {
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  font-size: 11px;
  font-weight: 600;
  color: var(--text-secondary);
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 4px 10px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.tagline {
  font-size: 16px;
  color: var(--text-secondary);
  font-weight: 400;
}

/* =============================================
   MAIN
   ============================================= */
.main {
  width: 100%;
  max-width: 680px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

/* =============================================
   CARD
   ============================================= */
.card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  padding: 32px;
}

.main-card {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* =============================================
   FORM FIELDS
   ============================================= */
.field-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.field-label {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-secondary);
  letter-spacing: 0.3px;
}

.input-field {
  width: 100%;
  background: #0D0D14;
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text-primary);
  font-family: 'Inter', sans-serif;
  font-size: 15px;
  padding: 14px 16px;
  outline: none;
  resize: vertical;
  transition: border-color var(--transition), box-shadow var(--transition);
  -webkit-appearance: none;
  appearance: none;
}

.input-field::placeholder {
  color: #44445A;
}

.input-field:focus {
  border-color: var(--purple);
  box-shadow: 0 0 40px rgba(124, 58, 237, 0.15);
}

/* SELECT */
.select-wrapper {
  position: relative;
}

.select-field {
  cursor: pointer;
  padding-right: 40px;
}

.select-arrow {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-secondary);
  font-size: 16px;
  pointer-events: none;
}

option {
  background: #13131A;
  color: var(--text-primary);
}

/* =============================================
   BUTTONS
   ============================================= */
.btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: none;
  border-radius: var(--radius-btn);
  cursor: pointer;
  font-family: 'Inter', sans-serif;
  font-weight: 700;
  font-size: 16px;
  padding: 16px 24px;
  transition: all var(--transition);
  width: 100%;
  letter-spacing: 0.2px;
}

.btn-primary {
  background: var(--gradient);
  color: #fff;
  box-shadow: 0 4px 24px rgba(124, 58, 237, 0.35);
}

.btn-primary:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 8px 32px rgba(124, 58, 237, 0.45);
}

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

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

.btn-outline {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--border);
  font-size: 15px;
}

.btn-outline:hover {
  border-color: var(--purple);
  color: var(--text-primary);
  background: rgba(124, 58, 237, 0.06);
}

/* SPINNER */
.spinner {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  vertical-align: middle;
}

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

/* =============================================
   REMAINING TEXT
   ============================================= */
.remaining-text {
  font-size: 13px;
  color: var(--text-secondary);
  text-align: center;
  margin-top: -4px;
}

/* =============================================
   RESULTS SECTION
   ============================================= */
.results-section {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

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

.results-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-primary);
}

/* HOOKS LIST */
.hooks-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.hook-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-left: 3px solid transparent;
  border-radius: var(--radius-card);
  border-image: var(--gradient) 1;
  border-image-slice: 1;
  padding: 18px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  transition: border-color var(--transition), transform var(--transition);
  position: relative;
  overflow: hidden;
}

/* Left gradient border via pseudo-element */
.hook-card::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: var(--gradient);
  border-radius: 3px 0 0 3px;
}

.hook-card:hover {
  transform: translateX(2px);
  border-color: #2A2A3E;
}

.hook-text {
  font-size: 15px;
  font-weight: 500;
  color: var(--text-primary);
  line-height: 1.55;
  flex: 1;
}

.copy-btn {
  flex-shrink: 0;
  background: rgba(124, 58, 237, 0.12);
  border: 1px solid rgba(124, 58, 237, 0.25);
  color: var(--purple);
  border-radius: 8px;
  padding: 7px 14px;
  font-size: 13px;
  font-weight: 600;
  font-family: 'Inter', sans-serif;
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
}

.copy-btn:hover {
  background: rgba(124, 58, 237, 0.22);
  border-color: var(--purple);
}

.copy-btn.copied {
  background: rgba(16, 185, 129, 0.12);
  border-color: rgba(16, 185, 129, 0.3);
  color: #10B981;
}

/* Faded state while loading new results */
.results-faded {
  opacity: 0.4;
  pointer-events: none;
}

/* =============================================
   FOOTER
   ============================================= */
.footer {
  margin-top: 56px;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.footer-main {
  font-size: 13px;
  color: var(--text-secondary);
}

.footer-sub {
  font-size: 12px;
  color: #55556A;
}

/* =============================================
   MODAL
   ============================================= */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(10, 10, 15, 0.8);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 16px;
}

.modal-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  padding: 40px 36px 36px;
  max-width: 420px;
  width: 100%;
  text-align: center;
  position: relative;
  box-shadow: 0 24px 80px rgba(0,0,0,0.6), 0 0 0 1px rgba(124,58,237,0.1);
}

.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  width: 32px;
  height: 32px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition);
  font-family: 'Inter', sans-serif;
}

.modal-close:hover {
  background: rgba(255,255,255,0.1);
  color: var(--text-primary);
}

.modal-icon {
  font-size: 40px;
  margin-bottom: 16px;
}

.modal-title {
  font-size: 20px;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 10px;
  line-height: 1.3;
}

.modal-subtitle {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 24px;
  line-height: 1.5;
}

.modal-price {
  font-size: 36px;
  font-weight: 900;
  margin-bottom: 28px;
}

.paypal-wrapper {
  margin-bottom: 16px;
  min-height: 48px;
}

.modal-fine-print {
  font-size: 12px;
  color: #55556A;
  margin-top: 4px;
}

/* =============================================
   TOAST
   ============================================= */
.toast {
  position: fixed;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%) translateY(0);
  background: #1E1E2E;
  border: 1px solid #3A1A1A;
  border-radius: 10px;
  padding: 14px 22px;
  font-size: 14px;
  font-weight: 500;
  color: #FF6B6B;
  z-index: 200;
  box-shadow: 0 8px 32px rgba(0,0,0,0.5);
  animation: toastIn 0.25s ease;
  white-space: nowrap;
}

.toast.toast-success {
  border-color: #1A3A2A;
  color: #10B981;
}

@keyframes toastIn {
  from { opacity: 0; transform: translateX(-50%) translateY(12px); }
  to   { opacity: 1; transform: translateX(-50%) translateY(0); }
}

/* =============================================
   RESPONSIVE — 375px
   ============================================= */
@media (max-width: 480px) {
  .header {
    padding: 32px 0 24px;
  }

  .logo-text {
    font-size: 26px;
  }

  .logo-icon {
    font-size: 26px;
  }

  .tagline {
    font-size: 14px;
  }

  .badge {
    position: static;
    transform: none;
    display: inline-block;
    margin-top: 8px;
  }

  .header-inner {
    flex-direction: column;
    gap: 6px;
  }

  .card {
    padding: 22px 18px;
  }

  .hook-card {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .copy-btn {
    align-self: flex-end;
  }

  .modal-card {
    padding: 32px 20px 28px;
  }

  .modal-title {
    font-size: 18px;
  }

  .modal-price {
    font-size: 30px;
  }

  .toast {
    left: 16px;
    right: 16px;
    transform: translateX(0);
    white-space: normal;
    text-align: center;
  }

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