* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    overflow-y: auto;
}

body {
    font-family: 'Open Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    background-color: #f2f2f2;
    color: #404040;
    line-height: 1.6;
    min-height: 100vh;
}

.cf-error-page {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.cf-wrapper {
    max-width: 960px;
    margin: 0 auto;
    padding: 0 32px;
}

@media (max-width: 1024px) {
    .cf-wrapper {
        padding: 0 32px;
    }
}

/* Header */
.cf-header {
    background-color: #ffffff;
    border-bottom: 1px solid #d8d8d8;
    padding: 40px 0 32px;
}

@media (max-width: 1024px) {
    .cf-header {
        padding: 24px 0;
    }
}

.cf-error-title {
    font-size: 60px;
    font-weight: 300;
    color: #313131;
    margin-bottom: 15px;
    line-height: 1.2;
}

@media (max-width: 1024px) {
    .cf-error-title {
        font-size: 36px;
    }
}

.cf-error-code {
    display: block;
    background-color: #dedede;
    color: #5e5e5e;
    font-size: 12px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 3px;
    margin-top: 10px;
    margin-bottom: 0;
    width: fit-content;
}

.cf-error-info {
    font-size: 14px;
    color: #606060;
    margin-bottom: 5px;
}

.cf-error-info a {
    color: #0077cc;
    text-decoration: none;
}

.cf-error-info a:hover {
    text-decoration: underline;
}

.cf-timestamp {
    font-size: 13px;
    color: #808080;
}

/* Status Section */
.cf-status-section {
    background-color: #f0f0f0;
    padding: 60px 0;
    border-bottom: 1px solid #d8d8d8;
}

.cf-status-diagram {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    gap: 60px;
}

.cf-status-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    min-width: 100px;
}

.cf-status-icon {
    position: relative;
    width: 100px;
    height: 100px;
    margin-bottom: 15px;
}

.cf-status-icon svg {
    width: 100%;
    height: 100%;
}

.cf-status-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.cloudflare-icon > img {
    transform: scale(1.2);
}

.cf-status-badge {
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 48px;
    height: 48px;
}

.cf-status-badge svg {
    width: 100%;
    height: 100%;
}

.cf-status-badge img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.cf-status-label {
    font-size: 14px;
    color: #404040;
    margin-bottom: 4px;
}

.cf-status-name {
    font-size: 24px;
    font-weight: 300;
    color: #9ca3af;
    margin-bottom: 4px;
}

.cf-status-state {
    font-size: 24px;
    font-weight: 300;
}

.cf-status-state.working {
    color: #9bca3e;
}

.cf-status-state.error {
    color: #bd2426;
}

/* Connection Lines */
.cf-connection-line {
    width: 80px;
    height: 3px;
    background: #9bca3e; /* Цвет совпадает с цветом текста "Working" */
    background-size: 12px 3px;
    margin-top: 48px;
    flex-shrink: 0;
    align-self: flex-start;
}

.cf-connection-line.error {
    background: #bd2426; /* Цвет совпадает с цветом текста "Error" */
    background-size: 12px 3px;
}

/* Content Section */
.cf-content-section {
    background-color: #ffffff;
    padding: 16px 0 24px; /* Уменьшены отступы сверху и снизу */
    flex: 1;
}

.cf-columns {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px; /* Уменьшено расстояние между колонками */
}

.cf-column {
    padding-right: 24px;
}

.cf-column:last-child {
    padding-right: 0;
    padding-left: 0;
}

.cf-column h2 {
    font-size: 30px;
    font-weight: 400;
    color: #000;
    margin-bottom: 16px;
    border-bottom: none;
    padding-bottom: 0;
}

.cf-column h3 {
    font-size: 15px;
    font-weight: 600;
    color: #000;
    margin-top: 0;
    margin-bottom: 8px;
}

.cf-column p {
    font-size: 16px;
    color: #606060;
    line-height: 1.625;
    margin-bottom: 24px;
}

/* Footer */
.cf-footer {
    background-color: #ffffff;
    border-top: 1px solid #d8d8d8;
    padding: 20px 0;
    text-align: center;
}

.cf-ray-id {
    font-size: 12px;
    color: #808080;
    margin-bottom: 5px;
}

.cf-ray-id code {
    font-family: 'Courier New', Courier, monospace;
    background-color: #e8e8e8;
    padding: 2px 6px;
    border-radius: 3px;
}

.cf-footer-text {
    font-size: 12px;
    color: #808080;
}

.cf-footer-text a {
    color: #0077cc;
    text-decoration: none;
}

.cf-footer-text a:hover {
    text-decoration: underline;
}

/* Responsive */
@media (max-width: 768px) {
    .cf-error-title {
        font-size: 22px;
    }

    .cf-status-diagram {
        flex-direction: column;
        align-items: center;
        gap: 20px;
    }

    .cf-connection-line {
        display: none;
    }

    .cf-columns {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .cf-status-item {
        flex: 0 0 auto;
        width: 100%;
        max-width: 150px;
    }

    .cf-status-icon {
        width: 80px;
        height: 80px;
        margin-bottom: 10px;
        display: block;
    }

    .cf-status-label {
        font-size: 12px;
        color: #808080;
        margin-bottom: 2px;
        display: block;
    }

    .cf-status-name {
        font-size: 14px;
        font-weight: 600;
        color: #0077cc;
        margin-bottom: 2px;
        display: block;
    }

    .cf-status-state {
        font-size: 13px;
        display: block;
    }

    body, .cf-error-title, .cf-error-code, .cf-error-info, .cf-status-label, .cf-status-name, .cf-status-state {
        color: inherit; /* Сохраняем цвета шрифтов как в десктопной версии */
    }

    .cf-status-name {
        color: #9ca3af; /* Сохраняем серый цвет для "Browser", "Cloudflare", "Host" */
    }
}

@media (max-width: 480px) {
    .cf-header {
        padding: 20px 0;
    }

    .cf-error-title {
        font-size: 18px;
    }

    .cf-status-section {
        padding: 25px 0;
    }

    .cf-status-icon {
        width: 60px;
        height: 60px;
        display: block;
    }

    .cf-status-badge {
        width: 36px;
        height: 36px;
    }

    .cf-content-section {
        padding: 25px 0;
    }
}
