/* CSS Reset for all elements */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* Vanguard CSS Styles */
/* Base styles for both pages */
body {
  font-family: Arial, sans-serif;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  margin: 0;
  user-select: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  background-color: var(--systemBackground, #fff);
  color: var(--label, #1c1c1e);
  /* Home page background */
}
body.home {
  background-color: var(--secondarySystemBackground, #f2f2f7);
}
body {
  /* Success page background */
}
body.success {
  background-color: var(--tertiarySystemBackground, #f0f8ff);
}
body.success .animation {
  display: block;
}

.container {
  background-color: var(--systemBackground, #fff);
  padding: 15px;
  border-radius: 8px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  text-align: center;
  max-width: 600px;
  width: 100%;
  box-sizing: border-box;
  overflow-wrap: break-word;
  word-wrap: break-word;
}

h1 {
  color: var(--label, #1c1c1e);
}

p {
  margin-top: 10px;
}

p, .checkpoint-text, .info-content p, .joining-message {
  color: var(--secondaryLabel, rgba(60, 60, 67, 0.6));
}

/* Success page specific styles */
#countdownMessage {
  margin: 0px;
  color: var(--label, #1c1c1e);
  font-weight: bold;
}

/* WebGL cube animation or GIF */
.animation {
  width: 150px;
  height: 150px;
  margin: 20px auto;
  display: none;
  position: relative;
}
.animation canvas {
  width: 100% !important;
  height: 100% !important;
  display: block;
}

/* Form styles */
form {
  margin-top: 20px;
}

button {
  background-color: var(--AccentColor, #007aff);
  color: var(--systemBackground, #fff);
  border: none;
  padding: 10px 20px;
  border-radius: 5px;
  cursor: pointer;
  font-size: 16px;
}
button:disabled {
  background-color: var(--quaternaryLabel, #d1d1d6);
  color: var(--tertiaryLabel, #aeaeb2);
}

/* Challenge ID copy functionality */
.checkpoint-container {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 15px 0;
  justify-content: center;
}

.checkpoint-text {
  color: #555;
  font-weight: normal;
  white-space: nowrap;
}

.checkpoint-wrapper {
  position: relative;
  display: inline-block;
}

.clickable-checkpoint {
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  padding: 2px 4px;
  border-radius: 3px;
  transition: background-color 0.2s ease;
}
.clickable-checkpoint:hover {
  background-color: #e8f4f8;
}

/* Unified copy confirmation message styles */
.copied-message {
  position: absolute;
  background-color: var(--systemBlue, #007aff);
  color: white;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 500;
  display: none;
  white-space: nowrap;
  opacity: 1;
  transition: opacity 0.3s ease-out, transform 0.3s ease-out;
  z-index: 1000;
  pointer-events: none;
}
.copied-message.fade-out {
  opacity: 0;
}

/* Position variant for checkpoint (centered over element) */
.copied-message-checkpoint {
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}
.copied-message-checkpoint.fade-out {
  transform: translate(-50%, -70%);
}

/* Position variant for invite link (centered over link) */
.copied-message-invite {
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}
.copied-message-invite.fade-out {
  transform: translate(-50%, -70%);
}

@keyframes blink-gentle {
  0% {
    background-color: transparent;
  }
  50% {
    background-color: #cce7ff;
  }
  100% {
    background-color: transparent;
  }
}
.blink-animation {
  animation: blink-gentle 0.2s ease-in-out;
}

/* Error and retry styles */
.error-message {
  color: var(--systemRed, #ff3b30);
  font-weight: bold;
}

a.retry-link {
  color: var(--AccentColor, #007aff);
  text-decoration: none;
  display: inline-block;
  margin-top: 15px;
  padding: 8px 15px;
  border: 1px solid var(--AccentColor, #007aff);
  border-radius: 4px;
}
a.retry-link:hover {
  background-color: var(--AccentColor, #007aff);
  color: var(--systemBackground, #fff);
}

/* Progressive result styles */
.progressive-result {
  margin-top: 20px;
  padding: 15px;
  border-radius: 5px;
  border-left: 4px solid var(--separator, #ccc);
  color: var(--label, #1c1c1e);
}
.progressive-result.solved-result, .progressive-result.success-result {
  background-color: color-mix(in srgb, var(--systemGreen, #30d158) 10%, transparent);
  border-left-color: var(--systemGreen, #30d158);
}
.progressive-result.error-result {
  color: var(--systemRed, #ff3b30);
  background-color: color-mix(in srgb, var(--systemRed, #ff3b30) 10%, transparent);
  border-left-color: var(--systemRed, #ff3b30);
}
.progressive-result h2 {
  margin-top: 0;
  color: #333;
  font-size: 2.4em;
}

.status-title {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.status-badge {
  width: 1em;
  height: 1em;
  object-fit: contain;
}

.retry-link {
  background-color: var(--AccentColor, #007aff);
  color: var(--systemBackground, #fff);
  text-decoration: none;
  display: inline-block;
  margin-top: 15px;
  padding: 8px 15px;
  border: 1px solid var(--AccentColor, #007aff);
  border-radius: 4px;
}
.retry-link:hover {
  background-color: #0056b3;
}

/* Monospaced text style for challenge and result */
.monospaced-text {
  font-family: "Courier New", monospace;
  font-size: 12px;
  line-height: 1.4;
  background-color: var(--secondarySystemBackground, #f2f2f7);
  color: var(--label, #1c1c1e);
  border: 1px solid var(--separator, #e9ecef);
  border-radius: 4px;
  padding: 2px 4px;
  display: inline-block;
  word-break: break-all;
  word-wrap: break-word;
  white-space: pre-wrap;
  max-width: 100%;
  overflow-wrap: break-word;
  hyphens: none;
}

/* Challenge string styling */
#checkpointString {
  display: inline-block;
  word-break: break-all;
  word-wrap: break-word;
  white-space: pre-wrap;
  max-width: 100%;
  padding: 8px 12px;
  background-color: var(--secondarySystemBackground, #f2f2f7);
  color: var(--label, #1c1c1e);
  border: 1px solid var(--separator, #e9ecef);
  border-radius: 4px;
  font-family: "Courier New", monospace;
  font-size: 12px;
  line-height: 1.4;
  margin: 5px 0;
  overflow-wrap: break-word;
  hyphens: none;
}

/* Result number style (inherits monospaced-text) */
#resultNumber {
  margin-left: 0.5em;
  font-weight: bold;
  background-color: var(--secondarySystemBackground, #f2f2f7);
  border: 1px solid var(--separator, #e9ecef);
  border-radius: 4px;
  padding: 2px 4px;
  display: inline-block;
}

/* Code elements general styling */
code {
  font-family: "Courier New", monospace;
  background-color: var(--secondarySystemBackground, #f2f2f7);
  color: var(--label, #1c1c1e);
  padding: 2px 4px;
  border-radius: 3px;
  border: 1px solid var(--separator, #e9ecef);
}

/* Info section styling */
.info-section {
  margin-top: 30px;
  text-align: center;
}

.info-toggle {
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  text-align: center;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: var(--AccentColor, #007aff);
  text-decoration: none;
  margin: 0 auto;
}
.info-toggle:hover {
  color: #66a3ff;
  text-decoration: none;
}

.arrow {
  font-size: 12px;
  transition: transform 0.2s ease;
  color: #333;
}

.panel-box {
  background-color: var(--secondarySystemBackground, #f2f2f7);
  border: 1px solid #e9ecef;
  border-radius: 8px;
}

.info-content {
  padding: 15px;
  text-align: center;
  font-size: 14px;
  line-height: 1.5;
  color: #333;
}
.info-content p {
  margin: 10px 0;
  color: #555;
}
.info-content p:first-child {
  margin-top: 0;
}
.info-content p:last-child {
  margin-bottom: 0;
}

/* Footer styling */
.footer {
  margin-top: 20px;
  text-align: center;
  color: var(--tertiaryLabel, #aeaeb2);
  font-size: 14px;
}
.footer p {
  margin: 15px;
}

.footer-divider {
  border: none;
  border-top: 1px solid var(--separator, #dee2e6);
  margin: 20px auto 20px auto;
  width: 400px;
  /* Embossed divider effect */
  box-shadow: 0 1px 0 0 #fff, 0 -1px 0 0 #b0b0b0, 0 2px 4px #e0e0e0; /* soft drop shadow */
}

/* Chat info styling */
.chat-info {
  margin: 20px 0;
  padding: 15px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.group-photo {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  border: 2px solid var(--separator, #dee2e6);
  object-fit: cover;
}

.group-photo-placeholder {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  border: 2px solid var(--separator, #dee2e6);
  background-color: #0088cc;
  display: flex;
  align-items: center;
  justify-content: center;
}

.telegram-icon {
  width: 100%;
  height: 100%;
}

.joining-message {
  margin: 0;
  font-size: 16px;
  color: #333;
}

@keyframes cool-progress-shine-move {
  0% {
    left: -100%;
  }
  100% {
    left: 100%;
  }
}
/* Vanguard progress bar (from gotoquiz.com, adapted) */
.vanguard-progress-outer {
  background: var(--quaternaryLabel, #252525);
  border: 1px solid var(--separator, #000);
  border-radius: 8px;
  box-shadow: inset 1px 1px 3px 0 rgba(0, 0, 0, 0.8), 1px 1px 0 0 rgba(255, 255, 255, 0.12);
  height: 14px; /* 2/3 of 21px = 14px */
  width: 85%;
  margin-bottom: 10px;
  position: relative;
  margin-left: auto;
  margin-right: auto;
}

.vanguard-progress-label {
  color: var(--tertiaryLabel, #888);
  font-size: 12px;
  position: absolute;
  right: -32px;
  top: 0;
}

.vanguard-progress-inner {
  background-color: var(--AccentColor, #0A84FF);
  border-right: 1px solid #090909;
  border-radius: 7px;
  height: 100%;
  width: 0%;
  background-size: 100% 100%, 20px 20px, 100% 100%;
  background-image: linear-gradient(to bottom, rgba(255, 255, 255, 0.33) 0, rgba(255, 255, 255, 0.08) 50%, rgba(0, 0, 0, 0.25) 50%, rgba(0, 0, 0, 0.1) 100%), linear-gradient(45deg, rgba(255, 255, 255, 0.16) 25%, rgba(0, 0, 0, 0) 25%, rgba(0, 0, 0, 0) 50%, rgba(255, 255, 255, 0.16) 50%, rgba(255, 255, 255, 0.16) 75%, rgba(0, 0, 0, 0) 75%, rgba(0, 0, 0, 0)), linear-gradient(to right, #007AFF, #0A84FF);
  box-shadow: inset 0 1px 1px 0px rgba(255, 215, 215, 0.5), inset 0 -1px 1px 0px rgba(255, 255, 255, 0.25), 1px 1px 3px 0 rgba(0, 0, 0, 0.33);
  animation: progress-shine-reverse 0.4s linear infinite;
  transition: none;
}
.vanguard-progress-inner.vanguard-progress-error {
  background-color: var(--systemRed, #ff3b30);
  background-image: linear-gradient(to bottom, rgba(255, 255, 255, 0.33) 0, rgba(255, 255, 255, 0.08) 50%, rgba(0, 0, 0, 0.25) 50%, rgba(0, 0, 0, 0.1) 100%), linear-gradient(45deg, rgba(255, 255, 255, 0.16) 25%, rgba(0, 0, 0, 0) 25%, rgba(0, 0, 0, 0) 50%, rgba(255, 255, 255, 0.16) 50%, rgba(255, 255, 255, 0.16) 75%, rgba(0, 0, 0, 0) 75%, rgba(0, 0, 0, 0)), linear-gradient(to right, #FF3B30, #FF453A);
  animation: none !important;
}
.vanguard-progress-inner.vanguard-progress-success {
  background-color: var(--systemGreen, #30d158);
  background-image: linear-gradient(to bottom, rgba(255, 255, 255, 0.33) 0, rgba(255, 255, 255, 0.08) 50%, rgba(0, 0, 0, 0.25) 50%, rgba(0, 0, 0, 0.1) 100%), linear-gradient(45deg, rgba(255, 255, 255, 0.16) 25%, rgba(0, 0, 0, 0) 25%, rgba(0, 0, 0, 0) 50%, rgba(255, 255, 255, 0.16) 50%, rgba(255, 255, 255, 0.16) 75%, rgba(0, 0, 0, 0) 75%, rgba(0, 0, 0, 0)), linear-gradient(to right, #5cb85c, #3e8e41);
  border-right: 1px solid #3e8e41;
}

@keyframes progress-shine-reverse {
  0% {
    background-position: 0 0, 20px 0, 0 0;
  }
  100% {
    background-position: 0 0, 0 0, 0 0;
  }
}
#infoBoxContainer {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 20px;
  width: 100%;
}

.info-box {
  display: block;
  width: 100%;
  box-sizing: border-box;
  background-color: var(--secondarySystemBackground, #f2f2f7);
  color: var(--label, #1c1c1e);
  border-radius: 4px;
  font-family: "Courier New", monospace;
  font-size: 14px;
  cursor: default;
  word-break: break-all;
  padding: 10px;
  margin: 5px;
  line-height: 1.5;
  letter-spacing: 0;
}

.info-row {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  margin: 0;
  padding: 2px;
}

.info-col-left,
.info-col-right {
  margin: 0;
  padding: 0;
  line-height: 1;
  white-space: pre-wrap;
}

.info-col-right {
  text-align: right;
  flex: 0 0 auto;
  min-width: 60px;
  margin-left: 16px;
}

/* Invite link success styles */
.invite-link-container {
  padding: 15px;
  border-radius: 8px;
}

.invite-label {
  display: block;
  margin-bottom: 10px;
  font-size: 14px;
  color: var(--secondaryLabel, #636366);
}

.invite-link-wrapper {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background-color: var(--systemBackground, #fff);
  padding: 8px 12px;
  border-radius: 6px;
  border: 1px solid var(--separator, #c6c6c8);
}

.invite-link-text-wrapper {
  position: relative;
  display: inline-block;
}

.invite-link {
  color: var(--systemBlue, #007aff);
  text-decoration: none;
  font-size: 14px;
  letter-spacing: 0.5px;
}
.invite-link:hover {
  text-decoration: underline;
}

.copy-invite-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
}

.copy-invite-icon {
  width: 18px;
  height: 18px;
  display: block;
  object-fit: contain;
}

.redirect-controls p {
  margin-bottom: 15px;
  color: var(--secondaryLabel, #636366);
}

.join-now-btn {
  background-color: var(--systemBlue, #007aff);
  color: white;
  border: none;
  padding: 10px 24px;
  border-radius: 6px;
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.2s;
}
.join-now-btn:hover {
  background-color: color-mix(in srgb, var(--systemBlue, #007aff) 85%, black);
}
.join-now-btn:active {
  transform: scale(0.98);
}

.dev-mode,
body:has(.dev-mode-banner) {
  justify-content: flex-start;
  padding-top: 24px;
}

.dev-mode-banner {
  width: 100%;
  text-align: center;
  font-size: 64px;
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: 2px;
  color: var(--systemRed, #ff3b30);
  margin-bottom: 16px;
  order: -1;
  pointer-events: none;
}

/*# sourceMappingURL=vanguard.css.map */
