/* CSS переменные и кастомные стили */
:root {
    --primary-gradient: linear-gradient(90deg, #3fd27a, #3bc6d4);
    --nav-bg: #001f4d;
    --glass-bg: rgba(255, 255, 255, 0.12);
    --glass-border: rgba(255, 255, 255, 0.2);
    --modal-bg: rgba(0, 0, 0, 0.2);
    --modal-content-bg: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
}

html{
    line-height: 1.5;
    -webkit-text-size-adjust: 100%;
    tab-size: 4;
    font-family: var(--default-font-family, ui-sans-serif, system-ui, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol', 'Noto Color Emoji');
    font-feature-settings: var(--default-font-feature-settings, normal);
    font-variation-settings: var(--default-font-variation-settings, normal);
    -webkit-tap-highlight-color: transparent;
    font-size: 12px;
}

[v-cloak] {
    display: none;
}

body {
    font-family: "Inter", sans-serif;
    background-color: #f7f9fc;
    color: #0a1d3f;
}

.font-inter {
    font-family: "Inter", sans-serif;
}

.font-space-mono {
    font-family: "Space Mono", monospace;
}

/* Градиентный текст */
.gradient-text {
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-fill-color: transparent;
}

/* Glass-эффект */
.glass-effect {
    background: var(--glass-bg);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border: 1px solid var(--glass-border);
header.scrolled{
    background: linear-gradient(to bottom, rgb(5 39 88 / 40%), rgb(0 0 0 / 0%));
}

/* Project Modal Styles */
.project-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(10px);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

/* Lightbox Styles */
.lightbox {
    backdrop-filter: blur(8px);
    background: rgba(0, 0, 0, 0.95);
    animation: fadeIn 0.3s ease;
    touch-action: none;
    user-select: none;
}

.lightbox img {
    max-width: 100%;
    max-height: 85vh;
    object-fit: contain;
    animation: zoomIn 0.3s ease;
    transition: transform 0.2s ease-out;
    will-change: transform;
}

.lightbox img:active {
    cursor: grabbing;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes zoomIn {
    from { 
        opacity: 0;
        transform: scale(0.9);
    }
    to { 
        opacity: 1;
        transform: scale(1);
    }
}

.lightbox button {
    transition: all 0.2s ease;
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    user-select: none;
}

.lightbox button:hover {
    transform: scale(1.1);
}

/* Touch gesture improvements */
.lightbox .image-container {
    overflow: hidden;
    border-radius: 0.5rem;
    touch-action: none;
    -webkit-user-select: none;
    user-select: none;
}

@media (max-width: 768px) {
    .lightbox {
        padding: 1rem;
    }
    
    .lightbox img {
        max-height: 70vh;
    }
    
    .lightbox button {
        transform: scale(0.8);
    }
    
    .lightbox button:hover {
        transform: scale(0.9);
    }
}

/* Prevent text selection during touch interactions */
.lightbox * {
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    -webkit-touch-callout: none;
}

body.lightbox-open {
    overflow: hidden;
}

.project-modal-content {
    background: var(--modal-content-bg);
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    max-width: 1200px;
    max-height: 90vh;
    width: 100%;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

.project-modal-content::-webkit-scrollbar {
    width: 8px;
}

.project-modal-content::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}

.project-modal-content::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 4px;
}

.project-modal-content::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.5);
}

.project-modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(0, 0, 0, 0.5);
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 10;
}

.project-modal-close:hover {
    background: rgba(0, 0, 0, 0.7);
    transform: scale(1.1);
}

.project-modal-close svg {
    width: 20px;
    height: 20px;
    stroke: white;
}

/* Image Gallery Styles */
.project-gallery {
    position: relative;
    width: 100%;
    height: 400px;
    overflow: hidden;
    border-radius: 15px;
    margin-bottom: 30px;
}

.gallery-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: opacity 0.5s ease;
}

.gallery-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.5);
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    color: white;
    font-size: 20px;
}

.gallery-nav:hover {
    background: rgba(0, 0, 0, 0.7);
    transform: translateY(-50%) scale(1.1);
}

.gallery-nav.prev {
    left: 15px;
}

.gallery-nav.next {
    right: 15px;
}

.gallery-pagination {
    position: absolute;
    bottom: 15px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
}

.gallery-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: all 0.3s ease;
}

.gallery-dot.active {
    background: white;
    transform: scale(1.2);
}

/* Project Info Styles */
.project-info h2 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.project-meta {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin: 20px 0;
}

.project-meta-item {
    background: rgba(255, 255, 255, 0.05);
    padding: 15px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.project-meta-item strong {
    color: #3fd27a;
    display: block;
    margin-bottom: 5px;
}

.project-features {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 20px 0;
}

.feature-tag {
    background: rgba(63, 210, 122, 0.2);
    color: #3fd27a;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.875rem;
    border: 1px solid rgba(63, 210, 122, 0.3);
}

/* Form Styles */
.project-form {
    background: rgba(255, 255, 255, 0.05);
    padding: 30px;
    border-radius: 15px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    margin-top: 30px;
}

.project-form h3 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 20px;
    color: white;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    color: rgba(255, 255, 255, 0.8);
    font-weight: 500;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 12px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    transition: all 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: #3fd27a;
    box-shadow: 0 0 0 2px rgba(63, 210, 122, 0.2);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.submit-btn {
    background: var(--primary-gradient);
    color: white;
    padding: 12px 30px;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
}

.submit-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(63, 210, 122, 0.3);
}

.submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Responsive Styles */
@media (max-width: 768px) {
    .project-modal {
        padding: 10px;
    }
    
    .project-modal-content {
        max-height: 95vh;
        margin: 10px;
    }
    
    .project-gallery {
        height: 250px;
    }
    
    .project-info h2 {
        font-size: 2rem;
    }
    
    .project-meta {
        grid-template-columns: 1fr;
    }
    
    .gallery-nav {
        width: 40px;
        height: 40px;
        font-size: 16px;
    }
}

@media (max-width: 480px) {
    .project-gallery {
        height: 200px;
    }
    
    .project-info h2 {
        font-size: 1.5rem;
    }
    
    .project-form {
        padding: 20px;
    }
}

/* Animation Styles */
.project-modal-enter-active,
.project-modal-leave-active {
    transition: all 0.3s ease;
}

.project-modal-enter-from,
.project-modal-leave-to {
    opacity: 0;
    transform: scale(0.9);
}

.fade-enter-active,
.fade-leave-active {
    transition: opacity 0.3s ease;
}

.fade-enter-from,
.fade-leave-to {
    opacity: 0;
}   backdrop-filter: blur(5px);
}

/* Анимация подчеркивания для навигации */
.nav-link::after {
    content: "";
    display: block;
    width: 0;
    height: 2px;
    background: var(--primary-gradient);
    transition: width 0.3s ease-out;
}

.nav-link:hover::after {
    width: 100%;
}

/* Стили для скроллбара */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f0f4ff;
}

::-webkit-scrollbar-thumb {
    background: #005bb5;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #00b4ff;
}

.typed-cursor {
    color: #22c55e; /* Tailwind green-500 */
    font-weight: bold;
}

/* Отключение анимаций для пользователей с prefers-reduced-motion */
@media (prefers-reduced-motion: reduce) {
    .reveal,
    .pulse-animation {
        transition: none;
        transform: none;
        opacity: 1;
    }
}

.shine-effect {
    position: relative;
    overflow: hidden;
}

.shine-effect::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(to right, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.2) 50%, rgba(255, 255, 255, 0) 100%);
    transform: translateX(-100%);
    transition: transform 0.6s ease-in-out;
}

.shine-effect:hover::after {
    transform: translateX(100%);
}
    