/* Modern 3D Design System */
:root {
    --gradient-primary: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    --gradient-secondary: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --gradient-success: linear-gradient(135deg, #13B0A5 0%, #0FA3E6 100%);
    --gradient-dark: linear-gradient(135deg, #2D3748 0%, #1A202C 100%);
    --shadow-3d: 0 20px 40px rgba(0, 0, 0, 0.15), 0 0 20px rgba(0, 0, 0, 0.05);
    --shadow-3d-hover: 0 30px 60px rgba(0, 0, 0, 0.25), 0 0 40px rgba(0, 0, 0, 0.1);
    --glass-bg: rgba(255, 255, 255, 0.1);
    --glass-border: rgba(255, 255, 255, 0.2);
}

/* 3D Animations */
@keyframes float3D {
    0%, 100% { transform: translateY(0px) rotateX(0deg) rotateY(0deg); }
    25% { transform: translateY(-20px) rotateX(5deg) rotateY(5deg); }
    50% { transform: translateY(-10px) rotateX(-5deg) rotateY(-5deg); }
    75% { transform: translateY(-15px) rotateX(3deg) rotateY(-3deg); }
}

@keyframes rotateGlow {
    0% { 
        transform: rotate(0deg) scale(1);
        filter: hue-rotate(0deg);
    }
    50% {
        transform: rotate(180deg) scale(1.05);
        filter: hue-rotate(180deg);
    }
    100% {
        transform: rotate(360deg) scale(1);
        filter: hue-rotate(360deg);
    }
}

@keyframes pulse3D {
    0%, 100% {
        transform: scale(1) translateZ(0);
        box-shadow: var(--shadow-3d);
    }
    50% {
        transform: scale(1.05) translateZ(10px);
        box-shadow: var(--shadow-3d-hover);
    }
}

@keyframes slideIn3D {
    from {
        opacity: 0;
        transform: translateX(-100px) translateZ(-100px) rotateY(-15deg);
    }
    to {
        opacity: 1;
        transform: translateX(0) translateZ(0) rotateY(0);
    }
}

/* Enable 3D perspective */
body {
    overflow-x: hidden;
    position: relative;
}

/* 3D Cards with subtle effects */
.service-card, .tech-card, .calculator-card {
    background: white;
    border: 1px solid rgba(30, 41, 59, 0.1);
    border-radius: 15px;
    padding: 2rem;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    position: relative;
    overflow: hidden;
}

.service-card::before, .tech-card::before, .calculator-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
        45deg,
        transparent,
        rgba(255, 255, 255, 0.1),
        transparent
    );
    transform: rotate(45deg);
    transition: all 0.6s;
    opacity: 0;
}

.service-card:hover, .tech-card:hover, .calculator-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

.service-card:hover::before, .tech-card:hover::before, .calculator-card:hover::before {
    animation: shine 0.5s ease-in-out;
    opacity: 1;
}

@keyframes shine {
    0% { transform: translateX(-100%) translateY(-100%) rotate(45deg); }
    100% { transform: translateX(100%) translateY(100%) rotate(45deg); }
}

/* 3D Hero Section */
.hero-section {
    min-height: 100vh;
    position: relative;
    transform-style: preserve-3d;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.hero-content {
    z-index: 10;
    animation: slideIn3D 1s ease-out;
    transform-style: preserve-3d;
}

.hero-title {
    font-size: 4rem;
    font-weight: 900;
    background: linear-gradient(135deg, #fff 0%, #e0e0ff 50%, #fff 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    animation: float3D 6s ease-in-out infinite;
    transform-style: preserve-3d;
}

/* Убраны плавающие элементы по запросу пользователя */

/* 3D Buttons */
.btn-3d {
    background: var(--gradient-primary);
    border: none;
    border-radius: 15px;
    padding: 1rem 2rem;
    color: white;
    font-weight: 600;
    font-size: 1.1rem;
    cursor: pointer;
    position: relative;
    transform-style: preserve-3d;
    transition: all 0.3s cubic-bezier(0.23, 1, 0.320, 1);
    box-shadow: 0 10px 20px rgba(30, 41, 59, 0.4);
    overflow: hidden;
}

.btn-3d::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s;
}

.btn-3d:hover {
    transform: translateZ(10px) translateY(-5px) rotateX(10deg);
    box-shadow: 0 20px 40px rgba(30, 41, 59, 0.6);
}

.btn-3d:hover::before {
    left: 100%;
}

.btn-3d:active {
    transform: translateZ(5px) translateY(-2px);
}

/* 3D Navigation */
.navbar {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    transform-style: preserve-3d;
    transition: all 0.3s;
}

.navbar.scrolled {
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    transform: translateZ(20px);
}

.nav-link {
    color: #333;
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 10px;
    transition: all 0.3s;
    position: relative;
    overflow: hidden;
}

.nav-link::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--gradient-primary);
    transition: all 0.3s;
    transform: translateX(-50%);
}

.nav-link:hover {
    color: #1e293b;
    background: rgba(30, 41, 59, 0.05);
    transform: translateY(-2px);
}

.nav-link:hover::before {
    width: 80%;
}

/* 3D Form Elements - Fixed for visibility */
.form-group-3d {
    position: relative;
    margin-bottom: 2rem;
}

input.form-input-3d, 
textarea.form-input-3d,
select.form-input-3d {
    width: 100%;
    padding: 1rem 1.5rem;
    border: 2px solid rgba(30, 41, 59, 0.3);
    border-radius: 10px;
    background: white;
    color: #333;
    font-size: 1rem;
    transition: all 0.3s;
}

input.form-input-3d:focus,
textarea.form-input-3d:focus,
select.form-input-3d:focus {
    outline: none;
    border-color: #64748b;
    box-shadow: 0 5px 15px rgba(100, 116, 139, 0.2);
}

input.form-input-3d::placeholder,
textarea.form-input-3d::placeholder {
    color: #999;
}

/* 3D Stats Counter */
.stats-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin: 3rem 0;
}

.stat-card {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0.05) 100%);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    padding: 2rem;
    text-align: center;
    transform-style: preserve-3d;
    transition: all 0.3s;
    cursor: pointer;
}

.stat-card:hover {
    transform: translateZ(20px) rotateX(5deg);
    box-shadow: var(--shadow-3d-hover);
}

.stat-number {
    font-size: 3rem;
    font-weight: 900;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-label {
    color: rgba(255, 255, 255, 0.8);
    font-size: 1.1rem;
    margin-top: 0.5rem;
}

/* 3D Map Container */
.map-container-3d {
    position: relative;
    width: 100%;
    height: 500px;
    border-radius: 20px;
    overflow: hidden;
    transform-style: preserve-3d;
    box-shadow: var(--shadow-3d);
    transition: all 0.3s;
}

.map-container-3d:hover {
    transform: translateZ(20px) scale(1.02);
    box-shadow: var(--shadow-3d-hover);
}

.map-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.2) 0%, rgba(15, 23, 42, 0.2) 100%);
    pointer-events: none;
    z-index: 1;
}

/* Particle Background */
.particles-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
}

.particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 50%;
    animation: particleFloat 20s infinite linear;
}

@keyframes particleFloat {
    0% {
        transform: translateY(100vh) translateX(0) rotateZ(0deg);
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        transform: translateY(-100vh) translateX(100px) rotateZ(360deg);
        opacity: 0;
    }
}

/* Responsive 3D adjustments */
@media (max-width: 768px) {
    .hero-title {
        font-size: 2.5rem;
    }
    
    .floating-element {
        transform: scale(0.7);
    }
    
    .service-card:hover, .tech-card:hover {
        transform: translateZ(20px) scale(1.02);
    }
}

/* Loading Animation */
.loader-3d {
    width: 100px;
    height: 100px;
    position: relative;
    transform-style: preserve-3d;
    animation: rotate3D 2s linear infinite;
}

.loader-3d::before,
.loader-3d::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 3px solid transparent;
}

.loader-3d::before {
    border-top-color: #64748b;
    animation: rotate3D 1.5s linear infinite;
}

.loader-3d::after {
    border-bottom-color: #475569;
    animation: rotate3D 1s linear infinite reverse;
}

@keyframes rotate3D {
    0% {
        transform: rotateX(0deg) rotateY(0deg) rotateZ(0deg);
    }
    100% {
        transform: rotateX(360deg) rotateY(360deg) rotateZ(360deg);
    }
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 12px;
}

::-webkit-scrollbar-track {
    background: rgba(26, 32, 44, 0.9);
}

::-webkit-scrollbar-thumb {
    background: var(--gradient-primary);
    border-radius: 6px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--gradient-secondary);
}