:root {
  --span-strong: #8a6dff; /* Более темный фиолетовый */
  --span: #af98ff;        /* Основной фиолетовый */
  --text-default: #f1f2f6;
  --text-custom: #dfe4ea;
  --card: #2f3542;
  --button-active: rgba(175, 152, 255, 0.1);
  --bottom-line-table: rgba(175, 152, 255, 0.05);
}

.rules_menu {
  display: block;
  color: var(--text-custom);
  padding: 12px 15px;
  border-radius: 8px;
  margin-bottom: 10px;
  font-weight: 600;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  position: relative;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.03);
}

.rules_menu:hover {
  color: var(--span);
  background: var(--bottom-line-table);
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(188, 107, 255, 0.2);
}

.rules_menu:active {
  transform: translateY(0);
}

.rules_menu::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--span);
  transition: width 0.3s ease;
}

.rules_menu:hover::after {
  width: 100%;
}

.rules_block > header {
  position: relative;    /* контейнер для абсолютной даты */
  min-height: 56px;      /* резервируем высоту */
  box-sizing: border-box;
}

.rules_block {
  color: var(--text-default);
  font-weight: bold;
  font-size: 14px;
  padding: 0 35px;
  margin: 15px 0;
  display: none;
  width: 100%;
  animation: fadeIn 0.5s ease-out;
}

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

.rules_block>a {
  display: flex;
  color: var(--text-default);
  font-weight: 600;
  font-size: 17px;
  text-align: center;
  justify-content: center;
  margin: 20px 0;
}

.rules_text {
  color: var(--text-custom);
  font-weight: 500;
  font-size: 15px;
  line-height: 1.6;
}

.rules_text_punishment {
  display: inline;        /* оставляем в потоке рядом с текстом */
  margin-left: 8px;       /* небольшой отступ от основного текста */
  white-space: nowrap;    /* запрет переносов внутри блока наказания */
  color: #ff4757;
  font-weight: 600;
  font-size: 14px;
}

.rules_warning {
  color: #ffb158;
  font-weight: 600;
  font-size: 14px;
  padding: 2px 5px;
  border-radius: 3px;
}

.rules_active {
  background: var(--button-active);
  color: var(--span);
  border-left: 3px solid var(--span);
}

.rules_card_header {
  float: left;
  margin: 5px 0 0 10px;
}

.rules_card_right {
  width: 100%;
}

.rules_header {
  margin: 30px 0;
  border-left: 3px solid var(--span); 
  border-right: 3px solid var(--span);
  position: relative;
  padding: 20px;
  background: #252525;
  overflow: hidden;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

.rules_header::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(45deg, 
    transparent 0%, 
    rgba(176, 107, 255, 0.1) 50%, 
    transparent 100%);
  animation: shine 3s infinite;
}

@keyframes shine {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

.rules_header h5 {
  font-weight: 800;
  font-size: 32px;
  text-transform: uppercase;
  text-align: center;
  margin: 0;
  position: relative;
  background: linear-gradient(to right, var(--span-strong), var(--span));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.rules_header h6 {
  margin-top: 5px;
  font-weight: 700;
  font-size: 16px;
  text-transform: uppercase;
  color: var(--text-custom);
  text-align: center;
  position: relative;
}

.rules_card {
  background: var(--card);
  border-radius: 12px;
  padding: 25px;
  width: 100%;
  display: flex;
  justify-content: center;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.rules_card:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.2);
}

.rules_sticky {
  position: sticky;
  height: fit-content;
  top: 25px;
}

.rules_chapter {
  font-weight: 900;
  text-transform: uppercase;
  color: var(--text-default);
  margin: 0 12px 15px;
  font-size: 16px;
  letter-spacing: 1px;
  position: relative;
  padding-bottom: 8px;
}

.rules_chapter::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 50px;
  height: 2px;
  background: var(--span);
}

.rules_number {
  background: linear-gradient(to right, var(--span-strong), var(--span));
  color: white;
  border-radius: 4px;
  padding: 3px 8px;
  margin-right: 12px;
  font-weight: 700;
  
  display: inline-block;
  min-width: 30px;
  text-align: center;
  box-shadow: 0 2px 5px rgba(255, 107, 129, 0.3);
}

.rules_title {
  margin: 0;
  flex: 1 1 auto;
  font-weight: 900;
  text-transform: uppercase;
  color: var(--text-default);
  padding-bottom: 10px;
  font-size: 24px;
}


.rules_title::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 70px;
  height: 3px;
  background: linear-gradient(to right, var(--span-strong), var(--span));
  border-radius: 3px;
}

.rules_margin {
  margin: 15px;
}

.time_short_text,
.time_long_text {
  align-items: center;      /* уже было, но повторно явно указываем */
  right: 40px;
  top: 40px;
  transition: transform 160ms ease, opacity 160ms ease, top 160ms ease;
  will-change: transform, top;
  transform: translateZ(0); /* устраняет субпиксельные прыжки */
  pointer-events: none;     /* чтобы наведению на соседние элементы не мешал курсор */
}
/* Анимация для пунктов правил */
.rules_block p {
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}



