/* Сброс основных стилей и базовые настройки */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    line-height: 1.15;
    -webkit-text-size-adjust: 100%;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Helvetica Neue, Arial, Noto Sans, sans-serif, Apple Color Emoji, Segoe UI Emoji, Segoe UI Symbol, Noto Color Emoji;
}

/* Всегда используем темный фон */
body {
    display: flex;
    flex-direction: column;
    height: 100vh;
    min-height: 100vh;
    background-color: #fff; /* Темная тема */
    color: #353535;         /* Светлый текст на темном фоне */
}

/* Ссылки в темной теме */
a {
    color: #353535; /* Светлый цвет */
    background-color: transparent;
    text-decoration: none;
    transition: color 0.15s ease;
}

a:hover {
    color: #ee730a;
    text-decoration: underline;
}

/* Заголовки и адаптивность */
.h1 {
    font-size: 2.5rem;
    font-weight: 500;
    line-height: 3.75rem;
}

.h2 {
    font-size: 1.5rem;
    font-weight: 500;
    line-height: 2.25rem;
}

@media (width <= 720px) {
    .h1 {
        font-size: 1.5rem;
        line-height: 1.75rem;
    }
    .h2 {
        font-size: 1.25rem;
        line-height: 1.5rem;
    }
}

/* Основная обертка контента */
.main-content {
    margin: 8rem auto;
    max-width: 60rem;
    padding-left: 1.5rem;
    padding-right: 1.5rem;
    width: 100%;
}

@media (width <= 720px) {
    .main-content {
        margin-top: 4rem;
    }
}

/* Дополнительные классы отступов */
.spacer {
    margin: 2rem 0;
}
.spacer-top {
    margin-top: 4rem;
}
.spacer-bottom {
    margin-bottom: 2rem;
}

/* Центрирование текста */
.text-center {
    text-align: center;
}

/* Кнопка */
.ctp-button {
    background-color: #4693ff;
    border: 0.063rem solid #4693ff;
    border-radius: 0.313rem;
    color: #1d1d1d;
    cursor: pointer;
    font-size: 0.875rem;
    line-height: 1.313rem;
    margin: 2rem 0;
    padding: 0.375rem 1rem;
    transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.ctp-button:hover {
    background-color: #003681;
    border-color: #003681;
    color: #fff;
}

/* Красный шрифт */
.font-red {
    color: #b20f03;
}

/* Иконка загрузки */
.loading-spinner {
    height: 76.391px;
}

.lds-ring {
    display: inline-block;
    position: relative;
}

.lds-ring,
.lds-ring div {
    height: 1.875rem;
    width: 1.875rem;
}

.lds-ring div {
    animation: lds-ring 1.2s cubic-bezier(.5, 0, .5, 1) infinite;
    border: 0.3rem solid transparent;
    border-radius: 50%;
    border-top-color: #999;
    box-sizing: border-box;
    display: block;
    position: absolute;
}

.lds-ring div:first-child {
    animation-delay: -0.45s;
}
.lds-ring div:nth-child(2) {
    animation-delay: -0.3s;
}
.lds-ring div:nth-child(3) {
    animation-delay: -0.15s;
}

@keyframes lds-ring {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

/* Блоки успеха/ошибки с фоновыми иконками */
#challenge-success-text {
    background-image: url("750146d79df2f7e02b6895527d982b4de952ab94.svg");
    background-repeat: no-repeat;
    background-size: contain;
    padding-left: 42px;
}

#challenge-error-text {
    background-image: url("39676ea0b0640b4db29d0f93845d702b3784985a.svg");
    background-repeat: no-repeat;
    background-size: contain;
    padding-left: 34px;
}

/* Футер, диагностическая инфа */
.footer {
    font-size: 0.75rem;
    line-height: 1.125rem;
    margin: 0 auto;
    max-width: 60rem;
    padding-left: 1.5rem;
    padding-right: 1.5rem;
    width: 100%;
}

.footer-inner {
    border-top: 1px solid #666; /* Заменил на более темную границу под темную тему */
    padding-bottom: 1rem;
    padding-top: 1rem;
}

.clearfix::after {
    content: "";
    display: table;
    clear: both;
}

.clearfix .column {
    float: left;
    width: 50%;
    padding-right: 1.5rem;
}

.diagnostic-wrapper {
    margin-bottom: 0.5rem;
}

.footer .ray-id {
    text-align: center;
}

.footer .ray-id code {
    font-family: monaco, courier, monospace;
}

/* Мобильная адаптация футера */
@media (width <= 720px) {
    .diagnostic-wrapper {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
    }
    .clearfix::after {
        display: initial;
        content: none;
        clear: none;
        text-align: center;
    }
    .column {
        float: none;
        padding: 0;
        width: auto;
        word-break: keep-all;
    }
    .zone-name-title {
        margin-bottom: 1rem;
    }
}

/* RTL-поддержка */
.rtl .heading-favicon {
    margin-left: 0.5rem;
    margin-right: 0;
}

.rtl #challenge-success-text {
    background-position: 100%;
    padding-left: 0;
    padding-right: 42px;
}

.rtl #challenge-error-text {
    background-position: 100%;
    padding-left: 0;
    padding-right: 34px;
}

/* Дополнительные стили для контейнера с чекбоксом и брендингом */
#DPxlC8 {
    display: flex;
    align-items: center;
    width: 320px;
    padding: 8px 12px;
    background-color: #fafafa;
    border: 1px solid #eaeaea;
    box-sizing: border-box;
}

#DPxlC8 .cb-c {
    display: flex;
    align-items: center;
    color: #353535;
    font-size: 14px;
    margin-right: 10px;
}

/* Стили для чекбокса */
#DPxlC8 .cb-c input[type="checkbox"] {
    margin-right: 6px;
}

/* Прижатый к правому краю блок */
#DPxlC8 #branding {
    margin-left: auto;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    color: #353535;
    font-size: 12px;
}

#DPxlC8 #branding svg {
    width: 100px;
    margin-bottom: 4px;
}

/* Ссылки в блоке */
#DPxlC8 #terms {
    display: flex;
    gap: 4px;
}

#DPxlC8 #terms a {
    color: #353535;
    text-decoration: none;
}

#DPxlC8 #terms a:hover {
    text-decoration: underline;
}

/* Контейнер для чекбокса и лейбла */
.cb-lb {
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
}

.cb-lb span.cb-lb-t {
    margin: 0;
    line-height: normal;
}

.cb-lb input[type="checkbox"] {
    -webkit-appearance: none;
    appearance: none;
    width: 24px;
    height: 24px;
    background-color: #ffffff;
    border: 2px solid #dadada;
    box-sizing: border-box;
    cursor: pointer;
    margin: 0;
    z-index: 9999;
}

.cb-lb input[type="checkbox"]:checked::before {
    content: "";
    display: block;
    width: 100%;
    height: 100%;
    background: url("data:image/svg+xml;base64,PHN2ZyBmb2N1c2FibGU9ImZhbHNlIiBoZWlnaHQ9IjQwIiB2aWV3Qm94PSIwIDAgNDAgNDAiIHdpZHRoPSI0MCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48ZyBmaWxsPSIjZmZmIj48cGF0aCBkPSJNMTUuOTY5IDI4LjgxOGwtOC41NDQtOC41NDMtMS41NyAxLjU3MSA5LjExNCA5LjExN2ExIDEgMCAwIDAgMS40MTQgMGwxNy45MTctMTcuOTE1LTEuNTcxLTEuNTcxLTE2LjUwMyAxNi41MDN6Ii8+PC9nPjwvc3ZnPg==") no-repeat center center / contain;
}
