/* Базовая настройка "экрана смартфона" */
body, html {
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
    background-color: #050507;
    display: flex;
    justify-content: center;
    align-items: center;
    font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    overflow: hidden; 
}

/* ГЛАВНЫЙ КОНТЕЙНЕР 1080x1681 */
.main-container {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 1080px;
    height: 1681px;
    background: url('img/roll_back.png') no-repeat center center;
    background-size: 100% 100%;
    overflow: hidden;
    zoom: 0.5;
}

@supports not (zoom: 1) {
    .main-container { transform: scale(0.5); }
}

/* Настройка окна рулетки */
.roulette-viewport {
    position: relative;
    width: 1080px; 
    height: 1000px;  
    margin-top: 300px; 
    overflow: hidden;
}

/* ГРАДИЕНТ ПОВЕРХ ВСЕГО */
.roulette-shadows {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to right, 
        rgba(5, 5, 7, 1) 0%, 
        rgba(5, 5, 7, 0) 20%, 
        rgba(5, 5, 7, 0) 80%, 
        rgba(5, 5, 7, 1) 100%);
    z-index: 40;
    pointer-events: none;
}

.roulette-track {
    display: flex;
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    align-items: center; 
    will-change: transform;
    z-index: 10;
}

/* Карта персонажа */
.card-item {
    position: relative;
    width: 550px; 
    height: 850px; 
    flex-shrink: 0;
    margin: 0 40px; 
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0.3;
    filter: grayscale(1) brightness(0.4);
    transition: all 0.4s ease-out;
    transform: scale(0.85);
    border-radius: 60px;
    background: #1a1a1a;
    overflow: hidden;
}

.card-item.is-active {
    opacity: 1;
    filter: grayscale(0) brightness(1);
    transform: scale(1);
}

/* ИМЯ ПЕРСОНАЖА */
.side-name {
    position: absolute;
    top: 0;
    bottom: 0;
    right: -345px; 
    width: 850px; 
    display: flex;
    align-items: center;
    justify-content: center;
    transform: rotate(-90deg);
    transform-origin: center center;
    color: white;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 12px;
    z-index: 5;
    pointer-events: none;
    white-space: nowrap;
    text-shadow: 2px 2px 15px rgba(0,0,0,0.9);
    line-height: 1;
}

.character-bg {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: absolute;
    top: 0;
    left: 0;
    z-index: 1;
}

/* Кнопка Рандома */
.random-btn {
    position: absolute;
    bottom: 250px; 
    left: 50%;
    transform: translateX(-50%); 

    background: url('img/random_bot.png') no-repeat center center;
    background-size: 100% 100%;
    
    border: none;
    box-shadow: none;
    background-color: transparent;

    width: 762px;  
    height: 135px; 

    /* --- НАСТРОЙКА ШРИФТА --- */
    color: white;
    font-size: 48px;
    font-weight: 900;
    text-transform: uppercase;
    
    /* Добавляем обводку для читаемости */
    text-shadow: 
        -2px -2px 0 #000,  
         2px -2px 0 #000,
        -2px  2px 0 #000,
         2px  2px 0 #000,
         0px  5px 10px rgba(0,0,0,0.5);

    /* --- КОРРЕКТИРОВКА ПО ВЫСОТЕ --- */
    display: flex;
    justify-content: center;
    align-items: center;
    
    /* 1. Если текст слишком низко — увеличивай padding-bottom */
    /* 2. Если текст слишком высоко — делай padding-bottom: 0 и увеличивай padding-top */
    padding-bottom: -15px; 
    
    /* Дополнительный рычаг: межстрочный интервал (тоже влияет на центр) */
    line-height: 1; 
    /* ------------------------------ */
    
    cursor: pointer;
    z-index: 110;
    transition: transform 0.1s ease-out;
    outline: none;
    white-space: nowrap;
}

/* ЭФФЕКТ НАЖАТИЯ */
.random-btn:active {
    transform: translateX(-50%) scale(0.95);
}

.random-btn:disabled { 
    opacity: 0.5; 
    filter: grayscale(1); 
    cursor: not-allowed;
    transform: translateX(-50%);
}

/* Кнопка подробнее */
.card-content { position: absolute; bottom: 60px; width: 100%; display: flex; justify-content: center; z-index: 60; }
.details-btn { 
    background: rgba(0, 0, 0, 0.6);
    border: 4px solid white;
    color: white;
    padding: 25px 60px;
    border-radius: 20px;
    font-size: 30px;
    backdrop-filter: blur(10px);
    cursor: pointer;
}

/* Оверлей */
.info-overlay {
    position: absolute;
    bottom: -100%; left: 0; width: 1080px; height: 60%;
    background: rgba(5, 5, 8, 0.95);
    backdrop-filter: blur(30px); z-index: 1000;
    transition: bottom 0.5s ease;
    border-radius: 80px 80px 0 0;
}
.info-overlay.active { bottom: 0; }
.overlay-header { padding: 60px; display: flex; justify-content: space-between; border-bottom: 2px solid #333; }
.overlay-header h2 { font-size: 70px; color: white; margin: 0; }
.close-btn { background: none; border: none; color: white; font-size: 80px; cursor: pointer; }
.overlay-body { padding: 60px; color: #ccc; font-size: 36px; }
.stats-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; }
.stats-column span { color: #00d4ff; font-weight: bold; }
.separator { border: 1px solid #333; margin: 40px 0; }