:root {
    --bg-main: #0b0c10;
    --bg-card: #161b22;
    --accent-gold: #c5a059;
    --text-main: #aeb9c7;
    --text-light: #ffffff;
}

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

body {
    background-color: var(--bg-main);
    color: var(--text-main);
    font-family: 'Segoe UI', sans-serif;
    line-height: 1.6;
}

.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }

/* Шапка */
header { background: #000; border-bottom: 1px solid #30363d; padding: 15px 0; }
.nav { display: flex; justify-content: space-between; align-items: center; }
.logo { color: var(--accent-gold); font-weight: 800; font-size: 22px; text-decoration: none; }
.nav-links a { color: #fff; text-decoration: none; margin-left: 20px; font-weight: 600; font-size: 13px; text-transform: uppercase; }

/* СЕТКА — теперь карточки не будут слишком узкими */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); /* Увеличил минимальную ширину */
    gap: 25px;
    margin: 30px 0;
}

/* КАРТОЧКА */
.card {
    background: var(--bg-card);
    border: 1px solid #30363d;
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 100%;
}

/* ИСПРАВЛЕННЫЙ БЛОК КАРТИНКИ */
.img-box {
    width: 100%;
    height: 180px;
    background: #000;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    border-bottom: 1px solid #30363d;
}

.img-box img {
    width: 100%;
    height: 100%;
    /* Используем contain вместо cover, чтобы логотипы не обрезались, 
       но при этом они будут занимать всё черное пространство */
    object-fit: contain; 
    padding: 15px; /* Небольшой отступ, чтобы лого не липло к краям */
}

/* Контент */
.card-content { padding: 20px; flex-grow: 1; display: flex; flex-direction: column; }
.card-content h3 { color: #fff; margin-bottom: 10px; }
.rating { color: #ffd700; margin-bottom: 10px; font-weight: bold; }
.card-content p { font-size: 0.9rem; margin-bottom: 20px; flex-grow: 1; }
.btn-small { color: var(--accent-gold); text-decoration: none; font-weight: 700; }

/* Крупный блок для главной (Stake) */
.featured-card {
    background: #111418;
    border-radius: 15px;
    padding: 30px;
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 30px;
    align-items: center;
    margin: 40px 0;
}

@media (max-width: 900px) {
    .featured-card { grid-template-columns: 1fr; }
}
/* Контейнер для списка */
.casino-list {
    margin-top: 40px;
    display: flex;
    flex-direction: column;
    gap: 15px; /* Расстояние между карточками */
}

/* Стили для каждой строки казино */
.casino-row {
    background: #161b22; /* Цвет из твоих переменных */
    border: 1px solid #30363d;
    border-radius: 12px;
    padding: 25px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s ease;
}

.casino-row:hover {
    border-color: #c5a059; /* Золотой при наведении */
    background: #1c2128;
    transform: translateX(10px); /* Легкий сдвиг вправо */
}

/* Левая часть: Текст */
.casino-info {
    max-width: 75%;
}

.casino-info h3 {
    color: #fff;
    font-size: 1.4rem;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 15px;
}

.casino-info .rating-gold {
    color: #ffd700;
    font-size: 1.1rem;
    font-weight: bold;
}

.casino-info p {
    color: #aeb9c7;
    font-size: 0.95rem;
    line-height: 1.6;
}

/* Правая часть: Кнопка */
.btn-play {
    background: #c5a059;
    color: #0b0c10;
    text-decoration: none;
    padding: 14px 35px;
    border-radius: 8px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.9rem;
    transition: 0.3s;
    border: none;
    cursor: pointer;
}

.btn-play:hover {
    background: #e6c073;
    box-shadow: 0 0 20px rgba(197, 160, 89, 0.3);
}

/* Адаптивность для мобилок */
@media (max-width: 768px) {
    .casino-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 20px;
    }
    .casino-info { max-width: 100%; }
    .btn-play { width: 100%; text-align: center; }
    
}
/* Анимация золотого перелива */
.main-title {
    background: linear-gradient(90deg, #fff, #c5a059, #fff);
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: shine 5s linear infinite, fadeInUp 1.2s ease-out;
    font-weight: 900;
}

@keyframes shine {
    to { background-position: 200% center; }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
/* Анимация логотипа iGaming.View */
.logo-animated {
    font-size: 1.5rem;
    font-weight: 800;
    text-decoration: none;
    color: #fff;
    letter-spacing: 1px;
    transition: 0.4s;
    display: inline-block;
    animation: logoPulse 4s ease-in-out infinite; /* Плавное свечение */
}

.logo-animated span {
    color: #c5a059; /* Ваш фирменный золотой */
    text-shadow: 0 0 10px rgba(197, 160, 89, 0.2);
}

.logo-animated:hover {
    transform: scale(1.05); /* Легкое увеличение при наведении */
    text-shadow: 0 0 20px rgba(197, 160, 89, 0.5);
}

@keyframes logoPulse {
    0%, 100% { opacity: 1; filter: brightness(1); }
    50% { opacity: 0.85; filter: brightness(1.3); }
}
/* Анимация появления карточек при загрузке */
.card {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUpCard 0.8s ease-out forwards;
}

/* Эффект очереди: каждая следующая карточка появляется чуть позже */
.card:nth-child(1) { animation-delay: 0.1s; }
.card:nth-child(2) { animation-delay: 0.2s; }
.card:nth-child(3) { animation-delay: 0.3s; }
.card:nth-child(4) { animation-delay: 0.4s; }
.card:nth-child(5) { animation-delay: 0.5s; }
.card:nth-child(6) { animation-delay: 0.6s; }

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

/* Оставляем крутой ховер-эффект при наведении */
.card:hover {
    border-color: #c5a059;
    box-shadow: 0 10px 30px rgba(197, 160, 89, 0.2);
    transform: translateY(-5px);
    transition: 0.3s ease;
}
/* Анимация увеличения карточек при загрузке */
.card {
    opacity: 0;
    transform: scale(0.8); /* Начинаем с уменьшенного размера */
    animation: zoomInCard 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

/* Эффект поочередного появления (лесенка) */
.card:nth-child(1) { animation-delay: 0.1s; }
.card:nth-child(2) { animation-delay: 0.2s; }
.card:nth-child(3) { animation-delay: 0.3s; }
.card:nth-child(4) { animation-delay: 0.4s; }
.card:nth-child(5) { animation-delay: 0.5s; }
.card:nth-child(6) { animation-delay: 0.6s; }

@keyframes zoomInCard {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1); /* Вырастает до нормального размера */
    }
}

/* Акцентный ховер (увеличение при наведении) */
.card:hover {
    border-color: #c5a059;
    box-shadow: 0 15px 40px rgba(197, 160, 89, 0.3);
    transform: scale(1.05); /* Блок увеличивается при наведении */
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.4s ease;
    z-index: 10; /* Чтобы блок был поверх остальных при увеличении */
}
/* Обновленный стиль карточек */
.card {
    opacity: 0;
    transform: perspective(1000px) rotateX(10deg) scale(0.9); /* Начальный 3D наклон */
    transition: all 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    animation: entrance 0.8s ease-out forwards;
    position: relative;
    overflow: hidden;
}

/* Эффект "появления" при загрузке */
@keyframes entrance {
    to {
        opacity: 1;
        transform: perspective(1000px) rotateX(0deg) scale(1);
    }
}

/* "Лесенка" появления */
.card:nth-child(1) { animation-delay: 0.1s; }
.card:nth-child(2) { animation-delay: 0.2s; }
.card:nth-child(3) { animation-delay: 0.3s; }
.card:nth-child(4) { animation-delay: 0.4s; }
.card:nth-child(5) { animation-delay: 0.5s; }
.card:nth-child(6) { animation-delay: 0.6s; }

/* Экстремальный ховер-эффект */
.card:hover {
    transform: perspective(1000px) rotateY(5deg) translateY(-15px) scale(1.05) !important;
    border-color: #c5a059;
    box-shadow: 
        -5px 5px 20px rgba(197, 160, 89, 0.2),
        0 0 40px rgba(197, 160, 89, 0.1);
    z-index: 100;
}

/* Добавляем "блик" при наведении */
.card::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(255,255,255,0.05), transparent);
    transform: rotate(45deg);
    transition: 0.6s;
    pointer-events: none;
}

.card:hover::after {
    left: 120%;
    top: 120%;
}
/* Контейнер карточки с эффектом глубины */
.card {
    position: relative;
    background: #161b22;
    border: 1px solid #30363d;
    overflow: hidden; /* Важно для эффекта сканера */
    transition: all 0.5s cubic-bezier(0.23, 1, 0.32, 1);
    z-index: 1;
}

/* Эффект бегущей линии сканера (появляется при наведении) */
.card::before {
    content: "";
    position: absolute;
    top: -100%;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        to bottom,
        transparent,
        rgba(197, 160, 89, 0.2),
        transparent
    );
    transition: 0s;
    z-index: 2;
    pointer-events: none;
}

.card:hover::before {
    top: 100%;
    transition: 1.5s linear;
}

/* Эффект "Цифрового шума" на фоне при наведении */
.card:hover {
    border-color: #c5a059;
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 0 30px rgba(197, 160, 89, 0.1);
    background: radial-gradient(circle at center, #1c2128 0%, #161b22 100%);
}

/* Анимация пульсации рейтинга (чтобы цифры "жили") */
.card .rating {
    animation: ratingPulse 2s infinite ease-in-out;
    display: inline-block;
}

@keyframes ratingPulse {
    0%, 100% { text-shadow: 0 0 5px rgba(197, 160, 89, 0.5); transform: scale(1); }
    50% { text-shadow: 0 0 15px rgba(197, 160, 89, 1); transform: scale(1.1); }
}
/* Фиксированный терминал доступа */
.fixed-terminal {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 10000;
    background: rgba(13, 17, 23, 0.8);
    backdrop-filter: blur(10px); /* Эффект матового стекла */
    border: 1px solid #c5a059;
    padding: 15px;
    border-radius: 12px;
    box-shadow: 0 0 30px rgba(197, 160, 89, 0.2);
    font-family: monospace;
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 280px;
}

.terminal-header {
    display: flex;
    justify-content: space-between;
    font-size: 0.6rem;
    color: #c5a059;
    border-bottom: 1px solid rgba(197, 160, 89, 0.3);
    padding-bottom: 5px;
}

.terminal-link {
    background: #c5a059;
    color: #000 !important;
    text-align: center;
    padding: 10px;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 900;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: 0.3s;
}

.terminal-link:hover {
    background: #fff;
    box-shadow: 0 0 20px #fff;
}

.scan-line {
    width: 100%;
    height: 1px;
    background: #c5a059;
    box-shadow: 0 0 10px #c5a059;
    animation: scanMove 2s infinite linear;
}

@keyframes scanMove {
    0% { transform: translateY(0); opacity: 0; }
    50% { opacity: 1; }
    100% { transform: translateY(50px); opacity: 0; }
}