body, html {
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    background-color: #000;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: #fff;
}

#canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.cursor {
    position: absolute;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    pointer-events: none;
    mix-blend-mode: difference;
    transform: translate(-50%, -50%);
    transition: transform 0.1s;
    z-index: 1000;
}

.content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    z-index: 10;
    width: 90%;
    max-width: 600px;
}

.title {
    font-size: 5rem;
    font-weight: bold;
    margin-bottom: 1rem;
    background: linear-gradient(90deg, #FF3F8E, #04C2C9, #2E55C1, #FFCC00);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: gradient 10s ease infinite;
    background-size: 300% 300%;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.3);
}

.subtitle {
    font-size: 1.5rem;
    margin-bottom: 3rem;
    color: rgba(255, 255, 255, 0.8);
}

footer {
    position: absolute;
    bottom: 20px;
    left: 0;
    width: 100%;
    text-align: center;
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.9rem;
    z-index: 10;
}

/* Сетка игр */
.games-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 2rem;
    margin-top: 3rem;
}

.games-grid > div {
    flex: 0 1 auto;
}

/* Стили для ссылки на игру "Змейка" */
.snake-link-container {
    position: relative;
    display: inline-block;
    animation: float 6s ease-in-out infinite, aurora 12s linear infinite;
    animation-delay: 0s;
}

.snake-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: #fff;
    background: rgba(0, 0, 0, 0.4);
    padding: 20px 30px;
    border-radius: 20px;
    box-shadow: 0 0 20px rgba(46, 204, 113, 0.5);
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
    border: 2px solid rgba(46, 204, 113, 0.3);
}

.snake-link:hover {
    transform: scale(1.05);
    box-shadow: 0 0 30px rgba(46, 204, 113, 0.8);
    border-color: rgba(46, 204, 113, 0.8);
}

.snake-link span {
    margin-top: 15px;
    font-size: 1.3rem;
    font-weight: bold;
    text-shadow: 0 0 10px rgba(46, 204, 113, 0.8);
}

.snake-icon {
    display: flex;
    align-items: center;
    position: relative;
    height: 40px;
}

.snake-segment {
    width: 20px;
    height: 20px;
    background-color: #2ecc71;
    border-radius: 50%;
    margin: 0 -5px;
    box-shadow: 0 0 10px rgba(46, 204, 113, 0.7);
    position: relative;
    z-index: 1;
}

.snake-segment.head {
    width: 25px;
    height: 25px;
    background-color: #27ae60;
    z-index: 2;
    animation: pulse 2s infinite;
}

.snake-segment.head::before,
.snake-segment.head::after {
    content: '';
    position: absolute;
    width: 5px;
    height: 5px;
    background-color: white;
    border-radius: 50%;
    top: 5px;
}

.snake-segment.head::before {
    left: 5px;
}

.snake-segment.head::after {
    right: 5px;
}

.snake-segment.tail {
    width: 15px;
    height: 15px;
    background-color: #16a085;
}

@keyframes gradient {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

@keyframes float {
    0% {
        transform: translateY(0px) rotate(0deg);
    }
    50% {
        transform: translateY(-20px) rotate(5deg);
    }
    100% {
        transform: translateY(0px) rotate(0deg);
    }
}

@keyframes pulse {
    0% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.1);
        opacity: 0.8;
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

@keyframes aurora {
    0% {
        filter: hue-rotate(0deg) brightness(1);
    }
    50% {
        filter: hue-rotate(180deg) brightness(1.2);
    }
    100% {
        filter: hue-rotate(360deg) brightness(1);
    }
}

@keyframes slither {
    0% {
        transform: translateX(0);
    }
    25% {
        transform: translateX(3px) translateY(-3px);
    }
    50% {
        transform: translateX(0) translateY(0);
    }
    75% {
        transform: translateX(-3px) translateY(3px);
    }
    100% {
        transform: translateX(0);
    }
}

@media (max-width: 768px) {
    .title {
        font-size: 3.5rem;
    }
    
    .subtitle {
        font-size: 1.2rem;
        margin-bottom: 2rem;
    }
    
    .games-grid {
        flex-direction: column;
        gap: 1.5rem;
        align-items: center;
    }
    
    .snake-link {
        padding: 15px 25px;
    }
    
    .snake-link span {
        font-size: 1.1rem;
    }
    
    .snake-segment {
        width: 16px;
        height: 16px;
    }
    
    .snake-segment.head {
        width: 20px;
        height: 20px;
    }
    
    .snake-segment.tail {
        width: 12px;
        height: 12px;
    }
}

@media (max-width: 480px) {
    .title {
        font-size: 2.5rem;
    }
    
    .subtitle {
        font-size: 1rem;
        margin-bottom: 1.5rem;
    }
}
/* Стили для ссылки на игру "Блэкджек" */
.blackjack-link-container {
    position: relative;
    display: inline-block;
    animation: float 6s ease-in-out infinite, aurora 12s linear infinite;
    animation-delay: 2s;
}

.blackjack-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: #fff;
    background: rgba(0, 0, 0, 0.4);
    padding: 20px 30px;
    border-radius: 20px;
    box-shadow: 0 0 20px rgba(241, 196, 15, 0.5);
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
    border: 2px solid rgba(241, 196, 15, 0.3);
}

.blackjack-link:hover {
    transform: scale(1.05);
    box-shadow: 0 0 30px rgba(241, 196, 15, 0.8);
    border-color: rgba(241, 196, 15, 0.8);
}

.blackjack-link span {
    margin-top: 15px;
    font-size: 1.3rem;
    font-weight: bold;
    text-shadow: 0 0 10px rgba(241, 196, 15, 0.8);
}

.blackjack-icon {
    width: 40px;
    height: 40px;
    background: url('blackjack/svg/card-back.svg') no-repeat center/cover;
}

@media (max-width: 768px) {
    .blackjack-link {
        padding: 15px 25px;
    }
    .blackjack-link span {
        font-size: 1.1rem;
    }
    .blackjack-icon {
        width: 32px;
        height: 32px;
    }
}

/* Стили для ссылки на игру "Танки" */
.tanks-link-container {
    position: relative;
    display: inline-block;
    animation: float 6s ease-in-out infinite, aurora 12s linear infinite;
    animation-delay: 4s;
}

.tanks-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: #fff;
    background: rgba(0, 0, 0, 0.4);
    padding: 20px 30px;
    border-radius: 20px;
    box-shadow: 0 0 20px rgba(46, 125, 50, 0.5);
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
    border: 2px solid rgba(46, 125, 50, 0.3);
}

.tanks-link:hover {
    transform: scale(1.05);
    box-shadow: 0 0 30px rgba(46, 125, 50, 0.8);
    border-color: rgba(46, 125, 50, 0.8);
}

.tanks-link span {
    margin-top: 15px;
    font-size: 1.3rem;
    font-weight: bold;
    text-shadow: 0 0 10px rgba(46, 125, 50, 0.8);
}

.tanks-icon {
    position: relative;
    width: 32px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.tank-body {
    width: 18px;
    height: 32px;
    background-color: #2e7d32;
    border-radius: 4px;
    position: relative;
    box-shadow: 0 0 10px rgba(46, 125, 50, 0.7);
}

.tank-body::before,
.tank-body::after {
    content: '';
    position: absolute;
    width: 22px;
    height: 3px;
    background-color: #1b5e20;
    border-radius: 2px;
    left: -2px;
}

.tank-body::before {
    top: -2px;
}

.tank-body::after {
    bottom: -2px;
}

.tank-turret {
    position: absolute;
    width: 14px;
    height: 20px;
    background-color: #388e3c;
    border-radius: 50%;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    box-shadow: 0 0 8px rgba(56, 142, 60, 0.8);
    z-index: 2;
}

.tank-barrel {
    position: absolute;
    width: 3px;
    height: 24px;
    background-color: #424242;
    border-radius: 2px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    transform-origin: center top;
    z-index: 3;
    animation: tankAim 4s ease-in-out infinite;
}

@keyframes tankAim {
    0%, 100% {
        transform: translate(-50%, -50%) rotate(0deg);
    }
    25% {
        transform: translate(-50%, -50%) rotate(15deg);
    }
    75% {
        transform: translate(-50%, -50%) rotate(-15deg);
    }
}

@media (max-width: 768px) {
    .tanks-link {
        padding: 15px 25px;
    }
    .tanks-link span {
        font-size: 1.1rem;
    }
    .tanks-icon {
        width: 28px;
        height: 40px;
    }
    .tank-body {
        width: 14px;
        height: 26px;
    }
    .tank-turret {
        width: 10px;
        height: 16px;
    }
    .tank-barrel {
        width: 2px;
        height: 18px;
    }
}
