:root {
  --anticap-bg: #ffffff;
  --anticap-text: #202124;
  --anticap-border: #dadce0;
  --anticap-primary: #1a73e8;
  --anticap-success: #34a853;
  --anticap-error: #ea4335;
}

[data-pc-theme="dark"] {
  --anticap-bg: #1f1f1f;
  --anticap-text: #e8eaed;
  --anticap-border: #3c4043;
  --anticap-primary: #8ab4f8;
  --anticap-success: #81c995;
  --anticap-error: #f28b82;
}

[data-id="anticap-root"] {
  width: 320px;
  margin: 0 auto;
  font-family: system-ui, sans-serif;
  color: var(--anticap-text);
}

.anticap-toggle {
  width: 320px;
  height: 70px;
  padding: 0 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid var(--anticap-border);
  border-radius: 6px;
  background: var(--anticap-bg);
  color: var(--anticap-text);
  cursor: pointer;
  transition: 0.2s;
}

.anticap-toggle, label {
  font-weight: 600;
  font-size: 16px;
}

.anticap-toggle:hover {
  border-color: var(--anticap-border);
  box-shadow: none;
}

.anticap-checkbox {
  display: none;
}

.anticap-toggle .box {
  width: 24px;
  height: 24px;
  border: 2px solid #5f6368;
  border-radius: 4px;
  display: flex;
  justify-content: center;
  align-items: center;
  transition: 0.2s;
}

.spinner {
  width: 16px;
  height: 16px;
  border: 3px solid transparent;
  border-top-color: var(--anticap-primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.anticap-checkbox:checked + .box {
  background: var(--anticap-primary);
  border-color: var(--anticap-primary);
  position: relative;
}

.anticap-checkbox:checked + .box::after {
  content: "";
  position: absolute;
  width: 5px;
  height: 10px;
  border-right: 2px solid #fff;
  border-bottom: 2px solid #fff;
  transform: rotate(45deg) translate(-1px, -1px);
}

.anticap-toggle.verified .label {
  color: var(--anticap-primary);
  font-weight: 600;
}

.anticap-box {
  width: 320px;
  margin-top: 8px;
  border: 1px solid var(--anticap-border);
  border-radius: 6px;
  background: var(--anticap-bg);
  opacity: 0;
  transform: translateY(-5px);
  transition: all 0.3s ease;
  overflow: hidden;
}

.anticap-box.show {
  opacity: 1;
  transform: translateY(0);
}

.anticap-hidden {
  display: none !important;
}

.anticap-header {
  padding: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.anticap-label {
  font-weight: 600;
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.anticap-info-label {
  font-weight: 600;
  font-size: 16px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.anticap-info-hidden {
  display: none !important;
}

.anticap-preview {
  width: 30px;
  height: 30px;
  border-radius: 4px;
  border: 1px solid var(--anticap-border);
  object-fit: cover;
}

.anticap-divider {
  height: 1px;
  background: var(--anticap-border);
  margin: 0;
}

.anticap-content {
  padding: 8px;
}

.anticap-grid {
  display: grid;
  grid-template-columns: repeat(6, 45px);
  gap: 4px;
  justify-content: center;
  margin-top: 4px;
}

.anticap-item {
  width: 45px;
  height: 45px;
  border: 1px solid var(--anticap-border);
  border-radius: 6px;
  background: var(--anticap-bg);
  cursor: pointer;
  display: flex;
  justify-content: center;
  align-items: center;
  transition: 0.2s;
}

.anticap-item img {
  width: 80%;
  height: 80%;
  object-fit: contain;
  pointer-events: none;
}

.anticap-item.correct {
  border: 2px solid var(--anticap-success);
  background: rgba(52,168,83,0.1);
}

.anticap-item.wrong {
  border: 2px solid var(--anticap-error);
  background: rgba(234,67,53,0.1);
  animation: shake 0.5s ease-in-out;
}

@keyframes shake {
  0%,100% { transform: translateX(0); }
  25% { transform: translateX(-3px); }
  75% { transform: translateX(3px); }
}

.anticap-feedback {
  margin-top: 6px;
  text-align: center;
  font-weight: 500;
}

.anticap-feedback.success {
  color: #006400;
  font-weight: 600;
}
.anticap-feedback.error {
  color: #8B0000;
  font-weight: 600;
}


.anticap-footer {
  padding: 6px 0;
  text-align: center;
}
.anticap-footer a {
  text-decoration: none;
  color: var(--anticap-primary);
  font-size: 13px;
}
.anticap-footer a:hover {
  text-decoration: underline;
}