/* --- ОБЩИЕ СТИЛИ И ПЕРЕМЕННЫЕ --- */
:root {
    --bg-color: #000000;
    --text-color: #e2e8f0;
    --accent-color-1: #9333ea; /* Purple */
    --accent-color-2: #3b82f6; /* Blue */
    --glass-bg: rgba(17, 15, 23, 0.6);
    --glass-border: rgba(147, 51, 234, 0.2);
    --shadow-color: rgba(0, 0, 0, 0.5);
    
    --glare-x: 50%;
    --glare-y: 50%;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    position: relative;
    overflow-x: hidden; /* Запрещаем только горизонтальный скролл */
    background-image: radial-gradient(circle at 1px 1px, rgba(255,255,255,0.05) 1px, transparent 0);
    background-size: 20px 20px;
}

/* --- ИНТЕРАКТИВНЫЙ ФОН --- */
.cursor-light {
    position: fixed;
    top: 0;
    left: 0;
    width: 1000px;
    height: 1000px;
    border-radius: 50%;
    background: radial-gradient(
        circle,
        rgba(147, 51, 234, 0.15) 0%, 
        rgba(59, 130, 246, 0.1) 30%, 
        transparent 70%
    );
    transform-origin: center;
    pointer-events: none;
    z-index: -1;
    transition: transform 0.1s linear;
    margin: -500px 0 0 -500px;
}

/* --- КОНТЕЙНЕР И КАРТОЧКА --- */

/* ИЗМЕНЕНО: Контейнер управляет отступами на мобильных и помогает с центрированием */
.container {
    perspective: 1000px;
    width: 100%;
    padding: 2.5rem 1.5rem; /* Отступы сверху/снизу и по бокам для мобильных */
    display: flex;
    justify-content: center;
}

/* ИЗМЕНЕНО: Центрирование карточки на десктопных экранах */
@media (min-width: 640px) {
    body {
        display: flex;
        align-items: center;     /* Вертикальное центрирование */
        justify-content: center; /* Горизонтальное центрирование */
        min-height: 100vh;       /* Тело занимает всю высоту экрана */
    }

    .container {
        padding: 2rem; /* Уменьшаем отступы на десктопе, т.к. уже есть центрирование */
    }
}

.main-card {
    position: relative;
    width: 100%;
    max-width: 500px; /* Ограничиваем максимальную ширину карточки */
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    box-shadow: 0 16px 60px var(--shadow-color);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    transform-style: preserve-3d;
    transition: transform 0.1s linear;
    opacity: 0;
    transform: scale(0.95);
    animation: fadeInScale 0.8s 0.2s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.card-content {
    padding: 2rem 2.5rem 2.5rem;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.card-glare {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    border-radius: 24px; background: radial-gradient(circle at var(--glare-x) var(--glare-y), rgba(255, 255, 255, 0.1), transparent 40%);
    opacity: 0.6; pointer-events: none; z-index: 2;
}

.hero-section { opacity: 0; animation: fadeInUp 0.6s 0.6s ease forwards; }
.avatar {
    width: 100px; height: 100px; border-radius: 50%; border: 3px solid var(--glass-border);
    margin-bottom: 1.5rem; object-fit: cover; box-shadow: 0 8px 32px 0 var(--shadow-color);
    transition: transform 0.3s ease;
}
.avatar:hover { transform: scale(1.1) rotate(5deg); }
.hero-name {
    font-size: 2.5rem; font-weight: 800; margin-bottom: 0.5rem;
    background: linear-gradient(45deg, var(--text-color), #bd93f9);
    -webkit-background-clip: text; -webkit-text-fill-color: transparent;
}
.hero-description { font-size: 1.1rem; color: rgba(226, 232, 240, 0.7); max-width: 400px; margin-bottom: 2rem; }

.links-section {
    display: flex; justify-content: center; flex-wrap: wrap; gap: 1.2rem;
    margin-bottom: 2rem; opacity: 0; animation: fadeInUp 0.6s 0.8s ease forwards;
}
.glass-button {
    background: rgba(30, 27, 38, 0.5); border: 1px solid var(--glass-border);
    box-shadow: 0 4px 15px rgba(0,0,0,0.3); display: flex; align-items: center;
    padding: 0.6rem 1.2rem; border-radius: 12px; text-decoration: none;
    color: var(--text-color); font-weight: 500; transition: all 0.3s ease;
}
.glass-button:hover {
    background: rgba(147, 51, 234, 0.2); border-color: rgba(147, 51, 234, 0.5);
    transform: translateY(-3px); box-shadow: 0 8px 25px rgba(147, 51, 234, 0.3);
}
.glass-button svg { width: 20px; height: 20px; margin-right: 0.6rem; fill: currentColor; }

.about-section, .skills-section, .games-section {
    width: 100%; border-top: 1px solid var(--glass-border); padding-top: 1.5rem;
}
.about-section h2, .skills-section h2, .section-title {
    font-size: 1.2rem; font-weight: 700; margin-bottom: 1rem; color: #c4b5fd;
}
.about-section { margin-top: 0; opacity: 0; animation: fadeInUp 0.6s 1s ease forwards; }
.about-section p { line-height: 1.6; color: rgba(226, 232, 240, 0.8); }

.skills-section { margin-top: 1.5rem; opacity: 0; animation: fadeInUp 0.6s 1.2s ease forwards; }
.skills-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 0.75rem; }
.skill-item {
    background-color: rgba(147, 51, 234, 0.1); border: 1px solid transparent; border-radius: 10px;
    padding: 0.6rem; font-size: 0.9rem; text-align: center; font-weight: 500;
    transition: all 0.2s ease-in-out;
}
.skill-item:hover {
    background-color: rgba(147, 51, 234, 0.25); border-color: rgba(147, 51, 234, 0.4);
    transform: translateY(-3px); color: #fff; box-shadow: 0 0 15px rgba(147, 51, 234, 0.3);
}

.games-section { margin-top: 1.5rem; opacity: 0; animation: fadeInUp 0.6s 1.4s ease forwards; }
.section-title { text-align: center; margin-bottom: 1.5rem; }
.game-links-grid { display: flex; justify-content: center; gap: 1.2rem; flex-wrap: wrap; }
.game-links-grid .glass-button svg { fill: currentColor; stroke: none; }

.site-footer {
    position: relative;
    text-align: center;
    padding: 1.5rem 0 1.5rem 0;
    font-size: 0.9rem;
    color: rgba(226, 232, 240, 0.3);
    opacity: 0;
    animation: fadeInUp 0.6s 1.6s ease forwards;
}

@keyframes fadeInScale { to { opacity: 1; transform: scale(1); } }
@keyframes fadeInUp { to { opacity: 1; transform: translateY(0); } }
.hero-section, .links-section, .about-section, .skills-section, .games-section, .site-footer {
    transform: translateY(20px);
}

/* --- АДАПТИВНОСТЬ --- */
@media (max-width: 600px) {
    .container { padding: 2rem 1rem; } /* Более компактные отступы на маленьких экранах */
    .card-content { padding: 1.5rem; }
    .avatar { width: 80px; height: 80px; margin-bottom: 1rem; }
    .hero-name { font-size: 1.8rem; margin-bottom: 0.25rem; }
    .hero-description { font-size: 1rem; margin-bottom: 1.5rem; }
    .links-section { margin-bottom: 1.5rem; gap: 1rem; }
    .about-section h2, .skills-section h2, .section-title { font-size: 1.1rem; margin-bottom: 0.75rem; }
    .about-section, .skills-section, .games-section { padding-top: 1.25rem; }
    .skills-section, .games-section { margin-top: 1.25rem; }
}