/* Material Design 3: color roles, type scale, outlined fields and filled/text buttons. */
:root {
  color-scheme: light;
  --md-sys-color-primary: #0b57d0;
  --md-sys-color-on-primary: #fff;
  --md-sys-color-surface: #fff;
  --md-sys-color-on-surface: #1f1f1f;
  --md-sys-color-on-surface-variant: #444746;
  --md-sys-color-outline: #747775;
  --md-sys-color-outline-variant: #c4c7c5;
  --md-sys-color-error: #b3261e;
  --md-ref-typeface-plain: "Roboto", "Noto Sans JP", Arial, "Hiragino Kaku Gothic ProN", "Yu Gothic", sans-serif;
  font-family: var(--md-ref-typeface-plain);
  font-size: 16px;
  line-height: 24px;
  color: var(--md-sys-color-on-surface);
  background: var(--md-sys-color-surface);
  -webkit-font-smoothing: antialiased;
}

* { box-sizing: border-box; }
body { margin: 0; }
h1, p { margin: 0; }

.signin-page {
  display: grid;
  min-height: 100vh;
  min-height: 100svh;
  padding: 48px 24px;
  place-items: center;
}

.signin {
  width: 100%;
  max-width: 448px;
  padding: 40px;
  border: 1px solid var(--md-sys-color-outline-variant);
  border-radius: 16px;
}

.signin h1 {
  font-size: 24px;
  font-weight: 400;
  line-height: 32px;
}

.supporting-text { color: var(--md-sys-color-on-surface-variant); }
.signin > .supporting-text { margin-top: 16px; }
.signin-form { margin-top: 32px; }
.text-field { position: relative; }

.text-field input {
  display: block;
  width: 100%;
  height: 56px;
  padding: 16px;
  border: 1px solid var(--md-sys-color-outline);
  border-radius: 4px;
  background: var(--md-sys-color-surface);
  color: var(--md-sys-color-on-surface);
  font: inherit;
}

.text-field label {
  position: absolute;
  top: 28px;
  left: 12px;
  padding: 0 4px;
  background: var(--md-sys-color-surface);
  color: var(--md-sys-color-on-surface-variant);
  line-height: 20px;
  transform: translateY(-50%);
  transition: top 120ms ease-out, font-size 120ms ease-out, color 120ms ease-out;
  cursor: text;
}

.text-field input:focus + label,
.text-field input:not(:placeholder-shown) + label {
  top: 0;
  font-size: 12px;
  line-height: 16px;
}

.text-field input:hover { border-color: var(--md-sys-color-on-surface); }
.text-field input:focus {
  padding: 15px;
  border: 2px solid var(--md-sys-color-primary);
  outline: none;
}
.text-field input:focus + label { color: var(--md-sys-color-primary); }
.text-field input[aria-invalid="true"] { border-color: var(--md-sys-color-error); }
.text-field input[aria-invalid="true"] + label { color: var(--md-sys-color-error); }
.field-error {
  margin: 4px 16px 0;
  color: var(--md-sys-color-error);
  font-size: 12px;
  line-height: 16px;
}

.form-actions { display: flex; justify-content: flex-end; margin-top: 24px; }
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 24px;
  border: 0;
  border-radius: 24px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 500;
  line-height: 20px;
  letter-spacing: .1px;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
}
.button-filled { background: var(--md-sys-color-primary); color: var(--md-sys-color-on-primary); }
.button-filled:hover { background: #1e64d4; }
.button-filled:active { background: #2b6dd7; }
.button-text { padding: 0 16px; background: transparent; color: var(--md-sys-color-primary); }
.button-text:hover { background: #edf3fd; }
.button-text:active { background: #e2ebfa; }
.button:focus-visible { outline: 3px solid var(--md-sys-color-primary); outline-offset: 3px; }

.app-bar { border-bottom: 1px solid #e3e3e3; }
.app-bar-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 64px;
  max-width: 1168px;
  margin: 0 auto;
  padding: 0 24px;
}
.app-bar h1 { font-size: 22px; font-weight: 400; line-height: 28px; }
.player-page { max-width: 1168px; margin: 0 auto; padding: 32px 24px; }
video { display: block; width: 100%; aspect-ratio: 16 / 9; background: #000; border-radius: 12px; }
.player-help { margin-top: 16px; font-size: 14px; line-height: 20px; }

@media (max-width: 600px) {
  .signin-page { display: block; padding: 64px 24px 32px; }
  .signin { margin: 0 auto; padding: 0; border: 0; border-radius: 0; }
  .app-bar-content { padding: 0 16px; }
  .player-page { padding: 24px 16px; }
  video { border-radius: 8px; }
}

@media (prefers-reduced-motion: reduce) {
  .text-field label { transition: none; }
}
