/**
 * PocketSkills Web Portal - Base Styles & Reset
 * Includes custom RPG cursors, medieval scrollbars, typography
 */

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

button {
  font-family: inherit;
}

/* Custom RPG Cursors */
html, body {
  cursor: url("../images/cursor.png") 2 2, auto;
}

@supports (cursor: image-set(url("../images/cursor.png") 1x)) {
  html, body {
    cursor: image-set(url("../images/cursor.png") 1x, url("../images/cursor-2x.png") 2x) 2 2, auto;
  }
}

a, button, [role="button"], select, summary, .interactive, .stone-btn, .menu-link {
  cursor: url("../images/cursor-use.png") 2 2, pointer !important;
}

@supports (cursor: image-set(url("../images/cursor-use.png") 1x)) {
  a, button, [role="button"], select, summary, .interactive, .stone-btn, .menu-link {
    cursor: image-set(url("../images/cursor-use.png") 1x, url("../images/cursor-use-2x.png") 2x) 2 2, pointer !important;
  }
}

input[type="text"], input[type="password"], input[type="email"], textarea {
  cursor: text !important;
}

/* Document & Body */
html {
  font-size: 14px;
  background-color: var(--bg-deep);
  color-scheme: dark;
}

body {
  min-height: 100vh;
  font-family: var(--font-body);
  color: var(--text-main);
  background-color: var(--bg-deep);
  background-image: 
    radial-gradient(ellipse at top, rgba(18, 13, 9, 0.4) 0%, rgba(10, 7, 5, 0.95) 75%),
    url("../images/background.jpg");
  background-repeat: no-repeat;
  background-position: center top;
  background-size: cover;
  background-attachment: fixed;
  line-height: 1.5;
  overflow-x: hidden;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-title);
  color: var(--gold-light);
  letter-spacing: 0.5px;
  text-shadow: 1px 1px 2px #000, 0 0 10px rgba(232, 184, 58, 0.25);
  font-weight: 700;
}

h1 { font-size: 2.1rem; line-height: 1.2; }
h2 { font-size: 1.6rem; line-height: 1.25; }
h3 { font-size: 1.25rem; line-height: 1.3; }
h4 { font-size: 1.05rem; }

p {
  margin-bottom: 0.85rem;
  color: var(--text-dim);
}

p:last-child {
  margin-bottom: 0;
}

a {
  color: var(--gold-primary);
  text-decoration: none;
  transition: color var(--transition-fast), text-shadow var(--transition-fast);
}

a:hover {
  color: var(--gold-light);
  text-shadow: 0 0 8px rgba(232, 184, 58, 0.5);
}

strong, b {
  color: var(--text-main);
}

em, i {
  font-style: italic;
  color: var(--text-dim);
}

code, kbd {
  font-family: var(--font-mono);
  background: var(--frame-darkest);
  border: 1px solid var(--frame-border);
  padding: 2px 6px;
  border-radius: var(--radius-sm);
  color: var(--gold-light);
  font-size: 0.88em;
}

/* Custom Medieval Scrollbars */
::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-track {
  background: var(--frame-darkest);
  border: 1px solid var(--frame-mid);
  box-shadow: inset 0 0 4px rgba(0, 0, 0, 0.8);
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, var(--frame-light), var(--frame-mid) 60%, #20140c);
  border: 1px solid var(--frame-darkest);
  border-radius: var(--radius-sm);
  box-shadow: inset 0 1px 0 var(--bevel-light);
}

::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, var(--frame-highlight), var(--frame-light) 60%, var(--frame-mid));
}

/* Accessibility & Utility */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.text-gold { color: var(--gold-primary) !important; }

.text-muted { color: var(--text-muted) !important; }

/* `hidden` always wins over a component's own display (install buttons, tabs) */
[hidden] { display: none !important; }
