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

:root {
    --primary-color: #6366f1;
    --secondary-color: #8b5cf6;
    --accent-color: #ec4899;
    --dark-bg: #0a0a0f;
    --card-bg: rgba(17, 17, 27, 0.85);
    --text-primary: #ffffff;
    --text-secondary: #b8b8c0;
    --glow-color: #6366f1;
}

html {
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none;
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
    background-color: #0a0a14;
    min-height: 100%;
    -webkit-overflow-scrolling: touch; /* iOS smooth scrolling */
}

/* Mobile: Simpler scrolling */
@media (max-width: 768px) {
    html {
        scroll-behavior: auto; /* Disable smooth scroll on mobile for performance */
    }
}

body {
    font-family: 'Inter', sans-serif;
    background: #0a0a14 url('images/background.gif') center center fixed;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    color: var(--text-primary);
    overflow-x: hidden;
    line-height: 1.6;
    position: relative;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 50% 50%, rgba(10, 10, 20, 0.7), rgba(5, 5, 10, 0.9));
    z-index: -1;
    pointer-events: none;
}

/* Mobile: Static background for performance */
@media (max-width: 768px) {
    html {
        background: #0a0a14 !important;
        background-color: #0a0a14 !important;
    }
    
    body {
        background: linear-gradient(135deg, #0a0a14 0%, #14142e 50%, #0f0f1a 100%) !important;
        background-color: #0a0a14 !important;
        background-image: linear-gradient(135deg, #0a0a14 0%, #14142e 50%, #0f0f1a 100%) !important;
        background-attachment: fixed !important;
        min-height: 100vh !important;
    }
    
    body::before {
        background: 
            radial-gradient(circle at 30% 20%, rgba(99, 102, 241, 0.2), transparent 30%),
            radial-gradient(circle at 70% 80%, rgba(139, 92, 246, 0.2), transparent 30%) !important;
    }
    
    .hero,
    section {
        background: transparent !important;
    }
}

h1, h2, h3 {
    font-family: 'Orbitron', sans-serif;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Background overlay for better readability */
.stars, .stars2, .stars3 {
    position: fixed;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    will-change: auto;
    transform: translateZ(0);
    backface-visibility: hidden;
    background-color: transparent;
}

/* Mobile: Reduce stars for performance */
@media (max-width: 768px) {
    .stars, .stars2, .stars3 {
        background-color: #0a0a14;
    }
    
    .stars2, .stars3 {
        display: none;
    }
}

/* Navbar */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(10, 10, 15, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(99, 102, 241, 0.2);
    padding: 1rem 0;
    z-index: 1000;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo img {
    height: 50px;
    filter: drop-shadow(0 0 10px rgba(99, 102, 241, 0.5));
    transition: transform 0.3s ease;
}

.logo img:hover {
    transform: scale(1.05);
}

.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
    z-index: 1002;
}

.mobile-menu-toggle span {
    width: 25px;
    height: 3px;
    background: var(--primary-color);
    border-radius: 3px;
    transition: all 0.3s ease;
}

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

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

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

.mobile-menu-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 999;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.mobile-menu-overlay.active {
    display: block;
    opacity: 1;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
    align-items: center;
}

.nav-menu a {
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
}

.nav-menu a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
    transition: width 0.3s ease;
}

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

.nav-menu a:hover {
    color: var(--primary-color);
}

/* Hero Section */
.hero {
    position: relative;
    min-height: 100vh;
    min-height: 100dvh; /* Dynamic viewport height for mobile browsers */
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 150px 0 100px;
    overflow: hidden;
}

.hero-content {
    text-align: center;
    z-index: 10;
    position: relative;
}

.hero h1 {
    font-size: clamp(3rem, 8vw, 7rem);
    font-weight: 900;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: glow 2s ease-in-out infinite alternate;
}

@keyframes glow {
    from {
        filter: drop-shadow(0 0 20px rgba(99, 102, 241, 0.5));
    }
    to {
        filter: drop-shadow(0 0 40px rgba(139, 92, 246, 0.8));
    }
}

.glitch {
    position: relative;
}

.hero-subtitle {
    font-size: clamp(1.2rem, 3vw, 1.8rem);
    color: var(--text-secondary);
    margin-bottom: 1rem;
    font-family: 'Orbitron', sans-serif;
}

.hero-description {
    font-size: clamp(1rem, 2vw, 1.2rem);
    color: var(--text-secondary);
    max-width: 700px;
    margin: 0 auto 2rem;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.btn-primary, .btn-secondary {
    padding: 0.8rem 2rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    font-size: 1rem;
    border: none;
    cursor: pointer;
    font-family: 'Inter', sans-serif;
    min-height: 48px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    touch-action: manipulation;
    -webkit-user-select: none;
    user-select: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    box-shadow: 0 10px 30px rgba(99, 102, 241, 0.3);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 40px rgba(99, 102, 241, 0.5);
    background: linear-gradient(135deg, #7c7ff6, #9d6ef9);
}

.btn-secondary {
    background: transparent;
    color: var(--text-primary);
    border: 2px solid var(--primary-color);
}

.btn-secondary:hover {
    background: rgba(99, 102, 241, 0.15);
    transform: translateY(-3px);
    border-color: var(--secondary-color);
}

.cta-button {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    padding: 0.7rem 1.5rem;
    border-radius: 50px;
}

.cta-button:hover {
    background: linear-gradient(135deg, #7c7ff6, #9d6ef9);
}

/* Saturn Planet Animation */
.planet-container {
    position: absolute;
    right: -150px;
    top: 50%;
    transform: translateY(-50%);
    width: 700px;
    height: 700px;
    z-index: 1;
    opacity: 0.9;
    animation: rotatePlanet 60s linear infinite;
    will-change: transform;
    backface-visibility: hidden;
    transform-style: preserve-3d;
}

@media (max-width: 768px) {
    .planet-container {
        animation: rotatePlanet 90s linear infinite;
        will-change: auto;
    }
    
    @keyframes rotatePlanet {
        0% {
            transform: translateY(-50%) rotate(0deg);
        }
        100% {
            transform: translateY(-50%) rotate(360deg);
        }
    }
}

.planet {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: radial-gradient(circle at 35% 35%, #a78bfa, #8b5cf6 30%, #6366f1 60%, #1e1b4b);
    box-shadow: 
        0 0 120px rgba(99, 102, 241, 0.5),
        0 0 200px rgba(139, 92, 246, 0.3),
        inset -60px -60px 120px rgba(0, 0, 0, 0.6),
        inset 30px 30px 60px rgba(167, 139, 250, 0.4);
    animation: planetGlow 4s ease-in-out infinite alternate;
    position: relative;
}

/* Saturn Ring */
.planet::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(-20deg);
    width: 160%;
    height: 35%;
    border-radius: 50%;
    border: 4px solid rgba(255, 255, 255, 0.15);
    box-shadow: 
        0 0 40px rgba(99, 102, 241, 0.6),
        inset 0 0 30px rgba(139, 92, 246, 0.3),
        0 10px 30px rgba(0, 0, 0, 0.5);
    background: linear-gradient(90deg, 
        transparent 0%, 
        rgba(139, 92, 246, 0.1) 30%, 
        rgba(99, 102, 241, 0.15) 50%, 
        rgba(139, 92, 246, 0.1) 70%, 
        transparent 100%
    );
}

/* Saturn Ring Shadow */
.planet::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(-20deg);
    width: 160%;
    height: 8%;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.3);
    filter: blur(8px);
    z-index: -1;
}

/* Small Moon/Satellite */
.planet-container::before {
    content: '';
    position: absolute;
    top: 15%;
    right: 10%;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: radial-gradient(circle at 40% 40%, #d8b4fe, #a78bfa 50%, #6366f1);
    box-shadow: 
        0 0 30px rgba(139, 92, 246, 0.6),
        inset -10px -10px 20px rgba(0, 0, 0, 0.4);
    animation: orbitMoon 15s linear infinite;
}

/* Distant Stars around planet */
.planet-container::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(2px 2px at 20% 30%, white, transparent),
        radial-gradient(1px 1px at 80% 20%, white, transparent),
        radial-gradient(1.5px 1.5px at 70% 70%, rgba(99, 102, 241, 0.8), transparent),
        radial-gradient(1px 1px at 30% 80%, white, transparent),
        radial-gradient(2px 2px at 90% 60%, rgba(167, 139, 250, 0.8), transparent);
    background-size: 100% 100%;
    animation: twinkle 3s ease-in-out infinite;
    pointer-events: none;
}

@keyframes rotatePlanet {
    0% {
        transform: translateY(-50%) rotate(0deg) translateZ(0);
    }
    100% {
        transform: translateY(-50%) rotate(360deg) translateZ(0);
    }
}

@keyframes planetGlow {
    0% {
        box-shadow: 
            0 0 120px rgba(99, 102, 241, 0.5),
            0 0 200px rgba(139, 92, 246, 0.3),
            inset -60px -60px 120px rgba(0, 0, 0, 0.6),
            inset 30px 30px 60px rgba(167, 139, 250, 0.4);
    }
    100% {
        box-shadow: 
            0 0 140px rgba(99, 102, 241, 0.7),
            0 0 220px rgba(139, 92, 246, 0.4),
            inset -60px -60px 120px rgba(0, 0, 0, 0.6),
            inset 30px 30px 60px rgba(167, 139, 250, 0.5);
    }
}

@keyframes orbitMoon {
    0% {
        transform: rotate(0deg) translateX(200px) rotate(0deg);
    }
    100% {
        transform: rotate(360deg) translateX(200px) rotate(-360deg);
    }
}

@keyframes twinkle {
    0%, 100% {
        opacity: 0.5;
    }
    50% {
        opacity: 1;
    }
}

/* Services Section */
.services {
    padding: 100px 0;
    position: relative;
    z-index: 10;
}

.section-title {
    font-size: clamp(2.5rem, 5vw, 4rem);
    text-align: center;
    margin-bottom: 4rem;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

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

.service-card {
    background: var(--card-bg);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(99, 102, 241, 0.2);
    border-radius: 20px;
    padding: 2.5rem;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.service-card:hover::before {
    transform: scaleX(1);
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 60px rgba(99, 102, 241, 0.3);
    border-color: rgba(99, 102, 241, 0.5);
}

.service-icon {
    font-size: 4rem;
    margin-bottom: 1.5rem;
    filter: drop-shadow(0 0 20px rgba(99, 102, 241, 0.5));
}

.service-card h3 {
    font-size: 1.8rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.service-card p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    line-height: 1.8;
}

.service-features {
    list-style: none;
}

.service-features li {
    padding: 0.5rem 0;
    color: var(--text-secondary);
    position: relative;
    padding-left: 1.5rem;
}

.service-features li::before {
    content: '→';
    position: absolute;
    left: 0;
    color: var(--primary-color);
}

/* Features Section */
.features {
    padding: 100px 0;
    background: rgba(99, 102, 241, 0.02);
    position: relative;
    z-index: 10;
}

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

.feature-item {
    text-align: center;
    padding: 2rem;
    background: var(--card-bg);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(99, 102, 241, 0.2);
    border-radius: 15px;
    transition: all 0.3s ease;
}

.feature-item:hover {
    transform: translateY(-5px);
    border-color: var(--primary-color);
}

.feature-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.feature-item h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.feature-item p {
    color: var(--text-secondary);
}

/* Portfolio Section */
.portfolio {
    padding: 100px 0;
    position: relative;
    z-index: 10;
    background: rgba(99, 102, 241, 0.02);
}

.portfolio-subtitle {
    text-align: center;
    color: var(--text-secondary);
    font-size: 1.2rem;
    margin-bottom: 3rem;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin-top: 3rem;
    align-items: stretch;
}

@media (max-width: 1200px) {
    .portfolio-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.portfolio-item {
    background: var(--card-bg);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(99, 102, 241, 0.2);
    border-radius: 20px;
    overflow: hidden;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.portfolio-item:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 60px rgba(99, 102, 241, 0.3);
    border-color: rgba(99, 102, 241, 0.5);
}

.portfolio-preview {
    position: relative;
    width: 100%;
    height: 210px;
    overflow: hidden;
    background: #0a0a0f;
    flex-shrink: 0;
}

.portfolio-preview iframe {
    width: 1920px;
    height: 1080px;
    border: none;
    pointer-events: none;
    transform: scale(0.195);
    transform-origin: center top;
    position: absolute;
    top: 0;
    left: 50%;
    margin-left: -960px;
    display: block;
}

.portfolio-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.95), rgba(139, 92, 246, 0.95));
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: all 0.3s ease;
    z-index: 10;
}

.portfolio-item:hover .portfolio-overlay {
    opacity: 1;
}

.portfolio-overlay h3 {
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
    color: white;
}

.portfolio-overlay p {
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 1.5rem;
}

.portfolio-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.8rem 1.5rem;
    background: white;
    color: var(--primary-color);
    text-decoration: none;
    border-radius: 50px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.portfolio-link:hover {
    transform: scale(1.05);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.portfolio-info {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    flex: 1;
    justify-content: space-between;
}

.portfolio-info h3 {
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
    flex-shrink: 0;
}

.portfolio-tags {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-top: auto;
    align-items: flex-end;
}

.tag {
    padding: 0.4rem 1rem;
    background: rgba(99, 102, 241, 0.1);
    border: 1px solid rgba(99, 102, 241, 0.3);
    border-radius: 20px;
    font-size: 0.85rem;
    color: var(--primary-color);
    font-weight: 500;
}

/* Tech Stack Section */
.tech-section {
    padding: 100px 0;
    position: relative;
    z-index: 10;
}

.tech-stack {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    justify-content: center;
}

.tech-item {
    background: var(--card-bg);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(99, 102, 241, 0.2);
    padding: 1rem 2rem;
    border-radius: 50px;
    font-weight: 600;
    font-family: 'Orbitron', sans-serif;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.tech-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    opacity: 0;
    transition: opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 50px;
    z-index: -1;
}

.tech-item:hover::before {
    opacity: 1;
}

.tech-item:hover {
    transform: scale(1.05);
    box-shadow: 0 10px 30px rgba(99, 102, 241, 0.4);
    color: white;
}

/* Contact Section */
.contact {
    padding: 100px 0;
    position: relative;
    z-index: 10;
}

.contact-subtitle {
    text-align: center;
    color: var(--text-secondary);
    font-size: 1.2rem;
    margin-bottom: 3rem;
}

.contact-form {
    max-width: 600px;
    margin: 0 auto;
    background: var(--card-bg);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(99, 102, 241, 0.2);
    border-radius: 20px;
    padding: 3rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 1rem;
    background: rgba(17, 17, 27, 0.5);
    border: 1px solid rgba(99, 102, 241, 0.3);
    border-radius: 10px;
    color: var(--text-primary);
    font-size: 1rem;
    font-family: 'Inter', sans-serif;
    transition: all 0.3s ease;
    min-height: 48px;
    touch-action: manipulation;
    -webkit-appearance: none;
    appearance: none;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 20px rgba(99, 102, 241, 0.2);
}

.form-group textarea {
    resize: vertical;
}

.contact-form button {
    width: 100%;
}

/* Footer */
.footer {
    background: rgba(10, 10, 15, 0.9);
    border-top: 1px solid rgba(99, 102, 241, 0.2);
    padding: 4rem 0 2rem;
    position: relative;
    z-index: 10;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 3rem;
    margin-bottom: 3rem;
}

.footer-logo img {
    height: 60px;
    margin-bottom: 1rem;
}

.footer-logo p {
    color: var(--text-secondary);
}

.footer-links h4,
.footer-contact h4 {
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.footer-links ul {
    list-style: none;
}

.footer-links li {
    margin-bottom: 0.5rem;
}

.footer-links a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: var(--primary-color);
}

.footer-contact p {
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.footer-contact .whatsapp-contact {
    color: #25D366;
    display: flex;
    align-items: center;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
}

.footer-contact .whatsapp-contact:hover {
    color: #20BA5A;
    transform: translateX(5px);
}

.footer-contact .whatsapp-contact svg {
    flex-shrink: 0;
}

.footer-contact .instagram-contact {
    color: #E4405F;
    display: flex;
    align-items: center;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
    margin-top: 0.5rem;
}

.footer-contact .instagram-contact:hover {
    color: #D6295B;
    transform: translateX(5px);
}

.footer-contact .instagram-contact svg {
    flex-shrink: 0;
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(99, 102, 241, 0.1);
    color: var(--text-secondary);
}

/* Scroll to Top Button */
.scroll-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border: none;
    border-radius: 50%;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 5px 20px rgba(99, 102, 241, 0.4);
    opacity: 0;
    visibility: hidden;
    transform: translateY(100px);
    transition: all 0.3s ease;
    z-index: 999;
}

.scroll-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.scroll-to-top:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(99, 102, 241, 0.6);
}

.scroll-to-top svg {
    width: 24px;
    height: 24px;
    animation: bounceUp 1.5s ease-in-out infinite;
}

@keyframes bounceUp {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-5px);
    }
}

/* WhatsApp Button */
.whatsapp-button {
    position: fixed;
    bottom: 100px;
    right: 30px;
    width: 60px;
    height: 60px;
    background: #25D366;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 5px 25px rgba(37, 211, 102, 0.5);
    z-index: 999;
    transition: all 0.3s ease;
    text-decoration: none;
    color: white;
}

.whatsapp-button:hover {
    transform: scale(1.1);
    box-shadow: 0 10px 35px rgba(37, 211, 102, 0.7);
    background: #20BA5A;
}

.whatsapp-button svg {
    width: 32px;
    height: 32px;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
}

/* Responsive */
@media (max-width: 1024px) {
    .container {
        padding: 0 2rem;
    }
    
    .hero h1 {
        font-size: 3.5rem;
    }
    
    .services-grid,
    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .mobile-menu-toggle {
        display: flex;
    }
    
    .nav-menu {
        position: fixed;
        top: 0;
        right: -100%;
        width: 280px;
        height: 100vh;
        background: linear-gradient(135deg, rgba(10, 10, 20, 0.98), rgba(20, 20, 40, 0.98));
        backdrop-filter: blur(20px);
        flex-direction: column;
        padding: 80px 2rem 2rem;
        gap: 0;
        z-index: 1000;
        transition: right 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        box-shadow: -5px 0 30px rgba(0, 0, 0, 0.5);
        border-left: 1px solid rgba(99, 102, 241, 0.2);
    }
    
    .nav-menu.active {
        right: 0;
    }
    
    .nav-menu li {
        width: 100%;
        padding: 0;
        margin: 0;
        border-bottom: 1px solid rgba(99, 102, 241, 0.1);
    }
    
    .nav-menu li:last-child {
        border-bottom: none;
        margin-top: 1rem;
    }
    
    .nav-menu a {
        display: block;
        padding: 1.2rem 1rem;
        font-size: 1.1rem;
        transition: all 0.3s ease;
    }
    
    .nav-menu a:hover {
        background: rgba(99, 102, 241, 0.1);
        padding-left: 1.5rem;
    }
    
    .nav-menu .cta-button {
        margin: 1rem 0;
        padding: 1rem 2rem;
        text-align: center;
        border-radius: 50px;
    }
    
    .planet-container {
        width: 500px;
        height: 500px;
        right: -200px;
        opacity: 0.7;
    }
    
    .planet-container::before {
        width: 40px;
        height: 40px;
    }
    
    .hero {
        min-height: 100vh;
        padding: 120px 0 60px;
    }
    
    .hero h1 {
        font-size: 2.8rem;
        line-height: 1.2;
    }
    
    .hero-subtitle {
        font-size: 1.3rem;
    }
    
    .hero-description {
        font-size: 1rem;
    }
    
    .services-grid,
    .features-grid,
    .portfolio-grid {
        grid-template-columns: 1fr;
    }
    
    .portfolio-preview {
        height: 250px;
    }
    
    .portfolio-preview iframe {
        transform: scale(0.18);
    }
    
    .whatsapp-button {
        width: 55px;
        height: 55px;
        bottom: 90px;
        right: 25px;
    }
    
    .whatsapp-button svg {
        width: 28px;
        height: 28px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 1.5rem;
    }
    
    .nav-menu {
        width: 100%;
        right: -100%;
    }
    
    .planet-container {
        width: 300px;
        height: 300px;
        right: -150px;
        opacity: 0.3;
    }
    
    .planet-container::before {
        width: 25px;
        height: 25px;
    }
    
    .hero h1 {
        font-size: 2.2rem;
    }
    
    .hero-subtitle {
        font-size: 1.1rem;
    }
    
    .hero-description {
        font-size: 0.95rem;
    }
    
    .hero-buttons {
        flex-direction: column;
        gap: 1rem;
    }
    
    .btn-primary,
    .btn-secondary {
        width: 100%;
        padding: 1rem 2rem;
        font-size: 1rem;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .service-card,
    .feature-item {
        padding: 2rem 1.5rem;
    }
    
    .service-icon,
    .feature-icon {
        font-size: 2.5rem;
    }
    
    .portfolio-preview {
        height: 200px;
    }
    
    .portfolio-preview iframe {
        transform: scale(0.15);
    }
    
    .contact-form input,
    .contact-form select,
    .contact-form textarea {
        font-size: 1rem;
        padding: 1rem;
    }
    
    .whatsapp-button {
        width: 50px;
        height: 50px;
        bottom: 80px;
        right: 20px;
    }
    
    .whatsapp-button svg {
        width: 26px;
        height: 26px;
    }
    
    .scroll-to-top {
        width: 45px;
        height: 45px;
        bottom: 20px;
        right: 20px;
    }
    
    .footer-content {
        flex-direction: column;
        gap: 2rem;
        text-align: center;
    }
}

/* Reduced Motion - Accessibility & Performance */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
    
    .planet-container,
    .stars,
    .stars2,
    .stars3 {
        animation: none !important;
    }
}

/* Performance optimizations */
@media (max-width: 768px) {
    * {
        -webkit-font-smoothing: antialiased;
        -moz-osx-font-smoothing: grayscale;
    }
    
    /* Hide portfolio section on mobile - iframes cause crashes */
    #portfolio,
    .portfolio {
        display: none !important;
    }
    
    /* CSS containment for better rendering performance */
    section {
        contain: layout style;
    }
    
    .service-card,
    .feature-item,
    .tech-item,
    .portfolio-item {
        contain: layout paint;
    }
    
    /* Disable all heavy effects on mobile */
    .service-card::after,
    .cursor-trail {
        display: none !important;
    }
    
    .planet-container .planet::after {
        animation: none !important;
    }
    
    .planet-container {
        animation-duration: 120s !important; /* Much slower */
        will-change: auto !important; /* Don't reserve GPU memory */
    }
    
    /* Disable all transitions on scroll */
    .service-card,
    .feature-item,
    .tech-item {
        transition: none !important;
        transform: none !important;
        will-change: auto !important;
    }
    
    /* Simplify animations */
    @keyframes float {
        0%, 100% { transform: none; }
        50% { transform: none; }
    }
    
    /* Disable planet glow animation */
    .planet {
        animation: none !important;
    }
    
    /* Limit viewport rendering */
    body {
        overflow-y: auto;
        overflow-x: hidden;
        -webkit-overflow-scrolling: touch;
    }
}
