.ssp-diabolocom {
  width: 100%;
  max-width: 660px;
  margin: 0 auto;
  font-family: "Atkinson Hyperlegible", Georgia, serif;
  color: #111;
}

.ssp-diabolocom * {
  box-sizing: border-box;
}

.ssp-diabolocom-launch,
.ssp-diabolocom-connect,
.ssp-diabolocom-refresh-button {
  font-family: inherit;
  font-weight: 700;
}

.ssp-diabolocom-launch {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  max-width: 420px;
  min-height: 56px;
  margin: 0 auto;
  padding: 16px 24px;
  border: 0;
  border-radius: 14px;
  background: #0d7a55;
  color: #fff;
  cursor: pointer;
  font-size: clamp(16px, 3vw, 20px);
  line-height: 1.2;
  text-align: center;
  box-shadow: 0 4px 20px rgba(13, 122, 85, 0.3);
  transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
}

.ssp-diabolocom-launch[hidden] {
  display: none;
}

.ssp-diabolocom-launch:disabled {
  cursor: wait;
  opacity: 0.8;
}

.ssp-diabolocom-button-spinner,
.ssp-diabolocom-loader-spinner {
  width: 20px;
  height: 20px;
  border: 3px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: ssp-diabolocom-spin 0.8s linear infinite;
}

.ssp-diabolocom-button-spinner {
  display: none;
}

.ssp-diabolocom-launch.is-loading .ssp-diabolocom-button-spinner {
  display: inline-block;
}

.ssp-diabolocom-loader {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 100%;
  max-width: 420px;
  min-height: 56px;
  margin: 1rem auto 0;
  padding: 14px 18px;
  border: 2px solid #0d7a55;
  border-radius: 14px;
  background: #f0faf5;
  color: #0a5c40;
  font-size: 16px;
  font-weight: 700;
  text-align: center;
}

.ssp-diabolocom-loader[hidden] {
  display: none;
}

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

.ssp-diabolocom-launch:hover,
.ssp-diabolocom-connect:hover {
  background: #0a6144;
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(13, 122, 85, 0.45);
}

.ssp-diabolocom-panel {
  width: 100%;
}

.ssp-diabolocom-content {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.ssp-diabolocom-card {
  width: 100%;
  border-radius: 24px;
  padding: 2.5rem 2rem 2rem;
  text-align: center;
  border: 4px solid #ddd;
  background: #fff;
  transition: background 0.5s ease, border-color 0.5s ease;
}

.ssp-diabolocom-card.green {
  background: #f0faf5;
  border-color: #0d7a55;
}

.ssp-diabolocom-card.red {
  background: #fdf3f3;
  border-color: #c0392b;
}

.ssp-diabolocom-voyant {
  position: relative;
  width: 120px;
  height: 120px;
  margin: 0 auto 1.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ssp-diabolocom-voyant-ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  opacity: 0;
}

.ssp-diabolocom-voyant-core {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  background: #ddd;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 34px;
  font-weight: 700;
  line-height: 1;
  position: relative;
  z-index: 1;
  transition: background 0.5s;
}

.ssp-diabolocom-voyant.green .ssp-diabolocom-voyant-core {
  background: #0d7a55;
  animation: ssp-diabolocom-glow-green 2s infinite;
}

.ssp-diabolocom-voyant.green .ssp-diabolocom-voyant-ring {
  background: rgba(13, 122, 85, 0.18);
  animation: ssp-diabolocom-ring-expand 2s ease-out infinite;
}

.ssp-diabolocom-voyant.red .ssp-diabolocom-voyant-core {
  background: #c0392b;
  animation: ssp-diabolocom-glow-red 2.5s infinite;
}

.ssp-diabolocom-voyant.red .ssp-diabolocom-voyant-ring {
  background: rgba(192, 57, 43, 0.15);
  animation: ssp-diabolocom-ring-expand 2.5s ease-out infinite;
}

@keyframes ssp-diabolocom-ring-expand {
  0% {
    opacity: 0.7;
    transform: scale(1);
  }

  100% {
    opacity: 0;
    transform: scale(1.7);
  }
}

@keyframes ssp-diabolocom-glow-green {
  0% {
    box-shadow: 0 0 0 0 rgba(13, 122, 85, 0.5);
  }

  70% {
    box-shadow: 0 0 0 20px rgba(13, 122, 85, 0);
  }

  100% {
    box-shadow: 0 0 0 0 rgba(13, 122, 85, 0);
  }
}

@keyframes ssp-diabolocom-glow-red {
  0% {
    box-shadow: 0 0 0 0 rgba(192, 57, 43, 0.5);
  }

  70% {
    box-shadow: 0 0 0 20px rgba(192, 57, 43, 0);
  }

  100% {
    box-shadow: 0 0 0 0 rgba(192, 57, 43, 0);
  }
}

.ssp-diabolocom-title {
  font-size: clamp(22px, 5vw, 34px);
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 1rem;
  color: #222;
  transition: color 0.4s;
}

.ssp-diabolocom-card.green .ssp-diabolocom-title {
  color: #0a5c40;
}

.ssp-diabolocom-card.red .ssp-diabolocom-title {
  color: #7b241c;
}

.ssp-diabolocom-message {
  font-size: clamp(15px, 3vw, 20px);
  line-height: 1.7;
  color: #555;
  max-width: 500px;
  margin: 0 auto;
  transition: color 0.4s;
}

.ssp-diabolocom-card.green .ssp-diabolocom-message,
.ssp-diabolocom-card.green .ssp-diabolocom-count {
  color: #1a6b4a;
}

.ssp-diabolocom-card.red .ssp-diabolocom-message,
.ssp-diabolocom-card.red .ssp-diabolocom-count {
  color: #7b241c;
}

.ssp-diabolocom-count {
  margin-top: 1rem;
  font-size: 17px;
  font-weight: 700;
  color: #555;
}

.ssp-diabolocom-detail {
  max-width: 520px;
  margin: 0.75rem auto 0;
  color: #666;
  font-size: 14px;
  line-height: 1.5;
}

.ssp-diabolocom-divider {
  width: 60px;
  height: 3px;
  background: #0d7a55;
  border-radius: 2px;
  margin: 1.75rem auto 1.5rem;
  display: none;
}

.ssp-diabolocom-card.green .ssp-diabolocom-divider {
  display: block;
}

.ssp-diabolocom-connect-wrap {
  display: none;
}

.ssp-diabolocom-connect-wrap[hidden] {
  display: none !important;
}

.ssp-diabolocom-card.green .ssp-diabolocom-connect-wrap {
  display: block;
}

.ssp-diabolocom-connect {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: 420px;
  min-height: 56px;
  padding: 16px 24px;
  border-radius: 14px;
  background: #0d7a55;
  color: #fff;
  font-size: clamp(16px, 3vw, 20px);
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  box-shadow: 0 4px 20px rgba(13, 122, 85, 0.3);
  transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
}

.ssp-diabolocom-refresh {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 1rem 1.25rem;
  border: 2px solid #ddd;
  border-radius: 14px;
  background: #fff;
}

.ssp-diabolocom-last-update {
  font-size: 15px;
  font-weight: 700;
  color: #888;
}

.ssp-diabolocom-refresh-button {
  padding: 9px 16px;
  border: 2px solid #bbb;
  border-radius: 10px;
  background: #fff;
  color: #111;
  cursor: pointer;
  font-size: 15px;
  transition: background 0.15s;
}

.ssp-diabolocom-refresh-button:hover {
  background: #f0f0ee;
}

.ssp-diabolocom-error {
  display: none;
  width: 100%;
  padding: 18px;
  border: 3px solid #e74c3c;
  border-radius: 14px;
  background: #fdf0f0;
}

.ssp-diabolocom-error.show {
  display: block;
}

.ssp-diabolocom-error-header {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.ssp-diabolocom-error-code {
  padding: 4px 12px;
  border-radius: 999px;
  background: #f5b7b1;
  color: #6e1208;
  font-family: monospace;
  font-size: 14px;
  font-weight: 700;
}

.ssp-diabolocom-error-type {
  color: #922b21;
  font-size: 17px;
  font-weight: 700;
}

.ssp-diabolocom-error-message {
  color: #922b21;
  font-size: 16px;
  margin-bottom: 10px;
}

.ssp-diabolocom-error-toggle {
  padding: 4px 0;
  border: 0;
  background: none;
  color: #922b21;
  cursor: pointer;
  font-family: inherit;
  font-size: 15px;
  text-decoration: underline;
}

.ssp-diabolocom-error-detail {
  display: none;
  margin-top: 10px;
  padding: 12px 14px;
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.06);
  color: #6e1208;
  font-family: monospace;
  font-size: 13px;
  white-space: pre-wrap;
  word-break: break-all;
}

.ssp-diabolocom-error-detail.show {
  display: block;
}

@media (max-width: 600px) {
  .ssp-diabolocom-card {
    padding: 1.75rem 1.25rem;
    border-radius: 20px;
  }

  .ssp-diabolocom-voyant {
    width: 100px;
    height: 100px;
    margin-bottom: 1.5rem;
  }

  .ssp-diabolocom-voyant-core {
    width: 84px;
    height: 84px;
    font-size: 28px;
  }

  .ssp-diabolocom-refresh {
    align-items: stretch;
    flex-direction: column;
  }

  .ssp-diabolocom-refresh-button {
    width: 100%;
  }
}
