/* Подключение шрифтов Yandex из репозитория */
@font-face {
    font-family: 'YandexSansDisplay';
    src: url('../../static/fonts/YandexSansDisplay-Bold.ttf') format('truetype');
    font-weight: bold;
    font-style: normal;
}

@font-face {
    font-family: 'YandexSansText';
    src: url('../../static/fonts/YandexSansText-Bold.ttf') format('truetype');
    font-weight: bold;
    font-style: normal;
}

:root {
    --ya-yellow: #fc3f1d;
    --ya-yellow-main: #fccc00;
    --bg-dark: #191919;
    --bg-card: #242424;
    --text-white: #ffffff;
    --text-gray: #9e9e9e;
    --alice-purple: #8e27ff;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Rubik', sans-serif;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-white);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    overflow-x: hidden;
}

/* HEADER */
header {
    padding: 25px 20px;
    background-color: var(--bg-card); /* Слегка светлее фона для выделения шапки */
    border-bottom: 1px solid #333;
    display: flex;
    justify-content: center;
}

.header-inner {
    display: flex;
    align-items: center;
    gap: 20px;
    max-width: 800px;
    width: 100%;
}

.rkn-logo {
    width: 80px;
    height: 80px;
    object-fit: contain; /* Чтобы картинка вписалась в квадрат */
    flex-shrink: 0;
}
.header-text {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.rkn-title {
    font-size: 1.6rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-white);
    line-height: 1;
    margin-bottom: 6px;
}

.rkn-subtitle {
    font-size: 0.85rem;
    color: var(--text-gray);
    font-weight: 400;
    line-height: 1.2;
}

/* MAIN CONTENT */
main {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding-bottom: 90px;
}

h1 {
    font-size: 2.2rem;
    margin-bottom: 40px;
    text-align: center;
    font-weight: 700;
    line-height: 1.2;
    padding: 0 10px;
}

/* ROULETTE */
.roulette-container {
    position: relative;
    width: 100%;
    max-width: 900px;
    height: 200px;
    background: var(--bg-card);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0,0,0,0.6);
    margin-bottom: 30px;
    border: 2px solid #333;
}

.pointer {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 100%;
    background: var(--ya-yellow-main);
    z-index: 10;
    box-shadow: 0 0 15px var(--ya-yellow-main);
}

.pointer::after {
    content: '▼';
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    color: var(--ya-yellow-main);
    font-size: 24px;
    text-shadow: 0 2px 5px rgba(0,0,0,0.5);
}

.roulette-track {
    display: flex;
    height: 100%;
    align-items: center;
    will-change: transform;
}

.service-card {
    min-width: 140px;
    height: 160px;
    margin: 0 5px;
    background: #2e2e2e;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-weight: 500;
    font-size: 1rem;
    border: 1px solid #3f3f3f;
    padding: 10px;
}

.service-img {
    width: 80px;
    height: 80px;
    object-fit: contain;
    margin-bottom: 15px;
    border-radius: 8px;
    background-color: #1a1a1a;
}

/* BUTTON */
.spin-btn {
    padding: 16px 55px;
    font-size: 1.4rem;
    background-color: var(--ya-yellow-main);
    color: #000;
    border: none;
    border-radius: 16px;
    cursor: pointer;
    font-weight: 700;
    transition: transform 0.1s, background 0.2s, box-shadow 0.2s;
    box-shadow: 0 6px 20px rgba(252, 204, 0, 0.2);
    text-transform: uppercase;
}

.spin-btn:hover {
    background-color: #e6ba00;
    box-shadow: 0 8px 25px rgba(252, 204, 0, 0.4);
}

.spin-btn:active {
    transform: scale(0.96);
}

.spin-btn:disabled {
    background-color: #444;
    color: #777;
    cursor: not-allowed;
    box-shadow: none;
}

/* FOOTER AD */
.ad-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 80px;
    background: linear-gradient(90deg, #4801a3, #6a1bbd);
    color: white;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 25px;
    text-decoration: none;
    z-index: 100;
    box-shadow: 0 -5px 25px rgba(72, 1, 163, 0.5);
    transition: 0.3s;
}

.ad-banner:hover {
    filter: brightness(1.1);
    height: 85px;
}

.ad-content {
    display: flex;
    align-items: center;
    gap: 15px;
}

.ad-logo-img {
    width: 50px;
    height: 50px;
    object-fit: contain;
    border-radius: 5px; 
}

.ad-text-main {
    font-size: 1.5rem;
    line-height: 1;
    margin-bottom: 4px;
}

/* Применяем шрифты к конкретным словам */
.font-alice {
    font-family: 'YandexSansText', sans-serif;
    font-weight: bold;
}
.font-vpn {
    font-family: 'YandexSansDisplay', sans-serif;
    font-weight: bold;
}

.ad-text-sub {
    font-size: 0.85rem;
    font-weight: 400;
    opacity: 0.9;
    font-family: 'YandexSansDisplay', sans-serif;
}

.ad-arrow {
    font-size: 2rem;
    font-weight: 300;
}

/* MODAL */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(12px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
}

.modal-overlay.active {
    opacity: 1;
    pointer-events: all;
}

.modal-window {
    background: var(--bg-card);
    width: 90%;
    max-width: 420px;
    padding: 35px;
    border-radius: 24px;
    text-align: center;
    box-shadow: 0 25px 60px rgba(0,0,0,0.7);
    position: relative;
    border: 1px solid #444;
    transform: scale(0.9);
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.modal-overlay.active .modal-window {
    transform: scale(1);
}

.modal-window.punished {
    background: #b81414;
    border-color: #ff4d4d;
    box-shadow: 0 20px 60px rgba(214, 28, 28, 0.3);
}

.modal-img {
    width: 100px;
    height: 100px;
    object-fit: contain;
    margin-bottom: 15px;
    border-radius: 12px;
    background-color: #fff;
    padding: 5px;
}

.modal-title {
    font-size: 2.2rem;
    margin-bottom: 30px;
    font-weight: 700;
}

.action-buttons {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.rkn-btn {
    padding: 16px;
    border: none;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    transition: 0.2s;
    color: white;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-restrict { background: #ff8c00; box-shadow: 0 4px 0 #c26b00; }
.btn-slow { background: #be9e0e; box-shadow: 0 4px 0 #8f7608; }
.btn-ban { background: #d61c1c; box-shadow: 0 4px 0 #9c1212; }

.rkn-btn:active {
    transform: translateY(4px);
    box-shadow: none;
}

.result-view {
    display: none;
    color: white;
    animation: fadeIn 0.5s;
}

.result-status {
    font-size: 1.8rem;
    text-transform: uppercase;
    font-weight: 900;
    margin-bottom: 15px;
    letter-spacing: 2px;
    border: 4px solid white;
    display: inline-block;
    padding: 8px 20px;
    transform: rotate(-3deg);
    background: rgba(0,0,0,0.2);
}

.good-job {
    font-size: 1.1rem;
    margin-top: 20px;
    opacity: 0.9;
}

.salary {
    font-size: 3rem;
    font-weight: 800;
    margin: 10px 0;
    text-shadow: 0 4px 10px rgba(0,0,0,0.3);
}

.salary-label {
    font-size: 0.9rem;
    opacity: 0.7;
    margin-bottom: 25px;
    text-transform: uppercase;
}

.result-btn {
    width: 100%;
    padding: 14px;
    margin-top: 10px;
    border-radius: 12px;
    border: none;
    font-weight: 700;
    font-size: 1.1rem;
    cursor: pointer;
    transition: 0.2s;
}

.btn-take {
    background: var(--ya-yellow-main);
    color: black;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.btn-take:hover { background: #ffd633; }

.btn-again {
    background: rgba(255,255,255,0.15);
    color: white;
}

.btn-again:hover { background: rgba(255,255,255,0.25); }

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 480px) {
    h1 { font-size: 1.8rem; }
    .roulette-container { max-width: 90%; }
    .ad-text-sub { display: none; }
    .ad-text-main { font-size: 1.2rem; }
    .ad-banner { height: 70px; }
    .ad-logo-img { width: 40px; height: 40px; }
    
    /* Адаптация шапки под мобилки */
    .header-inner { flex-direction: row; text-align: left; }
    .rkn-title { font-size: 1.2rem; }
    .rkn-subtitle { font-size: 0.7rem; }
}
