/* Запрет выделения текста на всех элементах */
body {
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

/* Запрет перетаскивания картинок */
img {
    -webkit-user-drag: none;
    user-drag: none;
    pointer-events: auto;  /* картинки остаются кликабельными, но не перетаскиваются */
}

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

html, body {
    width: 100%;
    min-height: 100%;
    font-family: Arial, sans-serif;
}

body {
    min-height: 100vh;
    background: #bfe8ff url("/static/fon.png") center center / cover no-repeat fixed;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    overflow-x: hidden;
    position: relative;
}

/* =========================================================
   MAIN PAGE LAYOUT
========================================================== */
.page {
    width: 100%;
    max-width: 760px;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    position: relative;
    z-index: 1;
}

.stack {
    width: 100%;
    max-width: 620px;
    position: relative;
}

/* =========================================================
   TOP LOGO
========================================================== */
.logo-wrap {
    position: relative;
    z-index: 3;
    display: flex;
    justify-content: center;
    margin-bottom: -42px;
}

.logo-img {
    width: min(100%, 560px);
    height: auto;
    display: block;
    filter: drop-shadow(0 10px 24px rgba(70, 130, 200, 0.18));
}

/* =========================================================
   MAIN CARD
========================================================== */
.card {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 520px;
    margin: 0 auto;
    background: rgba(255, 255, 255, 0.94);
    border-radius: 30px;
    box-shadow: 0 20px 40px rgba(89, 156, 214, 0.18), inset 0 1px 0 rgba(255,255,255,0.85);
    padding: 72px 28px 28px;
    backdrop-filter: blur(4px);
}

.title {
    text-align: center;
    color: #6d6d6d;
    font-size: 18px;
    margin-bottom: 14px;
    font-weight: 400;
}

.info-text {
    text-align: center;
    color: #2c3e50;
    font-size: 14px;
    margin-bottom: 16px;
    line-height: 1.4;
}

/* =========================================================
   BUTTONS
========================================================== */
.button-group {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-bottom: 10px;
}

.btn-extend,
.btn-detach {
    flex: 1;
    text-align: center;
    border: none;
    border-radius: 12px;
    padding: 12px 20px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.btn-extend {
    background: #9ce6ff;
    color: #1e3c4a;
}
.btn-extend:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(156, 230, 255, 0.4);
}

.btn-detach {
    background: #fed7f2;
    color: #6a1b4d;
}
.btn-detach:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(254, 215, 242, 0.4);
}

.btn-green {
    background: #27ae60;
    color: #fff;
    border: none;
    padding: 12px 22px;
    font-size: 15px;
    font-weight: 700;
    border-radius: 10px;
    cursor: pointer;
    width: auto;
    min-width: 220px;
    max-width: 100%;
    transition: all 0.3s ease;
    display: inline-block;
}
.btn-green:hover {
    background: #219150;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(39,174,96,0.3);
}

.gos-btn-wrap {
    text-align: center;
    margin-top: 8px;
}

/* =========================================================
   PHONE INPUT
========================================================== */
.phone-input {
    width: 100%;
    height: 64px;
    border: 2px solid #dfe3e8;
    border-radius: 16px;
    background: #fafafa;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #333;
    font-size: 20px;
    letter-spacing: 1px;
    margin-bottom: 18px;
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.03);
    text-align: center;
    font-family: Arial, sans-serif;
    outline: none;
}

/* =========================================================
   BOTTOM FOOTER ON MAIN PAGE
========================================================== */
.footer {
    margin-top: 30px;
    width: 100%;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(8px);
    border-radius: 20px;
    padding: 15px 20px;
}

.footer-links {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    margin-bottom: 10px;
}

.footer-left {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.footer-right {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

.footer-link {
    color: #333;
    text-decoration: none;
    font-size: 13px;
    transition: color 0.3s ease;
}
.footer-link:hover {
    color: #2f7bf3;
}

.social-btn {
    width: 28px;
    height: 28px;
    background: none;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: all 0.3s ease;
}
.social-btn img {
    width: 20px;
    height: 20px;
    display: block;
}
.social-btn:hover {
    transform: translateY(-2px);
}

.copyright {
    color: #777;
    font-size: 11px;
    text-align: center;
    margin-top: 8px;
}

/* =========================================================
   MODALS
========================================================== */
.modal {
    display: none;
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal-content {
    background: white;
    padding: 25px 20px;
    border-radius: 24px;
    text-align: center;
    max-width: 360px;
    width: 90%;
    box-shadow: 0 20px 40px rgba(0,0,0,0.2);
    position: relative;
}

.modal-content h3 {
    font-size: 20px;
    margin-bottom: 15px;
    color: #333;
}

.red-text {
    font-weight: 700;
    font-size: 30px;
    line-height: 1.2;
    margin: 0 0 16px;
    color: #d32f2f;
}

.green-text {
    font-weight: 700;
    font-size: 30px;
    line-height: 1.2;
    margin: 0 0 16px;
    color: #27ae60;
}

.normal-text {
    font-size: 14px;
    margin: 0 0 20px;
    line-height: 1.5;
    color: #2c3e50;
    text-align: center;
}

#codeValue {
    font-size: 32px;
    font-weight: bold;
    letter-spacing: 6px;
    color: #2f7bf3;
    margin: 15px 0;
}

.btn-blue {
    background: #007bff;
    color: white;
    border: none;
    padding: 12px 30px;
    font-size: 16px;
    border-radius: 8px;
    cursor: pointer;
    width: 100%;
    transition: all 0.3s ease;
}
.btn-blue:hover {
    background: #0056b3;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,123,255,0.3);
}

/* =========================================================
   GOS OVERLAY
========================================================== */
body.overlay-active {
    overflow: hidden;
}

body.overlay-active .page {
    transform: scale(0.985);
    filter: blur(2px);
    opacity: 0.82;
    transition: transform 0.5s ease, filter 0.5s ease, opacity 0.5s ease;
}

.gos-overlay {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    background:
        linear-gradient(180deg, rgba(245, 248, 255, 0.98) 0%, rgba(237, 243, 252, 0.98) 100%),
        #f2f6fd;
    z-index: 3000;
    overflow-y: auto;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(26px) scale(0.992);
    transition:
        opacity 0.45s ease,
        transform 0.55s cubic-bezier(0.22, 1, 0.36, 1),
        visibility 0s linear 0.55s;
    display: flex;
    flex-direction: column;
}

.gos-overlay.show {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0) scale(1);
    transition:
        opacity 0.45s ease,
        transform 0.55s cubic-bezier(0.22, 1, 0.36, 1),
        visibility 0s linear 0s;
}

.gos-progress-track {
    width: 100%;
    height: 3px;
    background: rgba(0, 91, 255, 0.08);
    overflow: hidden;
}

.gos-progress-track-top {
    position: sticky;
    top: 0;
    left: 0;
    z-index: 6;
    box-shadow: 0 10px 28px rgba(30, 60, 120, 0.06);
}

.gos-progress-bar {
    width: 32%;
    height: 100%;
    background: linear-gradient(90deg, #005bff 0%, #4e8dff 100%);
    border-radius: 999px;
    transform: translateX(-130%);
}

.gos-overlay.show .gos-progress-bar {
    animation: gosProgressEnter 1.55s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.gos-main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding: 28px 20px 40px;
    font-family: 'Roboto', sans-serif;
}

.gos-loader-screen {
    width: 100%;
    max-width: 920px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 24px;
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.35s ease, transform 0.45s ease;
}

.gos-loader-screen.is-hiding {
    opacity: 0;
    transform: translateY(-10px);
}

.gos-loader-panel {
    width: 100%;
    max-width: 560px;
    text-align: center;
    background: rgba(255, 255, 255, 0.86);
    border: 1px solid rgba(0, 91, 255, 0.06);
    box-shadow: 0 20px 40px rgba(31, 55, 120, 0.08);
    border-radius: 28px;
    padding: 28px 24px;
}

.gos-spinner {
    width: 54px;
    height: 54px;
    border: 4px solid #dfe7f5;
    border-top-color: #005bff;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 0 auto 16px;
}

.gos-loader-title {
    font-size: 26px;
    line-height: 1.2;
    font-weight: 700;
    color: #1f1f1f;
    margin-bottom: 10px;
}

.gos-loader-subtitle {
    font-size: 16px;
    line-height: 1.5;
    color: #5e636b;
}

.gos-skeleton-page {
    width: 100%;
    max-width: 920px;
    display: grid;
    gap: 20px;
}

.gos-skeleton-top,
.gos-skeleton-card span {
    position: relative;
    overflow: hidden;
    background: linear-gradient(90deg, #eef3fa 0%, #e6edf8 100%);
}

.gos-skeleton-top::after,
.gos-skeleton-card span::after {
    content: '';
    position: absolute;
    inset: 0;
    transform: translateX(-100%);
    background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,0.85) 50%, transparent 100%);
    animation: skeletonShimmer 1.5s ease-in-out infinite;
}

.gos-skeleton-top {
    height: 92px;
    border-radius: 22px;
}

.gos-skeleton-card {
    background: rgba(255, 255, 255, 0.82);
    border-radius: 28px;
    padding: 28px;
    box-shadow: 0 18px 32px rgba(31, 55, 120, 0.06);
    display: grid;
    gap: 14px;
}

.gos-skeleton-card span {
    display: block;
    height: 16px;
    border-radius: 999px;
}

.gos-skeleton-card span:nth-child(1) { width: 62%; }
.gos-skeleton-card span:nth-child(2) { width: 82%; }
.gos-skeleton-card span:nth-child(3) { width: 48%; }
.gos-skeleton-card-small span:nth-child(1) { width: 40%; }
.gos-skeleton-card-small span:nth-child(2) { width: 56%; }

.gos-content-shell {
    width: 100%;
    display: none;
    flex-direction: column;
    align-items: center;
    opacity: 0;
    transform: translateY(24px);
}

.gos-content-shell.is-visible {
    display: flex;
    animation: gosContentReveal 0.55s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.gos-logo-container {
    width: 100%;
    text-align: center;
    margin-top: 16px;
    margin-bottom: 36px;
}

.gos-logo-img {
    max-width: 200px;
    height: auto;
    display: inline-block;
}

.gos-card {
    background: rgba(255, 255, 255, 0.96);
    border-radius: 28px;
    box-shadow: 0 20px 35px rgba(0, 0, 0, 0.08);
    padding: 40px 48px;
    max-width: 560px;
    width: 100%;
    text-align: center;
    font-family: 'Roboto', sans-serif;
    min-height: 220px;
}

.gos-card h2 {
    font-size: 26px;
    font-weight: 700;
    margin-bottom: 16px;
    color: #1f1f1f;
}

.gos-card p {
    font-size: 18px;
    line-height: 1.5;
    color: #5e636b;
    margin-bottom: 28px;
}

.gos-dots {
    display: flex;
    justify-content: center;
    gap: 10px;
}

.gos-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #005bff;
    opacity: 0.4;
    animation: pulse 1.4s infinite ease-in-out;
}

.gos-dot:nth-child(2) {
    animation-delay: 0.2s;
}
.gos-dot:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes pulse {
    0%, 80%, 100% { opacity: 0.3; transform: scale(0.8); }
    40% { opacity: 1; transform: scale(1); }
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

@keyframes skeletonShimmer {
    100% { transform: translateX(100%); }
}

@keyframes gosProgressEnter {
    0% { transform: translateX(-130%); }
    60% { transform: translateX(140%); }
    100% { transform: translateX(212%); }
}

@keyframes gosContentReveal {
    from {
        opacity: 0;
        transform: translateY(24px) scale(0.985);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* =========================================================
   GOS FOOTER
========================================================== */
.gos-site-footer {
    width: 100%;
    background: #e8edf3;
    padding: 34px 0 38px;
    margin-top: auto;
    font-family: 'Roboto', sans-serif;
    opacity: 0;
    transform: translateY(12px);
    transition: opacity 0.4s ease, transform 0.4s ease;
}

.gos-site-footer.footer-visible {
    opacity: 1;
    transform: translateY(0);
}

.gos-footer-inner {
    max-width: 1320px;
    margin: 0 auto;
    padding: 0 8px;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: nowrap;
    width: 100%;
}

.gos-footer-links {
    display: flex;
    gap: 90px;
    flex-wrap: nowrap;
    margin-right: 80px;
}

.gos-footer-col {
    display: flex;
    flex-direction: column;
    gap: 22px;
}

.gos-footer-col a {
    text-decoration: none;
    color: #5b6677;
    font-size: 18px;
    line-height: 1.2;
    font-weight: 400;
    transition: opacity 0.2s ease;
    white-space: nowrap;
}
.gos-footer-col a:hover {
    opacity: 0.75;
}

.gos-footer-socials {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: nowrap;
    margin-left: auto;
    justify-content: flex-end;
    padding-right: 0;
}

.gos-footer-socials a {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: #6b7788;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s ease, opacity 0.2s ease;
    flex: 0 0 auto;
}
.gos-footer-socials a:hover {
    transform: translateY(-2px);
    opacity: 0.9;
}
.gos-footer-socials img {
    width: 22px;
    height: 22px;
    object-fit: contain;
    display: block;
}

.hidden {
    display: none !important;
}

/* Специфичные стили для многострочного текста предупреждения */
#warningPhoneText {
    white-space: pre-line;
    line-height: 1.5;
}

/* Анимация загрузки контента */
.fade-in {
    animation: fadeIn 0.5s ease forwards;
}

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

/* =========================================================
   MEDIA QUERIES
========================================================== */

@media (max-width: 768px) {
    .gos-loader-title {
        font-size: 22px;
    }

    .gos-loader-subtitle {
        font-size: 15px;
    }

    body {
        display: flex;
        flex-direction: column;
        justify-content: space-between;
        min-height: 100vh;
        padding: 10px;
    }

    .page {
        flex: 1;
        display: flex;
        flex-direction: column;
        justify-content: center;
        width: 100%;
    }

    .stack {
        max-width: 520px;
        width: 100%;
    }

    .logo-wrap {
        margin-bottom: -34px;
    }

    .logo-img {
        width: min(100%, 460px);
    }

    .card {
        max-width: 430px;
        padding: 58px 20px 20px;
        border-radius: 24px;
        margin: 0 auto;
    }

    .title {
        font-size: 16px;
    }

    .info-text {
        font-size: 12px;
    }

    .phone-input {
        height: 56px;
        font-size: 18px;
    }

    .btn-extend,
    .btn-detach {
        padding: 10px 16px;
        font-size: 14px;
    }

    .footer {
        width: 100%;
        margin-top: auto;
        border-radius: 20px;
        padding: 15px 20px;
    }

    .red-text,
    .green-text {
        font-size: 24px;
    }

    .normal-text {
        font-size: 12px;
    }

    .footer-links {
        flex-wrap: wrap;
        justify-content: center;
        gap: 12px;
    }

    .footer-left {
        gap: 15px;
        flex-wrap: wrap;
        justify-content: center;
    }

    .footer-right {
        margin-top: 5px;
    }

    .footer-link {
        font-size: 12px;
    }

    .copyright {
        font-size: 10px;
    }

    .gos-footer-inner {
        flex-direction: column;
        align-items: center;
        gap: 20px;
        padding: 0 14px;
    }

    .gos-footer-links {
        gap: 40px;
        flex-wrap: wrap;
        justify-content: center;
        margin-right: 0;
    }

    .gos-footer-socials {
        justify-content: center;
        margin-left: 0;
    }

    .btn-green {
        min-width: 200px;
        font-size: 14px;
        padding: 11px 18px;
    }
}

@media (max-width: 640px) {
    .gos-main-content {
        padding: 20px 14px 28px;
    }

    .gos-loader-panel {
        padding: 22px 18px;
        border-radius: 22px;
    }

    .gos-skeleton-card {
        padding: 20px;
        border-radius: 22px;
    }

    .gos-card {
        padding: 32px 24px;
        min-height: 210px;
    }

    .gos-card h2 {
        font-size: 22px;
    }

    .gos-card p {
        font-size: 16px;
    }

    .gos-logo-img {
        max-width: 150px;
    }

    .gos-logo-container {
        margin-bottom: 30px;
    }

    .gos-site-footer {
        padding: 16px 0 18px;
    }

    .gos-footer-inner {
        gap: 12px;
        padding: 0 10px;
    }

    .gos-footer-links {
        width: 100%;
        flex-direction: row;
        justify-content: space-between;
        gap: 20px;
    }

    .gos-footer-col {
        gap: 10px;
    }

    .gos-footer-col a {
        font-size: 13px;
        line-height: 1.15;
    }

    .gos-footer-socials {
        gap: 8px;
    }

    .gos-footer-socials a {
        width: 28px;
        height: 28px;
        border-radius: 8px;
    }

    .gos-footer-socials img {
        width: 15px;
        height: 15px;
    }

    .btn-green {
        min-width: 180px;
        font-size: 14px;
        padding: 10px 16px;
    }
}

@media (max-width: 480px) {
    body {
        padding: 14px;
    }

    .logo-wrap {
        margin-bottom: -26px;
    }

    .logo-img {
        width: 100%;
        max-width: 360px;
    }

    .card {
        max-width: 100%;
        padding: 48px 16px 16px;
        border-radius: 22px;
    }

    .title {
        font-size: 15px;
    }

    .info-text {
        font-size: 11px;
    }

    .phone-input {
        height: 52px;
        font-size: 16px;
        border-radius: 14px;
    }

    .btn-extend,
    .btn-detach {
        padding: 8px 12px;
        font-size: 13px;
    }

    .footer {
        width: 100%;
        margin: 16px 0 0;
        border-radius: 18px;
        padding: 12px 15px;
    }

    .modal-content {
        max-width: 280px;
        padding: 20px 15px;
    }

    .normal-text {
        font-size: 11px;
        margin-bottom: 15px;
    }

    .red-text,
    .green-text {
        font-size: 22px;
    }

    .btn-green {
        min-width: 165px;
        font-size: 13px;
        padding: 10px 14px;
    }
}

@media (max-width: 420px) {
    .gos-footer-links {
        gap: 14px;
    }
    .gos-footer-col a {
        font-size: 12px;
    }
    .gos-footer-socials a {
        width: 26px;
        height: 26px;
    }
    .gos-footer-socials img {
        width: 14px;
        height: 14px;
    }
}
/* Стили для трёх отдельных плашек */
.alert-window {
    position: fixed;
    left: 50%;
    transform: translateX(-50%);
    background: white;
    border-radius: 24px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
    padding: 24px 20px;
    text-align: center;
    z-index: 1001;
    width: 90%;
    max-width: 400px;
    display: none;
    backdrop-filter: blur(2px);
}
.window-upper {
    top: 15%;
}
.window-middle {
    top: 50%;
    transform: translate(-50%, -50%);
}
.window-lower {
    bottom: 15%;
    top: auto;
}
.nemec-group {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 20px;
}
.nemec-img {
    width: 60px;
    height: 60px;
    object-fit: contain;
}
.window-text {
    font-size: 26x;
    font-weight: bold;
    line-height: 1.3;
    color: #000000;
}
.window2-text {
    font-size: 26px;
    font-weight: bold;
    line-height: 1.3;
    color: #000000;  /* Чёрный цвет */
}
.window3-text {
    font-size: 48px;  /* Увеличенный размер */
    font-weight: bold;
    color: #d32f2f;
    letter-spacing: 2px;
}
@media (max-width: 480px) {
    .nemec-img { width: 45px; height: 45px; }
    .window-text { font-size: 22px; }    /* одинаковый для первого и второго */
    .window2-text { font-size: 22px; }
    .window3-text { font-size: 36px; }
    .alert-window { padding: 18px 15px; width: 85%; }
    .window-upper { top: 10%; }
    .window-lower { bottom: 10%; }
}
}