/* === Rules Modal Styles === */

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.modal-content--rules {
  position: relative;
  background: rgba(22, 22, 24, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 24px;
  width: 100%;
  max-width: 380px;
  max-height: 82vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.6);
  animation: modalFadeIn 0.3s cubic-bezier(0.16, 1, 0.3, 1) both;
  z-index: 101;
  overflow: hidden;
}

@keyframes modalFadeIn {
  from { opacity: 0; transform: scale(0.95) translateY(8px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

.modal-header {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-title {
  font-size: 1.15rem;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: -0.3px;
}

.btn-close {
  background: none;
  border: none;
  color: #a1a1aa;
  font-size: 1.75rem;
  cursor: pointer;
  line-height: 1;
  padding: 0.25rem;
  transition: color 0.2s, transform 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn-close:hover {
  color: #ffffff;
  transform: scale(1.15);
}

.modal-body--scroll {
  padding: 1.5rem;
  overflow-y: auto;
  flex: 1;
  font-size: 0.85rem;
  line-height: 1.6;
  color: #d4d4d8;
}

/* Scrollbar styling for a premium feel */
.modal-body--scroll::-webkit-scrollbar {
  width: 6px;
}

.modal-body--scroll::-webkit-scrollbar-track {
  background: transparent;
}

.modal-body--scroll::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.12);
  border-radius: 10px;
}

.modal-body--scroll::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.25);
}

/* Rules typography styling */
.rules-text {
  text-align: left;
}

.rules-header-block {
  text-align: center;
  margin-bottom: 1.5rem;
  border-bottom: 1.5px solid rgba(255, 255, 255, 0.05);
  padding-bottom: 1rem;
}

.rules-main-title {
  font-size: 1.1rem;
  font-weight: 800;
  color: #ffffff;
  margin-bottom: 0.25rem;
}

.rules-subtitle {
  font-size: 0.8rem;
  font-weight: 700;
  color: #ff6b00;
}

.rules-section {
  margin-bottom: 1.25rem;
}

.rules-text h4 {
  color: #ffffff;
  margin-bottom: 0.4rem;
  font-weight: 700;
  font-size: 0.9rem;
  border-left: 3px solid #ff6b00;
  padding-left: 8px;
}

.rules-text p {
  margin-bottom: 0.5rem;
  color: #a1a1aa;
}

.rules-text ul {
  margin-bottom: 0.75rem;
  padding-left: 1.25rem;
  color: #a1a1aa;
}

.rules-text li {
  margin-bottom: 0.35rem;
}

.rules-text strong {
  color: #ffffff;
}

.modal-footer {
  padding: 1rem 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  justify-content: flex-end;
  background: rgba(18, 18, 20, 0.5);
}

/* Styling for the checkbox link */
.link-rules {
  color: #ff6b00;
  text-decoration: underline;
  cursor: pointer;
  font-weight: 700;
  transition: color 0.15s ease;
}

.link-rules:hover {
  color: #e05a00;
}

/* General modal layout */
.modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}
