body {
    margin: 0;
    padding: 0;
    font-family: Arial, sans-serif;
    background: #f5f7fb;
    color: #2f3542;
}

.container {
    max-width: 1100px;
    margin: 40px auto;
    padding: 20px;
}

.card {
    background: white;
    border-radius: 18px;
    padding: 28px;
    margin-bottom: 24px;
    box-shadow: 0 4px 18px rgba(0,0,0,0.05);
}

.hero-card {
    text-align: center;
}

h1 {
    font-size: 42px;
    margin-bottom: 24px;
}

h2 {
    margin-top: 0;
}

input[type="text"] {
    width: 100%;
    padding: 18px;
    border-radius: 12px;
    border: 1px solid #dfe4ea;
    font-size: 16px;
    box-sizing: border-box;
}

.hint {
    margin-top: 8px;
    color: #747d8c;
    font-size: 14px;
    text-align: left;
}

button {
    margin-top: 24px;
    background: #a29bfe;
    border: none;
    color: white;
    padding: 16px 28px;
    border-radius: 12px;
    cursor: pointer;
    font-size: 16px;
}

button:hover {
    opacity: 0.9;
}

.switch-row {
    display: flex;
    align-items: center;
    margin-top: 24px;
    gap: 16px;
}

.switch {
    position: relative;
    display: inline-block;
    width: 56px;
    height: 30px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #dfe6e9;
    transition: .4s;
    border-radius: 34px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 22px;
    width: 22px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

input:checked + .slider {
    background-color: #81ecec;
}

input:checked + .slider:before {
    transform: translateX(26px);
}

.result-row {
    display: flex;
    justify-content: space-between;
    padding: 14px 0;
    border-bottom: 1px solid #f1f2f6;
    gap: 20px;
    flex-wrap: wrap;
}

.success {
    color: #019200;
}

.failed {
    color: #ff6b81;
}

footer {
    text-align: center;
    padding: 40px;
    color: #747d8c;
}

.processing-spinner {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    border: 8px solid #dfe6e9;
    border-top-color: #a29bfe;
    animation: spin 1s linear infinite;
    margin: 30px auto;
}

#processing-overlay {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;

  display: flex;
  align-items: center;
  justify-content: center;

  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(8px);

  z-index: 999999;
}

.chart-card {
    height: 320px;
}

canvas {
    width: 100% !important;
    height: 240px !important;
}

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

#running-tests {
  margin-top: 28px;

  text-align: center;

  font-size: 1.3rem;
  font-weight: 800;
  letter-spacing: 0.08em;

  color: #ffffff;

  text-transform: uppercase;

  visibility: hidden;

  animation: blink 1s infinite;
}

#running-tests.visible {
  visibility: visible;
}

@keyframes blink {
  0%, 50% {
    opacity: 1;
  }

  51%, 100% {
    opacity: 0.25;
  }
}

.footer { 
  text-align: center; 
  color: #94a3b8; 
  padding: 30px; 
  font-size: 0.9rem; 

  position: relative;
  z-index: 1;  
  
  }

.footer a {
  color: #60a5fa;        /* nice blue */
  text-decoration: none;
}

.footer a:hover {
  color: #a78bfa;        /* purple hover */
  text-decoration: underline;
}


.float-right {
  float: right;
}

.badge-row {
  display: flex;
  align-items: center;   /* THIS fixes vertical misalignment */
  gap: 10px;              /* spacing between items */
}

.badge { display: inline-block; padding: 8px 14px; border-radius: 999px; font-size: 0.9rem; font-weight: 600; }
.badge-ok { background: #dcfce7; color: #166534; }
.badge-info { background: #94FFF4; color: #166534; }
.badge-bad { background: #fee2e2; color: #991b1b; }


.title-row {
  display: flex;
  align-items: center;   /* keeps button vertically centered in h1 */
  justify-content: space-between;
}

.inline-form {
  margin: 0;
  display: inline-flex;
}

.inline-form button {
  line-height: 1;
  display: inline-flex;
  align-items: center;
}

input[name="target"] {
  background-color: #FFF8C1; 
  border: 2px solid #3b82f6; 
  border-radius: 6px;        
  padding: 10px;             
  outline: none;        

  width: 100%;              
  max-width: 50%;    
       
}


input[name="target"]:focus {
  border-color: #1d4ed8;     
  background-color: #ffffff; 
}


#processing-overlay.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}


.spinner-container {
  width: 420px;
  color: white;
  font-family: system-ui, sans-serif;
}

/* SPINNER */
.spinner {
  width: 72px;
  height: 72px;

  margin: 0 auto 30px auto;

  border: 6px solid rgba(255,255,255,0.15);
  border-top: 6px solid #60a5fa;
  border-right: 6px solid #a78bfa;

  border-radius: 50%;

  animation: spin 1s linear infinite;
}

/* IMPORTANT: hidden by default */
.status-line {
  display: flex;
  align-items: center;

  opacity: 0;

  transform: translateY(6px);

  transition:
    opacity 0.35s ease,
    transform 0.35s ease;

  margin-bottom: 14px;
}

/* becomes visible via JS */
.status-line.visible {
  opacity: 1;
  transform: translateY(0);
}

.dots {
  flex: 1;
  border-bottom: 2px dotted rgba(255,255,255,0.25);
  margin: 0 12px;
  height: 1px;
}

.checkmark {
  color: #22c55e;
  font-weight: bold;

  opacity: 0;
  transform: scale(0.5);

  transition:
    opacity 0.25s ease,
    transform 0.25s ease;
}

.checkmark.visible {
  opacity: 1;
  transform: scale(1);
}

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