/**
 * BOLANDILA Interactive Game Template
 * CSS Reset
 *
 * Role of this file:
 * - Normalizes default browser styles
 * - Prevents unwanted horizontal scroll
 * - Improves mobile behavior
 * - Prepares the page for a fixed 9:16 game stage
 */

/* Safer box model */
*,
*::before,
*::after {
    box-sizing: border-box;
}

/* Remove default spacing */
html,
body,
div,
span,
applet,
object,
iframe,
h1,
h2,
h3,
h4,
h5,
h6,
p,
blockquote,
pre,
a,
abbr,
acronym,
address,
big,
cite,
code,
del,
dfn,
em,
img,
ins,
kbd,
q,
s,
samp,
small,
strike,
strong,
sub,
sup,
tt,
var,
b,
u,
i,
center,
dl,
dt,
dd,
ol,
ul,
li,
fieldset,
form,
label,
legend,
article,
aside,
canvas,
details,
embed,
figure,
figcaption,
footer,
header,
main,
menu,
nav,
output,
ruby,
section,
summary,
time,
mark,
audio,
video {
    margin: 0;
    padding: 0;
    border: 0;
}

/* Core document behavior */
html {
    width: 100%;
    min-height: 100%;
    overflow-x: hidden;
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
    scroll-behavior: auto;
}

/* Body is a fixed full-screen app container */
body {
    width: 100%;
    min-width: 320px;
    min-height: 100dvh;
    overflow: hidden;
    background: #070707;
    color: #fff7d6;
    line-height: 1;
    font-family: Georgia, serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* HTML5 display reset */
article,
aside,
details,
figcaption,
figure,
footer,
header,
main,
menu,
nav,
section {
    display: block;
}

/* Media defaults */
img,
picture,
video,
canvas,
svg {
    display: block;
    max-width: 100%;
}

/* Images should not be draggable by default in the game UI */
img {
    user-select: none;
    -webkit-user-drag: none;
}

/* Form elements inherit typography */
button,
input,
textarea,
select {
    font: inherit;
    color: inherit;
}

/* Button reset */
button {
    appearance: none;
    -webkit-appearance: none;
    border: 0;
    background: transparent;
    padding: 0;
    margin: 0;
    cursor: pointer;
    text-align: inherit;
}

/* Better mobile tap behavior */
button,
a,
[role="button"],
.game-item,
.draggable-item {
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

/* Links */
a {
    color: inherit;
    text-decoration: none;
}

/* Lists */
ol,
ul {
    list-style: none;
}

/* Tables */
table {
    border-collapse: collapse;
    border-spacing: 0;
}

/* Quotes */
blockquote,
q {
    quotes: none;
}

blockquote::before,
blockquote::after,
q::before,
q::after {
    content: "";
}

/* Strong and emphasis keep browser semantics but not disruptive style */
strong,
b {
    font-weight: 700;
}

em,
i {
    font-style: italic;
}

/* Prevent accidental text selection during gameplay */
.game-shell,
.game-stage,
.screen-content,
.banner-layer,
.modal-layer,
.effects-layer {
    user-select: none;
}

/* Allow text selection only where explicitly needed */
.is-text-selectable,
.is-text-selectable * {
    user-select: text;
}

/* Accessible hidden utility */
.sr-only {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

/* Noscript fallback */
.noscript-message {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: grid;
    place-items: center;
    padding: 24px;
    background: #070707;
    color: #fff7d6;
    text-align: center;
    line-height: 1.4;
}

.noscript-message h1 {
    margin-bottom: 12px;
    color: #ffe58a;
    font-size: 28px;
}

/* Respect reduced motion preferences globally */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        scroll-behavior: auto !important;
        transition-duration: 0.001ms !important;
    }
}