/*
 * HabTab "Sakura" theme: cherry-blossom pink on deep plum, layered over the dusk theme.
 * Loaded after the dusk Vite bundle (layouts/app.blade.php, client/nitro.blade.php), so the theme needs no
 * Tailwind rebuild. It recolours dusk's fixed colours (Tailwind arbitrary classes such as bg-[#2b303c] and the
 * grays/yellows) and gives the light-mode shared views (help center, applications, ...) the same dark surfaces.
 * Colours: the --sk-* tokens below. Remove the <link> to go back to plain dusk.
 */
:root {
    --sk-bg: #241b27;
    --sk-header: #1b141e;
    --sk-header-2: #22182a;
    /* Surfaces are slightly see-through "glass" over the fixed Sakura scene */
    --sk-surface: rgba(52, 36, 58, .8);
    --sk-surface-2: rgba(40, 28, 45, .84);
    --sk-surface-deep: rgba(30, 21, 34, .86);
    --sk-surface-glass: rgba(30, 21, 34, .62);
    --sk-glass-blur: blur(10px) saturate(125%);
    --sk-line: #f4a7c01f;
    --sk-line-strong: #f4a7c040;
    --sk-text: #fdf2f6;
    --sk-text-soft: #ecd6e0;
    --sk-muted: #b99cad;
    --sk-faint: #8c7282;
    --sk-pink: #f4a7c0;
    --sk-pink-soft: #ffd3e1;
    --sk-pink-glow: #f4a7c033;
    --sk-rose: #e86a92;
    --sk-rose-dark: #cf5079;
    --sk-rose-border: #f792b3;
    --sk-plum: #8a4a6c;
    --sk-plum-dark: #74395a;
    --sk-plum-border: #b56d93;
    --sk-primary-gradient: linear-gradient(180deg, #f07ea2 0%, #e2628c 100%);
    --sk-primary-gradient-hover: linear-gradient(180deg, #e56d94 0%, #cf5079 100%);
    --swiper-theme-color: #f4a7c0;
    color-scheme: dark;
}

::selection { background: #e86a9266; color: #fff; }
html { scrollbar-color: #8a4a6c #1b141e; }

/* ---------- Fixed Sakura scene behind every page ----------
 * html: base colour; body::before: evening sky + blossom branches (assets/images/sakura/*.svg, made by
 * C:\Backups\tmp\make-sakura-branches.php); body::after: drifting petals. Both fixed, behind all content. */
html { background-color: #211824; }
body { background: transparent; }
body::before, body::after { content: ""; position: fixed; inset: 0; pointer-events: none; }
body::before {
    z-index: -2;
    background:
        url("../images/sakura/branch-left.svg") no-repeat left -60px top 168px / min(54vw, 800px) auto,
        url("../images/sakura/branch-right.svg") no-repeat right -120px top 52vh / min(42vw, 600px) auto,
        radial-gradient(circle at 80% 14%, rgba(255, 214, 228, .26) 0, rgba(255, 214, 228, .08) 9%, transparent 22%),
        radial-gradient(ellipse 90% 50% at 50% 108%, rgba(232, 106, 146, .28), transparent 70%),
        radial-gradient(ellipse 60% 40% at 15% 35%, rgba(244, 167, 192, .1), transparent 70%),
        linear-gradient(180deg, #2a152f 0%, #3b1c39 32%, #4b2442 58%, #2c1b2e 84%, #211824 100%);
}
body::after {
    z-index: -1;
    opacity: .38;
    background: url("../images/sakura/petals.svg") repeat 0 0 / 420px 480px, url("../images/sakura/petals.svg") repeat 150px 90px / 300px 346px;
    animation: sk-petals 70s linear infinite;
}
@keyframes sk-petals {
    from { background-position: 0 0, 150px 90px; }
    to { background-position: 420px 1920px, -150px 1474px; }
}
@media (max-width: 767px) {
    body::before {
        background-size: 120vw auto, 80vw auto, auto, auto, auto, auto;
        background-position: left -30vw top 118px, right -40vw top 62vh, 0 0, 0 0, 0 0, 0 0;
    }
}
@media (prefers-reduced-motion: reduce) { body::after { animation: none; } }
/* Not behind the game client (it fills the screen; no animation running while playing) */
body#nitro-client::before, body#nitro-client::after { display: none; }

#app, #app.bg-\[\#262a35\], .bg-\[\#262a35\] { background: transparent; }
/* The dusk header picture (Habbo street) gives way to the Sakura scene */
.site-bg { display: none; }

.nav-header {
    background: rgba(27, 20, 30, .78);
    -webkit-backdrop-filter: var(--sk-glass-blur);
    backdrop-filter: var(--sk-glass-blur);
    border-bottom: 1px solid var(--sk-line);
}
.nav-header a.active, .nav-header div.active { color: var(--sk-pink); }
.nav-header a:hover, .nav-header .dropdown-parent:hover { color: var(--sk-pink-soft); }
.nav-header :is(a, button):focus-visible, .sub-header :is(a, button):focus-visible { outline-color: var(--sk-pink); }
.nav-header .dropdown-children, .bg-\[\#ac93da\] {
    background: linear-gradient(180deg, #e9789d 0%, #c9567f 100%);
    box-shadow: 0 10px 24px #0007, inset 0 0 0 1px #ffffff26;
}
.dropdown-item:hover, .hover\:bg-\[\#8770b2\]:hover { background-color: #ffffff2e; }

.sub-header { background: linear-gradient(90deg, transparent, #f4a7c00d 50%, transparent); }
.sub-header a:hover { color: var(--sk-pink-soft); }

/* ---------- Surfaces (glass over the scene) ---------- */
:is(.bg-\[\#2b303c\], .bg-gray-900\/50, .rounded-lg.bg-\[\#21242e\], .rounded-xl.bg-\[\#21242e\], .ltd-card, .ltd-panel, .ltd-empty, .mp-card, .mp-panel, .mp-empty, .ltd-drop-widget, .potw-widget) {
    -webkit-backdrop-filter: var(--sk-glass-blur);
    backdrop-filter: var(--sk-glass-blur);
}
.bg-\[\#2b303c\], .bg-\[\#233143\] { background-color: var(--sk-surface); }
.bg-\[\#21242e\] { background-color: var(--sk-surface-2); }
.bg-\[\#21242e\]\/90 { background-color: rgba(42, 31, 47, .9); }
.bg-\[\#171a23\] { background-color: var(--sk-surface-deep); }
.bg-\[\#171a23\]\/95 { background-color: rgba(31, 23, 35, .95); }
.bg-gray-900 { background-color: var(--sk-surface-deep); }
.bg-gray-900\/50 { background-color: var(--sk-surface-glass); }
.bg-gray-800 { background-color: var(--sk-surface-2); }
.bg-gray-700 { background-color: #3d2d44; }
.hover\:bg-gray-900:hover { background-color: var(--sk-surface-deep); }
.hover\:bg-gray-800:hover { background-color: var(--sk-surface-2); }
.hover\:bg-gray-700:hover { background-color: #45324d; }
footer, footer.bg-gray-900 { height: auto; min-height: 3.5rem; padding: 12px 16px; text-align: center; background-color: rgba(27, 20, 30, .8); -webkit-backdrop-filter: var(--sk-glass-blur); backdrop-filter: var(--sk-glass-blur); border-top: 1px solid var(--sk-line); }

.border-gray-900, .border-gray-800, .border-gray-700, .border-gray-600 { border-color: var(--sk-line-strong); }
.divide-gray-700 > :not(:last-child) { border-color: var(--sk-line-strong); }
/* Plain "border" takes the (light) text colour in Tailwind 4; the shared views only set a dark: colour */
.border.dark\:border-gray-900, .border:not([class*="border-"]) { border-color: var(--sk-line); }

.text-gray-100 { color: var(--sk-text); }
.text-gray-200, .text-gray-300 { color: var(--sk-text-soft); }
.text-gray-400, .text-gray-500 { color: var(--sk-muted); }
.hover\:text-gray-400:hover { color: var(--sk-pink-soft); }
.hover\:text-\[\#ac93da\]:hover, .hover\:text-\[\#eeb425\]:hover { color: var(--sk-pink); }
.text-yellow-400, .text-yellow-500 { color: var(--sk-pink-soft); }
#article-content a, .prose a { color: var(--sk-pink); }

/* Light-mode shared views (help center, applications, password pages, ...): same dark surfaces as dusk. */
main .bg-white { background-color: var(--sk-surface); }
main .bg-gray-50, main .bg-gray-100, main .bg-gray-200 { background-color: var(--sk-surface-2); }
main .border-gray-200, main .border-gray-300 { border-color: var(--sk-line-strong); }
main .bg-white .text-gray-900, main .bg-white .text-gray-800, main .bg-white .text-gray-700, main .bg-white .text-black,
main .bg-gray-100 .text-gray-900, main .bg-gray-100 .text-gray-800 { color: var(--sk-text); }
main .bg-white .text-gray-500, main .bg-white .text-gray-600 { color: var(--sk-muted); }
main .hover\:bg-gray-200:hover, main .hover\:bg-gray-100:hover { background-color: #45324d; }

/* ---------- Buttons ---------- */
/* Primary (was yellow) */
.bg-\[\#eeb425\], .bg-yellow-500, .bg-\[\#e9b124\], .bg-\[\#f68b08\] {
    background-color: var(--sk-rose);
    background-image: var(--sk-primary-gradient);
    color: #fff;
}
.hover\:bg-\[\#d49f1c\]:hover, .hover\:bg-\[\#e3aa1e\]:hover, .hover\:bg-\[\#eeb425\]:hover, .hover\:bg-yellow-600:hover {
    background-color: var(--sk-rose-dark);
    background-image: var(--sk-primary-gradient-hover);
}
.border-yellow-300, .border-yellow-400, .border-\[\#d49f1c\], .border-\[\#eeb425\], .border-\[\#cf9d15\] { border-color: var(--sk-rose-border); }
.bg-\[\#eeb425\]\/10 { background-color: #e86a921a; }
.ring-\[\#eeb425\] { --tw-ring-color: var(--sk-pink); }
button.bg-\[\#eeb425\], a.bg-\[\#eeb425\], button.bg-yellow-500 { box-shadow: 0 3px 10px #e86a9240; }
/* Buttons coloured from the database (help center categories: button_color #eeb425 / border #facc15) */
[style*="#eeb425" i] { background-color: var(--sk-rose) !important; background-image: var(--sk-primary-gradient); }
[style*="#facc15" i] { border-color: var(--sk-rose-border) !important; }
/* The "Online Friends" tag on /user/me (was #e9b124 with a rotated corner) */
.bg-\[\#e9b124\].rotate-45 { background-image: none; background-color: #e2628c; }

/* Secondary (was green) */
.bg-green-600 { background-color: var(--sk-plum); }
.hover\:bg-green-700:hover { background-color: var(--sk-plum-dark); }
.border-green-500 { border-color: var(--sk-plum-border); }
.bg-blue-600 { background-color: #7c4a8a; }
.hover\:bg-blue-500:hover { background-color: #8f5a9e; }

/* ---------- Forms ---------- */
/* Fields without their own background (the forms plugin makes them white) */
#app main :is(input:not([type="checkbox"]):not([type="radio"]):not([type="submit"]):not([type="button"]):not([type="file"]):not([type="color"]):not([type="range"]):not([type="hidden"]), textarea, select):not([class*=" bg-"]):not([class^="bg-"]) {
    background-color: var(--sk-surface-2);
    color: var(--sk-text);
    border: 1px solid var(--sk-line-strong);
}
.focus\:border-\[\#eeb425\]:focus { border-color: var(--sk-pink); }
#app :is(input, textarea, select):not([type="checkbox"]):not([type="radio"]):focus {
    border-color: var(--sk-pink);
    --tw-ring-color: var(--sk-pink-glow);
    box-shadow: 0 0 0 3px var(--sk-pink-glow);
}
#app input::placeholder, #app textarea::placeholder { color: var(--sk-faint); }
#app [type="checkbox"]:checked, #app [type="radio"]:checked { background-color: var(--sk-rose); border-color: var(--sk-rose); }

/* ---------- Currencies ---------- */
/* Tickets (type 101) in the profile bar, styled like dusk's nav-credit/ducket/diamond icons */
.nav-ticket-icon {
    background: #ffe7a3 url("../images/icons/currency/tickets.png") no-repeat center;
    outline: 1px solid #c9962b;
}

/* ---------- Round avatar containers ----------
 * .sk-avatar-circle (size via --sk-circle) with a Japanese Habbo scene: images/sakura/avatar-bg-japan.png, a 200x200
 * crop (torii, cherry trees) of the hotel's own promo art client/ms-swf/c_images/web_promo/webjapa.png
 * (C:\Backups\tmp\crop-japan-bg.php; the older drawn avatar-scene.svg is unused). Full figures (.sk-avatar-full,
 * imager size=l = 128x220) fit completely inside the circle with a soft shadow under the feet; small circles show
 * the head (.sk-avatar-head). */
.sk-avatar-circle {
    --sk-circle: 200px;
    position: relative; flex: none; width: var(--sk-circle); height: var(--sk-circle); border-radius: 999px; overflow: hidden;
    background: radial-gradient(ellipse 38% 46% at 50% 58%, rgba(255, 242, 247, .6) 0%, rgba(255, 242, 247, .25) 55%, rgba(255, 242, 247, 0) 100%), #f2a3bf url("../images/sakura/avatar-bg-japan.png") center / cover no-repeat;
    image-rendering: pixelated;
    box-shadow: 0 0 0 3px rgba(255, 211, 225, .55), 0 10px 26px rgba(14, 5, 12, .45);
}
.sk-avatar-circle img { position: absolute; left: 50%; max-width: none; pointer-events: none; filter: drop-shadow(0 2px 0 rgba(46, 20, 40, .35)); }
/* size=l figure: 128x220; 80% of the circle high, feet on the platform (5% above the bottom) */
.sk-avatar-circle .sk-avatar-full { height: calc(var(--sk-circle) * .8); width: auto; bottom: calc(var(--sk-circle) * .05); transform: translateX(-50%); image-rendering: auto; }
/* headonly image (54x62 at normal size): centred, scaled to the circle */
.sk-avatar-circle .sk-avatar-head { width: calc(var(--sk-circle) * .9); height: auto; top: 50%; transform: translate(-50%, -54%); image-rendering: pixelated; }
.sk-avatar-circle a { position: absolute; inset: 0; display: block; }
.sk-avatar-circle a:hover img { transform: translateX(-50%) scale(1.04); }
.sk-avatar-circle a:hover img.sk-avatar-head { transform: translate(-50%, -54%) scale(1.06); }
.sk-avatar-circle img { transition: transform 250ms ease; z-index: 1; }
.sk-avatar-circle:not(.is-head)::after {
    content: ""; position: absolute; left: 50%; bottom: calc(var(--sk-circle) * .035); width: calc(var(--sk-circle) * .34); height: calc(var(--sk-circle) * .07);
    transform: translateX(-50%); border-radius: 50%; background: radial-gradient(ellipse, rgba(18, 30, 10, .45) 0%, transparent 70%);
}
/* soft inner vignette so the avatar stands out from the busy pixel art */
.sk-avatar-circle::before { content: ""; position: absolute; inset: 0; border-radius: inherit; box-shadow: inset 0 0 24px rgba(40, 10, 30, .35); z-index: 2; pointer-events: none; }
.sk-me-circle { --sk-circle: 132px; }
/* /user/me profile box on small screens: taller and top-aligned, so the "Go to hotel" button is not under the currency bar */
@media (max-width: 1023px) {
    .sk-profile-box { height: auto !important; min-height: 250px; align-items: flex-start; padding-top: 20px; padding-bottom: 100px; }
}
@media (min-width: 1024px) { .sk-me-circle { --sk-circle: 200px; } }
/* Staff cards and leaderboard rows: heads in the same scene */
.leaderboard-background { background: #f2a3bf url("../images/sakura/avatar-bg-japan.png") center / cover no-repeat; }

/* ---------- Misc components ---------- */
/* "No published articles" placeholder (an orange imgur picture) */
.article-image[style*="uGLDOUu"] {
    background: radial-gradient(circle at 30% 40%, #f9c1d3 0 6px, transparent 7px), radial-gradient(circle at 70% 60%, #f4a7c0 0 5px, transparent 6px), linear-gradient(135deg, #e86a92 0%, #8a4a6c 100%) !important;
}
.swiper-pagination-bullet { background: var(--sk-pink-soft); }
.swiper-pagination-bullet-active { background: var(--sk-pink); }
.swal2-toast { background-color: var(--sk-surface) !important; color: var(--sk-text) !important; box-shadow: 0 8px 24px #0008, inset 0 0 0 1px var(--sk-line-strong) !important; }
.custom-shadow { box-shadow: 0 7px 16px rgba(20, 8, 18, .45), 0 1px 0 rgba(20, 8, 18, .4); }
.leaderboard-background { background-color: var(--sk-surface-2); }
.rounded-lg.overflow-hidden.bg-\[\#2b303c\], .rounded-xl.bg-gray-900\/50 { box-shadow: 0 1px 2px #0005, inset 0 0 0 1px var(--sk-line); }

/* News article body (#article-content, HTML from the HK rich editor): Tailwind's reset removed all heading sizes and
   paragraph spacing, so headings became plain text and empty lines disappeared. Same look as in the editor:
   big bold centred headings, space between paragraphs, empty paragraphs keep their line. An alignment set in the
   editor (style="text-align:...") still wins. */
#article-content { line-height: 1.6; overflow-wrap: anywhere; }
#article-content h1, #article-content h2, #article-content h3, #article-content h4 { color: #fff; font-weight: 800; line-height: 1.2; letter-spacing: -.01em; text-align: center; }
#article-content h1 { font-size: 2rem; margin: .4em 0 .6em; }
#article-content h2 { font-size: 1.6rem; margin: 1.3em 0 .55em; }
#article-content h3 { font-size: 1.3rem; margin: 1.1em 0 .5em; }
#article-content h4 { font-size: 1.1rem; margin: 1em 0 .4em; }
#article-content > :first-child { margin-top: 0; }
#article-content p { margin: 0 0 .9em; }
#article-content p:empty { min-height: 1.6em; margin: 0; }
#article-content strong, #article-content b { font-weight: 700; color: #fff; }
#article-content em, #article-content i { font-style: italic; }
#article-content u { text-decoration: underline; }
#article-content s { text-decoration: line-through; }
#article-content ul, #article-content ol { margin: 0 0 .9em; padding-left: 1.6em; text-align: left; }
#article-content ul { list-style: disc; }
#article-content ol { list-style: decimal; }
#article-content li { margin: .2em 0; }
#article-content li > p { margin: 0; }
#article-content blockquote { margin: 0 0 .9em; padding: .4em 1em; border-left: 3px solid var(--sk-pink); background: rgba(255,255,255,.04); border-radius: 0 .4rem .4rem 0; }
#article-content hr { margin: 1.4em auto; border: 0; border-top: 1px solid rgba(255,255,255,.15); }
#article-content img { max-width: 100%; height: auto; display: inline-block; }
#article-content code { padding: .1em .35em; border-radius: .3rem; background: rgba(255,255,255,.08); font-size: .9em; }
#article-content pre { margin: 0 0 .9em; padding: .8em 1em; overflow-x: auto; border-radius: .5rem; background: rgba(0,0,0,.3); }
#article-content table { margin: 0 auto .9em; border-collapse: collapse; }
#article-content td, #article-content th { padding: .35em .6em; border: 1px solid rgba(255,255,255,.15); }
@media (max-width: 640px) { #article-content h1 { font-size: 1.5rem; } #article-content h2 { font-size: 1.25rem; } }
