/* Основные стили */
:root {
    --primary-color: #6C63FF;
    --secondary-color: #4ECDC4;
    --accent-color: #FF6B6B;
    --success-color: #06D6A0;
    --warning-color: #FFD166;
    --dark-color: #2D3047;
    --light-color: #F8F9FA;
    --gray-color: #6C757D;
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
}

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

body {
    font-family: 'Poppins', sans-serif;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    color: var(--dark-color);
    min-height: 100vh;
    line-height: 1.6;
}

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

/* Шапка */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
    margin-bottom: 40px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 15px;
}

.logo-icon {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 24px;
    box-shadow: var(--shadow);
}

.logo h1 {
    font-family: 'Roboto Slab', serif;
    font-size: 32px;
    font-weight: 700;
}

.logo span {
    color: var(--primary-color);
}

.user-info {
    display: flex;
    gap: 25px;
}

.coins, .gems, .level {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: white;
    border-radius: 50px;
    box-shadow: var(--shadow);
    font-weight: 500;
}

.coins i { color: var(--warning-color); }
.gems i { color: var(--secondary-color); }
.level i { color: var(--primary-color); }

/* Основной контент */
.hero-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    margin-bottom: 60px;
    align-items: center;
}

.hero-text h2 {
    font-size: 48px;
    margin-bottom: 15px;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.subtitle {
    font-size: 20px;
    color: var(--gray-color);
    margin-bottom: 20px;
}

.description {
    font-size: 16px;
    margin-bottom: 30px;
    color: var(--dark-color);
}

.stats {
    display: flex;
    gap: 30px;
    margin-top: 30px;
}

.stat {
    text-align: center;
}

.stat-number {
    font-size: 36px;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 5px;
}

.stat-label {
    font-size: 14px;
    color: var(--gray-color);
}

/* Анимированные бутылки */
.bottles-container {
    position: relative;
    height: 300px;
    display: flex;
    justify-content: center;
    align-items: flex-end;
    gap: 20px;
}

.bottle {
    position: relative;
    width: 60px;
    height: 200px;
    animation: float 3s ease-in-out infinite;
}

.bottle:nth-child(1) { animation-delay: 0s; }
.bottle:nth-child(2) { animation-delay: 0.6s; }
.bottle:nth-child(3) { animation-delay: 1.2s; }
.bottle:nth-child(4) { animation-delay: 1.8s; }
.bottle:nth-child(5) { animation-delay: 2.4s; }

.bottle-body {
    position: absolute;
    bottom: 0;
    width: 100%;
    height: 160px;
    background-color: var(--color);
    border-radius: 10px 10px 30px 30px;
    clip-path: polygon(0% 0%, 100% 0%, 85% 100%, 15% 100%);
    opacity: 0.9;
}

.bottle-neck {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 30px;
    height: 40px;
    background-color: var(--color);
    border-radius: 5px 5px 0 0;
    opacity: 0.8;
}

.bubble {
    position: absolute;
    background-color: rgba(255, 255, 255, 0.6);
    border-radius: 50%;
    animation: bubble-rise 2s infinite;
}

.bubble-1 {
    width: 12px;
    height: 12px;
    bottom: 30px;
    left: 15px;
    animation-delay: 0.3s;
}

.bubble-2 {
    width: 8px;
    height: 8px;
    bottom: 50px;
    right: 10px;
    animation-delay: 0.7s;
}

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

@keyframes bubble-rise {
    0% {
        transform: translateY(0);
        opacity: 0.6;
    }
    100% {
        transform: translateY(-100px);
        opacity: 0;
    }
}

/* Смешивание цветов */
.color-mixing {
    text-align: center;
    margin-top: 40px;
}

.mix-circle {
    position: relative;
    width: 200px;
    height: 200px;
    margin: 0 auto 20px;
    background: radial-gradient(circle, rgba(255,255,255,0.9) 0%, rgba(240,240,240,0.8) 100%);
    border-radius: 50%;
    box-shadow: var(--shadow);
}

.color-dot {
    position: absolute;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: var(--dot-color);
    animation: color-rotate 8s linear infinite;
}

.dot-1 {
    top: 30px;
    left: 30px;
    animation-delay: 0s;
}

.dot-2 {
    top: 30px;
    right: 30px;
    animation-delay: 2.6s;
}

.dot-3 {
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    animation-delay: 5.3s;
}

.mix-result {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background-color: var(--result-color);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

@keyframes color-rotate {
    0%, 100% { transform: rotate(0deg) translateX(60px) rotate(0deg); }
    25% { transform: rotate(90deg) translateX(60px) rotate(-90deg); }
    50% { transform: rotate(180deg) translateX(60px) rotate(-180deg); }
    75% { transform: rotate(270deg) translateX(60px) rotate(-270deg); }
}

.mix-text {
    font-size: 18px;
    font-weight: 500;
    color: var(--dark-color);
}

/* Авторизация */
.auth-section {
    margin: 60px 0;
}

.auth-card {
    max-width: 500px;
    margin: 0 auto;
    padding: 40px;
    background: white;
    border-radius: 20px;
    box-shadow: var(--shadow);
    text-align: center;
}

.auth-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #4C75A3, #5B88BD);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    color: white;
    font-size: 36px;
}

.auth-card h3 {
    font-size: 28px;
    margin-bottom: 10px;
    color: var(--dark-color);
}

.auth-card p {
    color: var(--gray-color);
    margin-bottom: 25px;
}

.vk-button {
    background: linear-gradient(135deg, #4C75A3, #5B88BD);
    color: white;
    border: none;
    padding: 15px 40px;
    font-size: 18px;
    font-weight: 600;
    border-radius: 50px;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin: 0 auto;
}

.vk-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 30px rgba(76, 117, 163, 0.3);
}

.auth-note {
    margin-top: 20px;
    font-size: 14px;
    color: var(--gray-color);
}

/* Уровни игры */
.levels-section {
    margin: 60px 0;
}

.levels-section h2 {
    text-align: center;
    font-size: 36px;
    margin-bottom: 40px;
    color: var(--dark-color);
}

.levels-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 25px;
}

.level-card {
    background: white;
    border-radius: 15px;
    padding: 25px;
    box-shadow: var(--shadow);
    transition: var(--transition);
    text-align: center;
}

.level-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.level-number {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 24px;
    font-weight: 700;
    margin: 0 auto 15px;
}

.level-card h3 {
    font-size: 20px;
    margin-bottom: 10px;
    color: var(--dark-color);
}

.level-difficulty {
    display: inline-block;
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 15px;
    text-transform: uppercase;
}

.difficulty-beginner {
    background: rgba(6, 214, 160, 0.2);
    color: var(--success-color);
}

.difficulty-intermediate {
    background: rgba(255, 209, 102, 0.2);
    color: var(--warning-color);
}

.difficulty-advanced {
    background: rgba(255, 107, 107, 0.2);
    color: var(--accent-color);
}

.difficulty-expert {
    background: rgba(108, 99, 255, 0.2);
    color: var(--primary-color);
}

.level-rewards {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin: 15px 0;
}

.reward {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 14px;
}

.play-button {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 10px 25px;
    border-radius: 25px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    width: 100%;
    margin-top: 15px;
}

.play-button:hover {
    background: var(--secondary-color);
}

/* Информационные карточки */
.info-section {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin: 60px 0;
}

.info-card {
    background: white;
    padding: 30px;
    border-radius: 15px;
    box-shadow: var(--shadow);
    text-align: center;
    transition: var(--transition);
}

.info-card:hover {
    transform: translateY(-5px);
}

.info-card i {
    font-size: 40px;
    color: var(--primary-color);
    margin-bottom: 20px;
}

.info-card h4 {
    font-size: 22px;
    margin-bottom: 15px;
    color: var(--dark-color);
}

.info-card p {
    color: var(--gray-color);
}

/* Футер */
.footer {
    background: var(--dark-color);
    color: white;
    padding: 40px 0;
    margin-top: 60px;
    border-radius: 30px 30px 0 0;
}

.footer-content {
    text-align: center;
}

.footer-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-size: 24px;
    margin-bottom: 20px;
}

.footer-logo i {
    color: var(--primary-color);
}

.footer-text {
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 10px;
}

/* Модальное окно */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
}

.modal.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: white;
    padding: 40px;
    border-radius: 20px;
    text-align: center;
    max-width: 400px;
    width: 90%;
}

.loader {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.loader-circle {
    width: 60px;
    height: 60px;
    border: 5px solid #f3f3f3;
    border-top: 5px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loader-text {
    font-size: 18px;
    color: var(--dark-color);
}

/* Адаптивность */
@media (max-width: 992px) {
    .hero-section {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    
    .hero-text h2 {
        font-size: 36px;
    }
    
    .user-info {
        flex-wrap: wrap;
        justify-content: center;
    }
}

@media (max-width: 768px) {
    .header {
        flex-direction: column;
        gap: 20px;
    }
    
    .stats {
        flex-direction: column;
        gap: 20px;
    }
    
    .bottles-container {
        height: 200px;
    }
    
    .bottle {
        width: 40px;
        height: 150px;
    }
    
    .mix-circle {
        width: 150px;
        height: 150px;
    }
    
    .color-dot {
        width: 40px;
        height: 40px;
    }
    
    .mix-result {
        width: 60px;
        height: 60px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }
    
    .logo h1 {
        font-size: 24px;
    }
    
    .hero-text h2 {
        font-size: 28px;
    }
    
    .auth-card {
        padding: 25px;
    }
    
    .levels-grid {
        grid-template-columns: 1fr;
    }
    
    .info-section {
        grid-template-columns: 1fr;
    }
}