#complianceModalOverlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  z-index: 2100;
  animation: complianceFadeIn 0.3s ease;
}

#complianceModalOverlay.active {
  display: flex;
  align-items: center;
  justify-content: center;
}

@keyframes complianceFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes complianceSlideUp {
  from {
    transform: translateY(50px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.compliance-modal {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(40px) saturate(200%);
  -webkit-backdrop-filter: blur(40px) saturate(200%);
  border-radius: 28px;
  padding: 32px;
  max-width: 560px;
  width: 90%;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  position: relative;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25), 0 0 0 1px rgba(0, 0, 0, 0.05);
  animation: complianceSlideUp 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.compliance-header {
  text-align: center;
  margin-bottom: 20px;
  flex-shrink: 0;
}

.compliance-header h2 {
  color: #1d1d1f;
  font-size: 1.5rem;
  margin-bottom: 8px;
  font-weight: 600;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", sans-serif;
}

.compliance-header p {
  color: rgba(0, 0, 0, 0.6);
  font-size: 0.9rem;
}

.compliance-content {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  background: rgba(0, 0, 0, 0.03);
  border-radius: 16px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  margin-bottom: 20px;
  max-height: 400px;
  font-size: 14px;
  line-height: 1.6;
  color: rgba(0, 0, 0, 0.8);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", sans-serif;
}

.compliance-content::-webkit-scrollbar {
  width: 8px;
}

.compliance-content::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.05);
  border-radius: 4px;
}

.compliance-content::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.2);
  border-radius: 4px;
}

.compliance-content::-webkit-scrollbar-thumb:hover {
  background: rgba(0, 0, 0, 0.3);
}

.compliance-content h3 {
  color: #1d1d1f;
  font-size: 1rem;
  font-weight: 600;
  margin-top: 20px;
  margin-bottom: 10px;
}

.compliance-content h3:first-child {
  margin-top: 0;
}

.compliance-content p {
  margin-bottom: 12px;
}

.compliance-content ul {
  margin: 0 0 12px 0;
  padding-left: 24px;
}

.compliance-content li {
  margin-bottom: 6px;
}

.compliance-footer-note {
  margin-top: 24px;
  padding: 16px;
  background: rgba(28, 156, 252, 0.08);
  border-radius: 12px;
  border: 1px solid rgba(28, 156, 252, 0.2);
}

.compliance-footer-note strong {
  color: #1d1d1f;
  display: block;
  margin-bottom: 4px;
}

.compliance-footer {
  flex-shrink: 0;
}

.scroll-hint {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: rgba(0, 0, 0, 0.5);
  font-size: 13px;
  margin-bottom: 16px;
  transition: opacity 0.3s ease;
}

.scroll-hint.hidden {
  opacity: 0;
  pointer-events: none;
}

.scroll-hint svg {
  animation: bounce 1.5s infinite;
}

@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(4px); }
}

.compliance-checkbox {
  margin-bottom: 16px;
  padding: 16px;
  background: rgba(255, 149, 0, 0.08);
  border: 1px solid rgba(255, 149, 0, 0.3);
  border-radius: 12px;
}

.compliance-checkbox .checkbox-label {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  cursor: pointer;
  font-size: 13px;
  line-height: 1.5;
  color: rgba(0, 0, 0, 0.8);
}

.compliance-checkbox .checkbox-label input[type="checkbox"] {
  width: 20px;
  height: 20px;
  min-width: 20px;
  margin-top: 2px;
  cursor: pointer;
  accent-color: #1C9CFC;
}

.compliance-checkbox .checkbox-label span {
  flex: 1;
}

.compliance-checkbox .checkbox-label strong {
  color: #1d1d1f;
}

.compliance-buttons {
  display: flex;
  gap: 12px;
}

.compliance-buttons .btn-decline {
  flex: 1;
  padding: 16px;
  border-radius: 14px;
  border: 1.5px solid rgba(0, 0, 0, 0.12);
  background: #fff;
  color: rgba(0, 0, 0, 0.7);
  font-weight: 600;
  font-size: 16px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", sans-serif;
}

.compliance-buttons .btn-decline:hover {
  background: rgba(0, 0, 0, 0.02);
  border-color: rgba(0, 0, 0, 0.2);
}

.compliance-buttons .btn-decline:active {
  transform: scale(0.98);
}

.compliance-buttons .btn-accept {
  flex: 1;
  padding: 16px;
  border-radius: 14px;
  border: none;
  background: linear-gradient(180deg, #1C9CFC 0%, #1478B8 100%);
  color: white;
  font-weight: 600;
  font-size: 16px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 4px 12px rgba(28, 156, 252, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.2);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", sans-serif;
}

.compliance-buttons .btn-accept:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(28, 156, 252, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.compliance-buttons .btn-accept:active:not(:disabled) {
  transform: scale(0.98);
}

.compliance-buttons .btn-accept:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

@media (max-width: 500px) {
  .compliance-modal {
    padding: 24px 20px;
    border-radius: 20px;
    max-height: 90vh;
  }

  .compliance-header h2 {
    font-size: 1.3rem;
  }

  .compliance-content {
    max-height: 300px;
    padding: 16px;
    font-size: 13px;
  }

  .compliance-buttons {
    flex-direction: column;
  }
}

.policy-close-btn {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 32px;
  height: 32px;
  border: none;
  background: rgba(0, 0, 0, 0.06);
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(0, 0, 0, 0.5);
  transition: all 0.2s ease;
}

.policy-close-btn:hover {
  background: rgba(0, 0, 0, 0.1);
  color: rgba(0, 0, 0, 0.7);
}

#policyViewModalOverlay .compliance-header {
  position: relative;
  padding-right: 48px;
}

#policyViewModalOverlay .compliance-buttons {
  justify-content: center;
}

#policyViewModalOverlay .btn-accept {
  min-width: 120px;
}

#policyViewModalOverlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  z-index: 2100;
  animation: complianceFadeIn 0.3s ease;
}

#policyViewModalOverlay.active {
  display: flex;
  align-items: center;
  justify-content: center;
}
