/* ===== ОБЩИЕ СТИЛИ ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
html, body {
    width: 100%;
    height: 100%;
    overflow: hidden;
    user-select: none;
    cursor: url(https://cur.cursors-4u.net/cursors/cur-7/cur686.cur), auto;
    font-family: "Pixelify Sans", sans-serif;
    background: #0a0a0a;
    color: #fff;
}
a {
    cursor: url(https://cur.cursors-4u.net/cursors/cur-7/cur686.cur), auto;
}

/* ===== ЗАГРУЗОЧНЫЙ ЭКРАН ===== */
#splash-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #0a0a0a;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: transform 0.8s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.8s ease;
}
#splash-screen.splash-exit {
    transform: scale(0.8) rotate(-5deg);
    opacity: 0;
    pointer-events: none;
}
.splash-content {
    text-align: center;
    padding: 1rem;
    animation: pulse 2s infinite;
}
.splash-content h1 {
    font-size: clamp(3rem, 10vw, 5rem);
    text-shadow: 0 0 20px #f801fc, 0 0 40px #f801fc;
    letter-spacing: 5px;
}
.splash-content p {
    font-size: clamp(1.2rem, 2.5vw, 1.5rem);
    opacity: 0.7;
    margin-top: 0.5rem;
}
.progress-container {
    width: min(350px, 80vw);
    height: 20px;
    background: rgba(255,255,255,0.1);
    border-radius: 10px;
    margin: 1.5rem auto;
    overflow: hidden;
    border: 2px solid #f801fc;
    box-shadow: 0 0 20px rgba(248,1,252,0.3);
}
.progress-bar {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #f801fc, #ff00ff, #8b00ff);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite linear;
    transition: width 0.1s linear;
    border-radius: 10px;
}
@keyframes shimmer {
    0% { background-position: 0% 0; }
    100% { background-position: 200% 0; }
}
.progress-text {
    font-size: clamp(1.5rem, 3vw, 2rem);
    text-shadow: 0 0 20px #f801fc;
    margin-top: 0.5rem;
}
#enter-btn {
    display: none;
    margin: 1.5rem auto 0;
    background: none;
    border: 2px solid #f801fc;
    color: #fff;
    padding: 0.8rem 2.5rem;
    font-size: clamp(1.4rem, 2.5vw, 1.8rem);
    font-family: "Pixelify Sans", sans-serif;
    cursor: pointer;
    transition: all 0.3s;
    text-shadow: 0 0 10px #f801fc;
    box-shadow: 0 0 20px rgba(248,1,252,0.3);
    animation: pulse 1.5s infinite;
}
#enter-btn:hover {
    background: #f801fc;
    box-shadow: 0 0 40px #f801fc;
    transform: scale(1.05);
}
@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.03); }
    100% { transform: scale(1); }
}

/* ===== ОСНОВНОЙ КОНТЕНТ ===== */
#main-content {
    position: relative;
    width: 100vw;
    height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;  /* всё центрируется по вертикали */
    opacity: 0;
    transform: scale(0.5) rotate(-10deg);
    transition: opacity 1.2s cubic-bezier(0.34, 1.56, 0.64, 1),
                transform 1.2s cubic-bezier(0.34, 1.56, 0.64, 1);
    padding: 1rem 0.5rem;
    gap: 0.2rem;  /* небольшой отступ между блоками */
}
#main-content.main-enter {
    opacity: 1;
    transform: scale(1) rotate(0deg);
}

#background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url(pics/pixel-city-rain.gif);
    background-size: cover;
    z-index: -2;
    filter: blur(2px);
}
#particles-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -1;
}

/* Бегущая строка */
.running-text {
    position: fixed;
    top: 0.3rem;
    left: 0;
    white-space: nowrap;
    font-size: clamp(0.8rem, 1.2vw, 1rem);
    color: #f6f4f4;
    text-shadow: 0 0 7px rgb(8, 6, 8);
    animation: marquee 25s linear infinite;
    z-index: 10;
}
@keyframes marquee {
    0% { transform: translateX(100vw); }
    100% { transform: translateX(-100vw); }
}

/* ===== ЦЕНТРАЛЬНЫЙ БЛОК ===== */
.center-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    width: 100%;
    margin: 0;
}
#header h1 {
    font-size: clamp(4.5rem, 14vw, 8rem);
    text-shadow: 0 0 20px #f801fc;
    text-align: center;
}
#aka {
    font-size: clamp(1.2rem, 2vw, 1.5rem);
    opacity: 0.6;
    margin-top: -0.2rem;
    text-align: center;
}
#welcometxt {
    font-size: clamp(1.4rem, 3vw, 2rem);
    color: #f6f4f4;
    text-shadow: 0 10px 30px #f801fc;
    animation: changeColor 3s infinite alternate;
    margin: 0.2rem 0;
    text-align: center;
}
@keyframes changeColor {
    0% { text-shadow: 0 0 30px #f801fc; }
    25% { text-shadow: 0 0 30px #ff0000; }
    50% { text-shadow: 0 0 30px #ffff00; }
    75% { text-shadow: 0 0 30px #00ff00; }
    100% { text-shadow: 0 0 30px #0088ff; }
}

/* ===== ИКОНКИ ===== */
.container12 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem 1rem;
    justify-items: center;
    align-items: center;
    width: min(400px, 85vw);
    margin: 0.1rem auto;
}
.container12 img {
    width: min(180px, 40vw);
    height: auto;
    max-height: 80px;
    transition: transform 0.2s, filter 0.2s;
    animation: float 5s infinite alternate;
}
.container12 img:hover {
    transform: scale(1.15);
    filter: drop-shadow(0 0 15px #f801fc);
}
@keyframes float {
    0% { transform: translateY(0); }
    100% { transform: translateY(-8px); }
}

/* ===== НИЖНИЙ БЛОК (About me + was associated) ===== */
.bottom-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    width: 100%;
    margin-top: 4rem;   /* ОТСТУП ОТ ИКОНОК (ПК) — можно менять */
    margin-bottom: 0.3rem;
}
#info {
    font-size: clamp(1rem, 1.8vw, 1.2rem);
    text-align: center;
    color: #f6f4f4;
    text-shadow: 0 0 10px #050105;
    line-height: 1.6;
    margin-bottom: 0.1rem;
}
.text {
    font-size: clamp(1rem, 1.8vw, 1.2rem);
    color: white;
    text-shadow: 0 10px 30px #f801fc;
    font-weight: bold;
    animation: glow 2s infinite alternate;
}
@keyframes glow {
    from { text-shadow: 0 0 10px #f801fc; }
    to { text-shadow: 0 0 30px #00ffff; }
}

/* ===== ПОДВАЛ ===== */
#footer {
    position: absolute;
    bottom: 0.5rem;          /* отступ от нижнего края */
    left: 0;
    width: 100%;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    font-size: clamp(0.7rem, 1vw, 0.9rem);
    color: #f6f4f4;
    text-shadow: 0 10px 30px #f801fc;
    padding: 0.2rem 0.5rem;
    gap: 0.2rem 0.8rem;
    z-index: 5; /* чтобы быть поверх фона */
}
#footer span {
    text-align: center;
}
#version {
    text-align: right;
    line-height: 1.2;
}

/* ============================================================
   📱 МОБИЛЬНАЯ ВЕРСИЯ
   ============================================================ */
@media screen and (max-width: 768px) {
    #main-content {
        justify-content: center;
        padding: 0.3rem;
        gap: 0.1rem;
    }
    .center-wrapper,
    .bottom-wrapper,
    #footer {
        flex: 0 0 auto;
        margin: 0;
        padding: 0;
        width: 100%;
    }
    .running-text {
        font-size: 0.6rem;
        top: 0.2rem;
    }
    #header h1 {
        font-size: 5.2rem;
        margin-bottom: 0;
    }
    #aka {
        font-size: 1rem;
        margin-top: -0.2rem;
    }
    #welcometxt {
        font-size: 1.3rem;
        margin: 0.1rem 0;
    }
    .container12 {
        width: 80vw;
        gap: 0.3rem 0.6rem;
        margin: 0.2rem auto;
    }
    .container12 img {
        width: min(130px, 35vw);
        max-height: 60px;
        animation: floatMobile 4s infinite alternate ease-in-out;
    }
    @keyframes floatMobile {
        0% { transform: translateY(0); }
        100% { transform: translateY(-5px); }
    }
    /* На мобилках убираем отступ между иконками и About me */
    .bottom-wrapper {
        margin-top: 0;
        margin-bottom: 0;
    }
    #info {
        font-size: 0.95rem;
        line-height: 1.4;
        margin-bottom: 0;
    }
    .text {
        font-size: 0.95rem;
        margin-top: 0.1rem;
    }
    #footer {
        font-size: 0.65rem;
        gap: 0.1rem 0.3rem;
        padding: 0.1rem 0.3rem;
        margin-top: 0.2rem;
    }
    #enter-btn {
        padding: 0.6rem 1.8rem;
        font-size: 1.2rem;
    }
    .splash-content h1 {
        font-size: 3.2rem;
    }
    .progress-container {
        width: 80vw;
        height: 18px;
    }
}

@media screen and (max-width: 480px) {
    #header h1 {
        font-size: 3.9rem;
    }
    #welcometxt {
        font-size: 1.1rem;
    }
    #aka {
        font-size: 0.85rem;
    }
    .container12 img {
        width: min(100px, 30vw);
        max-height: 50px;
    }
    .container12 {
        gap: 0.2rem 0.4rem;
        width: 85vw;
    }
    #info {
        font-size: 0.8rem;
        line-height: 1.3;
    }
    .text {
        font-size: 0.8rem;
    }
    #footer {
        font-size: 0.55rem;
        gap: 0.05rem 0.2rem;
    }
    .running-text {
        font-size: 0.5rem;
    }
    .splash-content h1 {
        font-size: 2.5rem;
    }
    .progress-container {
        width: 80vw;
        height: 14px;
    }
    #enter-btn {
        padding: 0.5rem 1.2rem;
        font-size: 1rem;
    }
    .bottom-wrapper {
        margin-top: 0;
    }
}