/* Enhanced Animated Styles with Multiple Theme Variants */

:root {
    --primary-color: #5BC4C8;
    --primary-dark: #4AA5A9;
    --primary-light: #7ED4D8;
    --dark-bg: #0A0E1B;
    --dark-secondary: #1A1F2E;
    --text-primary: #FFFFFF;
    --text-secondary: #A0A9C9;
    --accent-gradient: linear-gradient(135deg, #5BC4C8 0%, #7ED4D8 100%);
    --card-bg: rgba(26, 31, 46, 0.7);
    --border-color: rgba(91, 196, 200, 0.2);
    --glow-color: #5BC4C8;
}

/* Theme Variants */
[data-theme="neon"] {
    --primary-color: #00FFFF;
    --primary-dark: #00D4D4;
    --primary-light: #66FFFF;
    --dark-bg: #000000;
    --dark-secondary: #0A0A0F;
    --text-primary: #FFFFFF;
    --text-secondary: #B0B0FF;
    --accent-gradient: linear-gradient(135deg, #00FFFF 0%, #FF00FF 100%);
    --card-bg: rgba(10, 10, 25, 0.8);
    --border-color: rgba(0, 255, 255, 0.3);
    --glow-color: #00FFFF;
}

[data-theme="aurora"] {
    --primary-color: #8B5CF6;
    --primary-dark: #7C3AED;
    --primary-light: #A78BFA;
    --dark-bg: linear-gradient(135deg, #0F172A 0%, #1E293B 50%, #334155 100%);
    --dark-secondary: rgba(30, 41, 59, 0.9);
    --text-primary: #FFFFFF;
    --text-secondary: #CBD5E1;
    --accent-gradient: linear-gradient(135deg, #8B5CF6 0%, #EC4899 50%, #06B6D4 100%);
    --card-bg: rgba(30, 41, 59, 0.6);
    --border-color: rgba(139, 92, 246, 0.2);
    --glow-color: #8B5CF6;
}

[data-theme="matrix"] {
    --primary-color: #00FF41;
    --primary-dark: #00CC33;
    --primary-light: #66FF88;
    --dark-bg: #000000;
    --dark-secondary: #001100;
    --text-primary: #00FF41;
    --text-secondary: #00AA2A;
    --accent-gradient: linear-gradient(135deg, #00FF41 0%, #00AA2A 100%);
    --card-bg: rgba(0, 17, 0, 0.9);
    --border-color: rgba(0, 255, 65, 0.3);
    --glow-color: #00FF41;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: var(--dark-bg);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Animated Background */
.animated-bg {
    position: fixed;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    z-index: 0;
    overflow: hidden;
}

.particle {
    position: absolute;
    width: 2px;
    height: 2px;
    background: var(--glow-color);
    box-shadow: 0 0 10px var(--glow-color);
    animation: float-particle 20s infinite linear;
}

@keyframes float-particle {
    from {
        transform: translateY(100vh) translateX(0);
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    to {
        transform: translateY(-100vh) translateX(100px);
        opacity: 0;
    }
}

/* Geometric shapes background */
.geometric-bg {
    position: fixed;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    z-index: 0;
    overflow: hidden;
}

.shape {
    position: absolute;
    background: transparent;
    border: 1px solid var(--border-color);
}

.shape-circle {
    border-radius: 50%;
    animation: rotate-shape 30s infinite linear;
}

.shape-triangle {
    width: 0;
    height: 0;
    border-left: 50px solid transparent;
    border-right: 50px solid transparent;
    border-bottom: 100px solid var(--border-color);
    animation: float-shape 25s infinite ease-in-out;
}

.shape-hexagon {
    width: 100px;
    height: 55px;
    background: var(--border-color);
    position: relative;
    animation: pulse-shape 4s infinite ease-in-out;
}

.shape-hexagon:before {
    content: "";
    position: absolute;
    top: -25px;
    left: 0;
    width: 0;
    height: 0;
    border-left: 50px solid transparent;
    border-right: 50px solid transparent;
    border-bottom: 25px solid var(--border-color);
}

.shape-hexagon:after {
    content: "";
    position: absolute;
    bottom: -25px;
    left: 0;
    width: 0;
    height: 0;
    border-left: 50px solid transparent;
    border-right: 50px solid transparent;
    border-top: 25px solid var(--border-color);
}

@keyframes rotate-shape {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes float-shape {
    0%, 100% { transform: translateY(0) translateX(0); }
    25% { transform: translateY(-30px) translateX(20px); }
    50% { transform: translateY(20px) translateX(-30px); }
    75% { transform: translateY(-20px) translateX(30px); }
}

@keyframes pulse-shape {
    0%, 100% { opacity: 0.3; transform: scale(1); }
    50% { opacity: 0.8; transform: scale(1.2); }
}

/* Gradient orbs */
.gradient-orb {
    position: fixed;
    width: 600px;
    height: 600px;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.3;
    animation: float-orb 20s infinite ease-in-out;
    pointer-events: none;
    z-index: 0;
}

.orb-1 {
    background: var(--primary-color);
    top: -300px;
    left: -300px;
    animation-delay: 0s;
}

.orb-2 {
    background: var(--primary-light);
    bottom: -300px;
    right: -300px;
    animation-delay: 10s;
}

.orb-3 {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation-delay: 5s;
}

@keyframes float-orb {
    0%, 100% { transform: translate(0, 0) scale(1); }
    25% { transform: translate(100px, -100px) scale(1.1); }
    50% { transform: translate(-100px, -150px) scale(0.9); }
    75% { transform: translate(50px, 100px) scale(1.05); }
}

/* Theme & Animation Switcher */
.theme-switcher {
    position: fixed;
    top: 100px;
    right: 30px;
    z-index: 1001;
    display: flex;
    flex-direction: column;
    gap: 20px;
    background: var(--card-bg);
    padding: 25px;
    border-radius: 20px;
    border: 1px solid var(--border-color);
    backdrop-filter: blur(10px);
    max-width: 250px;
}

.switcher-section {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.switcher-section label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-secondary);
    margin-bottom: 5px;
    font-weight: 600;
}

.theme-btn,
.anim-btn {
    padding: 8px 16px;
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.85rem;
    white-space: nowrap;
}

.theme-btn:hover,
.anim-btn:hover {
    background: var(--primary-color);
    border-color: var(--primary-color);
    transform: translateX(3px);
}

.theme-btn.active,
.anim-btn.active {
    background: var(--accent-gradient);
    border: none;
    box-shadow: 0 4px 12px rgba(91, 196, 200, 0.3);
}

/* Enhanced Hero with 3D Text */
.hero-title {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 24px;
    position: relative;
}

.hero-title.glitch-active::before,
.hero-title.glitch-active::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.hero-title.glitch-active::before {
    animation: glitch-1 0.5s infinite;
    color: var(--primary-color);
    z-index: -1;
}

.hero-title.glitch-active::after {
    animation: glitch-2 0.5s infinite;
    color: var(--primary-light);
    z-index: -2;
}

@keyframes glitch {
    0%, 100% { text-shadow: 0 0 5px var(--glow-color); }
    50% { text-shadow: 0 0 20px var(--glow-color), 0 0 40px var(--glow-color); }
}

@keyframes glitch-1 {
    0%, 100% { clip-path: inset(0 0 0 0); transform: translate(0); }
    20% { clip-path: inset(20% 0 30% 0); transform: translate(-2px, 2px); }
    40% { clip-path: inset(50% 0 20% 0); transform: translate(2px, -2px); }
    60% { clip-path: inset(10% 0 60% 0); transform: translate(0, 2px); }
    80% { clip-path: inset(80% 0 5% 0); transform: translate(-2px, 0); }
}

@keyframes glitch-2 {
    0%, 100% { clip-path: inset(0 0 0 0); transform: translate(0); }
    20% { clip-path: inset(60% 0 10% 0); transform: translate(2px, -2px); }
    40% { clip-path: inset(10% 0 70% 0); transform: translate(-2px, 2px); }
    60% { clip-path: inset(30% 0 40% 0); transform: translate(2px, 0); }
    80% { clip-path: inset(5% 0 85% 0); transform: translate(0, -2px); }
}

/* Neon glow buttons */
.btn-neon {
    position: relative;
    padding: 14px 32px;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    background: transparent;
    text-transform: uppercase;
    letter-spacing: 2px;
    cursor: pointer;
    overflow: hidden;
    transition: all 0.3s ease;
    border-radius: 0;
}

.btn-neon::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: var(--primary-color);
    transition: left 0.5s ease;
    z-index: -1;
}

.btn-neon:hover::before {
    left: 0;
}

.btn-neon:hover {
    color: var(--dark-bg);
    box-shadow:
        0 0 10px var(--glow-color),
        0 0 20px var(--glow-color),
        0 0 40px var(--glow-color),
        inset 0 0 10px var(--glow-color);
}

/* Holographic cards */
.holographic-card {
    position: relative;
    background: linear-gradient(
        135deg,
        rgba(255, 255, 255, 0.1) 0%,
        rgba(255, 255, 255, 0.05) 50%,
        rgba(255, 255, 255, 0.1) 100%
    );
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    padding: 40px;
    overflow: hidden;
}

.holographic-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
        45deg,
        transparent 30%,
        var(--primary-color) 50%,
        transparent 70%
    );
    animation: holographic 3s infinite;
    opacity: 0.3;
}

@keyframes holographic {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}

/* Morphing blob animation */
.morph-blob {
    position: absolute;
    width: 400px;
    height: 400px;
    background: var(--accent-gradient);
    border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%;
    animation: morph 8s ease-in-out infinite;
    filter: blur(40px);
    opacity: 0.5;
}

@keyframes morph {
    0%, 100% {
        border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%;
    }
    25% {
        border-radius: 30% 60% 70% 40% / 50% 60% 30% 60%;
    }
    50% {
        border-radius: 50% 60% 60% 40% / 60% 40% 50% 50%;
    }
    75% {
        border-radius: 40% 60% 40% 60% / 70% 30% 60% 40%;
    }
}

/* Text animations */
.typewriter {
    overflow: hidden;
    border-right: 3px solid var(--primary-color);
    white-space: nowrap;
    animation: typing 3.5s steps(40, end), blink-caret 0.75s step-end infinite;
}

@keyframes typing {
    from { width: 0; }
    to { width: 100%; }
}

@keyframes blink-caret {
    from, to { border-color: transparent; }
    50% { border-color: var(--primary-color); }
}

/* Parallax scrolling effect */
.parallax-container {
    position: relative;
    transform-style: preserve-3d;
    perspective: 1000px;
}

.parallax-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.parallax-layer-1 {
    transform: translateZ(-100px) scale(1.1);
}

.parallax-layer-2 {
    transform: translateZ(-200px) scale(1.2);
}

.parallax-layer-3 {
    transform: translateZ(-300px) scale(1.3);
}

/* Reveal animations */
.reveal-text {
    position: relative;
    overflow: hidden;
}

.reveal-text::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--dark-bg);
    animation: reveal 1s ease forwards;
}

@keyframes reveal {
    from { transform: translateX(0); }
    to { transform: translateX(100%); }
}

/* Loading animation */
.loader {
    width: 50px;
    height: 50px;
    border: 3px solid var(--border-color);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Gradient text animation */
.gradient-text-animated {
    background: linear-gradient(
        90deg,
        var(--primary-color) 0%,
        var(--primary-light) 25%,
        var(--primary-color) 50%,
        var(--primary-light) 75%,
        var(--primary-color) 100%
    );
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradient-shift 3s linear infinite;
}

@keyframes gradient-shift {
    to { background-position: 200% center; }
}

/* Service cards height fix */
.service-card {
    min-height: 400px;
    height: auto;
    position: relative;
}

.service-card h3 {
    margin-top: 20px;
    margin-bottom: 20px;
    font-size: 1.3rem;
    line-height: 1.3;
    word-wrap: break-word;
}

.service-card p {
    margin-bottom: 20px;
    line-height: 1.7;
    font-size: 0.95rem;
    word-wrap: break-word;
    flex-grow: 1;
}

.service-icon {
    font-size: 3rem;
    margin-bottom: 20px;
}

.service-features {
    list-style: none;
    padding: 0;
    margin: 20px 0 0 0;
    text-align: left;
}

.service-features li {
    padding: 8px 0;
    padding-left: 25px;
    position: relative;
    color: var(--text-secondary);
    font-size: 0.95rem;
}

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

/* 3D card flip */
.card-3d {
    perspective: 1000px;
    height: 100%;
}

.card-3d-inner {
    position: relative;
    width: 100%;
    min-height: 400px;
    height: 100%;
    text-align: center;
    transition: transform 0.6s;
    transform-style: preserve-3d;
}

/* Disabled flip on hover - causes content to be hidden
.card-3d:hover .card-3d-inner {
    transform: rotateY(180deg);
} */

/* Better hover effect without flipping */
.card-3d:hover .card-3d-inner {
    transform: translateY(-10px) scale(1.02);
    transition: transform 0.3s ease;
}

.card-3d:hover .holographic-card {
    box-shadow: 0 20px 40px rgba(91, 196, 200, 0.3);
}

.card-3d-front, .card-3d-back {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    min-height: 400px;
    height: 100%;
    padding: 40px 30px;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    text-align: center;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    box-sizing: border-box;
}

.card-3d-back {
    /* Hide back card since we're not flipping anymore */
    display: none;
    transform: rotateY(180deg);
}

.card-3d-back h3 {
    margin-bottom: 30px;
    font-size: 1.5rem;
}

.card-3d-back .service-features {
    list-style: none;
    padding: 0;
    margin: 0;
    text-align: left;
    width: 100%;
}

.card-3d-back .service-features li {
    padding: 10px 0;
    padding-left: 30px;
    position: relative;
    color: var(--text-primary);
    font-size: 0.95rem;
}

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

/* Liquid animation */
.liquid-button {
    position: relative;
    padding: 20px 40px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    overflow: hidden;
}

.liquid-button::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.liquid-button:hover::before {
    width: 300px;
    height: 300px;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .theme-switcher {
        top: auto;
        bottom: 20px;
        right: 20px;
        flex-direction: row;
        padding: 10px;
        gap: 5px;
    }

    .theme-btn {
        padding: 8px 12px;
        font-size: 0.8rem;
    }

    .gradient-orb {
        width: 300px;
        height: 300px;
    }
}