* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    width: 100%;
    height: 100%;
    overflow: hidden;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #0f0c1f 0%, #1a0f3f 50%, #2d1b4e 100%);
    width: 100%;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    position: relative;
}

/* Звёзды */
.stars {
    position: fixed;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    z-index: 1;
}

.star {
    position: absolute;
    width: 2px;
    height: 2px;
    background: white;
    border-radius: 50%;
    animation: twinkle 3s infinite;
}

@keyframes twinkle {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 1; }
}

/* Свечение */
.glow {
    position: absolute;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(138, 43, 226, 0.2) 0%, transparent 70%);
    border-radius: 50%;
    filter: blur(40px);
    animation: float 6s ease-in-out infinite;
    z-index: 1;
}

.glow1 {
    top: -100px;
    left: -100px;
    animation-delay: 0s;
}

.glow2 {
    bottom: -100px;
    right: -100px;
    animation-delay: 2s;
}

@keyframes float {
    0%, 100% { transform: translate(0, 0); }
    50% { transform: translate(20px, 20px); }
}

/* Страница поздравлений */
.congratulations-page {
    position: relative;
    z-index: 2;
    text-align: center;
    max-width: 90%;
    animation: slideIn 0.8s ease-out;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.page-title {
    color: #e0b0ff;
    font-size: 36px;
    font-weight: 700;
    margin-bottom: 50px;
    text-shadow: 0 0 20px rgba(224, 176, 255, 0.5);
    animation: slideInDown 0.8s ease-out 0.2s both;
}

@keyframes slideInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Сетка аватарок */
.avatars-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 40px;
    justify-content: center;
    animation: fadeInUp 0.8s ease-out 0.4s both;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Кружочек аватарки */
.avatar-circle {
    cursor: pointer;
    text-align: center;
    transition: all 0.3s ease;
    animation: scaleIn 0.6s ease-out both;
}

.avatar-circle:nth-child(1) { animation-delay: 0.5s; }
.avatar-circle:nth-child(2) { animation-delay: 0.6s; }
.avatar-circle:nth-child(3) { animation-delay: 0.7s; }
.avatar-circle:nth-child(4) { animation-delay: 0.8s; }
.avatar-circle:nth-child(5) { 
    animation-delay: 0.9s;
    flex-basis: 100%;
    margin-top: 30px;
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.avatar-circle img {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    border: 3px solid #8a2be2;
    box-shadow: 0 0 20px rgba(138, 43, 226, 0.6);
    object-fit: cover;
    transition: all 0.3s ease;
}

.avatar-circle:hover img {
    transform: scale(1.1);
    box-shadow: 0 0 40px rgba(138, 43, 226, 0.8);
    border-color: #d4a5ff;
}

/* Выделение Даника */
.avatar-circle[data-person="2"] img {
    border: 4px solid #ff1493;
    box-shadow: 0 0 30px rgba(255, 20, 147, 0.8),
                0 0 60px rgba(255, 20, 147, 0.4);
    animation: danikGlow 2s ease-in-out infinite;
}

.avatar-circle[data-person="2"]:hover img {
    box-shadow: 0 0 50px rgba(255, 20, 147, 1),
                0 0 80px rgba(255, 20, 147, 0.6);
}

@keyframes danikGlow {
    0%, 100% {
        box-shadow: 0 0 30px rgba(255, 20, 147, 0.8),
                    0 0 60px rgba(255, 20, 147, 0.4);
    }
    50% {
        box-shadow: 0 0 50px rgba(255, 20, 147, 1),
                    0 0 80px rgba(255, 20, 147, 0.6);
    }
}

.avatar-circle[data-person="2"] p {
    color: #ff1493;
    font-weight: 700;
    font-size: 15px;
    text-shadow: 0 0 10px rgba(255, 20, 147, 0.6);
}

.avatar-circle p {
    color: #d4a5ff;
    font-size: 14px;
    font-weight: 600;
    margin-top: 12px;
    letter-spacing: 0.5px;
}

/* Модальное окно */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    animation: fadeIn 0.3s ease;
}

.modal.show {
    display: flex;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-content {
    background: rgba(20, 10, 40, 0.95);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(138, 43, 226, 0.3);
    border-radius: 20px;
    padding: 40px;
    max-width: 500px;
    width: 90%;
    box-shadow: 0 8px 32px rgba(138, 43, 226, 0.3);
    position: relative;
    animation: modalAppear 0.4s ease-out;
}

@keyframes modalAppear {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    color: #d4a5ff;
    font-size: 32px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.modal-close:hover {
    color: #e0b0ff;
    transform: rotate(90deg);
}

.modal-title {
    color: #e0b0ff;
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 20px;
    text-shadow: 0 0 20px rgba(224, 176, 255, 0.5);
}

.modal-text {
    color: #d4a5ff;
    font-size: 16px;
    line-height: 1.6;
    letter-spacing: 0.5px;
}

/* Адаптивный дизайн */
@media (max-width: 768px) {
    .page-title {
        font-size: 28px;
        margin-bottom: 40px;
    }

    .avatars-grid {
        gap: 30px;
    }

    .avatar-circle img {
        width: 100px;
        height: 100px;
    }

    .modal-content {
        padding: 30px;
        max-width: 90%;
    }

    .modal-title {
        font-size: 22px;
    }

    .modal-text {
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .page-title {
        font-size: 22px;
        margin-bottom: 30px;
    }

    .avatars-grid {
        gap: 20px;
    }

    .avatar-circle img {
        width: 80px;
        height: 80px;
        border-width: 2px;
    }

    .avatar-circle p {
        font-size: 12px;
        margin-top: 8px;
    }

    .modal-content {
        padding: 20px;
    }

    .modal-title {
        font-size: 18px;
        margin-bottom: 15px;
    }

    .modal-text {
        font-size: 13px;
    }
}
