html {
    scroll-behavior: smooth;
}

body {
    font-family: 'SF Pro Display', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: #000000;
    color: #ffffff;
    line-height: 1.6;
    overflow-x: hidden;
    display: flex;
    justify-content: center;
}

.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    padding: 1rem 2rem;
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.3) 0%, rgba(0, 0, 0, 0.1) 100%);
    backdrop-filter: blur(20px);
    z-index: 1000;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.nav-brand {
    font-size: 2rem;
    font-weight: 700;
    color: #fff;
    letter-spacing: -0.01em;
    font-family: 'Montserrat', sans-serif;
    background: linear-gradient(135deg, #ffffff 0%, #e0e0e0 100%);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 0 20px rgba(255, 255, 255, 0.3);
}

.visitor-count {
    color: #888888;
    text-decoration: none;
    font-weight: 500;
    font-size: 1rem;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    padding: 0.5rem 1rem;
    cursor: default;
}

.nav-links {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.nav-link {
    color: #888888;
    text-decoration: none;
    font-weight: 500;
    font-size: 1rem;
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    position: relative;
    overflow: hidden;
}

.nav-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transition: left 0.5s ease;
}

.nav-link:hover::before {
    left: 100%;
}

.nav-link:hover {
    color: #ffffff;
    text-shadow: 0 0 15px rgba(255, 255, 255, 0.8);
    background: rgba(255, 255, 255, 0.05);
    transform: translateY(-2px);
}

.zizi {
    height: 370px;
    width: 100%;
    max-width: 450px;
    z-index: 99999;
    border: none;
    overflow: hidden;
}

.main {
    margin-top: 10vh;
    display: flex;
    flex-direction: column;
    z-index: 1;
}

.krug {
    font-family: 'SF Pro Display', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    text-align: center;
    color: #ffffff;
    font-size: 30px;
    margin-bottom: 10px;
}

.kgugz {
    gap: 40px;
    display: flex;
}

.fotk img {
    width: 100%;
    max-width: 450px;
    border-radius: 20px;
}

.fotk {
    gap: 40px;
    display: flex;
    margin-bottom: 40px;
}

.fotk2 img {
    width: 100%;
    max-width: 685px;
    border-radius: 20px;
}

.fotk2 {
    gap: 60px;
    display: flex;
}

#rain-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.main-content {
    opacity: 0;
    transform: translateY(50px);
    transition: opacity 1.2s ease-out, transform 1.2s ease-out;
}

.main-content.show {
    opacity: 1;
    transform: translateY(0);
}

.hidden {
    display: none;
}

.animated-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
    background: #000000;
}

.animated-background::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 20% 80%, rgba(255, 255, 255, 0.02) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(255, 255, 255, 0.01) 0%, transparent 50%),
        radial-gradient(circle at 40% 40%, rgba(255, 255, 255, 0.005) 0%, transparent 50%);
    animation: backgroundShift 20s ease-in-out infinite;
}

@keyframes backgroundShift {
    0%, 100% {
        transform: translateX(0) translateY(0);
    }
    33% {
        transform: translateX(30px) translateY(-30px);
    }
    66% {
        transform: translateX(-20px) translateY(20px);
    }
}

.loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: #000000;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.8s ease-out, visibility 0.8s ease-out;
}

.loading-screen.fade-out {
    opacity: 0;
    visibility: hidden;
}

.logo-container {
    text-align: center;
}

.welcome-text {
    font-size: clamp(6rem, 12vw, 8rem);
    font-weight: 700;
    letter-spacing: 0.1em;
    color: #ffffff;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    display: flex;
    gap: 0.05em;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.8s ease-out;
}

.welcome-text.show {
    opacity: 1;
    transform: translateY(0);
}

.logo-text {
    font-size: clamp(3rem, 12vw, 8rem);
    font-weight: 800;
    letter-spacing: -0.02em;
    color: #ffffff;
    font-family: 'SF Pro Display', -apple-system, BlinkMacSystemFont, sans-serif;
    display: flex;
    gap: 0.1em;
}

.letter {
    display: inline-block;
    opacity: 0;
    transform: translateY(50px) scale(0.5);
    transition: all 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.letter.animate {
    opacity: 1;
    transform: translateY(0) scale(1);
}

@keyframes typewriter {
    0% {
        opacity: 0;
        transform: translateY(50px) scale(0.8);
    }
    20% {
        opacity: 0.3;
        transform: translateY(30px) scale(0.9);
    }
    40% {
        opacity: 0.6;
        transform: translateY(15px) scale(0.95);
    }
    60% {
        opacity: 0.8;
        transform: translateY(5px) scale(0.98);
    }
    80% {
        opacity: 0.9;
        transform: translateY(-2px) scale(1.01);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.project-card {
    background: linear-gradient(135deg, rgba(26, 26, 26, 0.8) 0%, rgba(20, 20, 20, 0.9) 100%);
    border-radius: 20px;
    overflow: hidden;
    transition: all 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    border: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
    cursor: pointer;
    backdrop-filter: blur(10px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.project-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0.05) 50%, rgba(255, 255, 255, 0.02) 100%);
    opacity: 0;
    transition: opacity 0.5s ease;
    border-radius: 20px;
}

.project-card:hover {
    transform: translateY(-12px) scale(1.03);
    box-shadow: 0 25px 60px rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.3);
}

.project-card:hover::before {
    opacity: 1;
}

.project-card:hover .project-tech {
    color: #ffffff;
    text-shadow: 0 0 5px rgba(255, 255, 255, 0.2);
}

.project-image {
    height: 90%;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.project-tech {
    text-align: center;
    color: #888;
    font-size: 2rem;
    font-weight: 500;
}

.footer {
    text-decoration: none;
    font-weight: 500;
    font-size: 1rem;
    transition: all 0.3s ease;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    color: #ffffff;
    text-shadow: 0 0 15px rgba(255, 255, 255, 0.6);
    position: relative;
    bottom: -1vh;
    left: auto;
    transform: none;
    text-align: center;
    margin-top: 4rem;
    padding: 1rem 0;
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.3) 0%, rgba(0, 0, 0, 0.1) 100%);
    backdrop-filter: blur(10px);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.5), transparent);
}

/* ========== МОБИЛЬНАЯ АДАПТАЦИЯ ========== */

/* Телефоны (до 480px) */
@media (max-width: 480px) {
    .navbar {
        padding: 0.75rem 1rem;
    }

    .nav-brand {
        font-size: 1.5rem;
    }

    .nav-links {
        gap: 1rem;
    }

    .nav-link {
        font-size: 0.85rem;
        padding: 0.4rem 0.6rem;
    }

    .visitor-count {
        font-size: 0.85rem;
        padding: 0.4rem 0.6rem;
    }

    .main {
        margin-top: 12vh;
        padding: 0 1rem;
    }

    .krug {
        font-size: 1.5rem;
        margin-bottom: 8px;
    }

    .zizi {
        height: 365px;
        width: 100%;
        overflow: hidden;
        max-width: 100%;
    }

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

    .fotk {
        gap: 20px;
        flex-direction: column;
        margin-bottom: 20px;
        align-items: center;
    }

    .fotk img {
        width: 100%;
        max-width: 300px;
    }

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

    .fotk2 img {
        width: 100%;
        max-width: 300px;
    }

    .project-card {
        border-radius: 15px;
    }

    .project-card:hover {
        transform: translateY(-6px) scale(1.02);
    }

    .project-tech {
        font-size: 1.5rem;
    }

    .welcome-text {
        font-size: clamp(2rem, 10vw, 4rem);
    }

    .logo-text {
        font-size: clamp(1.5rem, 10vw, 4rem);
    }

    .footer {
        font-size: 0.9rem;
        margin-top: 2rem;
    }
}

/* Планшеты и средние устройства (481px - 768px) */
@media (max-width: 768px) and (min-width: 481px) {
    .navbar {
        padding: 0.9rem 1.5rem;
    }

    .nav-brand {
        font-size: 1.7rem;
    }

    .nav-links {
        gap: 1.5rem;
    }

    .nav-link {
        font-size: 0.9rem;
        padding: 0.45rem 0.8rem;
    }

    .main {
        margin-top: 11vh;
        padding: 0 1.5rem;
    }

    .krug {
        font-size: 2rem;
        margin-bottom: 10px;
    }

    .zizi {
        height: 280px;
        width: 100%;
        max-width: 400px;
    }

    .kgugz {
        gap: 30px;
        flex-direction: column;
        align-items: center;
    }

    .fotk {
        gap: 30px;
        flex-direction: column;
        margin-bottom: 30px;
        align-items: center;
    }

    .fotk img {
        width: 100%;
        max-width: 400px;
    }

    .fotk2 {
        gap: 30px;
        flex-direction: column;
        align-items: center;
    }

    .fotk2 img {
        width: 100%;
        max-width: 500px;
    }

    .project-card:hover {
        transform: translateY(-8px) scale(1.02);
    }

    .welcome-text {
        font-size: clamp(3rem, 12vw, 6rem);
    }

    .logo-text {
        font-size: clamp(2rem, 12vw, 6rem);
    }
}

/* Планшеты в альбомной ориентации (769px - 1024px) */
@media (max-width: 1024px) and (min-width: 769px) {
    .nav-brand {
        font-size: 1.8rem;
    }

    .main {
        padding: 0 2rem;
    }

    .kgugz {
        gap: 30px;
        flex-wrap: wrap;
    }

    .fotk {
        gap: 30px;
    }

    .fotk2 {
        gap: 40px;
    }

    .fotk img {
        width: 100%;
        max-width: 350px;
    }

    .fotk2 img {
        width: 100%;
        max-width: 500px;
    }

    .project-card:hover {
        transform: translateY(-10px) scale(1.03);
    }
}