.rules-section {
  padding: 5rem 0;
  background-color: var(--dark-color);
  position: relative;
}

.rules-intro {
  max-width: 800px;
  margin: 0 auto 3rem;
  text-align: center;
  background-color: rgba(26, 26, 46, 0.7);
  border-radius: var(--border-radius-lg);
  padding: 2rem;
  box-shadow: var(--shadow-lg);
  border: 1px solid rgba(140, 82, 255, 0.2);
  animation: fadeIn 1s ease;
}

.rules-intro h2 {
  color: var(--secondary-color);
  font-size: 2.5rem;
  margin-bottom: 1.5rem;
}

.rules-intro p {
  font-size: 1.2rem;
  margin-bottom: 1rem;
}

.rules-signature {
  font-style: italic;
  color: var(--primary-color);
  font-weight: 600;
  margin-top: 1.5rem;
}

.rules-container {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  max-width: 900px;
  margin: 0 auto;
}

.rule-card {
  background-color: rgba(26, 26, 46, 0.5);
  border-radius: var(--border-radius-lg);
  padding: 2rem;
  box-shadow: var(--shadow);
  border: 1px solid rgba(140, 82, 255, 0.1);
  position: relative;
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
  animation: slideInUp 0.5s ease forwards;
  opacity: 0;
  transform: translateY(20px);
}

.rule-card:nth-child(1) {
  animation-delay: 0.1s;
}
.rule-card:nth-child(2) {
  animation-delay: 0.2s;
}
.rule-card:nth-child(3) {
  animation-delay: 0.3s;
}
.rule-card:nth-child(4) {
  animation-delay: 0.4s;
}
.rule-card:nth-child(5) {
  animation-delay: 0.5s;
}
.rule-card:nth-child(6) {
  animation-delay: 0.6s;
}
.rule-card:nth-child(7) {
  animation-delay: 0.7s;
}
.rule-card:nth-child(8) {
  animation-delay: 0.8s;
}
.rule-card:nth-child(9) {
  animation-delay: 0.9s;
}
.rule-card:nth-child(10) {
  animation-delay: 1s;
}

.rule-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
  border-color: rgba(140, 82, 255, 0.3);
}

.rule-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(48, 227, 202, 0.05), rgba(140, 82, 255, 0.05));
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: -1;
}

.rule-card:hover::before {
  opacity: 1;
}

.rule-number {
  position: absolute;
  top: -20px;
  left: -20px;
  width: 80px;
  height: 80px;
  background: linear-gradient(135deg, var(--primary-color), var(--primary-color-dark));
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-heading);
  font-size: 2.5rem;
  font-weight: 800;
  box-shadow: 0 4px 15px rgba(140, 82, 255, 0.4);
  z-index: 1;
}

.rule-content {
  margin-left: 50px;
}

.rule-content h3 {
  color: var(--secondary-color);
  font-size: 1.5rem;
  margin-bottom: 1rem;
  display: inline-block;
  position: relative;
}

.rule-content h3::after {
  content: "";
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 50px;
  height: 3px;
  background-color: var(--primary-color);
  border-radius: 2px;
}

.rule-content p {
  line-height: 1.7;
}

.rules-footer {
  max-width: 800px;
  margin: 4rem auto 0;
  text-align: center;
  background-color: rgba(26, 26, 46, 0.7);
  border-radius: var(--border-radius-lg);
  padding: 2rem;
  box-shadow: var(--shadow);
  border: 1px solid rgba(140, 82, 255, 0.2);
  animation: fadeIn 1s ease 1.2s backwards;
}

.rules-footer a {
  color: var(--secondary-color);
  text-decoration: underline;
  transition: color 0.3s ease;
}

.rules-footer a:hover {
  color: var(--primary-color);
}

.owners-info {
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.owners-info h3 {
  color: var(--secondary-color);
  margin-bottom: 1rem;
}

.owners-info p {
  margin-bottom: 0.5rem;
}

.owners-info strong {
  color: var(--primary-color);
}

/* Animaciones */
@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

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

/* Responsive */
@media (max-width: 768px) {
  .rules-intro h2 {
    font-size: 2rem;
  }

  .rule-number {
    width: 60px;
    height: 60px;
    font-size: 1.8rem;
    top: -15px;
    left: -15px;
  }

  .rule-content {
    margin-left: 30px;
  }
}

@media (max-width: 480px) {
  .rules-intro {
    padding: 1.5rem;
  }

  .rule-card {
    padding: 1.5rem;
  }

  .rule-number {
    width: 50px;
    height: 50px;
    font-size: 1.5rem;
    top: -10px;
    left: -10px;
  }

  .rule-content h3 {
    font-size: 1.3rem;
  }

  .rule-content {
    margin-left: 25px;
    margin-top: 20px;
  }
}

/* Estilos para modo oscuro/claro */
body.light-mode .rules-section {
  background-color: #f5f5f7;
}

body.light-mode .rules-intro,
body.light-mode .rule-card,
body.light-mode .rules-footer {
  background-color: white;
  border-color: rgba(140, 82, 255, 0.15);
}

body.light-mode .rule-content p,
body.light-mode .rules-intro p,
body.light-mode .rules-footer p {
  color: #333;
}

body.light-mode .rule-card::before {
  background: linear-gradient(135deg, rgba(48, 227, 202, 0.1), rgba(140, 82, 255, 0.1));
}

body.light-mode .rules-footer {
  border-color: rgba(140, 82, 255, 0.15);
}

body.light-mode .owners-info {
  border-top-color: rgba(0, 0, 0, 0.1);
}
