/* ===== DevOps card layout ===== */

.devops-wrapper {
  max-width: 1000px;
  margin: 40px auto;
  padding: 0 16px;
}

.devops-container {
  background: #020617;
  color: #e5e7eb;
  padding: 24px 22px 20px;
  border-radius: 16px;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  border: 1px solid #1f2937;
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.55);
}

.devops-container.light {
  background: #f9fafb;
  color: #111827;
  border-color: #e5e7eb;
  box-shadow: 0 14px 40px rgba(15, 23, 42, 0.25);
}

.devops-title {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 4px;
}

.devops-subtitle {
  font-size: 13px;
  color: #94a3b8;
  margin-bottom: 18px;
}

.devops-container.light .devops-subtitle {
  color: #6b7280;
}

.devops-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
}

/* Tab buttons */

.devops-container .devops-btn {
  padding: 6px 14px;
  border-radius: 999px;
  border: 1px solid #1e293b !important;
  background: #111827 !important;
  cursor: pointer;
  color: #e5e7eb !important;
  font-size: 12px;
  line-height: 1.2;
}

.devops-container.light .devops-btn {
  background: #e5e7eb !important;
  border-color: #d1d5db !important;
  color: #111827 !important;
}

.devops-container .devops-btn.active {
  background: linear-gradient(135deg, #2563eb, #38bdf8) !important;
  border-color: transparent !important;
  color: #ffffff !important;
}

.devops-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-bottom: 8px;
  justify-content: space-between;
}

.devops-toolbar-left,
.devops-toolbar-right {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.devops-container .devops-cta-btn {
  border-radius: 999px;
  border: none;
  padding: 6px 14px;
  font-size: 12px;
  cursor: pointer;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.devops-container .run-button {
  background: linear-gradient(135deg, #22c55e, #4ade80);
  color: #052e16;
}

.devops-container .copy-button {
  background: #020617;
  border: 1px solid #1f2937;
  color: #e5e7eb;
}

.devops-container .theme-button {
  background: #020617;
  border: 1px solid #1f2937;
  color: #e5e7eb;
  display: flex;
  align-items: center;
  gap: 4px;
}

.devops-container.light .copy-button,
.devops-container.light .theme-button {
  background: #ffffff;
  color: #111827;
  border-color: #d1d5db;
}

.theme-button span {
  font-size: 11px;
  opacity: 0.8;
}

.devops-container pre {
  background: #020617;
  border-radius: 12px;
  padding: 14px 16px;
  border: 1px solid #1e293b;
  overflow-x: auto;
  color: #e2e8f0;
  font-size: 12px;
  line-height: 1.5;
  margin: 0;
}

.devops-container.light pre {
  background: #111827;
  color: #e5e7eb;
  border-color: #1f2937;
}

.devops-container code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono",
    "Courier New", monospace;
}

.output-box {
  margin-top: 16px;
  padding: 14px 16px;
  border-radius: 12px;
  border: 1px dashed #22c55e;
  background: rgba(22, 163, 74, 0.08);
  display: none;
}

.output-title {
  font-size: 13px;
  font-weight: 600;
  margin: 0 0 4px;
  color: #bbf7d0;
}

.output-box p {
  font-size: 13px;
  color: #bbf7d0;
  margin: 0 0 6px;
  line-height: 1.6;
}

.devops-footnote {
  margin-top: 10px;
  font-size: 11px;
  color: #64748b;
}

.devops-container.light .devops-footnote {
  color: #9ca3af;
}

/* ===== Center Popup + Confetti ===== */

.devops-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.7);
  backdrop-filter: blur(4px);
  display: none;
  z-index: 50;
}

.devops-modal {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 51;
}

.devops-modal.active,
.devops-modal-backdrop.active {
  display: flex;
}

.devops-modal-card {
  position: relative;
  background: #020617;
  border-radius: 20px;
  padding: 24px 28px 20px;
  border: 1px solid #22c55e;
  box-shadow: 0 22px 60px rgba(0, 0, 0, 0.7);
  max-width: 380px;
  text-align: center;
  color: #e5e7eb;
  overflow: hidden;
}

.devops-modal-title {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 8px;
}

.devops-modal-text {
  font-size: 14px;
  color: #d1fae5;
  margin: 0 0 14px;
}

.devops-modal .devops-modal-close {
  margin-top: 4px;
}

/* Confetti animation */

.devops-modal-confetti {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.devops-modal-confetti span {
  position: absolute;
  width: 6px;
  height: 12px;
  background: #22c55e;
  border-radius: 2px;
  animation: devops-confetti-fall 1.4s linear infinite;
}

.devops-modal-confetti span:nth-child(2) {
  left: 20%;
  background: #38bdf8;
  animation-delay: -0.3s;
}

.devops-modal-confetti span:nth-child(3) {
  left: 40%;
  background: #facc15;
  animation-delay: -0.6s;
}

.devops-modal-confetti span:nth-child(4) {
  left: 60%;
  background: #fb7185;
  animation-delay: -0.9s;
}

.devops-modal-confetti span:nth-child(5) {
  left: 80%;
  background: #a855f7;
  animation-delay: -1.1s;
}

.devops-modal-confetti span:nth-child(6) {
  left: 10%;
  background: #4ade80;
  animation-delay: -1.3s;
}

@keyframes devops-confetti-fall {
  0% {
    top: -20px;
    transform: translateX(0) rotate(0deg);
    opacity: 0;
  }
  20% {
    opacity: 1;
  }
  100% {
    top: 120%;
    transform: translateX(15px) rotate(260deg);
    opacity: 0;
  }
}

/* Light theme modal */

.devops-container.light + .devops-modal-backdrop + .devops-modal .devops-modal-card {
  background: #ffffff;
  color: #022c22;
}