/* Terms of Service Modal Styles */
.terms-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.9);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(5px);
  animation: fadeIn 0.3s ease-out;
}

.terms-modal-overlay.hidden {
  display: none;
}

.terms-modal {
  background: var(--background, #1a1a2e);
  border: 2px solid var(--primary, #00d4ff);
  border-radius: 12px;
  padding: 2rem;
  max-width: 600px;
  max-height: 80vh;
  width: 90%;
  box-shadow: 0 20px 40px rgba(0, 212, 255, 0.3);
  position: relative;
  overflow: hidden;
}

.terms-modal-header {
  display: flex;
  align-items: center;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border, #333);
}

.terms-modal-icon {
  width: 32px;
  height: 32px;
  margin-right: 12px;
  color: var(--primary, #00d4ff);
}

.terms-modal-title {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--text, #ffffff);
  margin: 0;
}

.terms-modal-content {
  max-height: 300px;
  overflow-y: auto;
  margin-bottom: 2rem;
  padding-right: 8px;
}

.terms-modal-content::-webkit-scrollbar {
  width: 6px;
}

.terms-modal-content::-webkit-scrollbar-track {
  background: var(--background-secondary, #2a2a3e);
  border-radius: 3px;
}

.terms-modal-content::-webkit-scrollbar-thumb {
  background: var(--primary, #00d4ff);
  border-radius: 3px;
}

.terms-modal-content p {
  color: var(--text-secondary, #b8bcc8);
  line-height: 1.6;
  margin-bottom: 1rem;
}

.terms-modal-content h3 {
  color: var(--text, #ffffff);
  font-size: 1.1rem;
  margin: 1.5rem 0 0.5rem 0;
}

.terms-modal-content ul {
  color: var(--text-secondary, #b8bcc8);
  margin-left: 1.5rem;
  margin-bottom: 1rem;
}

.terms-modal-content ul li {
  margin-bottom: 0.5rem;
}

.terms-modal-actions {
  display: flex;
  gap: 1rem;
  justify-content: flex-end;
  margin-top: 2rem;
}

.terms-modal-btn {
  padding: 12px 24px;
  border: none;
  border-radius: 6px;
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  min-width: 100px;
}

.terms-modal-btn-accept {
  background: var(--primary, #00d4ff);
  color: var(--background, #1a1a2e);
}

.terms-modal-btn-accept:hover {
  background: var(--primary-light, #33ddff);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 212, 255, 0.4);
}

.terms-modal-btn-decline {
  background: transparent;
  color: var(--text-secondary, #b8bcc8);
  border: 1px solid var(--border, #333);
}

.terms-modal-btn-decline:hover {
  background: var(--danger, #ff4757);
  color: white;
  border-color: var(--danger, #ff4757);
}

.terms-modal-warning {
  background: rgba(255, 71, 87, 0.1);
  border: 1px solid var(--danger, #ff4757);
  border-radius: 6px;
  padding: 1rem;
  margin-bottom: 1.5rem;
  color: var(--danger, #ff4757);
  font-size: 0.9rem;
  display: none;
}

.terms-modal-warning.show {
  display: block;
  animation: slideIn 0.3s ease-out;
}

/* Animations */
@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes slideIn {
  from {
    transform: translateY(-10px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
  .terms-modal {
    padding: 1.5rem;
    max-width: 95%;
    max-height: 90vh;
  }
  
  .terms-modal-title {
    font-size: 1.3rem;
  }
  
  .terms-modal-actions {
    flex-direction: column;
  }
  
  .terms-modal-btn {
    width: 100%;
  }
  
  .terms-modal-content {
    max-height: 250px;
  }
}

/* Dark theme adjustments */
@media (prefers-color-scheme: dark) {
  .terms-modal {
    background: var(--background, #1a1a2e);
    border-color: var(--primary, #00d4ff);
  }
}

/* Body scroll lock when modal is open */
body.terms-modal-open {
  overflow: hidden;
  position: fixed;
  width: 100%;
}