/* src/frontend/index.css */
/*! tailwindcss v4.0.9 | MIT License | https://tailwindcss.com */
@layer theme {
  :root, :host {
    --font-sans: ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
    --color-blue-500: oklch(62.3% .214 259.815);
    --spacing: .25rem;
    --radius-2xl: 1rem;
  }
}

@layer base {
  *, :after, :before {
    box-sizing: border-box;
    border: 0 solid;
    margin: 0;
    padding: 0;
  }

  ::backdrop {
    box-sizing: border-box;
    border: 0 solid;
    margin: 0;
    padding: 0;
  }

  ::-webkit-file-upload-button {
    box-sizing: border-box;
    border: 0 solid;
    margin: 0;
    padding: 0;
  }

  ::file-selector-button {
    box-sizing: border-box;
    border: 0 solid;
    margin: 0;
    padding: 0;
  }

  html, :host {
    -webkit-text-size-adjust: 100%;
    tab-size: 4;
    font-feature-settings: initial;
    font-variation-settings: initial;
    -webkit-tap-highlight-color: transparent;
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Noto Sans, Ubuntu, Cantarell, Helvetica Neue, sans-serif, Apple Color Emoji, Segoe UI Emoji, Segoe UI Symbol, Noto Color Emoji;
    line-height: 1.5;
  }

  hr {
    color: inherit;
    border-top-width: 1px;
    height: 0;
  }

  abbr:where([title]) {
    -webkit-text-decoration: underline dotted;
    text-decoration: underline dotted;
  }

  h1, h2, h3, h4, h5, h6 {
    font-size: inherit;
    font-weight: inherit;
  }

  a {
    color: inherit;
    -webkit-text-decoration: inherit;
    text-decoration: inherit;
  }

  b, strong {
    font-weight: bolder;
  }

  code, kbd, samp, pre {
    font-feature-settings: initial;
    font-variation-settings: initial;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, Liberation Mono, Courier New, monospace;
    font-size: 1em;
  }

  small {
    font-size: 80%;
  }

  sub, sup {
    position: relative;
    vertical-align: baseline;
    font-size: 75%;
    line-height: 0;
  }

  sub {
    bottom: -.25em;
  }

  sup {
    top: -.5em;
  }

  table {
    text-indent: 0;
    border-color: inherit;
    border-collapse: collapse;
  }

  :-moz-focusring {
    outline: auto;
  }

  progress {
    vertical-align: baseline;
  }

  summary {
    display: list-item;
  }

  ol, ul, menu {
    list-style: none;
  }

  img, svg, video, canvas, audio, iframe, embed, object {
    display: block;
    vertical-align: middle;
  }

  img, video {
    max-width: 100%;
    height: auto;
  }

  button, input, select, optgroup, textarea {
    font: inherit;
    font-feature-settings: inherit;
    font-variation-settings: inherit;
    letter-spacing: inherit;
    color: inherit;
    opacity: 1;
    background-color: #0000;
    border-radius: 0;
  }

  ::-webkit-file-upload-button {
    font: inherit;
    font-feature-settings: inherit;
    font-variation-settings: inherit;
    letter-spacing: inherit;
    color: inherit;
    opacity: 1;
    background-color: #0000;
    border-radius: 0;
  }

  ::file-selector-button {
    font: inherit;
    font-feature-settings: inherit;
    font-variation-settings: inherit;
    letter-spacing: inherit;
    color: inherit;
    opacity: 1;
    background-color: #0000;
    border-radius: 0;
  }

  :where(select:-webkit-any([multiple], [size])) optgroup {
    font-weight: bolder;
  }

  :where(select:-moz-any([multiple], [size])) optgroup {
    font-weight: bolder;
  }

  :where(select:is([multiple], [size])) optgroup {
    font-weight: bolder;
  }

  :where(select:-webkit-any([multiple], [size])) optgroup option {
    padding-inline-start: 20px;
  }

  :where(select:-moz-any([multiple], [size])) optgroup option {
    padding-inline-start: 20px;
  }

  :where(select:is([multiple], [size])) optgroup option {
    padding-inline-start: 20px;
  }

  ::-webkit-file-upload-button {
    margin-inline-end: 4px;
  }

  ::file-selector-button {
    margin-inline-end: 4px;
  }

  ::placeholder {
    opacity: 1;
  }

  @supports ( not (-webkit-appearance: -apple-pay-button)) or (contain-intrinsic-size: 1px) {
    ::placeholder {
      color: color-mix(in oklab, currentcolor 50%, transparent);
    }
  }

  textarea {
    resize: vertical;
  }

  ::-webkit-search-decoration {
    -webkit-appearance: none;
  }

  ::-webkit-date-and-time-value {
    text-align: inherit;
    min-height: 1lh;
  }

  ::-webkit-datetime-edit {
    display: inline-flex;
  }

  ::-webkit-datetime-edit-fields-wrapper {
    padding: 0;
  }

  ::-webkit-datetime-edit {
    padding-block-start: 0;
    padding-block-end: 0;
  }

  ::-webkit-datetime-edit-year-field {
    padding-block-start: 0;
    padding-block-end: 0;
  }

  ::-webkit-datetime-edit-month-field {
    padding-block-start: 0;
    padding-block-end: 0;
  }

  ::-webkit-datetime-edit-day-field {
    padding-block-start: 0;
    padding-block-end: 0;
  }

  ::-webkit-datetime-edit-hour-field {
    padding-block-start: 0;
    padding-block-end: 0;
  }

  ::-webkit-datetime-edit-minute-field {
    padding-block-start: 0;
    padding-block-end: 0;
  }

  ::-webkit-datetime-edit-second-field {
    padding-block-start: 0;
    padding-block-end: 0;
  }

  ::-webkit-datetime-edit-millisecond-field {
    padding-block-start: 0;
    padding-block-end: 0;
  }

  ::-webkit-datetime-edit-meridiem-field {
    padding-block-start: 0;
    padding-block-end: 0;
  }

  ::-webkit-calendar-picker-indicator {
    line-height: 1;
  }

  :-moz-ui-invalid {
    box-shadow: none;
  }

  button {
    appearance: button;
  }

  input:where([type="button"], [type="reset"], [type="submit"]) {
    appearance: button;
  }

  ::-webkit-file-upload-button {
    appearance: button;
  }

  ::file-selector-button {
    appearance: button;
  }

  ::-webkit-inner-spin-button {
    height: auto;
  }

  ::-webkit-outer-spin-button {
    height: auto;
  }

  [hidden]:where(:not([hidden="until-found"])) {
    display: none !important;
  }
}

@layer utilities {
  .absolute {
    position: absolute;
  }

  .fixed {
    position: fixed;
  }

  .static {
    position: static;
  }

  .container {
    width: 100%;
  }

  @media (min-width: 40rem) {
    .container {
      max-width: 40rem;
    }
  }

  @media (min-width: 48rem) {
    .container {
      max-width: 48rem;
    }
  }

  @media (min-width: 64rem) {
    .container {
      max-width: 64rem;
    }
  }

  @media (min-width: 80rem) {
    .container {
      max-width: 80rem;
    }
  }

  @media (min-width: 96rem) {
    .container {
      max-width: 96rem;
    }
  }

  .my-8 {
    margin-block: calc(var(--spacing) * 8);
  }

  .flex {
    display: flex;
  }

  .grid {
    display: grid;
  }

  .hidden {
    display: none;
  }

  .inline {
    display: inline;
  }

  .inline-block {
    display: inline-block;
  }

  .h-36 {
    height: calc(var(--spacing) * 36);
  }

  .h-screen {
    height: 100vh;
  }

  .w-48 {
    width: calc(var(--spacing) * 48);
  }

  .transform {
    transform: var(--tw-rotate-x) var(--tw-rotate-y) var(--tw-rotate-z) var(--tw-skew-x) var(--tw-skew-y);
  }

  .resize {
    resize: both;
  }

  .grid-cols-1 {
    grid-template-columns: repeat(1, minmax(0, 1fr));
  }

  .flex-col {
    flex-direction: column;
  }

  .items-center {
    align-items:  center;
  }

  .gap-6 {
    gap: calc(var(--spacing) * 6);
  }

  .overflow-hidden {
    overflow: hidden;
  }

  .rounded-2xl {
    border-radius: var(--radius-2xl);
  }

  .border {
    border-style: var(--tw-border-style);
    border-width: 1px;
  }

  .bg-blue-500 {
    background-color: var(--color-blue-500);
  }

  .p-4 {
    padding: calc(var(--spacing) * 4);
  }

  .p-8 {
    padding: calc(var(--spacing) * 8);
  }

  .shadow-md {
    --tw-shadow: 0 4px 6px -1px var(--tw-shadow-color, #0000001a), 0 2px 4px -2px var(--tw-shadow-color, #0000001a);
    box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);
  }

  .blur {
    --tw-blur: blur(8px);
    filter: var(--tw-blur, ) var(--tw-brightness, ) var(--tw-contrast, ) var(--tw-grayscale, ) var(--tw-hue-rotate, ) var(--tw-invert, ) var(--tw-saturate, ) var(--tw-sepia, ) var(--tw-drop-shadow, );
  }

  .filter {
    filter: var(--tw-blur, ) var(--tw-brightness, ) var(--tw-contrast, ) var(--tw-grayscale, ) var(--tw-hue-rotate, ) var(--tw-invert, ) var(--tw-saturate, ) var(--tw-sepia, ) var(--tw-drop-shadow, );
  }

  @media (min-width: 40rem) {
    .sm\:grid-cols-3 {
      grid-template-columns: repeat(3, minmax(0, 1fr));
    }
  }

  @media (min-width: 48rem) {
    .md\:grid-cols-4 {
      grid-template-columns: repeat(4, minmax(0, 1fr));
    }
  }

  @media (min-width: 64rem) {
    .lg\:grid-cols-5 {
      grid-template-columns: repeat(5, minmax(0, 1fr));
    }
  }
}

:root {
  --background: #fff;
  --foreground: #09090b;
  --card: #fff;
  --card-foreground: #09090b;
  --popover: #fff;
  --popover-foreground: #09090b;
  --primary: #18181b;
  --primary-foreground: #fafafa;
  --secondary: #f4f4f5;
  --secondary-foreground: #18181b;
  --muted: #f4f4f5;
  --muted-foreground: #71717a;
  --accent: #f4f4f5;
  --accent-foreground: #18181b;
  --destructive: #ef4444;
  --destructive-foreground: #fafafa;
  --border: #e4e4e7;
  --input: #e4e4e7;
  --ring: #09090b;
  --chart-1: #e76e50;
  --chart-2: #2a9d90;
  --chart-3: #274754;
  --chart-4: #e8c468;
  --chart-5: #f4a462;
  --radius: .6rem;
  --sidebar-background: #fafafa;
  --sidebar-foreground: #3f3f46;
  --sidebar-primary: #18181b;
  --sidebar-primary-foreground: #fafafa;
  --sidebar-accent: #f4f4f5;
  --sidebar-accent-foreground: #18181b;
  --sidebar-border: #e5e7eb;
  --sidebar-ring: #3b82f6;
  --sidebar: #fafafa;
}

.dark {
  --background: #09090b;
  --foreground: #fafafa;
  --card: #09090b;
  --card-foreground: #fafafa;
  --popover: #09090b;
  --popover-foreground: #fafafa;
  --primary: #fafafa;
  --primary-foreground: #18181b;
  --secondary: #27272a;
  --secondary-foreground: #fafafa;
  --muted: #27272a;
  --muted-foreground: #a1a1aa;
  --accent: #27272a;
  --accent-foreground: #fafafa;
  --destructive: #7f1d1d;
  --destructive-foreground: #fafafa;
  --border: #27272a;
  --input: #27272a;
  --ring: #d4d4d8;
  --chart-1: #2662d9;
  --chart-2: #2eb88a;
  --chart-3: #e88c30;
  --chart-4: #af57db;
  --chart-5: #e23670;
  --sidebar-background: #18181b;
  --sidebar-foreground: #f4f4f5;
  --sidebar-primary: #1d4ed8;
  --sidebar-primary-foreground: #fff;
  --sidebar-accent: #27272a;
  --sidebar-accent-foreground: #f4f4f5;
  --sidebar-border: #27272a;
  --sidebar-ring: #3b82f6;
  --sidebar: #18181b;
}

@layer base {
  * {
    border-color: var(--border);
    outline-color: color-mix(in oklab, var(--ring) 50%, transparent);
  }

  body {
    background-color: var(--background);
    color: var(--foreground);
  }
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: Segoe UI, Tahoma, Geneva, Verdana, sans-serif;
}

body {
  background: #5052f5;
}

.login-container {
  display: flex;
  color: #000;
  justify-content: center;
  align-items:  center;
  height: 100vh;
}

.login-form {
  background: #fff;
  border-radius: 12px;
  width: 100%;
  max-width: 320px;
  padding: 2rem;
  box-shadow: 0 4px 20px #0000001a;
}

.login-form h2 {
  text-align: center;
  margin-bottom: 1.5rem;
}

.login-form label {
  display: block;
  margin-bottom: .25rem;
  font-weight: 600;
}

.login-form input {
  border: 1px solid #ccc;
  border-radius: 8px;
  width: 100%;
  margin-bottom: 1rem;
  padding: .5rem;
  font-size: 1rem;
}

.login-form button {
  color: #fff;
  cursor: pointer;
  background-color: #4a90e2;
  border: none;
  border-radius: 8px;
  width: 100%;
  padding: .75rem;
  transition: background .3s;
  font-size: 1rem;
  font-weight: bold;
}

.login-form button:hover {
  background-color: #357abd;
}

#message {
  color: red;
}

.loader {
  display: inline-block;
  box-sizing: border-box;
  animation: rotation 1s linear infinite;
  border: 4px solid #fff;
  border-bottom-color: #0000;
  border-radius: 50%;
  width: 24px;
  height: 24px;
}

@keyframes rotation {
  0% {
    transform: rotate(0);
  }

  100% {
    transform: rotate(360deg);
  }
}

@layer base {
  :root {
    font-family: var(--font-sans);
  }

  body {
    position: relative;
    margin: calc(var(--spacing) * 0);
    display: grid;
    background-color: var(--background);
    color: var(--foreground);
    place-items:  center;
    min-width: 320px;
    min-height: 100vh;
  }
}

@keyframes slide {
  from {
    background-position: 0 0;
  }

  to {
    background-position: 256px 224px;
  }
}

@keyframes spin {
  from {
    transform: rotate(0);
  }

  to {
    transform: rotate(360deg);
  }
}

@media (prefers-reduced-motion) {
  *, :before, :after {
    animation: none !important;
  }
}

@keyframes enter {
  from {
    opacity: var(--tw-enter-opacity, 1);
    transform: translate3d(var(--tw-enter-translate-x, 0), var(--tw-enter-translate-y, 0), 0) scale3d(var(--tw-enter-scale, 1), var(--tw-enter-scale, 1), var(--tw-enter-scale, 1)) rotate(var(--tw-enter-rotate, 0));
  }
}

@keyframes exit {
  to {
    opacity: var(--tw-exit-opacity, 1);
    transform: translate3d(var(--tw-exit-translate-x, 0), var(--tw-exit-translate-y, 0), 0) scale3d(var(--tw-exit-scale, 1), var(--tw-exit-scale, 1), var(--tw-exit-scale, 1)) rotate(var(--tw-exit-rotate, 0));
  }
}

@property --tw-rotate-x {
  syntax: "*";
  inherits: false;
  initial-value: rotateX(0);
}

@property --tw-rotate-y {
  syntax: "*";
  inherits: false;
  initial-value: rotateY(0);
}

@property --tw-rotate-z {
  syntax: "*";
  inherits: false;
  initial-value: rotateZ(0);
}

@property --tw-skew-x {
  syntax: "*";
  inherits: false;
  initial-value: skewX(0);
}

@property --tw-skew-y {
  syntax: "*";
  inherits: false;
  initial-value: skewY(0);
}

@property --tw-border-style {
  syntax: "*";
  inherits: false;
  initial-value: solid;
}

@property --tw-shadow {
  syntax: "*";
  inherits: false;
  initial-value: 0 0 #0000;
}

@property --tw-shadow-color {
  syntax: "*";
  inherits: false
}

@property --tw-inset-shadow {
  syntax: "*";
  inherits: false;
  initial-value: 0 0 #0000;
}

@property --tw-inset-shadow-color {
  syntax: "*";
  inherits: false
}

@property --tw-ring-color {
  syntax: "*";
  inherits: false
}

@property --tw-ring-shadow {
  syntax: "*";
  inherits: false;
  initial-value: 0 0 #0000;
}

@property --tw-inset-ring-color {
  syntax: "*";
  inherits: false
}

@property --tw-inset-ring-shadow {
  syntax: "*";
  inherits: false;
  initial-value: 0 0 #0000;
}

@property --tw-ring-inset {
  syntax: "*";
  inherits: false
}

@property --tw-ring-offset-width {
  syntax: "<length>";
  inherits: false;
  initial-value: 0;
}

@property --tw-ring-offset-color {
  syntax: "*";
  inherits: false;
  initial-value: #fff;
}

@property --tw-ring-offset-shadow {
  syntax: "*";
  inherits: false;
  initial-value: 0 0 #0000;
}

@property --tw-blur {
  syntax: "*";
  inherits: false
}

@property --tw-brightness {
  syntax: "*";
  inherits: false
}

@property --tw-contrast {
  syntax: "*";
  inherits: false
}

@property --tw-grayscale {
  syntax: "*";
  inherits: false
}

@property --tw-hue-rotate {
  syntax: "*";
  inherits: false
}

@property --tw-invert {
  syntax: "*";
  inherits: false
}

@property --tw-opacity {
  syntax: "*";
  inherits: false
}

@property --tw-saturate {
  syntax: "*";
  inherits: false
}

@property --tw-sepia {
  syntax: "*";
  inherits: false
}

@property --tw-drop-shadow {
  syntax: "*";
  inherits: false
}

/* src/frontend/pages/player-home.css */
.game-iframe {
  height: calc(100dvh - 40px);
}

/* src/frontend/ui/top-banner.css */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: Segoe UI, Tahoma, Geneva, Verdana, sans-serif;
}

.top-banner {
  position: fixed;
  color: #fff;
  display: flex;
  z-index: 1000;
  background-color: #1e1e2f;
  justify-content: space-between;
  align-items:  center;
  width: 100%;
  padding: 8px;
  top: 0;
  left: 0;
  box-shadow: 0 2px 6px #0000004d;
}

.banner-title {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
}

.settings-button {
  cursor: pointer;
  color: inherit;
  background: none;
  border: none;
  padding: 0;
}

.settings-icon {
  width: 24px;
  height: 24px;
}

.control {
  display: flex;
  gap: 8px;
}

/* src/frontend/ui/game-cell.css */
.dim-view {
  position: absolute;
  text-align: center;
  background: #0000004d;
  align-content:  center;
}

.loader {
  display: inline-block;
  box-sizing: border-box;
  animation: rotation 1s linear infinite;
  border: 4px solid #fff;
  border-bottom-color: #0000;
  border-radius: 50%;
  width: 24px;
  height: 24px;
}

@keyframes rotation {
  0% {
    transform: rotate(0);
  }

  100% {
    transform: rotate(360deg);
  }
}
