/* ============================================================
   Sirio Art Games — shared stylesheet
   ============================================================ */

/* ---------- design tokens (dark default) ---------- */
:root {
  --bg:           #1e1e1e;
  --bg-card:      #2a2a2a;
  --border:       #3a3a3a;
  --text:         #f0f0f0;
  --text-muted:   #999999;
  --link:         #7eb8f7;
  --link-hover:   #a8d0ff;
  --header-bg:    #000000;
  --footer-bg:    #000000;
  --footer-text:  rgba(255,255,255,0.65);
}

/* ---------- light tokens (explicit override) ---------- */
[data-theme="light"] {
  --bg:           #f2f2f2;
  --bg-card:      #ffffff;
  --border:       #dddddd;
  --text:         #1a1a1a;
  --text-muted:   #666666;
  --link:         #1a5fb4;
  --link-hover:   #0d3f7f;
  --header-bg:    #111111;
  --footer-bg:    #111111;
  --footer-text:  rgba(255,255,255,0.65);
}

/* ---------- light tokens (system preference, no manual override) ---------- */
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --bg:           #f2f2f2;
    --bg-card:      #ffffff;
    --border:       #dddddd;
    --text:         #1a1a1a;
    --text-muted:   #666666;
    --link:         #1a5fb4;
    --link-hover:   #0d3f7f;
    --header-bg:    #111111;
    --footer-bg:    #111111;
    --footer-text:  rgba(255,255,255,0.65);
  }
}

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

html, body {
  margin: 0;
  padding: 0;
  color: var(--text);
  background-color: var(--bg);
  font-family: 'Roboto', sans-serif;
  font-size: 1.1rem;
  min-height: 100vh;
}

body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

h1, h2, h3 { margin: 0; }

img { max-width: 100%; display: block; }

a         { color: var(--link); text-decoration: none; }
a:visited { color: var(--link); }
a:hover   { color: var(--link-hover); text-decoration: underline; }

/* ---------- layout helpers ---------- */
.container {
  max-width: 1024px;
  margin: 0 auto;
  width: 100%;
  padding-left: 0.75rem;
  padding-right: 0.75rem;
}

@media (min-width: 1024px) {
  .container { padding-left: 1rem; padding-right: 1rem; }
}

/* ---------- header ---------- */
header {
  background-color: var(--header-bg);
  position: sticky;
  top: 0;
  z-index: 100;
  width: 100%;
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 64px;
  padding: 0.5rem 0;
}

/* --- logo area --- */
.logo-area {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  gap: 0.65rem;
}

.logo-img-link {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  text-decoration: none;
}
.logo-img-link:hover { text-decoration: none; }

.logo-img {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: block;
}

.logo-right {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.logo-text-link {
  color: #ffffff;
  font-size: 1rem;
  font-weight: bold;
  white-space: nowrap;
  text-decoration: none;
  line-height: 1.2;
}
.logo-text-link:visited { color: #ffffff; }
.logo-text-link:hover   { color: #ffffff; text-decoration: none; }

/* --- social icons under logo --- */
.logo-socials {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.logo-socials a {
  display: flex;
  align-items: center;
  text-decoration: none;
  color: rgba(255,255,255,0.78);
  opacity: 0.88;
  transition: opacity 0.15s;
}
.logo-socials a:visited { color: rgba(255,255,255,0.78); opacity: 0.88; }
.logo-socials a:hover   { opacity: 1; text-decoration: none; }

.icon-sm {
  height: 16px;
  width: auto;
  display: block;
  flex-shrink: 0;
}

/* --- right-side nav --- */
.header-nav {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-shrink: 0;
  margin-left: auto;
}

.header-nav a {
  color: rgba(255,255,255,0.88);
  font-size: 0.875rem;
  font-weight: 600;
  white-space: nowrap;
  padding: 0.35rem 0.9rem;
  border-radius: 20px;
  border: 1px solid rgba(255,255,255,0.25);
  background: rgba(255,255,255,0.07);
  text-decoration: none;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.header-nav a:visited { color: rgba(255,255,255,0.88); }
.header-nav a:hover {
  background: rgba(255,255,255,0.18);
  color: #ffffff;
  border-color: rgba(255,255,255,0.5);
  text-decoration: none;
}

/* theme toggle button */
.theme-toggle {
  background: rgba(255,255,255,0.1);
  border: 1.5px solid rgba(255,255,255,0.45);
  border-radius: 8px;
  padding: 0.3rem 0.55rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s;
  min-width: 38px;
  height: 34px;
  flex-shrink: 0;
}
.theme-toggle:hover { background: rgba(255,255,255,0.22); }
.theme-toggle svg { display: block; }

/* ---------- main ---------- */
main {
  flex: 1;
  padding: 1rem 0;
}

/* ---------- footer ---------- */
footer {
  background-color: var(--footer-bg);
  color: var(--footer-text);
  padding: 1.25rem 0;
  font-size: 0.875rem;
  margin-top: auto;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.footer-inner a { color: var(--footer-text); }
.footer-inner a:hover { color: #ffffff; text-decoration: underline; }

/* ---------- responsive video embed (16:9) ---------- */
.video-embed-wrapper {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%;
  height: 0;
  overflow: hidden;
  border-radius: 12px;
  background: #000;
}

.video-embed-wrapper iframe {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  border: 0;
}

/* ---------- utilities ---------- */
.py-2 { padding-top: 1rem; padding-bottom: 1rem; }
.text-left   { text-align: left; }
.text-center { text-align: center; }
