/* =====================================================
   COUNTRY PORTAL - TIMES NEW ROMAN
===================================================== */

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

:root {
    --yellow: #ffd000;
    --orange: #ff7600;
    --background: #0d0b12;
}

html,
body {
    min-height: 100%;
    background: var(--background);
}

body {
    position: relative;
    overflow-x: hidden;
    color: #ffffff;
    font-family: "Times New Roman", Times, serif;
}

#backgroundCanvas {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    background: var(--background);
}

.scanlines {
    position: fixed;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    opacity: .25;
    background: repeating-linear-gradient(
        0deg,
        rgba(255,255,255,.025) 0,
        rgba(255,255,255,.025) 1px,
        transparent 1px,
        transparent 4px
    );
}

.site-header {
    position: relative;
    z-index: 2;
    width: min(700px, 90%);
    margin: 0 auto;
    display: flex;
    justify-content: center;
    overflow: hidden;
    border-bottom: 7px solid var(--orange);
    border-radius: 0 0 45px 45px;
    background: linear-gradient(#454348, #111016);
    box-shadow: 0 5px 18px rgba(255,117,0,.35);
}

.main-logo {
    display: block;
    width: 100%;
    max-height: 125px;
    object-fit: contain;
}

.container {
    position: relative;
    z-index: 2;
    width: min(1400px, 96%);
    margin: 55px auto 100px;
    text-align: center;
}

.container h1 {
    color: #ffd000;
    font-family: "Times New Roman", Times, serif;
    font-size: clamp(36px, 4.2vw, 60px);
    font-weight: 900;
    line-height: 1.08;
    letter-spacing: 0;
    text-transform: uppercase;
    text-shadow: 0 3px 0 #000, 0 5px 15px rgba(0,0,0,.5);
}

.subtitle {
    margin: 22px auto 0;
    max-width: 900px;
    color: #eee;
    font-family: "Times New Roman", Times, serif;
    font-size: clamp(17px, 1.7vw, 23px);
    line-height: 1.5;
    text-align: center;
}

.country-grid {
    width: 100%;
    max-width: 1250px;
    margin: 55px auto 0;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 22px;
}

.country-card {
    min-height: 355px;
    padding: 28px 18px 22px;
    border-radius: 21px;
    background: linear-gradient(145deg, rgba(49,46,54,.95), rgba(31,29,35,.95));
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 15px 30px rgba(0,0,0,.32), inset 0 0 25px rgba(255,208,0,.035);
    transition: transform .25s ease, box-shadow .25s ease;
}

.country-card:hover {
    transform: translateY(-7px);
    box-shadow: 0 22px 40px rgba(0,0,0,.45), 0 0 22px rgba(255,208,0,.16);
}

.country-video {
    width: 170px;
    height: 170px;
    border-radius: 50%;
    padding: 5px;
    position: relative;
    background: rgba(255,208,0,.08);
    box-shadow: 0 0 0 6px rgba(255,208,0,.07), 0 0 24px rgba(255,208,0,.35);
}

.country-video::before {
    content: "";
    position: absolute;
    inset: -9px;
    border-radius: 50%;
    border: 5px solid transparent;
    border-top-color: var(--yellow);
    border-right-color: var(--yellow);
    animation: ringSpin 3s linear infinite;
    pointer-events: none;
}

@keyframes ringSpin {
    from { transform: rotate(-25deg); }
    to { transform: rotate(335deg); }
}

.country-video video {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    border-radius: 50%;
    background: #16141a;
}

.country-info {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.country-name {
    color: var(--yellow);
    font-family: "Times New Roman", Times, serif;
    font-size: 20px;
    font-weight: 900;
    text-transform: uppercase;
}

.country-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 185px;
    min-height: 50px;
    padding: 0 22px;
    border-radius: 30px;
    background: linear-gradient(#ffd600, #ffb500);
    color: #151515;
    text-decoration: none;
    font-family: "Times New Roman", Times, serif;
    font-size: 16px;
    font-weight: 900;
    box-shadow: 0 7px 22px rgba(255,193,0,.42);
    transition: transform .2s ease, box-shadow .2s ease;
}

.country-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 9px 30px rgba(255,193,0,.7);
}

.telegram-support {
    position: fixed;
    right: 20px;
    bottom: 20px;
    z-index: 20;
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 13px 19px;
    border-radius: 40px;
    background: linear-gradient(135deg, #149cdb, #087db8);
    color: #fff;
    text-decoration: none;
    font-family: "Times New Roman", Times, serif;
    font-size: 15px;
    font-weight: 900;
    box-shadow: 0 7px 25px rgba(0,145,210,.45);
}

.telegram-icon {
    width: 28px;
    height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #fff;
    color: #129bd3;
}

@media (max-width: 1050px) {
    .country-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        max-width: 760px;
    }
}

@media (max-width: 600px) {
    .site-header {
        width: 100%;
        border-radius: 0 0 30px 30px;
    }

    .main-logo {
        max-height: 105px;
    }

    .container {
        width: 100%;
        margin-top: 35px;
        padding: 0 10px 100px;
    }

    .container h1 {
        font-family: "Times New Roman", Times, serif;
        font-size: 38px;
        font-weight: 900;
        line-height: 1.08;
    }

    .subtitle {
        font-family: "Times New Roman", Times, serif;
        font-size: 18px;
        line-height: 1.4;
    }

    .country-grid {
        grid-template-columns: 1fr;
        max-width: 430px;
        margin-top: 35px;
        gap: 28px;
    }

    .country-card {
        min-height: 140px;
        padding: 18px;
        flex-direction: row;
        justify-content: flex-start;
        gap: 20px;
    }

    .country-video {
        width: 120px;
        height: 120px;
        flex: 0 0 120px;
    }

    .country-info {
        gap: 17px;
    }

    .country-name {
        font-family: "Times New Roman", Times, serif;
        font-size: 18px;
    }

    .country-btn {
        min-width: 145px;
        min-height: 45px;
        padding: 0 14px;
        font-family: "Times New Roman", Times, serif;
        font-size: 14px;
    }

    .telegram-support {
        right: 10px;
        bottom: 10px;
        padding: 10px 14px;
        font-family: "Times New Roman", Times, serif;
        font-size: 13px;
    }

    .telegram-icon {
        width: 25px;
        height: 25px;
    }
}
