/* =========================================================
   otticmedia promptclub — Dark & Elegant Theme
   Palette & tone adapted from restyle.css
   ========================================================= */

/* --- Base & Variables --- */
:root{
  --bg-color:#121212;
  --card-bg:#1e1e1e;
  --input-bg:#282828;
  --text-color:#ffffff;
  --text-muted:#b3b3b3;
  /* ORANGE accent (from logo) */
  --accent:#F7931A;             /* primary orange */
  --accent-hover:#FFAB2E;       /* lighter hover */
  --ring: rgba(247,147,26,.45);  /* focus ring */
  --border:#383838;
  --focus: var(--accent);
  --error:#f44336;
  --radius:12px;
  --shadow: 0 10px 30px rgba(0,0,0,.35);
}

*{box-sizing:border-box}
html{scroll-behavior:smooth}
body{
  margin:0; font-family:'Poppins', system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, 'Apple Color Emoji','Segoe UI Emoji';
  background:var(--bg-color); color:var(--text-color); line-height:1.6;
  display:flex; justify-content:center; min-height:100vh; padding:20px;
}
.container{ width:100%; max-width:1200px; margin:0 auto; padding:20px }

/* --- Typography & Links --- */
h1,h2,h3{margin:0 0 .8em 0; font-weight:600}
h1{font-size:2.2rem; letter-spacing:.3px; color:var(--accent); text-align:center; margin-bottom:32px}
h2{font-size:1.4rem; color:var(--text-color)}
h3{font-size:1.05rem; color:var(--text-color)}
p{color:var(--text-muted)}
a{color:var(--accent); text-decoration:none; transition:color .2s ease}
a:hover{color:var(--accent-hover)}

/* --- Layout helpers --- */
.row{display:flex; align-items:center; gap:10px; flex-wrap:wrap}
.grid{display:grid; gap:18px; grid-template-columns:repeat(auto-fill,minmax(280px,1fr))}
@media (min-width: 760px){ .grid{gap:22px; grid-template-columns:repeat(auto-fill,minmax(320px,1fr))} }

/* --- Site header --- */
.site{display:flex; align-items:center; justify-content:space-between; margin-bottom:18px}
.brand{font-weight:700; letter-spacing:.5px; color:#fff}
.site .btn.secondary{margin-left:auto}

/* --- Card --- */
.card{
  background:var(--card-bg); border:1px solid var(--border); border-radius:var(--radius);
  padding:16px; box-shadow: 0 6px 18px rgba(0,0,0,.25);
}

/* --- Inputs --- */
.input, input.input, textarea.input, select.input{
  width:100%;
  padding:10px 14px;
  min-height:42px;                 /* same visual height as filter inputs */
  border-radius:10px;
  background:var(--input-bg);
  color:var(--text-color);
  border:1px solid var(--border);
  outline:none;
  transition:border-color .15s, box-shadow .15s;
}
.input::placeholder{color:var(--text-muted); opacity:.8}
.input:focus{border-color:var(--focus); box-shadow:0 0 0 2px var(--ring)}
textarea.input{min-height:120px; resize:vertical}

/* --- Buttons --- */
.btn{
  display:inline-flex; align-items:center; justify-content:center; gap:8px;
  padding:10px 18px; border-radius:999px; border:1px solid transparent;
  background:var(--accent); color:#fff; cursor:pointer; font-weight:600;
  transition:background .15s, transform .08s, box-shadow .2s;
  box-shadow:0 10px 26px rgba(29,185,84,.18);
}
.btn:hover{background:var(--accent-hover); transform:translateY(-1px)}
.btn:active{transform:translateY(0)}
.btn.secondary, .btn-secondary{
  background:var(--input-bg); color:var(--text-muted); border:1px solid var(--border);
  box-shadow:none;
}
.btn.secondary:hover, .btn-secondary:hover{color:#fff; border-color:#4b5563; background:#2c2c2c}
.btn.danger{background:transparent; color:var(--error); border:1px solid var(--error)}
.btn.danger:hover{background:rgba(244,67,54,.12)}
.kbd{font-family:ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; background:#111; padding:2px 6px; border-radius:6px}

/* --- Chips / pills --- */
.pill{
  display:inline-flex; align-items:center; padding:6px 10px; border-radius:999px;
  background:#0f172a; color:#cbd5e1; border:1px solid #202938; font-size:.85rem;
}

/* --- Toast --- */
.toast{
  position:fixed; left:50%; transform:translateX(-50%);
  bottom:28px; background:var(--accent); color:#fff; padding:10px 18px; border-radius:999px;
  box-shadow:0 10px 26px rgba(29,185,84,.25); opacity:0; pointer-events:none; transition:opacity .2s, bottom .2s; z-index:1001;
}
.toast.show{opacity:1; bottom:36px}

/* --- Slideshow (catalog mini & prompt large) --- */
.slideshow{ display:block; position:relative; width:100%; aspect-ratio:4/3; border-radius:12px; overflow:hidden; background:#0b0b0b; }
.slideshow:not(.large) img{ position:absolute; inset:0; width:100%; height:100%; object-fit:cover; opacity:0; transition:opacity .6s ease; }
.slideshow:not(.large) img.active{ opacity:1 }

.slideshow.large{ position:relative; aspect-ratio:16/9; background:#0b0b0b; border:1px solid var(--border) }
.slideshow.large img{ position:absolute; inset:0; width:100%; height:100%; object-fit:cover; opacity:0; transition:opacity .4s ease }
.slideshow.large img.active{ opacity:1 }

/* Arrow buttons */
.slide-btn{
  position:absolute; top:50%; transform:translateY(-50%);
  width:40px; height:40px; border:0; border-radius:999px;
  display:grid; place-items:center; cursor:pointer; z-index:6;
  background:rgba(0,0,0,.45); transition:background .15s, transform .08s;
}
.slide-btn:hover{ background:rgba(0,0,0,.6); transform:translateY(calc(-50% - 1px)) }
.slide-btn svg{ width:22px; height:22px; fill:#fff; pointer-events:none }
.slide-btn.prev{ left:10px }
.slide-btn.next{ right:10px }

/* Dots */
.slide-dots{
  position:absolute; left:50%; transform:translateX(-50%); bottom:10px; display:flex; gap:8px; z-index:5;
}
.slide-dots .dot{
  width:8px; height:8px; border-radius:999px; background:rgba(255,255,255,.35); border:0; cursor:pointer;
  transition:transform .1s, background .15s;
}
.slide-dots .dot.active{ background:#fff; transform:scale(1.1) }

/* --- Prompt reveal / content --- */
.prompt-reveal{
  margin-top:10px; padding:16px; border-radius:12px; text-align:center; cursor:pointer; user-select:none;
  background:linear-gradient(180deg, rgba(40,40,40,1) 0%, rgba(32,32,32,1) 100%);
  border:1px dashed #414141; color:#d1d5db; letter-spacing:.3px;
  transition:transform .08s ease, border-color .15s ease, color .15s ease;
}
.prompt-reveal:hover{ transform:translateY(-1px); border-color:#666; color:#fff }

.prompt-content{
  background:var(--input-bg); color:#e5e7eb; border:1px solid var(--border); border-radius:12px;
  padding:14px; white-space:pre-wrap;
}

/* --- Paywall block --- */
.paywall .row{ gap:8px }
.paywall input.input{ max-width:260px }

/* --- Admin: trash button on cards (white bg, 1px black border as requested) --- */
.card{ position:relative }
.admin-trash{
  position:absolute; top:8px; right:8px; width:36px; height:36px;
  border:1px solid #000; border-radius:999px; background:#fff;
  display:grid; place-items:center; cursor:pointer; z-index:7;
  box-shadow:0 6px 18px rgba(2,6,23,.18);
  transition:transform .08s ease, box-shadow .15s ease;
}
.admin-trash:hover{ transform:translateY(-1px); box-shadow:0 10px 24px rgba(2,6,23,.28) }
.admin-trash:focus{ outline:2px solid var(--ring); outline-offset:2px }
.admin-trash svg{ width:18px; height:18px; fill:#b91c1c; pointer-events:none }

/* --- Tables (admin subscribers) --- */
.nice-table{ width:100%; border-collapse:separate; border-spacing:0 10px }
.nice-table th{ text-align:left; font-weight:600; color:#94a3b8; padding:6px 10px }
.nice-table td{ background:var(--card-bg); border:1px solid var(--border); border-radius:12px; padding:12px; color:#e5e7eb }
.status-pill{ display:inline-flex; align-items:center; gap:6px; padding:6px 10px; border-radius:999px; font-size:.85rem }
.status-free{ background:#0f172a; color:#cbd5e1; border:1px solid #1f2937 }
.status-pro{ background:#052e1a; color:#a7f3d0; border:1px solid #064e3b }

/* --- Filters bar (full-width, responsive, no horizontal scroll) --- */
form.filters{
  width:100%;
  background:var(--card-bg); border:1px solid var(--border); border-radius:12px; padding:12px 12px;
  display:flex; align-items:center; gap:10px; flex-wrap:wrap;
}
form.filters .filter-input{
  flex:1 1 200px;                  /* stretch nicely, wrap on small screens */
  min-width:160px;
}
form.filters .btn{ flex:0 0 auto }

/* --- Footer --- */
footer{ text-align:center; margin-top:26px; padding-top:18px; border-top:1px solid var(--border); color:var(--text-muted); font-size:.9rem }

/* --- Accessibility focus ring utility --- */
:focus-visible{ outline:2px solid var(--ring); outline-offset:2px }

/* --- Responsive tweaks --- */
@media (max-width:768px){
  body{padding:14px} .container{padding:14px}
  h1{font-size:1.8rem}
  .slideshow.large{aspect-ratio:3/2}
  form.filters .filter-input{ flex:1 1 120px; min-width:120px }
}

.brand img{ height:200px; display:block }
@media (max-width:768px){ .brand img{ height:36px } }

/* header brand image, placed where the old SVG was */
.site .brand img{ height:88px; display:block }
@media (max-width:768px){ .site .brand img{ height:72px } }

.brand-large img{ height:96px; display:block }
@media (max-width:768px){ .brand-large img{ height:72px } }

/* Top bar styling under the logo */
.topbar{
  display:flex; align-items:center; justify-content:space-between;
  background:var(--card-bg); border:1px solid var(--border);
  border-radius:12px; padding:10px 12px; margin-bottom:16px;
}
.topbar .title{ margin:0; font-size:1.25rem; color:#fff }

/* === Spacing between fields === */
.card form:not(.row), form.stack{
  display:grid;
  grid-auto-flow: row;
  grid-template-columns: 1fr;
  gap:12px;
}
form.row{ gap:10px }
form .row{ gap:10px }
.card form .btn{ align-self:start }

/* ===== Modal overlay (confirm dialog) ===== */
.modal-open { overflow: hidden; }
.modal-overlay{
  position:fixed; inset:0; z-index:9999;
  display:none; align-items:center; justify-content:center;
  background:rgba(0,0,0,.55);
  backdrop-filter: blur(2px);
  animation: fadeIn .15s ease-out both;
}
.modal-overlay.show{ display:flex; }
.modal{
  width:min(520px, 92vw);
  background:var(--card-bg, #161616);
  color:var(--text-color, #e5e7eb);
  border:1px solid var(--border, #2c2c2c);
  border-radius:16px;
  padding:20px 18px;
  box-shadow: 0 20px 60px rgba(0,0,0,.45), 0 0 0 1px rgba(255,255,255,.03) inset;
  transform: translateY(8px);
  animation: slideUp .18s ease-out both;
}
.modal-title{ font-size:1.1rem; font-weight:700; margin:0 0 6px; }
.modal-desc{ opacity:.9; margin:0 0 14px; line-height:1.5; }
.modal-actions{ display:flex; gap:10px; justify-content:flex-end; margin-top:6px; }
.btn.danger{ background:#ef4444; color:#fff; border:1px solid transparent; }
.btn.danger:hover{ filter:brightness(1.08); transform: translateY(-1px); }
@keyframes fadeIn { from{ opacity:0 } to{ opacity:1 } }
@keyframes slideUp { from{ transform:translateY(8px); opacity:.98 } to{ transform:translateY(0); opacity:1 } }

/* --- Chips under card images --- */
.chips{display:flex;flex-wrap:wrap;gap:8px;margin-top:8px}

/* Base chip style (works for both .chip and legacy .pill) */
.chip, .pill{
  display:inline-flex;align-items:center;
  padding:6px 10px;border-radius:999px;line-height:1;
  font-size:.9rem;font-weight:500;
  background:#0c1422;border:1px solid #27344a;color:#dbe4f3;
  box-shadow:0 1px 0 rgba(255,255,255,.04) inset,0 1px 2px rgba(0,0,0,.22);
}

/* Category chip — brighter background + orange accent */
.chip.cat, .pill.cat{
  background:#1a1f27;               /* brighter than before */
  border-color:#f59e0b;
  color:#f59e0b;
  font-weight:700;
}

/* Optional hover for better micro-interaction */
.chip:hover, .pill:hover{filter:brightness(1.08)}
