@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@700&family=Roboto:wght@300&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body, html { 
    width: 100%; 
    height: 100%; 
    background-color: #000; 
    overflow: hidden;
    font-family: 'Roboto', sans-serif;
}

/* Видео контейнер */
#video-container {
    position: fixed; 
    top: 0; 
    left: 0; 
    width: 100%; 
    height: 100%; 
    z-index: 10;
}

#intro-video {
    width: 100%; 
    height: 100%; 
    object-fit: cover; 
    display: block;
}

/* Парящие частицы */
#particles-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 16;
    pointer-events: none;
    opacity: 0;
    transition: opacity 1.5s ease;
}

#particles-container.visible {
    opacity: 1;
}

.particle {
    position: absolute;
    border-radius: 50%;
    animation: floatUp linear infinite;
}

.particle.small {
    width: 1px;
    height: 1px;
    background: rgba(255, 255, 255, 0.2);
    filter: blur(1px);
}

.particle.medium {
    width: 2px;
    height: 2px;
    background: rgba(255, 255, 255, 0.4);
    filter: blur(0.5px);
}

.particle.large {
    width: 3px;
    height: 3px;
    background: rgba(255, 255, 255, 0.6);
    box-shadow: 0 0 8px rgba(255, 255, 255, 0.4);
}

@keyframes floatUp {
    0% {
        transform: translateY(110vh) scale(0) rotate(0deg);
        opacity: 0;
    }
    5% {
        opacity: 1;
    }
    50% {
        opacity: 0.7;
    }
    95% {
        opacity: 0.3;
    }
    100% {
        transform: translateY(-10vh) scale(1.5) rotate(360deg);
        opacity: 0;
    }
}

/* Основная навигация */
#main-nav {
    position: absolute;
    top: 30px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 100;
    display: flex;
    gap: 40px;
    opacity: 0;
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

#main-nav.visible {
    opacity: 1;
    animation: slideDown 0.6s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

#main-nav a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    font-family: 'Orbitron', sans-serif;
    font-size: 14px;
    letter-spacing: 3px;
    padding: 10px 15px;
    transition: all 0.3s ease;
    position: relative;
    text-transform: uppercase;
}

#main-nav a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%) scaleX(0);
    width: 80%;
    height: 1px;
    background: rgba(255, 255, 255, 0.8);
    transition: transform 0.3s ease;
}

#main-nav a:hover {
    color: #fff;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}

#main-nav a:hover::after {
    transform: translateX(-50%) scaleX(1);
}

#contact-nav {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 100;
    display: flex;
    gap: 30px;
    opacity: 0;
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

#contact-nav.visible {
    opacity: 1;
    animation: slideUp 0.6s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

#contact-nav a {
    color: rgba(255, 255, 255, 0.5);
    text-decoration: none;
    font-family: 'Roboto', sans-serif;
    font-size: 13px;
    letter-spacing: 2px;
    padding: 8px 12px;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    backdrop-filter: blur(10px);
    text-transform: uppercase;
}

#contact-nav a:hover {
    color: #fff;
    border-color: rgba(255, 255, 255, 0.6);
    background: rgba(255, 255, 255, 0.1);
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

@keyframes slideDown {
    0% {
        opacity: 0;
        transform: translateX(-50%) translateY(-20px);
    }
    100% {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

@keyframes slideUp {
    0% {
        opacity: 0;
        transform: translateX(-50%) translateY(20px);
    }
    100% {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

#apple-click-area {
    position: absolute;
    top: 65%; 
    right: 25%;
    width: 150px; 
    height: 150px;
    z-index: 999;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    
    border: 2px solid rgba(255, 255, 255, 0.3);
    box-shadow: 
        0 0 20px rgba(255, 255, 255, 0.1),
        inset 0 0 20px rgba(255, 255, 255, 0.05);
    
    opacity: 0;
    pointer-events: none;
}

#apple-click-area.visible {
    opacity: 1;
    pointer-events: auto;
    animation: fadeInScale 0.6s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.hidden {
    display: none;
}

@keyframes fadeInScale {
    0% {
        opacity: 0;
        transform: scale(0.8);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

#apple-click-area:hover {
    border-color: rgba(255, 255, 255, 0.6);
    box-shadow: 
        0 0 30px rgba(255, 255, 255, 0.3),
        0 0 60px rgba(255, 255, 255, 0.1),
        inset 0 0 30px rgba(255, 255, 255, 0.1);
    transform: scale(1.05);
    background: rgba(255, 255, 255, 0.05);
}

#apple-click-area::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 8px;
    height: 8px;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 50%;
    transition: all 0.4s ease;
}

#apple-click-area:hover::before {
    width: 12px;
    height: 12px;
    background: rgba(255, 255, 255, 1);
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.8);
}

#apple-click-area::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.2);
    animation: pulse 2s ease-out infinite;
}

@keyframes pulse {
    0% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 1;
    }
    100% {
        transform: translate(-50%, -50%) scale(1.5);
        opacity: 0;
    }
}

body::after {
    content: ""; 
    position: fixed; 
    top: 0; 
    left: 0; 
    width: 100%; 
    height: 100%;
    background: radial-gradient(circle, rgba(255,255,255,0.03) 0%, rgba(0,0,0,0.5) 100%);
    pointer-events: none; 
    z-index: 30;
}

#portfolio-content {
    display: none;
    flex-direction: column; 
    align-items: center; 
    justify-content: center;
    min-height: 100vh; 
    background-color: #000; 
    color: #fff; 
    position: relative; 
    z-index: 5;
}

#portfolio-content img { 
    max-width: 70%; 
    height: auto; 
    border: 1px solid #222; 
}

h1 { 
    font-family: 'Orbitron', sans-serif; 
    text-transform: uppercase; 
    letter-spacing: 4px; 
}

#back-button {
    position: fixed;
    top: 20px;
    left: 20px;
    z-index: 1000;
    width: 120px;
    height: 45px;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 25px;
    cursor: pointer;
    font-family: 'Orbitron', sans-serif;
    font-size: 11px;
    letter-spacing: 3px;
    color: #fff;
    text-transform: uppercase;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    
    background: 
        linear-gradient(135deg, rgba(0, 0, 0, 0.6) 0%, rgba(0, 0, 0, 0.3) 100%),
        url('resource/cederic-vandenberghe-21DP3hytVHw-unsplash.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-blend-mode: overlay;
    
    box-shadow: 
        0 0 15px rgba(255, 255, 255, 0.1),
        0 0 30px rgba(255, 255, 255, 0.05),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
    backdrop-filter: blur(5px);
    
    opacity: 0;
    pointer-events: none;
    transform: translateX(-20px);
}

#back-button.visible {
    opacity: 1;
    pointer-events: auto;
    transform: translateX(0);
}

#back-button:hover {
    border-color: rgba(255, 255, 255, 0.6);
    box-shadow: 
        0 0 25px rgba(255, 255, 255, 0.2),
        0 0 50px rgba(255, 255, 255, 0.1),
        0 0 80px rgba(255, 255, 255, 0.05),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
    color: #fff;
    text-shadow: 0 0 15px rgba(255, 255, 255, 0.8);
}

#back-button:active {
    transform: scale(0.95);
    border-color: rgba(255, 255, 255, 0.8);
    box-shadow: 
        0 0 40px rgba(255, 255, 255, 0.3),
        0 0 80px rgba(255, 255, 255, 0.2),
        0 0 120px rgba(255, 255, 255, 0.1),
        inset 0 0 20px rgba(255, 255, 255, 0.2);
    transition: all 0.1s ease;
    background: 
        linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0.05) 100%),
        url('resource/cederic-vandenberghe-21DP3hytVHw-unsplash.jpg');
    background-size: cover;
    background-position: center;
    background-blend-mode: overlay;
}

/* ========== АДАПТАЦИЯ ========== */

@media (max-width: 768px) {
    #main-nav {
        gap: 15px;
        top: 20px;
    }
    
    #main-nav a {
        font-size: 11px;
        letter-spacing: 1px;
        padding: 8px 10px;
    }
    
    #contact-nav {
        gap: 15px;
        bottom: 30px;
    }
    
    #contact-nav a {
        font-size: 11px;
        padding: 6px 10px;
    }
    
    #apple-click-area {
        width: 100px;
        height: 100px;
        top: 50%;
        right: 20%;
    }
    
    #back-button {
        width: 100px;
        height: 38px;
        top: 10px;
        left: 10px;
        font-size: 10px;
        letter-spacing: 2px;
        border-radius: 20px;
    }
}

@media (max-width: 480px) {
    #main-nav {
        flex-direction: column;
        align-items: center;
        gap: 10px;
        top: 15px;
    }
    
    #contact-nav {
        flex-direction: column;
        align-items: center;
        gap: 10px;
        bottom: 20px;
    }
    
    #apple-click-area {
        width: 80px;
        height: 80px;
    }
    
    #back-button {
        width: 80px;
        height: 32px;
        top: 5px;
        left: 5px;
        font-size: 9px;
        border-radius: 16px;
    }
}