/* Основные цвета: глубокий космос, звёздное сияние, туманности и созвездия */
:root {
    --deep-space: #0B0E17;
    --star-light: #E0E6FF;
    --nebula-purple: #4E2A84;
    --cosmic-blue: #1A237E;
    --constellation-gold: #FFD84D;
    --ancient-red: #7E1A2A;
    --god-teal: #00796B;
}

/* Основные стили */
body {
    background: var(--deep-space);
    color: var(--star-light);
    background-image: radial-gradient(circle at 25% 15%, rgba(78, 42, 132, 0.2) 0%, transparent 40%),
    radial-gradient(circle at 80% 70%, rgba(0, 121, 107, 0.15) 0%, transparent 35%);
    background-attachment: fixed;
}

h1, h2, h3, h4 {
    font-weight: 700;
    text-transform: uppercase;
    color: var(--star-light);
    text-shadow: 0 0 15px rgba(224, 230, 255, 0.3);
}

h1 {
    background: linear-gradient(180deg, var(--star-light) 0%, var(--constellation-gold) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    text-shadow: 0 0 20px rgba(255, 216, 77, 0.4);
}

h2 {
    color: var(--constellation-gold);
}

/* Навигация */
.navbar {
    background: rgba(11, 14, 23, 0.8);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid rgba(224, 230, 255, 0.1);
}

.menu-items li {
    position: relative;
}

.menu-items li::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -5px;
    left: 0;
    background: var(--constellation-gold);
    transition: width 0.3s ease;
}

.menu-items li:hover::after {
    width: 100%;
}

.navbar a {
    color: var(--star-light);
}

.navbar a:hover {
    color: var(--constellation-gold);
    opacity: 1;
}

.logo {
    color: var(--constellation-gold);
    text-shadow: 0 0 10px rgba(255, 216, 77, 0.5);
}

.navbar-container .hamburger-lines .line {
    background: var(--constellation-gold);
}

/* Кнопки */
.btn {
    position: relative;
    overflow: hidden;
    border: none;
    font-weight: bold;
    z-index: 1;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.2);
    transition: left 0.4s ease;
    z-index: -1;
}

.btn:hover::before {
    left: 0;
}

.btn-red {
    background: var(--ancient-red);
    box-shadow: 0 0 15px rgba(126, 26, 42, 0.5);
}

.btn-blue {
    background: var(--cosmic-blue);
    box-shadow: 0 0 15px rgba(26, 35, 126, 0.5);
}

.btn-green {
    background: var(--god-teal);
    box-shadow: 0 0 15px rgba(0, 121, 107, 0.5);
}

.btn-white {
    background: var(--star-light);
    color: var(--deep-space);
    box-shadow: 0 0 15px rgba(224, 230, 255, 0.5);
}

.btn-light-red {
    background: var(--ancient-red);
    box-shadow: 0 0 15px rgba(126, 26, 42, 0.5);
}

/* Карточки казино - переделаны под "созвездия" */
.casino-wrapper {
    gap: 20px;
    justify-content: center;
}

.casino-item {
    background: rgba(28, 28, 28, 0.6);
    border: 1px solid var(--nebula-purple);
    border-radius: 10px;
    box-shadow: 0 0 20px rgba(78, 42, 132, 0.3);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.casino-item:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 30px rgba(78, 42, 132, 0.5);
    border-color: var(--constellation-gold);
}

.casino-item h4 {
    color: var(--constellation-gold);
}

.casino-item p {
    color: var(--star-light);
    opacity: 0.8;
}

.casino img {
    filter: drop-shadow(0 0 10px rgba(224, 230, 255, 0.5));
    transition: transform 0.5s ease;
}

.casino-item:hover img {
    transform: scale(1.05) rotate(5deg);
}

/* Футер */
footer {
    background: rgba(11, 14, 23, 0.7);
    border: none;
    border-top: 1px solid rgba(224, 230, 255, 0.1);
    backdrop-filter: blur(8px);
}

.footer-info {
    color: var(--star-light);
}

.footer-age {
    background: rgba(21, 21, 21, 0.8);
    border-radius: 10px;
}

.footer-links a {
    color: var(--star-light);
    opacity: 0.7;
    transition: opacity 0.3s ease, color 0.3s ease;
}

.footer-links a:hover {
    color: var(--constellation-gold);
    opacity: 1;
}

.copyright {
    color: var(--star-light);
    opacity: 0.5;
}

.logo-info img {
    filter: drop-shadow(0 0 5px rgba(224, 230, 255, 0.3));
}

/* Модальное окно */
.modal-overlay {
    backdrop-filter: blur(5px);
    background-color: rgba(11, 14, 23, 0.85);
}

.modal {
    background: linear-gradient(145deg, rgba(28, 28, 28, 0.9), rgba(11, 14, 23, 0.95));
    border: 1px solid var(--nebula-purple);
    color: var(--star-light);
    box-shadow: 0 0 30px rgba(78, 42, 132, 0.5);
}

.modal .age-circle {
    background-color: var(--ancient-red);
    border: 2px solid var(--constellation-gold);
    box-shadow: 0 0 15px rgba(126, 26, 42, 0.5);
}

.modal h2 {
    color: var(--star-light);
}

.modal button {
    background-color: var(--constellation-gold);
    color: var(--deep-space);
    box-shadow: 0 0 15px rgba(255, 216, 77, 0.4);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.modal button:hover {
    background-color: var(--constellation-gold);
    transform: translateY(-3px);
    box-shadow: 0 5px 20px rgba(255, 216, 77, 0.6);
}

/* Анимации звёзд на фоне */
@keyframes twinkle {
    0%, 100% { opacity: 0.2; }
    50% { opacity: 1; }
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    background-image:
            radial-gradient(1px at 10% 10%, var(--star-light) 100%, transparent),
            radial-gradient(1px at 20% 20%, var(--star-light) 100%, transparent),
            radial-gradient(2px at 30% 30%, var(--constellation-gold) 100%, transparent),
            radial-gradient(1px at 40% 40%, var(--star-light) 100%, transparent),
            radial-gradient(1px at 50% 50%, var(--star-light) 100%, transparent),
            radial-gradient(2px at 60% 60%, var(--constellation-gold) 100%, transparent),
            radial-gradient(1px at 70% 70%, var(--star-light) 100%, transparent),
            radial-gradient(1px at 80% 80%, var(--star-light) 100%, transparent),
            radial-gradient(2px at 90% 90%, var(--constellation-gold) 100%, transparent);
    background-size: 500px 500px;
    opacity: 0.3;
    z-index: -2;
}

/* Эффект созвездий для секций */
section {
    position: relative;
    overflow: hidden;
}

section::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    background-image:
            linear-gradient(to right, transparent 98%, var(--constellation-gold) 98%, transparent 100%),
            linear-gradient(to bottom, transparent 98%, var(--constellation-gold) 98%, transparent 100%);
    background-size: 20px 20px;
    opacity: 0.05;
    pointer-events: none;
    z-index: -1;
}

/* Анимация для .col при наведении */
.col, .col-2, .col-3 {
    transition: transform 0.4s ease;
}

.col:hover, .col-2:hover, .col-3:hover {
    transform: translateY(-5px);
}

/* Медиа запросы */
@media screen and (max-width: 830px) {
    body::before {
        background-size: 300px 300px;
    }

    .casino-item {
        border-width: 2px;
    }
}

@media screen and (max-width: 540px) {
    h1 {
        font-size: 60px;
    }

    body::before {
        opacity: 0.2;
    }
}

/* Основные цвета: глубокий космос, звёздное сияние, туманности и созвездия */
:root {
    --deep-space: #0B0E17;
    --star-light: #E0E6FF;
    --nebula-purple: #4E2A84;
    --cosmic-blue: #1A237E;
    --constellation-gold: #FFD84D;
    --ancient-red: #7E1A2A;
    --god-teal: #00796B;
}

/* Основные стили с эпичными эффектами */
body {
    background: var(--deep-space);
    color: var(--star-light);
    background-image:
            radial-gradient(circle at 25% 15%, rgba(78, 42, 132, 0.25) 0%, transparent 40%),
            radial-gradient(circle at 80% 70%, rgba(0, 121, 107, 0.2) 0%, transparent 35%),
            radial-gradient(circle at 50% 50%, rgba(11, 14, 23, 0.8) 0%, rgba(11, 14, 23, 1) 100%);
    background-attachment: fixed;
    position: relative;
    animation: nebula-shift 80s ease-in-out infinite alternate;
}

@keyframes nebula-shift {
    0% { background-position: 0% 0%; }
    50% { background-position: 10% 10%; }
    100% { background-position: 0% 0%; }
}

h1, h2, h3, h4 {
    font-weight: 700;
    text-transform: uppercase;
    color: var(--star-light);
    text-shadow: 0 0 15px rgba(224, 230, 255, 0.3);
    position: relative;
}

/* Эффект космического мерцания для заголовков */
h1, h2, h3, h4 {
    position: relative;
    overflow: hidden;
}

h1::after, h2::after, h3::after, h4::after {
    content: attr(data-text);
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    color: transparent;
    text-shadow: 0 0 15px var(--constellation-gold);
    animation: title-flicker 5s linear infinite;
    opacity: 0;
}

@keyframes title-flicker {
    0%, 100% { opacity: 0; }
    5%, 9% { opacity: 0.5; }
    6%, 8% { opacity: 0; }
    40% { opacity: 0; }
    50% { opacity: 0.5; }
    52% { opacity: 0; }
}

h1 {
    background: linear-gradient(180deg, var(--star-light) 0%, var(--constellation-gold) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    text-shadow: 0 0 20px rgba(255, 216, 77, 0.4);
    position: relative;
    animation: cosmic-pulse 5s infinite alternate;
}

@keyframes cosmic-pulse {
    0% { text-shadow: 0 0 20px rgba(255, 216, 77, 0.4); }
    50% { text-shadow: 0 0 30px rgba(255, 216, 77, 0.7), 0 0 50px rgba(78, 42, 132, 0.4); }
    100% { text-shadow: 0 0 20px rgba(255, 216, 77, 0.4); }
}

h2 {
    color: var(--constellation-gold);
}

/* Навигация - космический портал */
.navbar {
    background: rgba(11, 14, 23, 0.8);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid rgba(224, 230, 255, 0.1);
    position: relative;
}

.navbar::after {
    content: '';
    position: absolute;
    width: 200%;
    height: 100%;
    top: 0;
    left: -50%;
    background: linear-gradient(90deg,
    transparent,
    rgba(78, 42, 132, 0.05),
    rgba(255, 216, 77, 0.08),
    rgba(78, 42, 132, 0.05),
    transparent);
    z-index: 0;
    transform: translateX(-100%);
    animation: nav-shimmer 8s infinite;
}

@keyframes nav-shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.menu-items {
    position: relative;
    z-index: 5;
}

.menu-items li {
    position: relative;
    transform-style: preserve-3d;
    perspective: 800px;
}

.menu-items li::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at center, rgba(255, 216, 77, 0.2) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.5s ease;
    border-radius: 50%;
    transform: scale(0);
    top: 0;
    left: 0;
    z-index: -1;
}

.menu-items li:hover::before {
    opacity: 1;
    transform: scale(1.5);
}

.menu-items li::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -5px;
    left: 0;
    background: var(--constellation-gold);
    transition: width 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 0 8px rgba(255, 216, 77, 0);
}

.menu-items li:hover::after {
    width: 100%;
    box-shadow: 0 0 8px rgba(255, 216, 77, 0.7);
}

.navbar a {
    color: var(--star-light);
    transition: color 0.3s ease, text-shadow 0.3s ease, transform 0.3s ease;
    display: inline-block;
}

.navbar a:hover {
    color: var(--constellation-gold);
    text-shadow: 0 0 10px rgba(255, 216, 77, 0.5);
    transform: translateY(-2px);
    opacity: 1;
}

.logo {
    color: var(--constellation-gold);
    text-shadow: 0 0 10px rgba(255, 216, 77, 0.5);
    position: relative;
    z-index: 5;
}

.logo::before {
    content: '';
    position: absolute;
    width: 150%;
    height: 150%;
    background: radial-gradient(circle at center, rgba(255, 216, 77, 0.2) 0%, transparent 70%);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: -1;
    border-radius: 50%;
    animation: logo-pulse 4s infinite alternate;
}

@keyframes logo-pulse {
    0% { opacity: 0.2; transform: translate(-50%, -50%) scale(0.8); }
    100% { opacity: 0.7; transform: translate(-50%, -50%) scale(1.2); }
}

.navbar-container .hamburger-lines .line {
    background: var(--constellation-gold);
    box-shadow: 0 0 5px rgba(255, 216, 77, 0.5);
}

/* Кнопки */
.btn {
    position: relative;
    overflow: hidden;
    border: none;
    font-weight: bold;
    z-index: 1;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.2);
    transition: left 0.4s ease;
    z-index: -1;
}

.btn:hover::before {
    left: 0;
}

.btn-red {
    background: var(--ancient-red);
    box-shadow: 0 0 15px rgba(126, 26, 42, 0.5);
}

.btn-blue {
    background: var(--cosmic-blue);
    box-shadow: 0 0 15px rgba(26, 35, 126, 0.5);
}

.btn-green {
    background: var(--god-teal);
    box-shadow: 0 0 15px rgba(0, 121, 107, 0.5);
}

.btn-white {
    background: var(--star-light);
    color: var(--deep-space);
    box-shadow: 0 0 15px rgba(224, 230, 255, 0.5);
}

.btn-light-red {
    background: var(--ancient-red);
    box-shadow: 0 0 15px rgba(126, 26, 42, 0.5);
}

/* Карточки "созвездий" с эпичными эффектами */
.casino-wrapper {
    gap: 20px;
    justify-content: center;
    perspective: 1000px;
}

.casino-item {
    background: rgba(28, 28, 28, 0.6);
    border: 1px solid var(--nebula-purple);
    border-radius: 10px;
    box-shadow: 0 0 20px rgba(78, 42, 132, 0.3);
    transition: transform 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275),
    box-shadow 0.6s ease,
    border-color 0.4s ease;
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(5px);
}

.casino-item::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
            45deg,
            transparent,
            rgba(255, 216, 77, 0.05),
            rgba(255, 216, 77, 0.1),
            rgba(255, 216, 77, 0.05),
            transparent
    );
    transform: rotate(45deg);
    z-index: 1;
    transition: transform 0.6s ease;
    pointer-events: none;
}

.casino-item:hover {
    transform: translateY(-10px) rotateX(5deg);
    box-shadow: 0 20px 40px rgba(78, 42, 132, 0.5),
    0 5px 15px rgba(255, 216, 77, 0.3);
    border-color: var(--constellation-gold);
}

.casino-item:hover::before {
    transform: translateX(100%) translateY(100%) rotate(45deg);
}

.casino-item h4 {
    color: var(--constellation-gold);
    position: relative;
    z-index: 2;
    text-shadow: 0 0 10px rgba(255, 216, 77, 0.3);
    transition: text-shadow 0.3s ease;
}

.casino-item:hover h4 {
    text-shadow: 0 0 15px rgba(255, 216, 77, 0.6);
}

.casino-item p {
    color: var(--star-light);
    opacity: 0.8;
    position: relative;
    z-index: 2;
    transition: opacity 0.3s ease;
}

.casino-item:hover p {
    opacity: 1;
}

.casino img {
    filter: drop-shadow(0 0 10px rgba(224, 230, 255, 0.5));
    transition: transform 0.7s ease, filter 0.7s ease;
    position: relative;
    z-index: 2;
}

.casino-item:hover img {
    transform: scale(1.1) rotate(5deg);
    filter: drop-shadow(0 0 15px rgba(255, 216, 77, 0.7));
}

/* Добавляем космические частицы в карточки */
.casino-item::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    background-image:
            radial-gradient(1px at 10% 10%, var(--star-light) 100%, transparent),
            radial-gradient(1px at 20% 70%, var(--star-light) 100%, transparent),
            radial-gradient(1px at 30% 30%, var(--star-light) 100%, transparent),
            radial-gradient(1px at 70% 50%, var(--star-light) 100%, transparent),
            radial-gradient(1px at 90% 80%, var(--star-light) 100%, transparent);
    background-size: 150px 150px;
    opacity: 0;
    transition: opacity 0.6s ease;
    pointer-events: none;
    z-index: 1;
}

.casino-item:hover::after {
    opacity: 0.2;
}

/* Футер */
footer {
    background: rgba(11, 14, 23, 0.7);
    border: none;
    border-top: 1px solid rgba(224, 230, 255, 0.1);
    backdrop-filter: blur(8px);
}

.footer-info {
    color: var(--star-light);
}

.footer-age {
    background: rgba(21, 21, 21, 0.8);
    border-radius: 10px;
}

.footer-links a {
    color: var(--star-light);
    opacity: 0.7;
    transition: opacity 0.3s ease, color 0.3s ease;
}

.footer-links a:hover {
    color: var(--constellation-gold);
    opacity: 1;
}

.copyright {
    color: var(--star-light);
    opacity: 0.5;
}

.logo-info img {
    filter: drop-shadow(0 0 5px rgba(224, 230, 255, 0.3));
}

/* Модальное окно */
.modal-overlay {
    backdrop-filter: blur(5px);
    background-color: rgba(11, 14, 23, 0.85);
}

.modal {
    background: linear-gradient(145deg, rgba(28, 28, 28, 0.9), rgba(11, 14, 23, 0.95));
    border: 1px solid var(--nebula-purple);
    color: var(--star-light);
    box-shadow: 0 0 30px rgba(78, 42, 132, 0.5);
}

.modal .age-circle {
    background-color: var(--ancient-red);
    border: 2px solid var(--constellation-gold);
    box-shadow: 0 0 15px rgba(126, 26, 42, 0.5);
}

.modal h2 {
    color: var(--star-light);
}

.modal button {
    background-color: var(--constellation-gold);
    color: var(--deep-space);
    box-shadow: 0 0 15px rgba(255, 216, 77, 0.4);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.modal button:hover {
    background-color: var(--constellation-gold);
    transform: translateY(-3px);
    box-shadow: 0 5px 20px rgba(255, 216, 77, 0.6);
}

/* Анимации звёзд на фоне */
@keyframes twinkle {
    0%, 100% { opacity: 0.2; transform: scale(0.8); }
    50% { opacity: 1; transform: scale(1.2); }
}

@keyframes shooting-star {
    0% { transform: translateX(-100px) translateY(-100px); opacity: 0; }
    10% { opacity: 1; }
    80% { opacity: 1; }
    100% { transform: translateX(calc(100vw + 200px)) translateY(calc(100vh + 200px)); opacity: 0; }
}

@keyframes constellation-pulse {
    0%, 100% { opacity: 0.4; }
    50% { opacity: 0.9; }
}

@keyframes nebula-drift {
    0% { background-position: 0% 0%; }
    100% { background-position: 100% 100%; }
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    background-image:
            radial-gradient(1px at 10% 10%, var(--star-light) 100%, transparent),
            radial-gradient(1px at 20% 20%, var(--star-light) 100%, transparent),
            radial-gradient(2px at 30% 30%, var(--constellation-gold) 100%, transparent),
            radial-gradient(1px at 40% 40%, var(--star-light) 100%, transparent),
            radial-gradient(1px at 50% 50%, var(--star-light) 100%, transparent),
            radial-gradient(2px at 60% 60%, var(--constellation-gold) 100%, transparent),
            radial-gradient(1px at 70% 70%, var(--star-light) 100%, transparent),
            radial-gradient(1px at 80% 80%, var(--star-light) 100%, transparent),
            radial-gradient(2px at 90% 90%, var(--constellation-gold) 100%, transparent);
    background-size: 500px 500px;
    opacity: 0.3;
    z-index: -2;
    animation: nebula-drift 120s linear infinite alternate;
}

/* Дополнительный слой для мерцающих звёзд */
body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: transparent;
    box-shadow:
            0 0 1px 1px var(--star-light) at 15% 15%,
            0 0 1px 1px var(--star-light) at 25% 5%,
            0 0 2px 1px var(--constellation-gold) at 35% 30%,
            0 0 1px 1px var(--star-light) at 45% 25%,
            0 0 2px 1px var(--constellation-gold) at 55% 65%,
            0 0 1px 1px var(--star-light) at 65% 35%,
            0 0 1px 1px var(--star-light) at 75% 75%,
            0 0 2px 1px var(--constellation-gold) at 85% 45%;
    pointer-events: none;
    z-index: -1;
}

/* Падающие звёзды */
.navbar::before {
    content: '';
    position: absolute;
    width: 100px;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--star-light), var(--constellation-gold), transparent);
    top: -100px;
    left: -100px;
    transform-origin: 100% 100%;
    animation: shooting-star 8s linear infinite;
    animation-delay: 3s;
    z-index: -1;
    opacity: 0.7;
    box-shadow: 0 0 10px 1px var(--constellation-gold);
}

/* Эффект созвездий для секций */
section {
    position: relative;
    overflow: hidden;
}

section::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    background-image:
            linear-gradient(to right, transparent 98%, var(--constellation-gold) 98%, transparent 100%),
            linear-gradient(to bottom, transparent 98%, var(--constellation-gold) 98%, transparent 100%);
    background-size: 20px 20px;
    opacity: 0.05;
    pointer-events: none;
    z-index: -1;
}

/* Анимация для .col при наведении */
.col, .col-2, .col-3 {
    transition: transform 0.4s ease;
}

.col:hover, .col-2:hover, .col-3:hover {
    transform: translateY(-5px);
}

/* Медиа запросы */
@media screen and (max-width: 830px) {
    body::before {
        background-size: 300px 300px;
    }

    .casino-item {
        border-width: 2px;
    }
}

@media screen and (max-width: 540px) {
    h1 {
        font-size: 60px;
    }

    body::before {
        opacity: 0.2;
    }
}