/* NSFWAI Converter - dark adult theme */

:root {
    --bg: #0d0714;
    --bg2: #140b21;
    --panel: #1b1030;
    --panel2: #221443;
    --border: #34205f;
    --text: #f3edff;
    --muted: #a593c9;
    --accent: #b646ff;
    --accent2: #ff3d9a;
    --ok: #2fd27d;
    --err: #ff5570;
    --radius: 14px;
}

* { box-sizing: border-box; }

html, body {
    margin: 0;
    padding: 0;
    background: var(--bg);
    color: var(--text);
    font-family: "Segoe UI", system-ui, -apple-system, Roboto, Helvetica, Arial, sans-serif;
    font-size: 16px;
    line-height: 1.6;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3 { line-height: 1.25; margin: 0 0 .6em; }
h1 { font-size: 2.1rem; }
h2 { font-size: 1.45rem; margin-top: 1.6em; }
h3 { font-size: 1.1rem; }
p { margin: 0 0 1em; }

.wrap { max-width: 1080px; margin: 0 auto; padding: 0 20px; }
.narrow { max-width: 820px; }
.center-block { text-align: center; }
.muted { color: var(--muted); }
.small { font-size: .88rem; }
.block { display: block; }
.break { overflow-wrap: anywhere; }
.ok-text { color: var(--ok); }
.hp-field { position: absolute; left: -5000px; top: -5000px; height: 0; width: 0; overflow: hidden; }

/* Header */
.site-header {
    border-bottom: 1px solid var(--border);
    background: linear-gradient(180deg, var(--bg2), var(--bg));
    position: sticky;
    top: 0;
    z-index: 50;
}
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-top: 14px; padding-bottom: 14px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text); font-weight: 700; text-decoration: none; }
.brand:hover { text-decoration: none; }
.brand-mark {
    display: inline-flex; align-items: center; justify-content: center;
    width: 34px; height: 34px; border-radius: 10px;
    background: linear-gradient(135deg, var(--accent), var(--accent2));
    color: #fff; font-weight: 800;
}
.brand-text { letter-spacing: .2px; }
.site-nav { display: flex; align-items: center; gap: 18px; }
.site-nav a { color: var(--muted); font-weight: 600; font-size: .95rem; }
.site-nav a:hover { color: var(--text); text-decoration: none; }
.badge-18 {
    display: inline-flex; align-items: center; justify-content: center;
    border: 1px solid var(--accent2); color: var(--accent2);
    border-radius: 999px; font-size: .78rem; font-weight: 700;
    padding: 2px 9px;
}

/* Hero */
.hero { padding: 64px 0 40px; background: radial-gradient(1000px 400px at 70% -10%, rgba(182,70,255,.18), transparent), radial-gradient(800px 300px at 10% 10%, rgba(255,61,154,.10), transparent); }
.kicker { color: var(--accent2); text-transform: uppercase; letter-spacing: .12em; font-size: .8rem; font-weight: 700; margin-bottom: .8em; }
.hero h1 { font-size: 2.6rem; }
.hero-sub { color: var(--muted); font-size: 1.1rem; max-width: 640px; }
.hero-actions, .cta-row { display: flex; flex-wrap: wrap; gap: 12px; margin: 18px 0 8px; }

/* Buttons */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    border: 1px solid transparent; border-radius: 12px;
    padding: 11px 20px; font-size: .98rem; font-weight: 700;
    cursor: pointer; text-decoration: none; color: var(--text);
    background: var(--panel2); transition: transform .08s ease, filter .15s ease;
    font-family: inherit;
}
.btn:hover { text-decoration: none; filter: brightness(1.12); }
.btn:active { transform: translateY(1px); }
.btn-primary { background: linear-gradient(135deg, var(--accent), var(--accent2)); color: #fff; }
.btn-ghost { background: transparent; border-color: var(--border); color: var(--muted); }
.btn-ghost:hover { color: var(--text); }
.btn-small { padding: 7px 13px; font-size: .86rem; border-radius: 10px; }
.btn-lg { padding: 14px 26px; font-size: 1.05rem; }
.btn[disabled] { opacity: .45; cursor: not-allowed; }

/* Sections */
.section { padding: 44px 0; }
.section-alt { background: var(--bg2); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.tool-head { padding-bottom: 10px; }

.group-head { margin: 26px 0 14px; }
.tool-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; }
.tool-card {
    display: flex; flex-direction: column; gap: 8px;
    background: linear-gradient(180deg, var(--panel), var(--panel2));
    border: 1px solid var(--border); border-radius: var(--radius);
    padding: 18px; color: var(--text); text-decoration: none;
    transition: border-color .15s ease, transform .12s ease;
}
.tool-card:hover { border-color: var(--accent); text-decoration: none; transform: translateY(-2px); }
.tool-letter {
    display: inline-flex; align-items: center; justify-content: center;
    width: 42px; height: 42px; border-radius: 12px;
    background: linear-gradient(135deg, rgba(182,70,255,.25), rgba(255,61,154,.25));
    border: 1px solid var(--border);
    font-weight: 800; color: var(--text);
}
.tool-name { font-weight: 700; font-size: 1.05rem; }
.tool-tagline { color: var(--muted); font-size: .92rem; flex: 1; }
.tool-more { color: var(--accent); font-weight: 600; font-size: .9rem; }

.why-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }
.why-card { background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; }
.why-card h3 { margin-bottom: .3em; }
.why-card p { color: var(--muted); margin: 0; font-size: .95rem; }
.disclaimer { text-align: center; }

/* Panels, fields */
.panel {
    display: block;
    background: var(--panel); border: 1px solid var(--border);
    border-radius: var(--radius); padding: 22px; margin: 18px 0;
}
.field { display: block; margin-bottom: 14px; }
.field-label { display: block; font-weight: 600; font-size: .92rem; margin-bottom: 6px; color: var(--muted); }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
input[type="text"], input[type="email"], input[type="password"], input[type="number"], select, textarea {
    width: 100%; background: var(--bg); color: var(--text);
    border: 1px solid var(--border); border-radius: 10px;
    padding: 11px 13px; font-size: .98rem; font-family: inherit;
}
textarea { resize: vertical; }
input[type="range"] { width: 100%; accent-color: var(--accent); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); }
.check-row { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; font-weight: 600; }
.check-row input { width: auto; }

.notice { border-radius: 12px; padding: 13px 16px; margin: 16px 0; font-weight: 600; }
.notice-ok { background: rgba(47,210,125,.12); border: 1px solid rgba(47,210,125,.5); color: var(--ok); }
.notice-error { background: rgba(255,85,112,.10); border: 1px solid rgba(255,85,112,.5); color: var(--err); }

/* Results */
.result-block { margin: 22px 0; }
.result-title { margin: 18px 0 8px; }
.copy-box { position: relative; background: var(--bg); border: 1px solid var(--border); border-radius: 12px; padding: 14px 90px 14px 14px; margin-bottom: 10px; }
.copy-box pre { margin: 0; white-space: pre-wrap; word-break: break-word; font-family: Consolas, "Courier New", monospace; font-size: .9rem; color: var(--text); }
.copy-box .btn { position: absolute; top: 10px; right: 10px; }

.persona-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.persona-head .result-title { margin: 0; }

.steps { padding-left: 22px; color: var(--text); }
.steps li { margin-bottom: 8px; }
.feature-list { padding-left: 22px; }
.feature-list li { margin-bottom: 6px; }

.faq { border: 1px solid var(--border); border-radius: 12px; padding: 12px 16px; margin-bottom: 10px; background: var(--panel); }
.faq summary { cursor: pointer; font-weight: 600; }
.faq p { margin: 10px 0 0; color: var(--muted); }

.prose h2 { border-bottom: 1px solid var(--border); padding-bottom: .3em; }
.prose ul { padding-left: 22px; }
.prose li { margin-bottom: 6px; }

/* Studio tools */
.dropzone {
    border: 2px dashed var(--border); border-radius: var(--radius);
    padding: 42px 20px; text-align: center; cursor: pointer;
    background: rgba(255,255,255,.01); transition: border-color .15s ease;
}
.dropzone:hover, .dropzone.dragover { border-color: var(--accent); }
.dropzone-title { font-weight: 700; margin-bottom: 4px; }
.dropzone-mock { cursor: default; }
.canvas-wrap { text-align: center; margin: 16px 0; }
#canvas { max-width: 100%; border-radius: 12px; border: 1px solid var(--border); cursor: crosshair; }
.studio-workspace { margin-top: 6px; }

.ai-images { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; margin-top: 16px; }
.ai-images img { width: 100%; border-radius: 12px; border: 1px solid var(--border); display: block; }

.chat-log { background: var(--bg); border: 1px solid var(--border); border-radius: 12px; padding: 16px; min-height: 180px; max-height: 420px; overflow-y: auto; margin-bottom: 12px; }
.chat-msg { padding: 10px 14px; border-radius: 12px; margin-bottom: 10px; max-width: 85%; white-space: pre-wrap; }
.chat-bot { background: var(--panel2); }
.chat-user { background: linear-gradient(135deg, rgba(182,70,255,.35), rgba(255,61,154,.35)); margin-left: auto; }
.chat-input-row { display: flex; gap: 10px; }
.chat-input-row input { flex: 1; }

.ai-result { margin: 18px 0; }

/* Age gate overlay */
.gate-overlay {
    position: fixed; inset: 0; z-index: 1000;
    background: rgba(8, 4, 14, .72);
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
    display: flex; align-items: center; justify-content: center;
    padding: 20px;
}
.gate-card {
    display: flex; flex-direction: column; gap: 12px;
    width: min(560px, 94vw);
    background: rgba(27, 16, 48, .93);
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 30px 28px;
    text-align: center;
    box-shadow: 0 30px 90px rgba(0,0,0,.6);
}
.gate-card-clickable { cursor: pointer; color: var(--text); }
.gate-card-clickable:hover { border-color: var(--accent); text-decoration: none; }
.gate-age {
    align-self: center;
    display: inline-flex; align-items: center; justify-content: center;
    width: 64px; height: 64px; border-radius: 50%;
    border: 2px solid var(--accent2); color: var(--accent2);
    font-weight: 800; font-size: 1.15rem;
}
.gate-title { font-size: 1.5rem; font-weight: 800; }
.gate-text { color: var(--muted); font-size: .95rem; }
.gate-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-top: 6px; }
.btn-yes { background: linear-gradient(135deg, var(--accent), var(--accent2)); color: #fff; }
.btn-no { background: transparent; border-color: var(--border); color: var(--muted); }
.gate-hint { font-size: .82rem; }
.gate-card-clickable .btn { pointer-events: none; }

/* Footer */
.site-footer { border-top: 1px solid var(--border); margin-top: 40px; background: var(--bg2); }
.footer-inner { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 24px; padding: 34px 20px 10px; }
.footer-brand { font-weight: 800; }
.footer-title { font-weight: 700; margin-bottom: .4em; }
.footer-col a { display: block; color: var(--muted); font-size: .92rem; margin-bottom: 5px; }
.footer-col a:hover { color: var(--text); }
.footer-bottom { padding: 8px 20px 26px; }

/* Admin */
.admin-body { background: var(--bg2); }
.admin-header { background: var(--panel); border-bottom: 1px solid var(--border); }
.admin-header-inner { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; padding-top: 12px; padding-bottom: 12px; }
.admin-nav { display: flex; gap: 14px; flex-wrap: wrap; }
.admin-nav a { color: var(--muted); font-size: .92rem; font-weight: 600; }
.admin-nav a.active, .admin-nav a:hover { color: var(--text); text-decoration: none; }
.admin-nav a.danger:hover { color: var(--err); }
.admin-main { padding: 30px 0 60px; }
.admin-footer { border-top: 1px solid var(--border); padding: 16px 0; }
.admin-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; margin: 18px 0 26px; }
.admin-card { background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; }
.admin-card-title { font-weight: 700; margin-bottom: .5em; }
.admin-table { width: 100%; border-collapse: collapse; margin: 14px 0 24px; background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.admin-table th, .admin-table td { text-align: left; padding: 10px 14px; border-bottom: 1px solid var(--border); font-size: .94rem; vertical-align: middle; }
.admin-table th { background: var(--panel2); font-size: .82rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.admin-table tr:last-child td { border-bottom: none; }
.admin-table-wrap { overflow-x: auto; }
.admin-table-tools select { min-width: 210px; }
.admin-table-tools input { min-width: 180px; }
.admin-login-body { display: flex; align-items: center; justify-content: center; min-height: 100vh; }
.admin-login { width: min(420px, 92vw); }
.admin-login-panel { text-align: left; }
.admin-login .brand { justify-content: center; display: flex; margin-bottom: 12px; }

/* Admin dashboard: tools & help */
.mode-badge {
    display: inline-block; padding: 3px 10px; border-radius: 999px;
    font-size: .78rem; font-weight: 700; border: 1px solid var(--border);
    white-space: nowrap;
}
.badge-ok { color: var(--ok); border-color: rgba(47,210,125,.45); background: rgba(47,210,125,.08); }
.badge-warn { color: #ffb54d; border-color: rgba(255,181,77,.45); background: rgba(255,181,77,.08); }
.badge-neutral { color: var(--muted); }
.tool-links { white-space: nowrap; }
.tool-links .btn { margin: 2px 6px 2px 0; }
.help-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 16px; margin: 16px 0 30px; }
.help-block { background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px 20px; }
.help-block h3 { margin-top: 0; }

/* Responsive */
@media (max-width: 720px) {
    .hero h1 { font-size: 2rem; }
    .field-row { grid-template-columns: 1fr; }
    .footer-inner { grid-template-columns: 1fr; }
    .site-nav { gap: 12px; }
    .wrap { padding: 0 16px; }
}

/* Admin - dashboard tools & help */
.mode-badge { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: .8rem; font-weight: 700; border: 1px solid var(--border); white-space: nowrap; }
.badge-ok { color: var(--ok); border-color: rgba(47,210,125,.5); background: rgba(47,210,125,.08); }
.badge-warn { color: #ffb545; border-color: rgba(255,181,69,.5); background: rgba(255,181,69,.08); }
.badge-neutral { color: var(--muted); }
.tool-links { white-space: nowrap; }
.tool-links .btn { margin: 2px 6px 2px 0; }
.help-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 16px; margin: 16px 0 30px; }
.help-block { background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px 20px; }
.help-block h3 { margin-top: 0; }
