:root {
  color-scheme: dark;
  font-family: "Noto Sans", "Liberation Sans", sans-serif;
  background: #121416;
  color: #f3f5f6;
  --athena-accent: #c45aec;
  --athena-accent-light: #dda3f4;
  --athena-accent-surface: rgba(64, 25, 79, 0.88);
}

* {
  box-sizing: border-box;
}

html,
body,
#application {
  width: 100%;
  height: 100%;
  margin: 0;
  overflow: hidden;
}

button {
  min-height: 32px;
  padding: 4px 10px;
  border: 1px solid #626a70;
  border-radius: 4px;
  background: #2b3034;
  color: #f5f6f7;
  font: inherit;
  cursor: pointer;
}

button:hover {
  background: #3a4247;
}

button:focus-visible {
  outline: 2px solid var(--athena-accent);
  outline-offset: 2px;
}

.toolbar {
  position: absolute;
  z-index: 20;
  top: 0;
  left: 0;
  right: 0;
  height: 46px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 6px 10px;
  border-bottom: 1px solid #454b50;
  background: rgba(27, 31, 34, 0.96);
}

.identity,
.session-controls,
.panel-heading,
.message-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.identity img {
  width: 28px;
  height: 28px;
}

.identity strong {
  font-size: 17px;
}

#connection-label {
  color: #b5bcc1;
  white-space: nowrap;
}

#timer {
  min-width: 62px;
  font-variant-numeric: tabular-nums;
  text-align: center;
}

#extend-button {
  border-color: #d39d3a;
}

#desktop-stage {
  position: absolute;
  inset: 46px 0 0;
  display: grid;
  place-items: center;
  background: #08090a;
}

#desktop-video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #08090a;
  outline: 0;
}

.center-panel,
#message-screen {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  justify-items: center;
  text-align: center;
  background: #15191c;
}

.center-panel h1,
.message-content h1 {
  margin: 16px 0 4px;
  font-size: 24px;
  letter-spacing: 0;
}

.center-panel p,
.message-content p {
  max-width: 580px;
  margin: 4px 20px 18px;
  color: #bcc3c7;
  line-height: 1.5;
}

.spinner {
  width: 34px;
  height: 34px;
  border: 3px solid #4a5359;
  border-top-color: var(--athena-accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

#drop-overlay {
  position: absolute;
  inset: 18px;
  z-index: 15;
  display: grid;
  place-items: center;
  border: 2px dashed var(--athena-accent);
  background: var(--athena-accent-surface);
  font-size: 22px;
  pointer-events: none;
}

#downloads-panel {
  position: absolute;
  z-index: 30;
  top: 54px;
  right: 8px;
  width: min(520px, calc(100vw - 16px));
  max-height: calc(100vh - 62px);
  overflow: auto;
  border: 1px solid #5b6267;
  border-radius: 4px;
  background: #202529;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.5);
}

.panel-heading {
  position: sticky;
  top: 0;
  padding: 8px;
  border-bottom: 1px solid #464d52;
  background: #282e32;
}

.panel-heading strong {
  margin-right: auto;
}

#downloads-empty {
  margin: 20px;
  color: #b7bec2;
}

#downloads-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

#downloads-list li {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 42px;
  padding: 7px 10px;
  border-bottom: 1px solid #3c4347;
}

#downloads-list a {
  min-width: 0;
  flex: 1;
  overflow-wrap: anywhere;
  color: var(--athena-accent-light);
}

#downloads-list span {
  color: #aeb5b9;
  white-space: nowrap;
}

#message-screen {
  z-index: 50;
  inset: 0;
}

.message-content {
  display: grid;
  justify-items: center;
}

.message-content > img {
  width: 72px;
  height: 72px;
}

#toast-region {
  position: fixed;
  z-index: 70;
  left: 12px;
  bottom: 12px;
  display: grid;
  gap: 6px;
  pointer-events: none;
}

.toast {
  max-width: min(560px, calc(100vw - 24px));
  padding: 9px 12px;
  border-left: 4px solid var(--athena-accent);
  background: rgba(30, 35, 38, 0.96);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
}

[hidden] {
  display: none !important;
}

@media (max-width: 760px) {
  .toolbar {
    height: auto;
    min-height: 46px;
    flex-wrap: wrap;
  }

  #connection-label {
    display: none;
  }

  #desktop-stage {
    top: 88px;
  }

  .session-controls {
    flex-wrap: wrap;
  }
}
