/* ChatBase login: premium, modern, a little playful. Everything is scoped to #cb_login or to the login modals. */
html, body { background: #0d0f16; }
/* the colours live on :root so the modals (which sit outside #cb_login) can use them too */
:root { --ink: #f5f6fa; --mute: #a3a9bd; --line: rgba(255,255,255,.1); --yellow: #ffc93c; --violet: #7b61ff; --cyan: #17c3ee; --pink: #ff6b9d; }
#cb_login {
	position: relative; min-height: 100vh; overflow: hidden; color: var(--ink);
	background: #0d0f16; padding: 0 0 20px;
}
#cb_login * { box-sizing: border-box; }
#login_wrap { height: auto; }

/* animated background */
.cb_bg { position: absolute; inset: 0; pointer-events: none; z-index: 0; }
.cb_blob { position: absolute; border-radius: 50%; filter: blur(80px); opacity: .5; animation: cbfloat 16s ease-in-out infinite; }
.cb_blob.b1 { width: 480px; height: 480px; left: -120px; top: -100px; background: radial-gradient(circle, var(--violet), transparent 70%); }
.cb_blob.b2 { width: 420px; height: 420px; right: -100px; top: 120px; background: radial-gradient(circle, var(--yellow), transparent 70%); opacity: .28; animation-delay: -5s; }
.cb_blob.b3 { width: 460px; height: 460px; left: 35%; bottom: -200px; background: radial-gradient(circle, var(--cyan), transparent 70%); opacity: .3; animation-delay: -10s; }
.cb_grid { position: absolute; inset: 0; background-image: radial-gradient(rgba(255,255,255,.07) 1px, transparent 1px); background-size: 28px 28px; mask-image: radial-gradient(ellipse at 50% 30%, #000 20%, transparent 75%); -webkit-mask-image: radial-gradient(ellipse at 50% 30%, #000 20%, transparent 75%); }
@keyframes cbfloat { 0%,100% { transform: translate(0,0) scale(1); } 50% { transform: translate(40px,30px) scale(1.12); } }

#cb_login > header, #cb_login > main, #cb_login > section, #cb_login > .cb_footer { position: relative; z-index: 1; }
.cb_top { display: flex; align-items: center; justify-content: space-between; max-width: 1180px; margin: 0 auto; padding: 22px 24px 0; }
#login_logo { height: 44px; width: auto; display: block; }
.cb_top_right { display: flex; align-items: center; gap: 10px; }
.cb_lang { width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line); background: rgba(255,255,255,.06); display: grid; place-items: center; cursor: pointer; padding: 0; }
.cb_lang img { width: 22px; height: auto; border-radius: 3px; display: block; }
.cb_lang:hover { background: rgba(255,255,255,.12); }

/* buttons */
.cb_btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 52px; padding: 0 26px; border: 0; border-radius: 16px; font: inherit; font-size: 17px; cursor: pointer; transition: transform .15s, box-shadow .2s, background .2s; color: var(--ink); }
.cb_btn:active { transform: translateY(1px) scale(.99); }
.cb_btn_primary { background: linear-gradient(135deg, var(--yellow), #ff9f43); color: #231a05; box-shadow: 0 10px 30px rgba(255,170,50,.35), inset 0 1px 0 rgba(255,255,255,.5); }
.cb_btn_primary:hover { transform: translateY(-2px); box-shadow: 0 16px 38px rgba(255,170,50,.45), inset 0 1px 0 rgba(255,255,255,.5); }
.cb_btn_ghost { background: rgba(255,255,255,.07); border: 1px solid var(--line); backdrop-filter: blur(8px); }
.cb_btn_ghost:hover { background: rgba(255,255,255,.14); }
.cb_btn_sm { min-height: 40px; padding: 0 18px; font-size: 15px; border-radius: 12px; }
.cb_link { border: 0; background: none; color: var(--yellow); font: inherit; cursor: pointer; padding: 0; text-decoration: underline; text-underline-offset: 3px; }

/* hero */
.cb_hero { max-width: 1180px; margin: 0 auto; padding: 46px 24px 30px; display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); gap: 40px; align-items: center; }
.cb_eyebrow { display: inline-flex; align-items: center; gap: 10px; margin: 0 0 20px; padding: 8px 16px 8px 14px; border: 1px solid var(--line); border-radius: 999px; background: rgba(255,255,255,.06); color: var(--mute); font-size: 14px; backdrop-filter: blur(8px); }
.cb_eyebrow b { color: var(--ink); }
.cb_live { width: 9px; height: 9px; border-radius: 50%; background: #3ddc84; box-shadow: 0 0 0 0 rgba(61,220,132,.6); animation: cbpulse 2s infinite; }
@keyframes cbpulse { 70% { box-shadow: 0 0 0 10px rgba(61,220,132,0); } 100% { box-shadow: 0 0 0 0 rgba(61,220,132,0); } }
.cb_title { font-size: clamp(40px, 5.6vw, 72px); line-height: 1.05; margin: 0 0 20px; font-weight: 400; letter-spacing: -.01em; }
.cb_swap { display: inline-block; position: relative; }
.cb_swap > span { display: inline-block; padding-bottom: .08em; background: linear-gradient(120deg, var(--yellow), var(--pink) 55%, var(--violet)); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; color: transparent; animation: cbin .5s ease both; }
@keyframes cbin { from { opacity: 0; transform: translateY(14px) rotate(-2deg); } to { opacity: 1; transform: none; } }
.cb_lead { max-width: 540px; margin: 0 0 28px; color: var(--mute); font-size: 18px; line-height: 1.6; }
.cb_cta { display: flex; flex-wrap: wrap; gap: 14px; }
.cb_guest { margin: 16px 0 0; color: var(--mute); font-size: 15px; }
.cb_trust { list-style: none; margin: 30px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.cb_trust li { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 999px; background: rgba(255,255,255,.05); border: 1px solid var(--line); color: var(--mute); font-size: 14px; }
.cb_trust i { color: var(--yellow); }
.cb_count { margin: 18px 0 0; color: var(--mute); font-size: 14px; }
.cb_count b { color: var(--ink); }

/* the playful chat card */
.cb_stage { position: relative; display: grid; place-items: center; min-height: 440px; perspective: 1200px; }
.cb_card { width: min(420px, 100%); border-radius: 28px; background: linear-gradient(160deg, rgba(255,255,255,.12), rgba(255,255,255,.04)); border: 1px solid rgba(255,255,255,.16); box-shadow: 0 30px 80px rgba(0,0,0,.5), inset 0 1px 0 rgba(255,255,255,.18); backdrop-filter: blur(18px); padding: 18px; transform: rotateY(-8deg) rotateX(4deg); animation: cbtilt 9s ease-in-out infinite; }
@keyframes cbtilt { 0%,100% { transform: rotateY(-8deg) rotateX(4deg) translateY(0); } 50% { transform: rotateY(-4deg) rotateX(2deg) translateY(-10px); } }
.cb_card_head { display: flex; align-items: center; gap: 12px; padding: 4px 4px 14px; border-bottom: 1px solid var(--line); }
.cb_card_head b { display: block; font-size: 17px; font-weight: 400; }
.cb_card_head small { color: var(--mute); font-size: 13px; }
.cb_dot { width: 12px; height: 12px; border-radius: 50%; background: #3ddc84; flex: none; }
.cb_stack { margin-left: auto; display: flex; }
.cb_stack i, .cb_msg > i, .cb_typing > i { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font-style: normal; font-size: 14px; color: #fff; flex: none; border: 2px solid #1a1d29; }
.cb_stack i + i { margin-left: -10px; }
.a1 { background: linear-gradient(135deg, #7b61ff, #b79bff); } .a2 { background: linear-gradient(135deg, #ffb347, #ff7e5f); } .a3 { background: linear-gradient(135deg, #17c3ee, #3ddc84); }
.cb_msgs { display: flex; flex-direction: column; gap: 14px; padding: 18px 2px; }
.cb_msg { display: flex; gap: 10px; align-items: flex-end; opacity: 0; animation: cbpop .5s ease forwards; }
.cb_msg.m1 { animation-delay: .4s; } .cb_msg.m2 { animation-delay: 1.4s; justify-content: flex-end; } .cb_msg.m3 { animation-delay: 2.4s; }
.cb_msg b { display: block; font-size: 12px; font-weight: 400; color: var(--mute); margin: 0 0 3px 4px; }
.cb_msg p { margin: 0; padding: 10px 14px; border-radius: 18px 18px 18px 6px; background: rgba(255,255,255,.1); font-size: 15px; line-height: 1.35; }
.cb_msg.mine p { border-radius: 18px 18px 6px 18px; background: linear-gradient(135deg, var(--violet), #9d86ff); }
.cb_react { display: inline-block; margin: 6px 0 0 4px; padding: 3px 10px; border-radius: 999px; background: rgba(255,255,255,.08); font-size: 12px; }
@keyframes cbpop { from { opacity: 0; transform: translateY(12px) scale(.96); } to { opacity: 1; transform: none; } }
.cb_typing { display: flex; gap: 10px; align-items: center; opacity: 0; animation: cbpop .5s 3.4s ease forwards; }
.cb_typing span { display: inline-flex; gap: 5px; padding: 12px 14px; border-radius: 18px; background: rgba(255,255,255,.1); }
.cb_typing u { width: 7px; height: 7px; border-radius: 50%; background: var(--mute); animation: cbdot 1.2s infinite; }
.cb_typing u:nth-child(2) { animation-delay: .15s; } .cb_typing u:nth-child(3) { animation-delay: .3s; }
@keyframes cbdot { 0%,60%,100% { transform: translateY(0); opacity: .5; } 30% { transform: translateY(-5px); opacity: 1; } }
.cb_input { display: flex; align-items: center; justify-content: space-between; height: 48px; padding: 0 8px 0 18px; border-radius: 999px; background: rgba(0,0,0,.28); border: 1px solid var(--line); color: var(--mute); font-size: 15px; }
.cb_input em { width: 34px; height: 34px; border-radius: 50%; background: linear-gradient(135deg, var(--yellow), #ff9f43); display: grid; place-items: center; color: #231a05; font-style: normal; font-size: 14px; }
.cb_float { position: absolute; width: 58px; height: 58px; border-radius: 20px; display: grid; place-items: center; font-size: 28px; background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.18); backdrop-filter: blur(10px); box-shadow: 0 14px 34px rgba(0,0,0,.4); animation: cbbob 6s ease-in-out infinite; z-index: 2; }
.cb_float.f1 { left: 2%; top: 14%; } .cb_float.f2 { right: 4%; top: 6%; animation-delay: -2s; transform: rotate(8deg); } .cb_float.f3 { right: 8%; bottom: 8%; animation-delay: -4s; }
@keyframes cbbob { 0%,100% { translate: 0 0; } 50% { translate: 0 -14px; } }

/* features */
.cb_features { max-width: 1180px; margin: 0 auto; padding: 40px 24px 10px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.cb_feat { padding: 26px; border-radius: 24px; background: linear-gradient(160deg, rgba(255,255,255,.08), rgba(255,255,255,.03)); border: 1px solid var(--line); transition: transform .2s, border-color .2s; }
.cb_feat:hover { transform: translateY(-4px); border-color: rgba(255,255,255,.22); }
.cb_feat h3 { margin: 16px 0 8px; font-size: 21px; font-weight: 400; }
.cb_feat p { margin: 0; color: var(--mute); line-height: 1.55; font-size: 15px; }
.cb_ic { width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center; font-size: 22px; color: #fff; }
.ic1 { background: linear-gradient(135deg, #7b61ff, #b79bff); } .ic2 { background: linear-gradient(135deg, #ff6b9d, #ff9f7a); } .ic3 { background: linear-gradient(135deg, #17c3ee, #3ddc84); }

/* the "roll me a name" band */
.cb_band { max-width: 1132px; margin: 30px auto 0; padding: 32px 36px; border-radius: 28px; display: flex; align-items: center; justify-content: space-between; gap: 24px; background: linear-gradient(120deg, rgba(123,97,255,.35), rgba(255,107,157,.25) 60%, rgba(255,201,60,.25)); border: 1px solid rgba(255,255,255,.18); }
.cb_band h2 { margin: 0 0 6px; font-size: 28px; font-weight: 400; }
.cb_band p { margin: 0; color: #d6d9e6; }
.cb_dice { display: inline-block; font-size: 22px; }
.cb_btn:hover .cb_dice { animation: cbroll .6s ease; }
@keyframes cbroll { to { transform: rotate(360deg) scale(1.2); } }
.cb_footer { margin-top: 20px; }
.cb_footer a, .cb_footer span, .cb_footer p { color: var(--mute); }

/* ---- the sign-in / register / guest modals, restyled to match (ONE card: the stock frame is the card, the inside is plain) ---- */
.small_modal_out, .large_modal_out { background: rgba(8,9,14,.72) !important; backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
#small_modal_in, #large_modal_in { border-radius: 26px !important; background: #171a25 !important; color: #f5f6fa; border: 1px solid rgba(255,255,255,.12) !important; box-shadow: 0 30px 90px rgba(0,0,0,.6); }
#small_modal_in { padding: 30px 28px 24px !important; max-width: 440px; }
#small_modal_content, #large_modal_content { background: none !important; border: 0 !important; border-radius: 0 !important; box-shadow: none !important; padding: 0 !important; overflow: visible; color: #f5f6fa !important; }
#small_modal_in .modal_close { top: 14px; right: 14px; width: 38px; height: 38px; border-radius: 50%; background: rgba(255,255,255,.07); color: #cfd3e3; display: grid; place-items: center; }
#small_modal_in .modal_close:hover { background: rgba(255,255,255,.16); color: #fff; }
#small_modal_in .modal_close .bcell_mid { display: block; }
#small_modal_content .modal_title { padding: 0 40px 12px 0; font-size: 26px; font-weight: 400; background: none; border: 0; color: #f5f6fa; }
#small_modal_content .modal_content, #small_modal_content .modal_control { padding-left: 0; padding-right: 0; background: none; border: 0; }
#small_modal_content .modal_control { padding-top: 10px; padding-bottom: 0; }
#small_modal_content .full_input { height: 52px; border-radius: 14px; padding: 0 16px; background: rgba(255,255,255,.06) !important; border: 1px solid rgba(255,255,255,.14) !important; color: #fff; font-size: 16px; }
#small_modal_content .full_input:focus { border-color: var(--yellow) !important; box-shadow: 0 0 0 3px rgba(255,201,60,.22); }
#small_modal_content select { border-radius: 12px; }
#small_modal_content .theme_btn, #small_modal_content .large_button { border-radius: 14px; min-height: 52px; border: 0; font-size: 17px; background: linear-gradient(135deg, var(--yellow), #ff9f43) !important; color: #231a05 !important; box-shadow: 0 10px 26px rgba(255,170,50,.3); }
#small_modal_content .sub_text, #small_modal_content .rules_text { color: #a3a9bd; }

/* generator controls added by login.js */
.cb_field { position: relative; }
.cb_field .full_input { padding-right: 56px; }
.cb_dice_btn { position: absolute; right: 7px; top: 7px; width: 36px; height: 36px; border-radius: 11px; border: 0; background: rgba(255,201,60,.16); color: var(--yellow); font-size: 19px; cursor: pointer; display: grid; place-items: center; transition: transform .2s, background .2s; }
.cb_dice_btn:hover { background: rgba(255,201,60,.3); transform: rotate(18deg) scale(1.06); }
.cb_dice_btn.spin { animation: cbroll .5s ease; }
.cb_pw_tools { display: flex; align-items: center; gap: 8px; margin: 10px 0 0; flex-wrap: wrap; }
.cb_chip { border: 1px solid rgba(255,255,255,.16); background: rgba(255,255,255,.06); color: #f5f6fa; border-radius: 999px; padding: 7px 14px; font: inherit; font-size: 14px; cursor: pointer; display: inline-flex; align-items: center; gap: 7px; }
.cb_chip:hover { background: rgba(255,255,255,.14); }
.cb_chip.main { background: rgba(255,201,60,.16); border-color: rgba(255,201,60,.45); color: var(--yellow); }
.cb_meter { display: none; height: 5px; border-radius: 4px; background: rgba(255,255,255,.1); margin: 12px 0 0; overflow: hidden; }
.cb_meter.on { display: block; }
.cb_meter i { display: block; height: 100%; width: 0; border-radius: 4px; background: #ff5d5d; transition: width .25s, background .25s; }
.cb_tip { margin: 8px 0 0; font-size: 13px; color: #a3a9bd; }
.cb_tip:empty { display: none; }

@media (max-width: 960px) {
	.cb_hero { grid-template-columns: 1fr; padding-top: 28px; }
	.cb_stage { min-height: 0; padding: 26px 0 6px; }
	.cb_card { transform: none; animation: none; }
	.cb_features { grid-template-columns: 1fr; }
	.cb_band { flex-direction: column; align-items: flex-start; margin: 26px 16px 0; padding: 26px; }
}
@media (max-width: 560px) {
	.cb_top { padding: 16px 16px 0; } .cb_hero { padding: 22px 16px 10px; }
	.cb_btn { width: 100%; } .cb_cta { flex-direction: column; }
	.cb_float { display: none; }
	.cb_features { padding: 26px 16px 6px; }
}
@media (prefers-reduced-motion: reduce) {
	.cb_blob, .cb_card, .cb_float, .cb_live, .cb_typing u { animation: none !important; }
	.cb_msg, .cb_typing { animation: none !important; opacity: 1; }
}
