/* ============================================ */
/* БАЗОВЫЕ СТИЛИ */
/* ============================================ */
* {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    background-color: #0E0F15;
    color: #E2E8F0;
    overflow-x: hidden;
}

/* ============================================ */
/* GRAIN TEXTURE OVERLAY */
/* ============================================ */
.grain-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9999;
    opacity: 0.03;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
}

/* ============================================ */
/* CUSTOM SCROLLBAR */
/* ============================================ */
::-webkit-scrollbar {
    width: 10px;
}
::-webkit-scrollbar-track {
    background: #1A1B23;
}
::-webkit-scrollbar-thumb {
    background: #2C2E3A;
    border-radius: 5px;
}
::-webkit-scrollbar-thumb:hover {
    background: #4353FF;
}

/* ============================================ */
/* ANIMATIONS CLASSES */
/* ============================================ */
.fade-up {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), 
                transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}
.fade-up.visible {
    opacity: 1;
    transform: translateY(0);
}

.fade-left {
    opacity: 0;
    transform: translateX(-50px);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), 
                transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}
.fade-left.visible {
    opacity: 1;
    transform: translateX(0);
}

.fade-right {
    opacity: 0;
    transform: translateX(50px);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), 
                transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}
.fade-right.visible {
    opacity: 1;
    transform: translateX(0);
}

.stagger-1 { transition-delay: 0.1s; }
.stagger-2 { transition-delay: 0.2s; }
.stagger-3 { transition-delay: 0.3s; }
.stagger-4 { transition-delay: 0.4s; }
.stagger-5 { transition-delay: 0.5s; }

/* ============================================ */
/* GRADIENT TEXT */
/* ============================================ */
.gradient-text {
    background: linear-gradient(135deg, #4353FF 0%, #A855F7 50%, #EC4899 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    background-size: 200% 200%;
    animation: gradient-shift 5s ease infinite;
}

@keyframes gradient-shift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

/* ============================================ */
/* GLASS CARD */
/* ============================================ */
.glass-card {
    background: rgba(26, 27, 35, 0.6);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

/* ============================================ */
/* HOVER CARD EFFECT */
/* ============================================ */
.hover-card {
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
.hover-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(67, 83, 255, 0.15);
    border-color: rgba(67, 83, 255, 0.3);
}

/* ============================================ */
/* BUTTON STYLES */
/* ============================================ */
.btn-primary {
    background: linear-gradient(135deg, #4353FF 0%, #7B2CBF 100%);
    background-size: 200% 200%;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    animation: gradient-shift 5s ease infinite;
}
.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(67, 83, 255, 0.4);
}
.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}
.btn-primary:hover::before {
    left: 100%;
}

.btn-secondary {
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
}
.btn-secondary:hover {
    border-color: #4353FF;
    background: rgba(67, 83, 255, 0.1);
    transform: translateY(-2px);
}

/* ============================================ */
/* NAVIGATION */
/* ============================================ */
.nav-blur {
    background: rgba(14, 15, 21, 0.8);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

/* ============================================ */
/* HERO GRADIENT ORB */
/* ============================================ */
.gradient-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.4;
}

/* ============================================ */
/* FEATURE ICON CONTAINER */
/* ============================================ */
.icon-container {
    background: linear-gradient(135deg, rgba(67, 83, 255, 0.1) 0%, rgba(168, 85, 247, 0.1) 100%);
    border: 1px solid rgba(67, 83, 255, 0.2);
    transition: all 0.4s ease;
}
.hover-card:hover .icon-container {
    background: linear-gradient(135deg, rgba(67, 83, 255, 0.2) 0%, rgba(168, 85, 247, 0.2) 100%);
    border-color: rgba(67, 83, 255, 0.4);
    transform: scale(1.1);
}

/* ============================================ */
/* PROCESS STEP */
/* ============================================ */
.process-step {
    position: relative;
    transition: all 0.4s ease;
}
.process-step::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    padding: 1px;
    background: linear-gradient(135deg, rgba(67, 83, 255, 0.3), transparent);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0;
    transition: opacity 0.3s;
}
.process-step:hover::before {
    opacity: 1;
}

/* ============================================ */
/* GRID PATTERN */
/* ============================================ */
.grid-pattern {
    background-image: linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
                      linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
    background-size: 60px 60px;
}

/* ============================================ */
/* MARQUEE ANIMATION */
/* ============================================ */
.marquee-container {
    overflow: hidden;
    white-space: nowrap;
    position: relative;
}

.marquee-container::before,
.marquee-container::after {
    content: '';
    position: absolute;
    top: 0;
    width: 150px;
    height: 100%;
    z-index: 2;
    pointer-events: none;
}

.marquee-container::before {
    left: 0;
    background: linear-gradient(to right, #0E0F15 0%, transparent 100%);
}

.marquee-container::after {
    right: 0;
    background: linear-gradient(to left, #0E0F15 0%, transparent 100%);
}

.marquee-content {
    display: inline-flex;
    animation: marquee-scroll 30s linear infinite;
}

.marquee-content:hover {
    animation-play-state: paused;
}

.marquee-content.reverse {
    animation-direction: reverse;
}

@keyframes marquee-scroll {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-50%);
    }
}

.marquee-item {
    display: inline-flex;
    align-items: center;
    padding: 0 2rem;
    flex-shrink: 0;
}

/* ============================================ */
/* FLOATING ELEMENTS */
/* ============================================ */
.floating-element {
    animation: float 6s ease-in-out infinite;
}
.floating-element-delayed {
    animation: float 6s ease-in-out 3s infinite;
}

/* ============================================ */
/* GLOW EFFECTS */
/* ============================================ */
.glow-effect {
    position: relative;
}
.glow-effect::after {
    content: '';
    position: absolute;
    inset: -2px;
    border-radius: inherit;
    background: linear-gradient(135deg, #4353FF, #A855F7, #EC4899);
    z-index: -1;
    opacity: 0;
    transition: opacity 0.3s;
    filter: blur(10px);
}
.glow-effect:hover::after {
    opacity: 0.5;
}

/* ============================================ */
/* SHIMMER EFFECT */
/* ============================================ */
.shimmer {
    background: linear-gradient(90deg, 
        rgba(255,255,255,0) 0%, 
        rgba(255,255,255,0.1) 50%, 
        rgba(255,255,255,0) 100%);
    background-size: 200% 100%;
    animation: shimmer 2s linear infinite;
}

/* ============================================ */
/* CARD SHINE EFFECT */
/* ============================================ */
.card-shine {
    position: relative;
    overflow: hidden;
}
.card-shine::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;
}
.card-shine:hover::before {
    left: 100%;
}

/* ============================================ */
/* VIDEO STYLES */
/* ============================================ */
.video-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
    min-height: 400px;
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}
.video-wrapper video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.video-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, transparent 0%, rgba(14, 15, 21, 0.3) 100%);
    pointer-events: none;
}
.video-fallback {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #1A1B23 0%, #2C2E3A 100%);
    color: #94A3B8;
    font-size: 1.1rem;
}

/* ============================================ */
/* SENIOR DEV BADGE ON VIDEO */
/* ============================================ */
.senior-badge {
    position: absolute;
    top: 20px;
    left: 20px;
    z-index: 10;
    animation: fadeInUp 0.8s ease-out 0.5s both;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ============================================ */
/* HERO BACKGROUND IMAGE WITH BLUR */
/* ============================================ */
.hero-bg-image {
    position: absolute;
    inset: 0;
    background-image: url('hero-background.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    filter: blur(8px) brightness(0.4);
    z-index: 0;
}

/* ============================================ */
/* LIGHTBOX - COMPLETELY ISOLATED */
/* ============================================ */
#lightbox-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 99999;
}

#lightbox-modal.active {
    display: flex !important;
    align-items: center;
    justify-content: center;
}

#lightbox-modal img {
    max-width: 90%;
    max-height: 80vh;
    object-fit: contain;
}

.lightbox-btn-close,
.lightbox-btn-prev,
.lightbox-btn-next {
    position: absolute;
    z-index: 100;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
}

.lightbox-btn-close {
    top: 20px;
    right: 20px;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    font-size: 20px;
}

.lightbox-btn-prev {
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    width: 56px;
    height: 56px;
    border-radius: 50%;
    font-size: 24px;
}

.lightbox-btn-next {
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    width: 56px;
    height: 56px;
    border-radius: 50%;
    font-size: 24px;
}

.lightbox-btn-close:hover,
.lightbox-btn-prev:hover,
.lightbox-btn-next:hover {
    background: rgba(67, 83, 255, 0.8);
}

.lightbox-info {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
    color: white;
}

.lightbox-info h3 {
    font-size: 24px;
    font-weight: bold;
    margin-bottom: 8px;
}

.lightbox-info p {
    color: #999;
}

.lightbox-counter {
    position: absolute;
    top: 20px;
    left: 20px;
    background: rgba(255, 255, 255, 0.1);
    padding: 8px 16px;
    border-radius: 20px;
    color: white;
    font-size: 14px;
}