/* Оптимизированные стили для главной страницы */
:root {
    --primary: #6366f1;
    --primary-light: #818cf8;
    --primary-dark: #4f46e5;
    --text-main: #1e293b;
    --text-light: #64748b;
    --bg-white: #ffffff;
    --bg-light: #f8fafc;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.05);
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.08);
    --shadow-xl: 0 20px 50px rgba(99, 102, 241, 0.15);
}

[data-theme="dark"] {
    --primary: #a5b4fc;
    --primary-light: #c7d2fe;
    --primary-dark: #818cf8;
    --text-main: #f8fafc;
    --text-light: #cbd5e1;
    --bg-white: #1e293b;
    --bg-light: #0f172a;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.5);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.6);
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.7);
    --shadow-xl: 0 20px 50px rgba(99, 102, 241, 0.4);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 30%, #0f172a 60%, #1e293b 100%);
    background-size: 400% 400%;
    animation: gradientShift 15s ease infinite;
    color: var(--text-main);
    min-height: 100vh;
    padding: 80px 20px 40px;
    position: relative;
    overflow-x: hidden;
}

@keyframes gradientShift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.bg-decoration {
    position: fixed;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.bg-circle {
    position: absolute;
    border-radius: 50%;
    opacity: 0.08;
    animation: float 20s infinite ease-in-out;
}

.bg-circle-1 {
    width: 600px;
    height: 600px;
    background: linear-gradient(135deg, #6366f1, #818cf8);
    top: -10%;
    right: -5%;
}

.bg-circle-2 {
    width: 400px;
    height: 400px;
    background: linear-gradient(135deg, #818cf8, #c7d2fe);
    bottom: -5%;
    left: -5%;
    animation-delay: 2s;
}

.bg-circle-3 {
    width: 300px;
    height: 300px;
    background: linear-gradient(135deg, #4f46e5, #6366f1);
    top: 40%;
    left: 10%;
    animation-delay: 4s;
}

@keyframes float {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(30px, -30px) scale(1.05); }
    66% { transform: translate(-20px, 20px) scale(0.95); }
}

.particles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: var(--primary-light);
    border-radius: 50%;
    opacity: 0.3;
    animation: particleFloat 15s infinite ease-in-out;
    box-shadow: 0 0 8px var(--primary-light);
}

[data-theme="dark"] .particle {
    opacity: 0.5;
    box-shadow: 0 0 12px var(--primary-light);
}

@keyframes particleFloat {
    0%, 100% {
        transform: translateY(0) translateX(0);
        opacity: 0;
    }
    10% {
        opacity: 0.3;
    }
    90% {
        opacity: 0.3;
    }
    100% {
        transform: translateY(-100vh) translateX(50px);
        opacity: 0;
    }
}

.main-container {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    animation: fadeInUp 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.card {
    background: rgba(15, 23, 42, 0.7);
    backdrop-filter: blur(40px) saturate(180%);
    border-radius: 32px;
    padding: 60px 50px;
    box-shadow: 0 30px 90px rgba(0, 0, 0, 0.6), 0 0 60px rgba(99, 102, 241, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(129, 140, 248, 0.2);
    position: relative;
    overflow: hidden;
}

.card::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(99, 102, 241, 0.1), transparent, rgba(129, 140, 248, 0.1), transparent);
    animation: cardShine 8s infinite;
    pointer-events: none;
}

@keyframes cardShine {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.logo-container {
    text-align: center;
    margin-bottom: 40px;
}

.logo-image {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    box-shadow: var(--shadow-lg);
    border: 4px solid var(--bg-white);
    margin-bottom: 24px;
    animation: logoFloat 3s ease-in-out infinite;
}

@keyframes logoFloat {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-10px) rotate(5deg); }
}

.main-title {
    font-size: 2.8rem;
    font-weight: 900;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 50%, var(--primary) 100%);
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 12px;
    animation: gradientMove 3s ease infinite;
}

@keyframes gradientMove {
    0%, 100% { background-position: 0% center; }
    50% { background-position: 100% center; }
}

.subtitle {
    font-size: 1.125rem;
    color: var(--text-light);
    margin-bottom: 40px;
}

.pulse-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #10b981;
    animation: pulse 2s infinite;
    margin-right: 8px;
}

@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.6; transform: scale(1.3); }
}

.btn-primary {
    width: 100%;
    padding: 20px 32px;
    font-size: 1.125rem;
    font-weight: 700;
    color: white;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    border: none;
    border-radius: 16px;
    cursor: pointer;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    box-shadow: 0 4px 20px rgba(99, 102, 241, 0.3);
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    margin-bottom: 40px;
}

.btn-primary:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 10px 40px rgba(99, 102, 241, 0.5);
}

.advantages-section {
    margin-top: 50px;
}

.advantages-title {
    text-align: center;
    font-size: 2rem;
    font-weight: 800;
    color: var(--text-main);
    margin-bottom: 35px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.advantages-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
    margin-top: 30px;
}

.advantage-card {
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(20px) saturate(180%);
    border: 2px solid rgba(255, 255, 255, 0.08);
    border-radius: 24px;
    padding: 35px 28px;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    overflow: hidden;
}

.advantage-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(129, 140, 248, 0.1), transparent);
    opacity: 0;
    transition: opacity 0.4s ease;
}

.advantage-card:hover::before {
    opacity: 1;
}

.advantage-card:hover {
    transform: translateY(-8px) scale(1.02);
    border-color: var(--primary-light);
    box-shadow: 0 20px 50px rgba(99, 102, 241, 0.4), 0 0 30px rgba(129, 140, 248, 0.6);
    background: rgba(255, 255, 255, 0.06);
}

.advantage-icon {
    font-size: 3.5rem;
    margin-bottom: 20px;
    text-align: center;
}

.advantage-title {
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 15px;
    text-align: center;
}

.advantage-text {
    font-size: 0.95rem;
    color: var(--text-light);
    line-height: 1.7;
    margin-bottom: 20px;
    text-align: center;
}

.advantage-list {
    list-style: none;
    padding: 0;
}

.advantage-list li {
    font-size: 0.9rem;
    color: var(--text-light);
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.advantage-list li i {
    color: #4ade80;
}

.stats-section {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-top: 40px;
}

.stat-card {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    border-radius: 20px;
    padding: 30px 20px;
    text-align: center;
    color: white;
    box-shadow: 0 10px 30px rgba(99, 102, 241, 0.3), 0 0 30px rgba(129, 140, 248, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.2);
    transition: all 0.4s ease;
    position: relative;
    overflow: hidden;
    border: 2px solid rgba(129, 140, 248, 0.3);
}

.stat-card::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.15) 0%, transparent 70%);
    animation: statGlow 4s ease-in-out infinite;
}

@keyframes statGlow {
    0%, 100% { transform: translate(0, 0); }
    50% { transform: translate(-20px, -20px); }
}

.stat-card:hover {
    transform: translateY(-8px) scale(1.05);
    box-shadow: 0 20px 50px rgba(99, 102, 241, 0.5), 0 0 40px rgba(129, 140, 248, 0.8), inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.stat-number {
    font-size: 2.8rem;
    font-weight: 900;
    margin-bottom: 8px;
}

.stat-label {
    font-size: 0.95rem;
    font-weight: 600;
    opacity: 0.9;
}

.games-section {
    margin-top: 50px;
}

.divider {
    display: flex;
    align-items: center;
    text-align: center;
    margin: 40px 0;
    color: var(--text-light);
}

.divider::before,
.divider::after {
    content: '';
    flex: 1;
    border-bottom: 2px solid var(--primary-light);
}

.divider span {
    padding: 0 20px;
    font-weight: 600;
}

.games-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.game-card {
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(20px);
    border: 2px solid rgba(255, 255, 255, 0.08);
    border-radius: 20px;
    padding: 0;
    text-align: center;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    cursor: pointer;
    position: relative;
    overflow: hidden;
    aspect-ratio: 1;
    display: flex;
    flex-direction: column;
}

.game-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.1), rgba(129, 140, 248, 0.1));
    opacity: 0;
    transition: opacity 0.4s ease;
    z-index: 1;
}

.game-card:hover::before {
    opacity: 1;
}

.game-card:hover {
    transform: translateY(-10px) scale(1.05);
    border-color: var(--primary-light);
    box-shadow: 0 20px 50px rgba(99, 102, 241, 0.5), 0 0 30px rgba(129, 140, 248, 0.6);
}

.game-image-wrapper {
    width: 100%;
    height: 70%;
    position: relative;
    overflow: hidden;
    border-radius: 20px 20px 0 0;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.1), rgba(129, 140, 248, 0.1));
    display: flex;
    align-items: center;
    justify-content: center;
}

.game-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.game-card:hover .game-image {
    transform: scale(1.15);
}

.game-icon {
    font-size: 3.5rem;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    filter: drop-shadow(0 0 10px rgba(129, 140, 248, 0.5));
    transition: all 0.4s ease;
}

.game-card:hover .game-icon {
    transform: translate(-50%, -50%) scale(1.2) rotate(5deg);
    filter: drop-shadow(0 0 20px rgba(129, 140, 248, 1));
}

.game-name {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-main);
    padding: 16px 12px;
    position: relative;
    z-index: 2;
    background: rgba(15, 23, 42, 0.5);
    backdrop-filter: blur(10px);
    margin-top: auto;
}

.game-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0);
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 3;
    box-shadow: 0 10px 30px rgba(99, 102, 241, 0.6);
}

.game-card:hover .game-overlay {
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
}

.game-card:hover .game-overlay i {
    animation: arrowPulse 1s ease-in-out infinite;
}

@keyframes arrowPulse {
    0%, 100% { transform: translateX(0); }
    50% { transform: translateX(5px); }
}

.theme-toggle {
    position: fixed;
    top: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--bg-white);
    border: 2px solid var(--primary);
    box-shadow: var(--shadow-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 1000;
    transition: all 0.3s ease;
}

.theme-toggle:hover {
    transform: scale(1.1) rotate(15deg);
}

.footer {
    text-align: center;
    margin-top: 40px;
    color: var(--text-light);
    font-size: 0.875rem;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 32px;
    margin-top: 16px;
    flex-wrap: wrap;
}

.footer-link {
    color: var(--text-light);
    text-decoration: none;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border-radius: 12px;
    background: rgba(99, 102, 241, 0.05);
}

.footer-link:hover {
    color: var(--primary);
    background: rgba(99, 102, 241, 0.1);
    transform: translateY(-3px);
}

@media (max-width: 900px) {
    .advantages-grid {
        grid-template-columns: 1fr;
    }
    
    .games-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .stats-section {
        grid-template-columns: 1fr;
    }
    
    .main-title {
        font-size: 2.2rem;
    }
    
    .card {
        padding: 40px 25px;
    }
}

@media (max-width: 600px) {
    body {
        padding: 50px 12px 25px;
    }
    
    .card {
        padding: 35px 20px;
    }
    
    .games-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
    
    .main-title {
        font-size: 1.8rem;
    }
}

