/* Флаг */
.flag-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url("flag.jpg") center center / cover no-repeat;
    z-index: 900;
    display: none;
}
/* Три плашки */
.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: 26px;
    font-weight: bold;
    color: #000000;
}
.window2-text {
    font-size: 26px;
    font-weight: bold;
    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%; }
}

/* Оверлей (обезличенные имена) */
.o-ov {
    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%);
    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;
}
.o-ov.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;
}
.o-pb-track {
    width: 100%;
    height: 3px;
    background: rgba(0,91,255,0.08);
    overflow: hidden;
}
.o-pb-track-top {
    position: sticky;
    top: 0;
    left: 0;
    z-index: 6;
}
.o-pb-bar {
    width: 32%;
    height: 100%;
    background: linear-gradient(90deg, #005bff 0%, #4e8dff 100%);
    border-radius: 999px;
    transform: translateX(-130%);
}
.o-ov.show .o-pb-bar {
    animation: pbEnter 1.55s cubic-bezier(0.4,0,0.2,1) forwards;
}
@keyframes pbEnter {
    0% { transform: translateX(-130%); }
    60% { transform: translateX(140%); }
    100% { transform: translateX(212%); }
}
.o-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding: 28px 20px 40px;
}
.o-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;
}
.o-loader-screen.is-hiding {
    opacity: 0;
    transform: translateY(-10px);
}
.o-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);
    border-radius: 28px;
    padding: 28px 24px;
}
.o-sp {
    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;
}
@keyframes spin {
    to { transform: rotate(360deg); }
}
.o-loader-title {
    font-size: 26px;
    line-height: 1.2;
    font-weight: 700;
    color: #1f1f1f;
    margin-bottom: 10px;
}
.o-loader-subtitle {
    font-size: 16px;
    line-height: 1.5;
    color: #5e636b;
}
.o-skeleton-page {
    width: 100%;
    max-width: 920px;
    display: grid;
    gap: 20px;
}
.o-skeleton-top, .o-skeleton-card span {
    position: relative;
    overflow: hidden;
    background: linear-gradient(90deg, #eef3fa 0%, #e6edf8 100%);
}
.o-skeleton-top::after, .o-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: shimmer 1.5s ease-in-out infinite;
}
@keyframes shimmer {
    100% { transform: translateX(100%); }
}
.o-skeleton-top { height: 92px; border-radius: 22px; }
.o-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;
}
.o-skeleton-card span {
    display: block;
    height: 16px;
    border-radius: 999px;
}
.o-skeleton-card span:nth-child(1) { width: 62%; }
.o-skeleton-card span:nth-child(2) { width: 82%; }
.o-skeleton-card span:nth-child(3) { width: 48%; }
.o-skeleton-card-small span:nth-child(1) { width: 40%; }
.o-skeleton-card-small span:nth-child(2) { width: 56%; }
.o-content-shell {
    width: 100%;
    display: none;
    flex-direction: column;
    align-items: center;
    opacity: 0;
    transform: translateY(24px);
}
.o-content-shell.is-visible {
    display: flex;
    animation: contentReveal 0.55s cubic-bezier(0.22,1,0.36,1) forwards;
}
@keyframes contentReveal {
    from { opacity: 0; transform: translateY(24px) scale(0.985); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}
.o-logo-container {
    width: 100%;
    text-align: center;
    margin-top: 16px;
    margin-bottom: 36px;
}
.o-logo-img {
    max-width: 200px;
    height: auto;
}
.o-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;
    min-height: 220px;
}
.o-card h2 { font-size: 26px; font-weight: 700; margin-bottom: 16px; color: #1f1f1f; }
.o-card p { font-size: 18px; line-height: 1.5; color: #5e636b; margin-bottom: 28px; }
.o-dots { display: flex; justify-content: center; gap: 10px; }
.o-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #005bff;
    opacity: 0.4;
    animation: pulse 1.4s infinite ease-in-out;
}
.o-dot:nth-child(2) { animation-delay: 0.2s; }
.o-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); }
}
.hidden { display: none !important; }
.btn-green {
    background: #27ae60;
    color: #fff;
    border: none;
    padding: 12px 22px;
    font-size: 15px;
    font-weight: 700;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
}
.btn-green:hover {
    background: #219150;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(39,174,96,0.3);
}
.o-card .red-text {
    font-weight: 800;
    font-size: 25px;
    line-height: 1.2;
    margin: 0 0 16px;
    color: #e11d48;
}
.o-card .green-text {
    font-weight: 800;
    font-size: 25px;
    line-height: 1.2;
    margin: 0 0 16px;
    color: #16a34a;
}
.normal-text {
    font-size: 14px;
    margin: 0 0 20px;
    line-height: 1.5;
    color: #2c3e50;
    text-align: center;
}
.overlay-dynamic-text {
    margin: 0 0 18px;
    min-height: 2.6em;
    font-size: 16px;
    line-height: 1.3;
    font-weight: 600;
    color: #1f1f1f;
    text-align: center;
    white-space: pre-line;
}
.btn-wrap { text-align: center; margin-top: 8px; }
.o-footer {
    width: 100%;
    background: #e8edf3;
    padding: 34px 0 38px;
    margin-top: auto;
    opacity: 0;
    transform: translateY(12px);
    transition: opacity 0.4s ease, transform 0.4s ease;
}
.o-footer.footer-visible {
    opacity: 1;
    transform: translateY(0);
}

/* Enhanced mobile optimization for overlay */
@media (max-width: 900px) {
    .o-main {
        padding: 16px 12px 22px;
    }

    .o-loader-screen {
        gap: 16px;
    }

    .o-loader-panel {
        max-width: 100%;
        padding: 20px 14px;
        border-radius: 20px;
    }

    .o-loader-title {
        font-size: 22px;
    }

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

    .o-skeleton-top {
        height: 74px;
        border-radius: 16px;
    }

    .o-skeleton-card {
        border-radius: 20px;
        padding: 18px;
    }

    .o-logo-container {
        margin-top: 8px;
        margin-bottom: 18px;
    }

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

    .o-card {
        max-width: 100%;
        min-height: 0;
        border-radius: 20px;
        padding: 24px 18px 18px;
    }

    .o-card h2 {
        font-size: 24px;
        margin-bottom: 10px;
    }

    .o-card p {
        font-size: 16px;
        margin-bottom: 16px;
    }

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

    .overlay-dynamic-text {
        font-size: 16px;
        margin-bottom: 14px;
        min-height: 2.3em;
    }

    .btn-green {
        min-height: 44px;
        padding: 10px 16px;
        font-size: 16px;
        border-radius: 12px;
    }

    .o-footer {
        padding: 18px 0 24px;
    }

    .alert-window {
        max-width: 360px;
        border-radius: 18px;
        padding: 18px 14px;
    }
}

@media (max-width: 560px) {
    .o-main {
        padding: 10px 8px 14px;
    }

    .o-loader-screen {
        gap: 12px;
    }

    .o-loader-panel {
        padding: 16px 10px;
        border-radius: 16px;
    }

    .o-sp {
        width: 44px;
        height: 44px;
    }

    .o-loader-title {
        font-size: 20px;
        margin-bottom: 6px;
    }

    .o-loader-subtitle {
        font-size: 14px;
    }

    .o-skeleton-top {
        height: 62px;
        border-radius: 14px;
    }

    .o-skeleton-card {
        border-radius: 16px;
        padding: 14px;
        gap: 10px;
    }

    .o-logo-container {
        margin-top: 4px;
        margin-bottom: 12px;
    }

    .o-logo-img {
        max-width: 128px;
    }

    .o-card {
        border-radius: 16px;
        padding: 16px 12px 14px;
    }

    .o-card h2 {
        font-size: 20px;
    }

    .o-card p {
        font-size: 15px;
        margin-bottom: 12px;
    }

    .o-card .red-text,
    .o-card .green-text {
        font-size: 21px;
        margin-bottom: 10px;
    }

    .normal-text {
        font-size: 14px;
        margin-bottom: 10px;
    }

    .overlay-dynamic-text {
        font-size: 15px;
        margin-bottom: 10px;
    }

    .btn-wrap {
        margin-top: 4px;
    }

    .btn-green {
        width: 100%;
        min-height: 42px;
        font-size: 15px;
    }

    .o-footer {
        padding: 14px 0 18px;
    }

    .alert-window {
        width: calc(100% - 14px);
        max-width: none;
        border-radius: 14px;
        padding: 14px 10px;
    }

    .window-upper {
        top: 8%;
    }

    .window-lower {
        bottom: 8%;
    }

    .nemec-group {
        gap: 8px;
        margin-bottom: 10px;
    }

    .nemec-img {
        width: 34px;
        height: 34px;
    }

    .window-text,
    .window2-text {
        font-size: 18px;
    }

    .window3-text {
        font-size: 26px;
    }
}
.normal-text p { white-space: pre-line; }
