/*
Theme Name: Stranger Chat
Theme URI: https://example.com/
Author: You
Description: A front-end theme for anonymous "talk to a stranger" chat sites. Includes an 18+ age gate, interest tags, a live chat window, skip/report controls, and a [stranger_chat] shortcode. Real-time messaging needs a backend (see assets/chat.js).
Version: 1.0.0
Requires at least: 6.0
Requires PHP: 7.4
License: GPLv2 or later
Text Domain: strangerchat
*/
:root{--bg:#ECEAF6;--ink:#231B3A;--muted:#6B6485;--card:#fff;--you:#FF5C7A;--them:#1FB5A6;--line:#D8D3EB;--r:18px}
*{box-sizing:border-box}
html{scroll-behavior:smooth}
body{margin:0;background:var(--bg);color:var(--ink);font:17px/1.6 "Figtree",system-ui,sans-serif}
h1,h2,h3,.brand{font-family:"Bricolage Grotesque","Figtree",system-ui,sans-serif;line-height:1.1;letter-spacing:-.02em}
a{color:inherit}
:focus-visible{outline:3px solid var(--you);outline-offset:2px}
.wrap{max-width:1080px;margin:0 auto;padding:0 20px}
.site-header{padding:18px 0}
.site-header .wrap{display:flex;align-items:center;justify-content:space-between;gap:16px}
.brand{font-size:1.5rem;font-weight:800;text-decoration:none}
.brand i{display:inline-block;width:.6em;height:.6em;border-radius:50%;background:var(--them);margin-right:.35em;box-shadow:.55em .25em 0 -.05em var(--you)}
.main-nav ul{display:flex;gap:20px;list-style:none;margin:0;padding:0}
.main-nav a{text-decoration:none;color:var(--muted)}
.main-nav a:hover{color:var(--ink)}
.hero{display:grid;grid-template-columns:1fr 1.05fr;gap:40px;align-items:center;padding:30px 0 60px}
.hero h1{font-size:clamp(2.4rem,5.5vw,4.2rem);margin:0 0 16px}
.hero p{color:var(--muted);max-width:44ch;margin:0 0 20px}
.tags{display:flex;flex-wrap:wrap;gap:8px;margin:0 0 20px}
.tag{border:1.5px solid var(--line);background:var(--card);color:var(--ink);padding:6px 14px;border-radius:99px;font:inherit;font-size:.92rem;cursor:pointer}
.tag[aria-pressed=true]{background:var(--ink);border-color:var(--ink);color:#fff}
.btn{display:inline-block;border:0;border-radius:99px;padding:14px 28px;font:600 1rem "Figtree",sans-serif;background:var(--you);color:#fff;cursor:pointer;text-decoration:none}
.btn:hover{filter:brightness(.95)}
.btn.ghost{background:transparent;color:var(--ink);border:1.5px solid var(--line)}
.btn[disabled]{opacity:.5;cursor:not-allowed}
.online{color:var(--muted);font-size:.9rem;margin-top:14px}
.online b{display:inline-block;width:.6em;height:.6em;border-radius:50%;background:var(--them);margin-right:.4em}
/* chat */
.chat{background:var(--card);border-radius:24px;box-shadow:0 24px 60px -24px rgba(35,27,58,.35);display:flex;flex-direction:column;height:520px;overflow:hidden}
.chat-top{display:flex;justify-content:space-between;align-items:center;padding:14px 18px;border-bottom:1px solid var(--line)}
.chat-status{font-weight:600}
.chat-top button{background:none;border:0;color:var(--muted);cursor:pointer;font:inherit;font-size:.9rem;padding:4px 8px}
.chat-top button:hover{color:var(--you)}
.log{flex:1;overflow-y:auto;padding:18px;display:flex;flex-direction:column;gap:10px}
.msg{max-width:78%;padding:10px 15px;border-radius:var(--r);overflow-wrap:anywhere}
.msg.you{align-self:flex-end;background:var(--you);color:#fff;border-bottom-right-radius:4px}
.msg.them{align-self:flex-start;background:#E4F6F4;border-bottom-left-radius:4px}
.msg.sys{align-self:center;color:var(--muted);font-size:.88rem;text-align:center}
.typing{align-self:flex-start;color:var(--muted);font-size:.88rem}
.composer{display:flex;gap:10px;padding:14px;border-top:1px solid var(--line)}
.composer input{flex:1;border:1.5px solid var(--line);border-radius:99px;padding:12px 18px;font:inherit;min-width:0}
.composer input:disabled{background:#F6F5FB}
/* gate */
.gate{position:fixed;inset:0;background:rgba(35,27,58,.7);display:none;align-items:center;justify-content:center;padding:20px;z-index:50}
.gate.open{display:flex}
.gate div{background:var(--card);border-radius:24px;padding:32px;max-width:440px}
.gate h2{margin:0 0 10px}
.gate p{color:var(--muted);margin:0 0 20px}
.gate .row{display:flex;gap:10px;flex-wrap:wrap}
/* content */
.rules{padding:20px 0 60px}
.rules h2{font-size:2rem;margin:0 0 18px}
.rules ul{margin:0;padding-left:1.2em;max-width:60ch;color:var(--muted)}
.rules li{margin-bottom:8px}
.page{max-width:720px;margin:20px auto 60px;padding:0 20px}
.page h1{font-size:2.4rem}
.site-footer{border-top:1px solid var(--line);padding:26px 0;color:var(--muted);font-size:.9rem}
.site-footer .wrap{display:flex;justify-content:space-between;flex-wrap:wrap;gap:12px}
@media(max-width:820px){.hero{grid-template-columns:1fr}.chat{height:480px}}
@media(prefers-reduced-motion:reduce){*{scroll-behavior:auto!important}}
