.block_case {
    margin-top: -20px;
    justify-items: center;
}

.block_case_form {
    display: block;
    flex-direction: column;
    margin-left: auto;
    margin-right: auto;
    justify-items: center;
    padding-top: 35px;
}

.block_case_back {
    align-self: center;
    transition: .08s ease-in-out;
    text-transform: uppercase;
    font-weight: 700;
    justify-self: center;
    /* Добавляем центрирование */
    display: block;
    margin: 0 auto;
    text-align: center;
    width: fit-content;
    padding: 10px 20px;
}

.block_case_name {
    text-align: center;
    margin-top: 12px;
    font-size: 24px;
    line-height: 32px;
    justify-self: center;
}

.block_case_image {
    min-width: 400px;
}

.block_case_butt {
    height: 58px;
    padding: 0 20px;
    font-size: 19px;
    line-height: 23px;
}

.block_case_library {
    margin-top: 32px;
}

.block_case_library {
    display: grid;
    row-gap: row;
}

.block_case-img {
    max-width: 184px;
    align-content: end;
    padding-bottom: 16px;
}

.block_case-item {
    position: relative;
    max-width: 272px;
    max-width: 272px;
    width: 100%;
    min-height: 260px;
    margin-right: 0;
}

.block_title {
    font-size: 14px;
    line-height: 18px;
    padding-left: 10px;
    color: #3a57e8;
}

.block_case-img {
    min-width: 271px;
    min-height: 271px;
    background-size: cover;
}

.block_price {
    width: max-content;
    margin-top: 2px;
    order: 1;
    font-weight: 600;
    color: #fff;
    padding-left: 10px;
}

.block_case_library-grid {
    display: grid;
    grid-template-columns: repeat(5, cover);
    grid-template-rows: repeat(auto, 150px);
    gap: 15px;
    padding-bottom: 5px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

.block_container {
    max-width: 1350px;
    min-width: 1200px;
    width: 100%;
    margin: auto;
    text-align: center;
}

.block_sideline {
    min-width: 1000px;
 
    position: relative; /* Для позиционирования псевдоэлементов */
    padding: 20px 0; /* Отступы сверху и снизу */
    margin: 10px 0; /* Отступы от других элементов */
}

/* Левая шестиугольная граница */
.block_sideline::before {
    content: "";
    position: absolute;
    height: 100%;
    top: 0;
    left: 0px; /* Смещение влево */
    border-top: 100px solid transparent;
    border-bottom: 100px solid transparent;
    border-right: 2px solid #3a57e8a1;
}

/* Правая шестиугольная граница */
.block_sideline::after {
    content: "";
    position: absolute;
    height: 100%;
    top: 0;
    right: 0px; /* Смещение вправо */
    border-top: 100px solid transparent;
    border-bottom: 100px solid transparent;
    border-left: 2px solid #3a57e8a1;
}

.case-image {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 0 auto 20px;
}

.roulette-container {
    position: relative;
    width: 1200px;
    height: 450px; /* Увеличена высота для вертикальной рулетки */
    margin: 20px auto;
    border: 3px solid #3a57e8;
    border-radius: 5px;
    overflow: hidden;
    background-color: #80101000;
}

.roulette-window {
    width: 100%;
    height: 100%;
    overflow: hidden;
    position: relative;
}

.roulette-list {
    position: absolute;
    display: flex;
    list-style: none;
    padding: 0;
    margin: 0;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.roulette-list.vertical {
    flex-direction: column;
}

.roulette-list.horizontal {
    flex-direction: row;
}

.roulette-list li {
    width: 150px;
    height: 150px;
    padding: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    background-color: rgba(255, 255, 255, 0);
    border: 1px solid #eeeeee00;
}

.roulette-list img {
    width: 120px;
    height: 120px;
    object-fit: contain;
    display: block;
}

.arrow-up, .arrow-down {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 15px solid transparent;
    border-right: 15px solid transparent;
    z-index: 10;
}

.arrow-up {
    top: 20px;
    border-top: 20px solid #3a57e8;
}

.arrow-down {
    bottom: 20px;
    border-bottom: 20px solid #3a57e8;
}

.spin-button {
    padding: 10px 20px;
    color: white;
    border: none;
    font-size: 16px;
    cursor: pointer;
    background-color: #2247fd65;
    border: 1px solid #3a57e8a1;
    background: linear-gradient(180deg, var(--action-color-0), var(--action-color-10));
    box-shadow: inset 0 -4px 24px var(--action-color-50);
    transition: .08s ease;
    border-radius: 6px;
    /* Центрирование */
    display: block;
    margin: 0px auto;
    width: fit-content;
    min-width: 120px;
}

.spin-button:hover {
    background-color: #3a57e8;
}

.result-container {
    width: 100%;
    min-height: 300px;
    background-color: #1a1a2e;
    border-radius: 10px;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 20px 0;
    flex-wrap: wrap;
}

.result-content {
    text-align: center;
    padding: 20px;
}

.result-image {
    max-width: 180px;
    max-height: 180px;
    border: 3px solid #3a57e8;
    border-radius: 10px;
    margin-bottom: 15px;
}

.result-name {
    color: white;
    margin: 0 0 5px 0;
    font-size: 1.5rem;
}

.result-price {
    color: #aaa;
    margin: 0 0 15px 0;
    font-size: 1.2rem;
}

.result-buttons {
    display: flex;
    justify-content: center;
    gap: 24px;
}

.sell-button, .keep-button {
    padding: 8px 16px;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.sell-button {
    padding: 8px 16px;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.3s ease;
    background-color: #f44336;
    /* Центрирование */
    display: inline-block;
    margin: 0 auto;
    text-align: center;
}

.keep-button {
    background-color: #4CAF50;
}

.sell-button:hover, .keep-button:hover {
    transform: scale(1.05);
    opacity: 0.9;
}

.form_radio_group {
    display: inline-block;
    overflow: hidden;
    margin-left: auto;
    margin-right: auto;
    margin-top: 50px;
}

.form_radio_group-item {
    display: inline-block;
    float: left;
}

.form_radio_group input[type=radio] {
    display: none;
}

.form_radio_group label {
    display: inline-block;
    cursor: pointer;
    padding: 0px 15px;
    line-height: 34px;
    font-weight: 700;
    border: 1px solid #999;
    border-right: none;
    user-select: none;
}

.form_radio_group .form_radio_group-item:first-child label {
    border-radius: 6px 0 0 6px;
}

.form_radio_group .form_radio_group-item:last-child label {
    border-radius: 0 6px 6px 0;
    border-right: 1px solid #999;
}

.form_radio_group input[type=radio]:checked + label {
    background: #3a57e8;
    color: white;
}

.form_radio_group label:hover {
    color: #3a57e867;
}

.form_radio_group input[type=radio]:disabled + label {
    background: #efefef;
    color: #666;
}

.block_buttons {
    margin-top: 12px;
    display: flex;
    flex-direction: column;
    gap: 24px;
}
.toggle-pill-dark{
    justify-items: center;
}
.toggle-pill-dark input[type="checkbox"] {
  display: none;
  justify-self: center;
}
.toggle-pill-dark input[type="checkbox"] + label {
  display: block;
  position: relative;
  width: 3em;
  height: 1.6em;
  margin-bottom: 20px;
  border-radius: 1em;
  background: #303e58;
  box-shadow: inset 0px 0px 5px rgba(0, 0, 0, 0.3);
  cursor: pointer;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  -webkit-transition: background 0.1s ease-in-out;
  transition: background 0.1s ease-in-out;
}
.toggle-pill-dark input[type="checkbox"] + label:before {
  content: "";
  display: block;
  width: 1.2em;
  height: 1.2em;
  border-radius: 1em;
  background: #1a1a2e;
  position: absolute;
  left: 0.2em;
  top: 0.2em;
  -webkit-transition: all 0.2s ease-in-out;
  transition: all 0.2s ease-in-out;
  -webkit-transform: rotate(90deg);
  transform: rotate(90deg);
}
.toggle-pill-dark input[type="checkbox"]:checked + label:before {
  background: #0e1a58;
  box-shadow: -2px 0px 5px rgba(0, 0, 0, 0.2);
  left: 1.6em;
  -webkit-transform: rotate(295deg);
  transform: rotate(295deg);
}
.toggle-pill-dark {
    position: relative;
    display: inline-block;
    cursor: pointer;
}

.toggle-pill-dark:hover::after {
    content: "Медленно/Быстро";
    position: absolute;
    top: -30px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0,0,0,0.8);
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    white-space: nowrap;
}

.toggle-input {
    display: none;
}

.skewed-toggle {
    display: block;
    width: 60px;
    height: 30px;
    background: #333a55;
    position: relative;
    border-radius: 15px;
    transition: all 0.3s;
    /* Убрано transform: skewX(-10deg); */
}

.skewed-toggle::before {
    content: "";
    position: absolute;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: #fff;
    top: 2px;
    left: 2px;
    transition: all 0.3s;
    /* Убрано transform: skewX(10deg); */
}

.toggle-input:checked + .skewed-toggle {
    background: #3a57e8;
}

.toggle-input:checked + .skewed-toggle::before {
    left: calc(100% - 28px);
}

.buy_div {
    min-width: 200px;
    min-height: 200px;
}

/* Адаптация под разные экраны */
@media (min-width: 319px) {
    .block_case_library-grid {
        grid-template-columns: repeat(1, 1fr);
    }
    .block_case_image {
        min-width: 100px;
    }
    .case-image {
        margin-bottom: 0;
    }
    .block_container {
        padding: 0;
        padding-top: 16px;
    }
    .roulette-container {
        width: 300px;
        height: 450px;
        margin: auto;
        justify-self: center;
    }
    .block_sideline {
        min-width: 400px;
    }
}

@media (min-width: 767px) {
    .block_case_library-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .block_container {
        max-width: 600px;
    }
    .roulette-container {
        width: 600px;
        height: 450px;
    }
    .block_sideline {
        min-width: 500px;
    }
}

@media (min-width: 992px) {
    .block_case_library-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    .block_container {
        max-width: 900px;
    }
    .roulette-container {
        width: 900px;
        height: 450px;
    }
}

@media (min-width: 1440px) {
    .block_case_library-grid {
        grid-template-columns: repeat(5, 1fr);
    }
    .block_sideline {
        min-width: 1200px;
    }
}
.roulette-container {
    position: relative;
    margin: 20px auto;
    border: 3px solid #3a57e8;
    border-radius: 5px;
    background-color: #1a1a2e;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px 0;
    overflow: hidden;
}

/* Для множителя 2 (вертикальные рулетки) */
.roulette-container[data-multiplier="2"] {
    width: 490px; /* 150px * 3 + 40 */
    height: 1140px; /* (150px * 5 * 2) + отступы */
}

/* Для горизонтальных рулеток */
.roulette-container[data-multiplier="1"] {
    width: 790px; /* 150px * 5 + 40 */
    height: 140px;
}

.roulette-window {
    position: relative;
    overflow: hidden;
    margin: 10px 0;
    border: 2px solid #3a57e8;
    border-radius: 10px;
}

/* Вертикальная рулетка */
.roulette-window.vertical {
    width: 450px;
    height: 500px;
}

/* Горизонтальная рулетка */
.roulette-window.horizontal {
    width: 750px;
    height: 100px;
}

.roulette-list {
    display: flex;
    position: absolute;
    padding: 0;
    margin: 0;
    list-style: none;
}

.roulette-list.vertical {
    flex-direction: column;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
}

.roulette-list.horizontal {
    flex-direction: row;
    top: 50%;
    left: 0;
    transform: translateY(-50%);
}

/* Адаптация для мобильных */
@media (max-width: 768px) {
    .roulette-container {
        width: 100% !important;
        height: auto !important;
        padding: 10px;
    }
    
    .roulette-window {
        width: 100% !important;
        height: 120px !important;
    }
    
    .arrow-up, .arrow-down {
        display: none;
    }
}