/* Purple Modern Dashboard Theme */
:root {
  color-scheme: dark light;
  --bg: #050016;
  /* --bg: #27246e; */
  --fg: #fff;
  --muted: #b39ddb;
  --accent: #383a3c;
  --tab-accent: #050016;
  --accent-green: #2ecc40;
  --card: #121212;
  --border: #3c256b;
  --header: #000;
  --tab-bg: #130b35;
  --input-bg: #4d4d4d;
  --btn-bg: #0c0443;
  --tab-active: #050016;
  --tab-inactive: #b39ddb;
}

body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: 'Segoe UI', 'Roboto', 'Helvetica Neue', Arial, sans-serif;
  color: #e9efe1;
  min-height: 100vh;
  width: 100vw;
  overflow-x: hidden;
}

[hidden] {
  display: none !important;
}

.main-grid {
  display: flex;
  padding: 20px;
  box-sizing: border-box;
  flex-direction: column;
}


header {
  background: var(--header);
  padding: 18px 32px;
  border-bottom: 2px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 2px 12px rgba(162, 89, 230, 0.08);
}

header h1 {
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: .5px;
  margin: 0;
}



section {
  /* margin: 32px 0 0 0; */
  padding: 10px 32px;
}

.card {
  background: var(--card);
  border: 2px solid var(--border);
  border-radius: 4px;
  padding: 20px;
  box-shadow: 0 4px 24px rgba(162, 89, 230, 0.10);
  margin-bottom: 24px;
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.row {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
}

label {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 8px;
  display: block;
}

.login-field{
  width: 100%;
}

select, input {
  background: var(--input-bg);
  color: var(--fg);
  border: 1.5px solid var(--border);
  padding: 8px 12px;
  font-size: 1rem;
  margin-bottom: 8px;
}

.btn,
button {
  background: var(--btn-bg);
  color: var(--fg);
  border: none;
  padding: 18px 50px;
  font-size: 1rem;
  cursor: pointer;
  letter-spacing: .1rem;
  font-weight: bold;
  margin-bottom: 8px;
  text-decoration: none;
}

.btn:hover,
button:hover {
  box-shadow: 0 2px 8px rgb(195 152 236 / 69%);
}

button.primary {
  background: var(--accent);
  color: #fff;
  border: none;
  font-weight: 600;
  box-shadow: 0 2px 8px rgba(162, 89, 230, 0.12);
  transition: background 0.2s;
}

button.primary:hover {
  background: #7c3aed;
}

img {
  max-width: 100%;
  height: auto;
  border-radius: 14px;
  border: 2px solid var(--border);
  box-shadow: 0 2px 12px rgba(162, 89, 230, 0.10);
}

.log {
  font-family: 'Fira Mono', 'Consolas', 'Menlo', monospace;
  white-space: pre-wrap;
  max-height: 45vh;
  overflow: auto;
  background: #000;
  padding: 14px;
  font-size: 14px;
}

.hint {
  color: var(--muted);
  font-size: 13px;
}



/* Login overlay */
#login-view {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

#login-view .header {
  width: 100%;
  display: flex;
  justify-content: center;
  background: var(--header);
  padding: 18px 32px;
  border-bottom: 2px solid var(--border);
}

#login-view h1 {
  font-size: 2rem;
  margin-bottom: 24px;
}

#loginForm {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 20px;
  background: var(--bg);
  padding: 32px 28px;
  /* border-radius: 12px; */
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.10);
}

#loginForm label {
  font-size: 1rem;
  color: #e9efe1;
}

#loginForm input {
  padding: 10px;
  border-bottom: 1px solid #444;
  background: #232526;
  color: #e9efe1;
  font-size: 1rem;
}

#loginForm input:focus {
  /* border-color: #b6e388; */
  outline: none;
}

.error {
  color: #ff6b6b;
  margin-top: 8px;
  font-weight: 500;
  text-align: center;
}


/* ImageDecoder */

.wrap {
  max-width: 1100px;
  margin: 32px auto;
  padding: 0 16px;
}

.panel {
  background: #11141a;
  border: 1px solid #1c2230;
  padding: 16px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .25);
}

.row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
  margin-bottom: 12px;
}

label {
  color: var(--muted);
}

#url, #file {
  width: 420px;
  max-width: 100%;
}


button.primary {
  background: #0f1b2a;
  border-color: #25405d;
}

button:disabled {
  opacity: .6;
  cursor: not-allowed;
}



/* Fullscreen Loader Overlay */
#loader-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100vw;
  height: 100vh;
  background: #111;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
}

.loader-spinner {
  width: 64px;
  height: 64px;
  border: 8px solid #222;
  border-top: 8px solid #a259e6;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

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

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