* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background: linear-gradient(135deg, #0f0c29 0%, #1a1a3e 50%, #24243e 100%);
    color: #e2e2e8;
    line-height: 1.5;
    min-height: 100vh;
    overflow-x: hidden;
}

body.dark {
    background: linear-gradient(135deg, #0a0a15 0%, #14142b 50%, #1a1a35 100%);
}

/* ========== КАСТОМНЫЙ КУРСОР ========== */
@media (pointer: fine) and (hover: hover) {
    .cursor {
        width: 8px;
        height: 8px;
        background: #9aa8d9;
        border-radius: 50%;
        position: fixed;
        pointer-events: none;
        z-index: 9999;
    }
    
    .cursor-follower {
        width: 40px;
        height: 40px;
        border: 2px solid rgba(154, 168, 217, 0.5);
        border-radius: 50%;
        position: fixed;
        pointer-events: none;
        z-index: 9998;
        transition: transform 0.2s, width 0.2s, height 0.2s;
    }
    
    body {
        cursor: none;
    }
}

/* ========== БУРГЕР-МЕНЮ ========== */
.burger-menu {
    display: none;
    position: fixed;
    top: 20px;
    right: 20px;
    width: 45px;
    height: 45px;
    background: rgba(30, 35, 50, 0.9);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    cursor: pointer;
    z-index: 200;
}

.burger-menu span {
    width: 25px;
    height: 2px;
    background: #e2e2e8;
    transition: 0.3s;
}

.burger-menu.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.burger-menu.active span:nth-child(2) {
    opacity: 0;
}

.burger-menu.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* ========== БОКОВАЯ ПАНЕЛЬ ========== */
.side-nav {
    position: fixed;
    left: 0;
    top: 0;
    height: 100vh;
    width: 80px;
    background: rgba(20, 22, 45, 0.9);
    backdrop-filter: blur(12px);
    border-right: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    padding: 30px 0;
    z-index: 100;
    transition: transform 0.3s ease;
}

.nav-logo {
    font-size: 24px;
    font-weight: 700;
    color: #9aa8d9;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(154, 168, 217, 0.1);
    border-radius: 50%;
}

.nav-menu {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.nav-link {
    writing-mode: vertical-rl;
    text-orientation: mixed;
    transform: rotate(180deg);
    font-size: 13px;
    font-weight: 500;
    color: #a0a8c0;
    text-decoration: none;
    letter-spacing: 2px;
    transition: color 0.3s;
}

.nav-link:hover, .nav-link.active {
    color: #9aa8d9;
}

.nav-contacts {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.nav-contacts a {
    color: #a0a8c0;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    transition: color 0.3s;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding-left: 100px;
    padding-right: 20px;
    position: relative;
    z-index: 2;
}

/* ========== HERO ========== */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 50px;
    padding: 60px 0;
}

.hero-content {
    flex: 1;
}

.hero-3d {
    flex: 1;
    height: 450px;
    position: relative;
}

#techSphere {
    width: 100%;
    height: 100%;
}

.hero h1 {
    font-size: 3rem;
    margin-bottom: 16px;
}

.highlight {
    color: #9aa8d9;
    text-shadow: 0 0 20px rgba(154, 168, 217, 0.3);
}

.subtitle {
    font-size: 1.1rem;
    opacity: 0.7;
    margin-bottom: 24px;
}

.badges {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin: 24px 0;
}

.badges span {
    padding: 8px 20px;
    border-radius: 40px;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* ========== СЧЁТЧИК ========== */
.counter-section {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
    padding: 40px;
    background: rgba(30, 35, 50, 0.4);
    backdrop-filter: blur(12px);
    border-radius: 28px;
    margin: 40px 0;
    text-align: center;
}

.counter-number {
    font-size: 2.8rem;
    font-weight: 700;
    color: #9aa8d9;
}

.counter-label {
    font-size: 0.85rem;
    opacity: 0.7;
    margin-top: 8px;
}

/* ========== ОБЩИЕ СЕКЦИИ ========== */
.services, .portfolio-section, .order-form, .reviews-section, .add-review {
    background: rgba(30, 35, 50, 0.4);
    backdrop-filter: blur(12px);
    border-radius: 28px;
    padding: 40px;
    margin: 40px 0;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

h2 {
    font-size: 2rem;
    text-align: center;
    margin-bottom: 32px;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
}

.service-card {
    padding: 28px;
    background: rgba(40, 45, 65, 0.5);
    border-radius: 20px;
    text-align: center;
    transition: transform 0.3s;
}

.service-card:hover {
    transform: translateY(-5px);
}

.service-icon {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 16px;
    color: #9aa8d9;
}

/* ========== ОБЩИЙ РЕЙТИНГ ========== */
.rating-summary {
    display: flex;
    gap: 40px;
    padding: 30px;
    background: rgba(40, 45, 65, 0.3);
    border-radius: 24px;
    margin-bottom: 40px;
    flex-wrap: wrap;
}

.rating-average {
    text-align: center;
    min-width: 150px;
}

.rating-number {
    font-size: 4rem;
    font-weight: 700;
    color: #9aa8d9;
    line-height: 1;
}

.rating-stars {
    font-size: 1.5rem;
    color: #ffc107;
    margin: 10px 0;
}

.rating-count {
    font-size: 0.9rem;
    opacity: 0.7;
}

.rating-bars {
    flex: 1;
    min-width: 200px;
}

.rating-bar-item {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 10px;
}

.rating-bar-label {
    width: 45px;
    font-size: 0.85rem;
}

.rating-bar-bg {
    flex: 1;
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    overflow: hidden;
}

.rating-bar-fill {
    height: 100%;
    background: #ffc107;
    border-radius: 10px;
    transition: width 0.5s ease;
}

.rating-bar-count {
    width: 30px;
    font-size: 0.8rem;
    text-align: right;
    opacity: 0.7;
}

/* ========== ПОРТФОЛИО КАРУСЕЛЬ (ИСПРАВЛЕНА) ========== */
.portfolio-carousel-container, .reviews-carousel-container {
    display: flex;
    align-items: center;
    gap: 16px;
}

.portfolio-carousel, .reviews-carousel {
    overflow: hidden;
    flex: 1;
}

.portfolio-track, .reviews-track {
    display: flex;
    transition: transform 0.4s ease;
    gap: 28px;
}

.portfolio-item {
    flex-shrink: 0;
    width: 100%;
    padding: 20px;
    background: rgba(40, 45, 65, 0.5);
    border-radius: 20px;
    cursor: pointer;
    transition: transform 0.3s;
}

.portfolio-item:hover {
    transform: translateY(-5px);
}

.portfolio-image-wrapper {
    width: 100%;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    border-radius: 16px;
    margin-bottom: 16px;
    background: rgba(20, 22, 35, 0.6);
}

.portfolio-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.portfolio-item:hover .portfolio-img {
    transform: scale(1.05);
}

.portfolio-item h3 {
    font-size: 1.1rem;
    margin-bottom: 8px;
}

.portfolio-item p {
    font-size: 0.85rem;
    opacity: 0.7;
}

/* ========== ОТЗЫВЫ ========== */
.review-card {
    flex-shrink: 0;
    width: 100%;
    padding: 24px;
    background: rgba(40, 45, 65, 0.5);
    border-radius: 20px;
}

.stars {
    font-size: 1.2rem;
    color: #ffc107;
    margin-bottom: 12px;
}

.review-text {
    font-style: italic;
    margin: 12px 0;
    line-height: 1.5;
    opacity: 0.85;
}

/* ========== КНОПКИ КАРУСЕЛИ ========== */
.carousel-btn {
    background: rgba(58, 74, 110, 0.8);
    border: none;
    color: white;
    font-size: 28px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    cursor: pointer;
    transition: background 0.2s;
    flex-shrink: 0;
}

.carousel-btn:hover {
    background: rgba(80, 100, 140, 0.9);
}

.portfolio-dots, .reviews-dots {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 24px;
}

.dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(200, 210, 230, 0.3);
    cursor: pointer;
    transition: all 0.3s;
}

.dot.active {
    background: #9aa8d9;
    width: 24px;
    border-radius: 10px;
}

/* ========== МОДАЛЬНОЕ ОКНО ========== */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    align-items: center;
    justify-content: center;
    flex-direction: column;
}

.modal-content {
    max-width: 90%;
    max-height: 70%;
    border-radius: 16px;
    object-fit: contain;
}

.modal-close {
    position: absolute;
    top: 20px;
    right: 35px;
    color: #fff;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    transition: 0.3s;
}

.modal-close:hover {
    color: #9aa8d9;
}

.modal-caption {
    text-align: center;
    margin-top: 20px;
    padding: 16px;
    background: rgba(0, 0, 0, 0.6);
    border-radius: 16px;
    max-width: 80%;
}

.modal-caption h3 {
    color: #9aa8d9;
    margin-bottom: 8px;
}

/* ========== ФОРМЫ ========== */
input, select, textarea {
    width: 100%;
    padding: 14px 18px;
    margin: 10px 0;
    border-radius: 28px;
    background: rgba(20, 22, 35, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #e2e2e8;
    font-family: inherit;
}

input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: rgba(154, 168, 217, 0.5);
}

.btn {
    padding: 12px 28px;
    border-radius: 40px;
    border: none;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s;
}

.btn:hover {
    transform: translateY(-2px);
}

.tg-btn, .submit-btn, .review-btn {
    background: #3a4a6e;
    color: white;
}

.channel-btn {
    background: #2d3a5e;
    color: white;
}

.cta-buttons {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.form-message {
    margin-top: 16px;
    padding: 12px;
    border-radius: 28px;
    text-align: center;
}

footer {
    text-align: center;
    padding: 30px;
    background: rgba(20, 22, 35, 0.4);
    border-radius: 24px;
    margin: 40px 0 20px;
}

footer a {
    color: #9aa8d9;
    text-decoration: none;
}

/* ========== АНИМАЦИИ ========== */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease;
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* ========== АДАПТИВ ========== */
@media (max-width: 1024px) {
    .portfolio-track .portfolio-item {
        min-width: calc(50% - 14px);
    }
    .reviews-track .review-card {
        min-width: calc(50% - 14px);
    }
}

@media (max-width: 768px) {
    .burger-menu {
        display: flex;
    }
    
    .side-nav {
        transform: translateX(-100%);
        width: 70px;
    }
    
    .side-nav.active {
        transform: translateX(0);
    }
    
    .container {
        padding-left: 16px;
        padding-right: 16px;
    }
    
    .hero {
        flex-direction: column;
        text-align: center;
        padding: 30px 0;
        min-height: auto;
    }
    
    .hero h1 {
        font-size: 2rem;
    }
    
    .hero-3d {
        height: 300px;
        width: 100%;
    }
    
    .counter-section {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
        padding: 25px;
    }
    
    .counter-number {
        font-size: 2rem;
    }
    
    .services, .portfolio-section, .order-form, .reviews-section, .add-review {
        padding: 24px;
        margin: 24px 0;
    }
    
    h2 {
        font-size: 1.5rem;
    }
    
    .portfolio-track .portfolio-item,
    .reviews-track .review-card {
        min-width: 100%;
    }
    
    .rating-summary {
        flex-direction: column;
        align-items: center;
        gap: 20px;
    }
    
    .rating-bars {
        width: 100%;
    }
    
    .carousel-btn {
        width: 36px;
        height: 36px;
        font-size: 24px;
    }
    
    .portfolio-image-wrapper {
        aspect-ratio: 16 / 9;
    }
    
    .cta-buttons {
        flex-direction: column;
    }
    
    .btn {
        width: 100%;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .hero-3d {
        height: 250px;
    }
    
    .counter-number {
        font-size: 1.5rem;
    }
    
    .rating-number {
        font-size: 3rem;
    }
    
    .modal-close {
        font-size: 30px;
        top: 10px;
        right: 20px;
    }
}