/**
 * FindGooLinks — shadcn/ui visual language
 * Styles v20261112-shadcn02
 * Zinc palette, Inter, rounded-md, quiet borders.
 * Desktop breakpoint: 960px
 */

:root {
  --font-sans: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    Roboto, "Helvetica Neue", Arial, sans-serif;

  /* zinc palette (shadcn/ui light) */
  --color-background: #ffffff;
  --color-foreground: #18181b;        /* zinc-900 */
  --color-muted: #f4f4f5;             /* zinc-100 */
  --color-muted-foreground: #71717a;  /* zinc-500 */
  --color-border: #e4e4e7;            /* zinc-200 */
  --color-input: #e4e4e7;
  --color-primary: #18181b;           /* zinc-900 */
  --color-primary-hover: #27272a;     /* zinc-800 */
  --color-primary-foreground: #fafafa;
  --color-ring: #18181b;
  --color-success: #16a34a;
  --color-warning: #b45309;
  --color-error: #dc2626;

  --radius: 0.375rem; /* rounded-md */
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --breakpoint-desktop: 960px;
}

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

html {
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.6;
  color: var(--color-foreground);
  background-color: var(--color-background);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  margin: 0;
  padding: 0;
}

h1, h2, h3 {
  font-family: var(--font-sans);
  color: var(--color-foreground);
  letter-spacing: -0.02em;
}

p {
  margin: 0;
}

a {
  color: var(--color-foreground);
  text-decoration: underline;
  text-decoration-color: var(--color-border);
  text-underline-offset: 3px;
}

a:hover {
  color: var(--color-foreground);
  text-decoration-color: var(--color-foreground);
}

.page-shell {
  max-width: 960px;
  margin: 0 auto;
  padding: 1.5rem 1.25rem 3rem;
}

/* Header */
.page-header {
  margin-bottom: 2.25rem;
  text-align: center;
  padding-top: 1.5rem;
}

.page-header h1 {
  font-size: 1.75rem;
  font-weight: 600;
  letter-spacing: -0.025em;
  line-height: 1.25;
  margin-bottom: 0.375rem;
}

.tagline {
  font-size: 0.95rem;
  color: var(--color-muted-foreground);
}

/* Layout */
.page-main {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.content-grid {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  align-items: stretch;
}

.primary-column,
.secondary-column {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

/* Cards: quiet 1px borders, rounded-md */
section {
  background: var(--color-background);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
}

h2 {
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin-bottom: 1rem;
}

/* Intro notice */
.intro-notice {
  margin-bottom: 1.5rem;
  padding: 0.875rem 1rem;
  background: var(--color-muted);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  color: var(--color-foreground);
  font-size: 0.85rem;
  line-height: 1.55;
}

.intro-notice p + p {
  margin-top: 0.5rem;
}

.intro-notice strong {
  font-weight: 600;
}

/* Form */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
  margin-bottom: 1.25rem;
}

label {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--color-foreground);
}

.field-hint {
  font-size: 0.8rem;
  color: var(--color-muted-foreground);
  line-height: 1.5;
}

.char-count {
  text-align: right;
  font-size: 0.75rem;
  color: var(--color-muted-foreground);
}

input[type="email"],
textarea,
input[type="file"] {
  width: 100%;
  padding: 0.55rem 0.75rem;
  font-family: var(--font-sans);
  font-size: 0.9rem;
  line-height: 1.5;
  color: var(--color-foreground);
  background: var(--color-background);
  border: 1px solid var(--color-input);
  border-radius: var(--radius);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

input[type="email"]::placeholder,
textarea::placeholder {
  color: var(--color-muted-foreground);
  opacity: 0.75;
}

textarea {
  resize: vertical;
  min-height: 96px;
}

input[type="email"]:focus,
textarea:focus,
input[type="file"]:focus {
  outline: none;
  border-color: var(--color-ring);
  box-shadow: 0 0 0 3px rgb(24 24 27 / 0.08);
}

/* File upload */
.file-upload-wrapper {
  position: relative;
}

input[type="file"] {
  padding: 0.5rem 0.75rem;
  cursor: pointer;
}

input[type="file"]::file-selector-button {
  font-family: var(--font-sans);
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--color-foreground);
  background: var(--color-muted);
  border: 1px solid var(--color-border);
  border-radius: calc(var(--radius) - 1px);
  padding: 0.25rem 0.625rem;
  margin-right: 0.625rem;
  cursor: pointer;
}

.image-preview {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem;
  margin-top: 0.5rem;
  background: var(--color-background);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
}

.image-preview img {
  width: 48px;
  height: 48px;
  object-fit: cover;
  border: 1px solid var(--color-border);
  border-radius: calc(var(--radius) - 2px);
}

.image-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: 0.85rem;
  color: var(--color-muted-foreground);
}

/* Buttons */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  height: 2.5rem;
  padding: 0 1.25rem;
  font-family: var(--font-sans);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--color-primary-foreground);
  background: var(--color-primary);
  border: 1px solid transparent;
  border-radius: var(--radius);
  cursor: pointer;
  text-decoration: none;
  transition: background-color 0.15s ease, transform 0.05s ease;
}

.btn-primary:hover {
  background: var(--color-primary-hover);
  color: var(--color-primary-foreground);
  text-decoration: none;
}

.btn-primary:active {
  transform: translateY(1px);
}

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

.btn-text {
  background: none;
  border: none;
  font-family: var(--font-sans);
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--color-muted-foreground);
  cursor: pointer;
  padding: 0.375rem 0.625rem;
  border-radius: var(--radius);
  text-decoration: none;
  transition: color 0.15s ease, background-color 0.15s ease;
}

.btn-text:hover {
  color: var(--color-foreground);
  background: var(--color-muted);
  text-decoration: none;
}

/* Checkbox */
.checkbox-group {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
}

.checkbox-group input[type="checkbox"] {
  width: auto;
  margin-top: 0.2rem;
  cursor: pointer;
  flex-shrink: 0;
  accent-color: var(--color-primary);
}

.checkbox-group label {
  font-size: 0.85rem;
  font-weight: 400;
  color: var(--color-muted-foreground);
  line-height: 1.5;
  cursor: pointer;
}

.checkbox-group a {
  color: var(--color-foreground);
  text-underline-offset: 2px;
}

.hidden {
  display: none !important;
}

/* Status */
.status-section {
  border-left: 1px solid var(--color-border);
  padding: 1rem 1.25rem;
}

.status-content {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.status-spinner {
  width: 18px;
  height: 18px;
  border: 2px solid var(--color-border);
  border-top-color: var(--color-foreground);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  flex-shrink: 0;
}

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

.status-message {
  font-size: 0.9rem;
  color: var(--color-foreground);
  line-height: 1.5;
}

.status-error {
  border-left-color: var(--color-error);
  background: #fef2f2;
}

.status-error .status-message {
  color: #b91c1c;
}

.status-success {
  border-left-color: var(--color-success);
  background: #f0fdf4;
}

.status-success .status-message {
  color: #166534;
}

/* Results */
.results-section {
  padding: 1.5rem;
}

.results-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.result-item {
  padding: 1rem 1.25rem;
  background: var(--color-background);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  transition: box-shadow 0.15s ease;
}

.result-item:hover {
  box-shadow: 0 4px 12px 0 rgb(0 0 0 / 0.06);
}

.result-title {
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin-bottom: 0.25rem;
  color: var(--color-foreground);
  line-height: 1.4;
}

.result-link {
  display: inline-block;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--color-foreground);
  text-decoration: underline;
  text-underline-offset: 3px;
  margin-bottom: 0.5rem;
}

.result-link:hover {
  text-decoration-color: var(--color-foreground);
}

.result-link.disabled {
  color: var(--color-muted-foreground);
  text-decoration: none;
}

.result-meta {
  font-size: 0.85rem;
  color: var(--color-muted-foreground);
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.result-price {
  font-weight: 500;
  color: var(--color-foreground);
}

.result-screenshot {
  margin-top: 0.75rem;
  max-width: 100%;
  height: auto;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
}

.empty-state {
  text-align: center;
  padding: 2rem 0;
  color: var(--color-muted-foreground);
  font-size: 0.9rem;
}

/* Info / side cards */
.info-section p,
.info-section li {
  font-size: 0.875rem;
  color: var(--color-muted-foreground);
  line-height: 1.65;
  margin-bottom: 0.625rem;
}

.info-section p:last-child,
.info-section li:last-child {
  margin-bottom: 0;
}

.info-section strong {
  color: var(--color-foreground);
  font-weight: 600;
}

.info-section ul {
  margin: 0.5rem 0 0.75rem;
  padding-left: 1.25rem;
}

.info-section li {
  margin-bottom: 0.375rem;
}

.info-section h2 {
  font-size: 0.95rem;
  margin-bottom: 0.75rem;
}

.info-section a {
  color: var(--color-foreground);
  text-underline-offset: 2px;
}

.credit-note {
  font-size: 0.85rem;
  color: var(--color-muted-foreground);
  line-height: 1.6;
}

.credit-note + .credit-note {
  margin-top: 0.625rem;
}

.credit-note:last-child {
  margin-bottom: 0;
}

/* Pricing pack cards (shadcn/ui, zinc palette) */
.packs-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  margin: 1.25rem 0 1.5rem;
}

.pack-card {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: 1.25rem;
  background: var(--color-background);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

.pack-card.featured {
  border-color: var(--color-primary);
  box-shadow: 0 4px 12px 0 rgb(0 0 0 / 0.06);
}

.pack-card h3 {
  font-family: var(--font-sans);
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--color-foreground);
}

.pack-card .pack-price {
  font-size: 1.5rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--color-foreground);
  margin-bottom: 0;
}

.pack-card .pack-note {
  font-size: 0.8rem;
  color: var(--color-muted-foreground);
  line-height: 1.5;
  margin-bottom: 0;
}

.pack-card .btn-primary {
  margin-top: auto;
  width: 100%;
}

.checkout-form {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin: 1.25rem 0;
}

.checkout-form label {
  font-size: 0.875rem;
  font-weight: 500;
}

/* Footer */
.page-footer {
  margin-top: 2.5rem;
  padding: 1.5rem 0 0.5rem;
  border-top: 1px solid var(--color-border);
  text-align: center;
}

.page-footer p {
  font-size: 0.8rem;
  color: var(--color-muted-foreground);
  line-height: 1.6;
  margin-bottom: 0.25rem;
}

.page-footer a {
  color: var(--color-muted-foreground);
  text-underline-offset: 2px;
}

.page-footer a:hover {
  color: var(--color-foreground);
}

/* Success / completion page */
.success-section {
  text-align: center;
  padding: 2.5rem 1.5rem;
}

.success-icon {
  font-size: 2rem;
  line-height: 1;
  width: 3.5rem;
  height: 3.5rem;
  margin: 0 auto 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-muted);
  border: 1px solid var(--color-border);
  border-radius: 9999px;
  color: var(--color-success);
}

.success-message {
  font-size: 0.95rem;
  color: var(--color-muted-foreground);
  line-height: 1.7;
  margin-bottom: 1.25rem;
  max-width: 34rem;
  margin-left: auto;
  margin-right: auto;
}

.success-message strong {
  color: var(--color-foreground);
  font-weight: 600;
}

.action-links {
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
  align-items: center;
  margin-top: 1.25rem;
}

.submit-another {
  font-size: 0.875rem;
  color: var(--color-muted-foreground);
  text-decoration: none;
  padding: 0.375rem 0.625rem;
  border-radius: var(--radius);
  transition: color 0.15s ease, background-color 0.15s ease;
}

.submit-another:hover {
  color: var(--color-foreground);
  background: var(--color-muted);
  text-decoration: none;
}

/* Placeholder / locked / error states */
.placeholder-section,
.locked-section,
.error-section {
  text-align: center;
  padding: 2.5rem 1.5rem;
}

.placeholder-icon,
.lock-icon,
.error-icon {
  font-size: 1.5rem;
  line-height: 1;
  width: 3rem;
  height: 3rem;
  margin: 0 auto 0.875rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-muted);
  border: 1px solid var(--color-border);
  border-radius: 9999px;
}

.placeholder-message,
.locked-message {
  font-size: 0.9rem;
  color: var(--color-muted-foreground);
  line-height: 1.7;
  margin-bottom: 1rem;
  max-width: 32rem;
  margin-left: auto;
  margin-right: auto;
}

.placeholder-message strong,
.locked-message strong {
  color: var(--color-foreground);
  font-weight: 600;
}

.locked-section h2,
.placeholder-section h2 {
  margin-bottom: 0.625rem;
}

.unlock-form {
  max-width: 400px;
  margin: 1.25rem auto 0;
  text-align: left;
}

.unlock-error {
  color: #b91c1c;
  font-size: 0.85rem;
  margin-top: 0.5rem;
  padding: 0.5rem 0.75rem;
  background-color: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: var(--radius);
}

.unlock-error.hidden {
  display: none;
}

.error-title {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--color-error);
  margin-bottom: 0.5rem;
}

.error-message {
  font-size: 0.9rem;
  color: var(--color-muted-foreground);
  line-height: 1.7;
  margin-bottom: 1.25rem;
  max-width: 32rem;
  margin-left: auto;
  margin-right: auto;
}

/* Desktop breakpoint: 960px and above */
@media (min-width: 960px) {
  .page-shell {
    padding: 2rem 2rem 3rem;
  }

  .page-header h1 {
    font-size: 2rem;
  }

  .packs-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .content-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 1.5rem;
    align-items: start;
  }

  .search-section {
    padding: 2rem;
  }

  .info-section {
    padding: 1.5rem;
  }
}

/* Mobile: 600px and below */
@media (max-width: 600px) {
  .page-shell {
    padding: 1rem 0.875rem 2rem;
  }

  .page-header h1 {
    font-size: 1.5rem;
  }

  section {
    padding: 1.25rem;
  }

  .result-meta {
    flex-direction: column;
    gap: 0.25rem;
  }

  .image-preview {
    flex-direction: column;
    align-items: flex-start;
  }

  .image-preview img {
    width: 64px;
    height: 64px;
  }
}