* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-purple: #6B46C1;
    --primary-blue: #3B82F6;
    --primary-pink: #EC4899;
    --primary-cyan: #06B6D4;
    --dark-bg: #0F0C1F;
    --darker-bg: #0A0614;
    --text-light: #E2E8F0;
    --text-dim: #94A3B8;
    --accent-glow: #8B5CF6;
}

body {
    font-family: 'Arial', sans-serif;
    background: var(--dark-bg);
    color: var(--text-light);
    overflow-x: hidden;
    line-height: 1.6;
}

.cosmic-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -2;
    background: radial-gradient(ellipse at center, #1a0f2e 0%, #0a0612 70%);
}

.stars {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
}

.star {
    position: absolute;
    background: white;
    border-radius: 50%;
    animation: twinkle 2s infinite alternate;
}

@keyframes twinkle {
    0% { opacity: 0.3; transform: scale(1); }
    100% { opacity: 1; transform: scale(1.2); }
}

nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(15, 12, 31, 0.9);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(139, 92, 246, 0.3);
    z-index: 1000;
    padding: 1rem 0;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 2rem;
}

.logo {
    font-size: 1.5rem;
    font-weight: bold;
    background: linear-gradient(45deg, var(--primary-purple), var(--primary-cyan));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    text-decoration: none;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-item {
    position: relative;
    z-index: 1;
}

.nav-link {
    color: var(--text-light);
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-link:hover {
    background: rgba(139, 92, 246, 0.2);
    box-shadow: 0 0 20px rgba(139, 92, 246, 0.3);
}

.dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    background: rgba(15, 12, 31, 0.95);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(139, 92, 246, 0.3);
    border-radius: 12px;
    padding: 1rem 0;
    min-width: 200px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
}

.nav-item:hover .dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-item {
    padding: 0.7rem 1.5rem;
    color: var(--text-light);
    text-decoration: none;
    display: block;
    transition: all 0.3s ease;
}

.dropdown-item:hover {
    background: rgba(139, 92, 246, 0.2);
    color: var(--accent-glow);
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    color: var(--text-light);
    font-size: 1.5rem;
    cursor: pointer;
    z-index: 1001;
}


@media (max-width: 768px) {
    .nav-menu {
        position: fixed;
        top: 0;
        left: -100%; 
        width: 80%;
        max-width: 300px;
        height: 100vh;
        background: rgba(15, 12, 31, 0.98);
        backdrop-filter: blur(30px);
        flex-direction: column;
        padding: 5rem 0 2rem 0;
        transition: left 0.3s ease; 
        box-shadow: 5px 0 20px rgba(0, 0, 0, 0.5); 
        overflow-y: auto;
        gap: 0;
    }

    .nav-menu.active {
        left: 0;
    }

    .mobile-menu-btn {
        display: block;
        position: relative;
        z-index: 1002;
    }

    .nav-item {
        width: 100%;
        border-bottom: 1px solid rgba(139, 92, 246, 0.1);
    }

    .nav-link {
        padding: 1rem 2rem;
        justify-content: space-between;
        border-radius: 0;
        width: 100%;
        position: relative;
    }

    .nav-link:hover {
        background: rgba(139, 92, 246, 0.15);
        box-shadow: none;
    }

    .nav-item.has-dropdown .nav-link::after {
        content: '▼';
        font-size: 0.8rem;
        transition: transform 0.3s ease;
        color: var(--text-dim);
    }

    .nav-item.has-dropdown.active .nav-link::after {
        transform: rotate(180deg);
    }

    .dropdown {
        position: static;
        background: rgba(10, 6, 20, 0.9);
        border: none;
        border-radius: 0;
        padding: 0;
        min-width: auto;
        opacity: 1;
        visibility: visible;
        transform: none;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease;
    }

    .nav-item.has-dropdown.active .dropdown {
        max-height: 300px;
    }

    .dropdown-item {
        padding: 0.8rem 3rem;
        border-bottom: 1px solid rgba(139, 92, 246, 0.05);
        font-size: 0.9rem;
    }

    .dropdown-item:last-child {
        border-bottom: none;
    }

    .dropdown-item:hover {
        background: rgba(139, 92, 246, 0.1);
    }

    .nav-overlay {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh;
        background: rgba(0, 0, 0, 0.5);
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s ease;
        z-index: 999;
    }

    .nav-overlay.active {
        opacity: 1;
        visibility: visible;
    }
}

.hero {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero-content {
    max-width: 800px;
    padding: 0 2rem;
    z-index: 2;
}

.hero h1 {
    font-size: 4rem;
    margin-bottom: 1rem;
    background: linear-gradient(45deg, var(--primary-purple), var(--primary-cyan), var(--primary-pink));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: glow 3s ease-in-out infinite alternate;
}

@keyframes glow {
    0% { filter: brightness(1) drop-shadow(0 0 20px rgba(139, 92, 246, 0.5)); }
    100% { filter: brightness(1.2) drop-shadow(0 0 30px rgba(139, 92, 246, 0.8)); }
}

.hero p {
    font-size: 1.3rem;
    color: var(--text-dim);
    margin-bottom: 2rem;
}

.cta-button {
    display: inline-block;
    background: linear-gradient(45deg, var(--primary-purple), var(--primary-blue));
    color: white;
    padding: 1rem 2rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: bold;
    transition: all 0.3s ease;
    box-shadow: 0 10px 30px rgba(107, 70, 193, 0.4);
}

.cta-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 40px rgba(107, 70, 193, 0.6);
}

.floating-elements {
    position: absolute;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.floating-element {
    position: absolute;
    opacity: 0.1;
    animation: float 20s linear infinite;
}

@keyframes float {
    0% { transform: translateY(100vh) rotate(0deg); }
    100% { transform: translateY(-100px) rotate(360deg); }
}

.section {
    padding: 5rem 0;
    position: relative;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.section-title {
    font-size: 3rem;
    text-align: center;
    margin-bottom: 3rem;
    background: linear-gradient(45deg, var(--primary-blue), var(--primary-cyan));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.service-card {
    background: rgba(15, 12, 31, 0.8);
    border: 1px solid rgba(139, 92, 246, 0.3);
    border-radius: 20px;
    padding: 2rem;
    text-align: center;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.service-card:hover {
    transform: translateY(-10px);
    border-color: var(--accent-glow);
    box-shadow: 0 20px 40px rgba(139, 92, 246, 0.3);
}

.service-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    background: linear-gradient(45deg, var(--primary-purple), var(--primary-pink));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.service-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--text-light);
}

.service-card p {
    color: var(--text-dim);
}

.portfolio-projects {
    display: flex;
    flex-wrap: wrap;
    gap: 2.5rem;
    justify-content: center;
    align-items: stretch;
    margin-top: 2.5rem;
}

.project-item {
    background: rgba(15, 12, 31, 0.85);
    border: 1.5px solid rgba(139, 92, 246, 0.22);
    border-radius: 18px;
    box-shadow: 0 8px 32px rgba(139, 92, 246, 0.10);
    padding: 2.2rem 2rem 2rem 2rem;
    max-width: 500px;
    min-width: 320px;
    flex: 1 1 420px;
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: all 0.35s cubic-bezier(.4,2,.3,1);
    position: relative;
    text-align: center;
}

.project-item:hover {
    transform: translateY(-10px) scale(1.03);
    border-color: var(--accent-glow);
    box-shadow: 0 16px 40px rgba(139, 92, 246, 0.18);
}

.project-image-block {
    width: 170px;
    height: 170px;
    margin-bottom: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(circle, rgba(139,92,246,0.13) 0%, transparent 80%);
    border-radius: 50%;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(139,92,246,0.10);
    position: relative;
}

.project-image-block img {
    width: 140px;
    height: 140px;
    object-fit: contain;
    border-radius: 50%;
    background: var(--darker-bg);
    border: 2.5px solid rgba(139,92,246,0.18);
    box-shadow: 0 4px 16px rgba(139,92,246,0.13);
    transition: transform 0.3s cubic-bezier(.4,2,.3,1), box-shadow 0.3s;
    display: block;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.project-item:hover .project-image-block img {
    transform: translate(-50%, -50%) scale(1.08) rotate(-2deg);
    box-shadow: 0 8px 32px rgba(139,92,246,0.22);
}

.project-title {
    font-size: 1.35rem;
    font-weight: bold;
    margin: 0.7rem 0 0.8rem 0;
    background: linear-gradient(45deg, var(--primary-purple), var(--primary-cyan));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: 0.01em;
}

.project-desc {
    color: var(--text-dim);
    font-size: 1.05rem;
    line-height: 1.6;
    margin-bottom: 0;
    margin-top: 0;
    text-align: center;
}

.about-flex {
    display: flex;
    align-items: center;
    gap: 12rem;
    flex-wrap: wrap;
}

.about-image-block {
    position: relative;
    flex: 0 0 300px;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 220px;
    margin-bottom: 2rem;
}

.about-image {
    width: 460px;
    height: auto;
    border-radius: 18px;
    border: 2px solid rgba(139,92,246,0.3);
    box-shadow: 0 8px 32px rgba(139,92,246,0.18);
    position: relative;
    z-index: 2;
    background: var(--darker-bg);
}

.about-image-glow {
    position: absolute;
    top: 50%; left: 50%;
    width: 300px; height: 300px;
    background: radial-gradient(circle, rgba(139,92,246,0.18) 0%, transparent 70%);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    z-index: 1;
    pointer-events: none;
    filter: blur(2px);
}

.about-text {
    flex: 1 1 350px;
    min-width: 250px;
    font-size: 1.1rem;
    text-align: justify;
    background: rgba(15, 12, 31, 0.55);
    border-radius: 16px;
    padding: 2rem 2rem 2rem 2rem;
    box-shadow: 0 4px 24px rgba(139, 92, 246, 0.08);
}

.about-list {
    margin: 0 0 1.5rem 1.2rem;
    padding: 0;
    color: var(--text-light);
    list-style: none;
}

.about-list li {
    margin-bottom: 0.5rem;
    position: relative;
    padding-left: 0.2em;
    font-size: 1.05em;
    opacity: 0.95;
}

.about-note {
    background: rgba(139,92,246,0.08);
    border-left: 4px solid var(--primary-purple);
    border-radius: 8px;
    padding: 0.8rem 1.2rem;
    font-size: 0.98em;
    color: var(--text-dim);
    margin-top: 1rem;
}

.contact-section {
    padding: 5rem 0;
}

.contact-flex {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
    align-items: flex-start;
}

.contact-info {
    flex: 1 1 300px;
    min-width: 260px;
}

.contact-desc {
    color: var(--text-dim);
    margin-bottom: 1.5rem;
    text-align: center;
}

.contact-form {
    flex: 1 1 340px;
    min-width: 260px;
    background: rgba(30,30,60,0.7);
    border-radius: 1.2em;
    box-shadow: 0 4px 24px 0 rgba(139,92,246,0.15);
    padding: 2rem 1.5rem;
}

.form-group {
    margin-bottom: 1.2rem;
}

.form-group input, .form-group textarea {
    width: 100%;
    padding: 0.9em 1em;
    border-radius: 0.7em;
    border: none;
    background: rgba(255,255,255,0.07);
    color: var(--text-light);
    font-size: 1rem;
    box-shadow: 0 2px 8px 0 rgba(139,92,246,0.07);
}

.form-group textarea {
    resize: vertical;
}

footer {
    background: var(--darker-bg);
    padding: 3rem 0;
    text-align: center;
    border-top: 1px solid rgba(139, 92, 246, 0.3);
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 2rem;
}

.social-links a {
    color: var(--text-light);
    font-size: 1.5rem;
    transition: all 0.3s ease;
}

.social-links a:hover {
    transform: translateY(-3px);
}

.fab.fa-youtube {color: #FF0000;}
.fab.fa-instagram {color: #C13584;}
.fab.fa-telegram-plane {color: #0088cc;}
.fab.fa-discord {color: #7289da;}

.nebula-effect {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(139, 92, 246, 0.3) 0%, transparent 70%);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    animation: pulse 4s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: translate(-50%, -50%) scale(1); opacity: 0.3; }
    50% { transform: translate(-50%, -50%) scale(1.2); opacity: 0.6; }
}

.scroll-indicator {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    color: var(--text-dim);
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateX(-50%) translateY(0); }
    40% { transform: translateX(-50%) translateY(-10px); }
    60% { transform: translateX(-50%) translateY(-5px); }
}

@media (max-width: 900px) {
    .about-flex {
        flex-direction: column;
        gap: 2rem;
    }
    .about-image-block {
        margin-bottom: 0;
    }
    .about-text {
        padding: 0.5rem 0.5rem 0.5rem 0.5rem;
    }
    .about-image {
        width: 300px;
    }
    .about-image-glow {
        width: 230px;
        height: 230px;
    }
}

@media (max-width: 768px) {
    .hero h1 {
        font-size: 2.5rem;
    }
    .hero p {
        font-size: 1.1rem;
    }
    .section-title {
        font-size: 2rem;
    }
    .services-grid {
        grid-template-columns: 1fr;
    }
    .nav-container {
        padding: 0 1rem;
    }
    .container {
        padding: 0 1rem;
    }
    .portfolio-projects {
        flex-direction: column;
        gap: 2rem;
        align-items: center;
    }
    .project-item {
        max-width: 98vw;
        min-width: 0;
        padding: 1.5rem 1rem 1.5rem 1rem;
    }
}

