/* ═══════════════════════════════════════════════════════════════════════════
   Hook — Viral Hook Generator
   Accent: #d946ef (fuchsia)
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── Page shell ─────────────────────────────────────────────────────────── */
.hook-page {
    background: #110018;
    min-height: 100vh;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Inter', 'Helvetica Neue', Arial, sans-serif;
    margin-bottom: -96px;
}

/* ── Header ─────────────────────────────────────────────────────────────── */
.hook-header {
    background: linear-gradient(140deg, #160020 0%, #280535 55%, #1a0030 100%);
    border-bottom: 1px solid rgba(217, 70, 239, 0.18);
    position: relative;
    margin: -60px 0 -110px 0;
}

.hook-header .back-to-store-btn {
    display: inline-flex !important;
    width: auto;
    align-self: flex-start;
}

/* Glow orb */
.hook-header::before {
    content: '';
    position: absolute;
    top: -80px;
    right: -120px;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(217, 70, 239, 0.09) 0%, transparent 65%);
    pointer-events: none;
}

.hook-header__body {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 20px;
}

.hook-header__badge {
    display: inline-flex;
    background: rgba(217, 70, 239, 0.15);
    color: #e879f9;
    border: 1px solid rgba(217, 70, 239, 0.30);
    border-radius: 999px;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    padding: 3px 12px;
    margin-bottom: 10px;
}

.hook-header__title {
    font-size: 2rem;
    font-weight: 800;
    color: #ffffff;
    margin: 0 0 8px;
    letter-spacing: -0.02em;
}

.hook-header__subtitle {
    font-size: 0.92rem;
    color: rgba(255, 255, 255, 0.50);
    margin: 0;
    max-width: 560px;
    line-height: 1.6;
}

/* Chips */
.hook-header__chips {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    flex-shrink: 0;
}

.hook-chip {
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: rgba(255, 255, 255, 0.70);
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 600;
    padding: 5px 14px;
}

.hook-chip--ai {
    background: rgba(217, 70, 239, 0.12);
    border-color: rgba(217, 70, 239, 0.28);
    color: #e879f9;
}

.hook-chip--results {
    background: rgba(217, 70, 239, 0.15);
    border-color: rgba(217, 70, 239, 0.30);
    color: #e879f9;
    font-weight: 700;
}

/* How-it-works button */
.hook-hiw-btn {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.14);
    color: rgba(255, 255, 255, 0.50);
    border-radius: 999px;
    padding: 6px 14px;
    font-size: 0.78rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
    white-space: nowrap;
}
.hook-hiw-btn:hover {
    background: rgba(217, 70, 239, 0.14);
    color: #e879f9;
    border-color: rgba(217, 70, 239, 0.35);
}

/* ── Body ───────────────────────────────────────────────────────────────── */
.hook-body {
    padding: 80px 0 80px;
}

/* Cancel global .container margins in body context */
.hook-body.container {
    min-height: 0;
}

/* ── 2-column form grid ─────────────────────────────────────────────────── */
.hook-form-grid {
    display: grid;
    grid-template-columns: 340px 1fr;
    gap: 24px;
    align-items: start;
}

/* ── Cards ──────────────────────────────────────────────────────────────── */
.hook-card {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 16px;
}

.hook-card__head {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 18px;
}

.hook-step {
    font-size: 0.68rem;
    font-weight: 800;
    color: #d946ef;
    background: rgba(217, 70, 239, 0.12);
    border: 1px solid rgba(217, 70, 239, 0.25);
    border-radius: 6px;
    padding: 3px 8px;
    flex-shrink: 0;
}

.hook-card__title {
    font-size: 1rem;
    font-weight: 700;
    color: #fff;
    margin: 0;
}

/* ── Inputs ─────────────────────────────────────────────────────────────── */
.hook-textarea {
    width: 100%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.10);
    border-radius: 10px;
    color: #fff;
    padding: 12px 14px;
    font-size: 0.9rem;
    font-family: inherit;
    outline: none;
    resize: vertical;
    transition: border-color 0.18s;
    box-sizing: border-box;
    line-height: 1.55;
}
.hook-textarea::placeholder { color: rgba(255,255,255,0.28); }
.hook-textarea:focus { border-color: rgba(217, 70, 239, 0.50); }

.hook-input {
    width: 100%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.10);
    border-radius: 10px;
    color: #fff;
    padding: 10px 14px;
    font-size: 0.9rem;
    font-family: inherit;
    outline: none;
    transition: border-color 0.18s;
    box-sizing: border-box;
    margin-top: 10px;
}
.hook-input::placeholder { color: rgba(255,255,255,0.28); }
.hook-input:focus { border-color: rgba(217, 70, 239, 0.50); }

/* Count selector */
.hook-count-block {
    margin-top: 18px;
}

.hook-label {
    font-size: 0.78rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.45);
    letter-spacing: 0.04em;
    text-transform: uppercase;
    margin: 0 0 8px;
}

/* ── Settings groups ────────────────────────────────────────────────────── */
.hook-settings-group {
    margin-bottom: 18px;
}
.hook-settings-group:last-child { margin-bottom: 0; }

/* ── Pill groups ────────────────────────────────────────────────────────── */
.hook-pill-group {
    display: flex;
    gap: 6px;
}

.hook-pill-group--wrap {
    flex-wrap: wrap;
}

.hook-pill {
    font-size: 0.8rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.50);
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.10);
    border-radius: 8px;
    padding: 5px 12px;
    cursor: pointer;
    transition: all 0.15s;
    white-space: nowrap;
}
.hook-pill:hover {
    color: rgba(255, 255, 255, 0.80);
    background: rgba(255, 255, 255, 0.10);
    border-color: rgba(255, 255, 255, 0.18);
}
.hook-pill.active {
    color: #fff;
    background: rgba(217, 70, 239, 0.20);
    border-color: rgba(217, 70, 239, 0.50);
}

/* ── Error ──────────────────────────────────────────────────────────────── */
.hook-error {
    font-size: 0.85rem;
    color: #f87171;
    background: rgba(248, 113, 113, 0.10);
    border: 1px solid rgba(248, 113, 113, 0.20);
    border-radius: 8px;
    padding: 10px 14px;
    margin-bottom: 12px;
}

/* ── Generate button ────────────────────────────────────────────────────── */
.hook-generate-btn {
    width: 100%;
    background: linear-gradient(135deg, #d946ef 0%, #a21caf 100%);
    color: #fff;
    border: none;
    border-radius: 12px;
    padding: 15px 24px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: opacity 0.18s, transform 0.15s;
    letter-spacing: 0.02em;
}
.hook-generate-btn:hover:not(:disabled) {
    opacity: 0.88;
    transform: translateY(-1px);
}
.hook-generate-btn:disabled {
    opacity: 0.55;
    cursor: not-allowed;
    transform: none;
}
.hook-generate-btn--loading {
    opacity: 0.70;
}

/* ── Results section ────────────────────────────────────────────────────── */
.hook-results {
    margin-top: 48px;
}

.hook-results__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.hook-results__title {
    font-size: 1.3rem;
    font-weight: 800;
    color: #fff;
    margin: 0 0 4px;
}

.hook-results__sub {
    font-size: 0.82rem;
    color: rgba(255,255,255,0.40);
    margin: 0;
}

.hook-results__actions {
    display: flex;
    gap: 10px;
    flex-shrink: 0;
}

.hook-action-btn {
    font-size: 0.82rem;
    font-weight: 600;
    color: rgba(255,255,255,0.60);
    background: rgba(255,255,255,0.07);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 8px;
    padding: 7px 16px;
    cursor: pointer;
    transition: all 0.15s;
    white-space: nowrap;
}
.hook-action-btn:hover:not(:disabled) {
    color: #fff;
    background: rgba(255,255,255,0.12);
}
.hook-action-btn--regen {
    color: #d946ef;
    background: rgba(217,70,239,0.10);
    border-color: rgba(217,70,239,0.25);
}
.hook-action-btn--regen:hover:not(:disabled) {
    background: rgba(217,70,239,0.18);
    border-color: rgba(217,70,239,0.45);
    color: #e879f9;
}
.hook-action-btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

/* ── Hook result grid ───────────────────────────────────────────────────── */
.hook-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.hook-result-card {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    padding: 18px 20px 14px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    transition: border-color 0.18s, background 0.18s;
}
.hook-result-card:hover {
    border-color: rgba(217, 70, 239, 0.25);
    background: rgba(217, 70, 239, 0.04);
}

.hook-result-card__top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.hook-type-label {
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: #d946ef;
    background: rgba(217, 70, 239, 0.12);
    border: 1px solid rgba(217, 70, 239, 0.22);
    border-radius: 5px;
    padding: 2px 8px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 75%;
}

.hook-copy-btn {
    font-size: 0.85rem;
    font-weight: 700;
    color: rgba(255,255,255,0.35);
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.09);
    border-radius: 6px;
    padding: 3px 9px;
    cursor: pointer;
    transition: all 0.15s;
    flex-shrink: 0;
}
.hook-copy-btn:hover {
    color: #e879f9;
    background: rgba(217,70,239,0.10);
    border-color: rgba(217,70,239,0.25);
}
.hook-copy-btn.copied {
    color: #86efac;
    background: rgba(134,239,172,0.10);
    border-color: rgba(134,239,172,0.25);
}

.hook-text {
    font-size: 0.92rem;
    color: rgba(255, 255, 255, 0.88);
    line-height: 1.55;
    margin: 0;
    flex: 1;
    word-break: break-word;
}

.hook-chars {
    font-size: 0.72rem;
    color: rgba(255,255,255,0.25);
    margin: 0;
}

/* ── How It Works modal ─────────────────────────────────────────────────── */
.hook-hiw-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.72);
    backdrop-filter: blur(6px);
    z-index: 1000;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 40px 20px 40px;
    overflow-y: auto;
}

.hook-hiw-modal {
    background: #1a0028;
    border: 1px solid rgba(217, 70, 239, 0.20);
    border-radius: 20px;
    padding: 36px 40px 40px;
    max-width: 680px;
    width: 100%;
    position: relative;
    animation: hook-modal-in 0.22s ease;
}

@keyframes hook-modal-in {
    from { opacity: 0; transform: scale(0.96) translateY(12px); }
    to   { opacity: 1; transform: scale(1) translateY(0); }
}

.hook-hiw-modal__close {
    position: absolute;
    top: 18px;
    right: 20px;
    width: 30px;
    height: 30px;
    background: rgba(255,255,255,0.07);
    border: 1px solid rgba(255,255,255,0.10);
    border-radius: 50%;
    color: rgba(255,255,255,0.55);
    font-size: 0.85rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s;
}
.hook-hiw-modal__close:hover {
    background: rgba(217,70,239,0.15);
    color: #e879f9;
    border-color: rgba(217,70,239,0.30);
}

.hook-hiw-modal__header {
    margin-bottom: 28px;
    padding-bottom: 24px;
    border-bottom: 1px solid rgba(255,255,255,0.07);
}

.hook-hiw-modal__eyebrow {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.10em;
    text-transform: uppercase;
    color: #d946ef;
    margin: 0 0 8px;
}

.hook-hiw-modal__title {
    font-size: 1.4rem;
    font-weight: 800;
    color: #fff;
    margin: 0 0 10px;
    letter-spacing: -0.02em;
}

.hook-hiw-modal__subtitle {
    font-size: 0.9rem;
    color: rgba(255,255,255,0.52);
    line-height: 1.6;
    margin: 0;
}

.hook-hiw-section {
    margin-bottom: 24px;
    padding-bottom: 24px;
    border-bottom: 1px solid rgba(255,255,255,0.06);
}
.hook-hiw-section:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.hook-hiw-section__head {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}

.hook-hiw-section__icon {
    font-size: 1rem;
    flex-shrink: 0;
}

.hook-hiw-section__title {
    font-size: 0.95rem;
    font-weight: 700;
    color: #fff;
    margin: 0;
}

.hook-hiw-section__body {
    font-size: 0.875rem;
    color: rgba(255,255,255,0.55);
    line-height: 1.65;
    margin: 0 0 10px;
}
.hook-hiw-section__body:last-child { margin-bottom: 0; }
.hook-hiw-section__body strong { color: rgba(255,255,255,0.80); }
.hook-hiw-section__body em { color: rgba(217,70,239,0.85); font-style: normal; }

.hook-hiw-passes {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-top: 4px;
}

.hook-hiw-pass {
    display: flex;
    gap: 14px;
    align-items: flex-start;
}

.hook-hiw-pass__num {
    font-size: 0.68rem;
    font-weight: 800;
    color: #d946ef;
    background: rgba(217,70,239,0.12);
    border: 1px solid rgba(217,70,239,0.25);
    border-radius: 6px;
    padding: 3px 8px;
    flex-shrink: 0;
    margin-top: 1px;
}

.hook-hiw-pass__content {
    flex: 1;
}

.hook-hiw-pass__title {
    font-size: 0.875rem;
    font-weight: 700;
    color: rgba(255,255,255,0.85);
    margin: 0 0 4px;
}

.hook-hiw-pass__desc {
    font-size: 0.84rem;
    color: rgba(255,255,255,0.48);
    line-height: 1.6;
    margin: 0;
}

/* ═══════════════════════════════════════════════════════════════════════════
   LIGHT MODE
   ═══════════════════════════════════════════════════════════════════════════ */

html[data-theme="light"] .hook-page { background: #fdf4ff; }
html[data-theme="light"] .hook-page .hook-header {
    background: linear-gradient(140deg, #fae8ff 0%, #f5d0fe 55%, #fae8ff 100%);
    border-bottom-color: rgba(217, 70, 239, 0.25);
}
html[data-theme="light"] .hook-page .hook-header::before {
    background: radial-gradient(circle, rgba(217, 70, 239, 0.07) 0%, transparent 65%);
}

html[data-theme="light"] .hook-page .hook-header__title  { color: #6b21a8; }
html[data-theme="light"] .hook-page .hook-header__subtitle { color: rgba(107, 33, 168, 0.65); }
html[data-theme="light"] .hook-page .hook-header__badge {
    color: #a21caf;
    background: rgba(217,70,239,0.10);
    border-color: rgba(217,70,239,0.25);
}

html[data-theme="light"] .hook-page .hook-chip {
    color: rgba(107,33,168,0.60);
    background: rgba(107,33,168,0.07);
    border-color: rgba(107,33,168,0.12);
}
html[data-theme="light"] .hook-page .hook-chip--ai,
html[data-theme="light"] .hook-page .hook-chip--results {
    color: #a21caf;
    background: rgba(217,70,239,0.10);
    border-color: rgba(217,70,239,0.22);
}
html[data-theme="light"] .hook-page .hook-hiw-btn {
    color: rgba(107,33,168,0.55);
    background: rgba(107,33,168,0.07);
    border-color: rgba(107,33,168,0.12);
}
html[data-theme="light"] .hook-page .hook-hiw-btn:hover {
    color: #a21caf;
    background: rgba(217,70,239,0.10);
}

html[data-theme="light"] .hook-page .hook-card {
    background: #fff;
    border-color: rgba(107,33,168,0.12);
}
html[data-theme="light"] .hook-page .hook-card__title { color: #1a0028; }
html[data-theme="light"] .hook-page .hook-step {
    color: #a21caf;
    background: rgba(217,70,239,0.08);
    border-color: rgba(217,70,239,0.22);
}

html[data-theme="light"] .hook-page .hook-textarea,
html[data-theme="light"] .hook-page .hook-input {
    background: #f9f0ff;
    color: #1a0028;
    border-color: rgba(107,33,168,0.18);
}
html[data-theme="light"] .hook-page .hook-textarea::placeholder,
html[data-theme="light"] .hook-page .hook-input::placeholder { color: rgba(107,33,168,0.35); }
html[data-theme="light"] .hook-page .hook-textarea:focus,
html[data-theme="light"] .hook-page .hook-input:focus { border-color: rgba(217,70,239,0.50); }

html[data-theme="light"] .hook-page .hook-label { color: rgba(107,33,168,0.55); }

html[data-theme="light"] .hook-page .hook-pill {
    color: rgba(107,33,168,0.55);
    background: rgba(107,33,168,0.06);
    border-color: rgba(107,33,168,0.14);
}
html[data-theme="light"] .hook-page .hook-pill:hover {
    color: #6b21a8;
    background: rgba(107,33,168,0.11);
    border-color: rgba(107,33,168,0.22);
}
html[data-theme="light"] .hook-page .hook-pill.active {
    color: #6b21a8;
    background: rgba(217,70,239,0.14);
    border-color: rgba(217,70,239,0.45);
}

html[data-theme="light"] .hook-page .hook-generate-btn {
    background: linear-gradient(135deg, #c026d3 0%, #7e22ce 100%);
}

html[data-theme="light"] .hook-page .hook-results__title { color: #1a0028; }
html[data-theme="light"] .hook-page .hook-results__sub { color: rgba(107,33,168,0.50); }

html[data-theme="light"] .hook-page .hook-action-btn {
    color: rgba(107,33,168,0.60);
    background: rgba(107,33,168,0.06);
    border-color: rgba(107,33,168,0.12);
}
html[data-theme="light"] .hook-page .hook-action-btn:hover:not(:disabled) {
    color: #6b21a8;
    background: rgba(107,33,168,0.12);
}
html[data-theme="light"] .hook-page .hook-action-btn--regen {
    color: #a21caf;
    background: rgba(217,70,239,0.08);
    border-color: rgba(217,70,239,0.22);
}

html[data-theme="light"] .hook-page .hook-result-card {
    background: #fff;
    border-color: rgba(107,33,168,0.12);
}
html[data-theme="light"] .hook-page .hook-result-card:hover {
    border-color: rgba(217,70,239,0.30);
    background: rgba(217,70,239,0.03);
}

html[data-theme="light"] .hook-page .hook-type-label {
    color: #a21caf;
    background: rgba(217,70,239,0.08);
    border-color: rgba(217,70,239,0.20);
}

html[data-theme="light"] .hook-page .hook-copy-btn {
    color: rgba(107,33,168,0.40);
    background: rgba(107,33,168,0.06);
    border-color: rgba(107,33,168,0.12);
}
html[data-theme="light"] .hook-page .hook-copy-btn:hover {
    color: #a21caf;
    background: rgba(217,70,239,0.10);
    border-color: rgba(217,70,239,0.25);
}

html[data-theme="light"] .hook-page .hook-text { color: #1a0028; }
html[data-theme="light"] .hook-page .hook-chars { color: rgba(107,33,168,0.30); }

html[data-theme="light"] .hook-page .hook-hiw-modal {
    background: #fff;
    border-color: rgba(107,33,168,0.15);
}
html[data-theme="light"] .hook-page .hook-hiw-modal__title { color: #1a0028; }
html[data-theme="light"] .hook-page .hook-hiw-modal__subtitle { color: rgba(107,33,168,0.60); }
html[data-theme="light"] .hook-page .hook-hiw-modal__eyebrow { color: #a21caf; }
html[data-theme="light"] .hook-page .hook-hiw-section__title { color: #1a0028; }
html[data-theme="light"] .hook-page .hook-hiw-section__body { color: rgba(107,33,168,0.65); }
html[data-theme="light"] .hook-page .hook-hiw-section__body strong { color: #1a0028; }
html[data-theme="light"] .hook-page .hook-hiw-pass__title { color: #1a0028; }
html[data-theme="light"] .hook-page .hook-hiw-pass__desc { color: rgba(107,33,168,0.55); }
html[data-theme="light"] .hook-page .hook-hiw-pass__num {
    color: #a21caf;
    background: rgba(217,70,239,0.08);
    border-color: rgba(217,70,239,0.20);
}
html[data-theme="light"] .hook-page .hook-hiw-modal__close {
    background: rgba(107,33,168,0.07);
    border-color: rgba(107,33,168,0.12);
    color: rgba(107,33,168,0.50);
}
html[data-theme="light"] .hook-page .hook-hiw-modal__close:hover {
    background: rgba(217,70,239,0.12);
    color: #a21caf;
}

/* ═══════════════════════════════════════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════════════════════════════════════ */

@media (max-width: 960px) {
    .hook-form-grid {
        grid-template-columns: 1fr;
    }
    .hook-header__body {
        flex-direction: column;
        gap: 14px;
    }
    .hook-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .hook-hiw-modal {
        padding: 28px 24px 32px;
    }
}

@media (max-width: 600px) {
    .hook-grid {
        grid-template-columns: 1fr;
    }
    .hook-results__header {
        flex-direction: column;
        align-items: flex-start;
    }
    .hook-results__actions {
        width: 100%;
    }
    .hook-action-btn {
        flex: 1;
        text-align: center;
    }
    .hook-hiw-backdrop {
        padding: 20px 12px;
    }
    .hook-hiw-modal {
        padding: 24px 18px 28px;
    }
}
