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

html {
    scroll-behavior: smooth;
}

/* Glow effect */
.glow-effect {
    box-shadow: 0 0 20px rgba(0, 240, 255, 0.5),
                0 0 40px rgba(0, 240, 255, 0.3),
                0 0 60px rgba(0, 240, 255, 0.1);
}

/* Grid background */
.grid-bg {
    background-image:
        linear-gradient(rgba(0, 240, 255, 0.1) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 240, 255, 0.1) 1px, transparent 1px);
    background-size: 50px 50px;
}

/* Feature card hover effect */
.feature-card {
    position: relative;
    overflow: hidden;
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(0, 240, 255, 0.1), transparent);
    transition: left 0.5s ease;
}

.feature-card:hover::before {
    left: 100%;
}

/* FAQ accordion */
.faq-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease;
}

.faq-content.show {
    max-height: 200px;
}

.faq-toggle i {
    transition: transform 0.3s ease;
}

.faq-toggle.active i {
    transform: rotate(180deg);
}

/* Button glow animation */
button:hover {
    box-shadow: 0 0 30px rgba(0, 240, 255, 0.6);
}

/* Scroll reveal animation */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

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

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #0a0a1a;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(to bottom, #00f0ff, #8b5cf6);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(to bottom, #00d4e6, #7c4fe0);
}

/* Text gradient animation */
@keyframes gradient {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

.bg-gradient-text {
    background-size: 200% 200%;
    animation: gradient 3s ease infinite;
}

/* Pulse animation for CTA */
@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

.pulse-animation {
    animation: pulse 2s infinite;
}

/* Floating animation */
@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

.float-animation {
    animation: float 3s ease-in-out infinite;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    h1 {
        font-size: 2.5rem;
    }

    h2 {
        font-size: 2rem;
    }

    .feature-card {
        margin-bottom: 1rem;
    }
}

/* Selection color */
::selection {
    background: rgba(0, 240, 255, 0.3);
    color: white;
}

/* Focus states for accessibility */
a:focus, button:focus {
    outline: 2px solid #00f0ff;
    outline-offset: 2px;
}

/* Smooth transitions for all elements */
* {
    transition-property: background-color, border-color, color, fill, stroke;
    transition-timing-function: ease;
    transition-duration: 0.2s;
}

/* Chat Widget */
#chat-widget {
    font-family: system-ui, -apple-system, sans-serif;
}

#chat-window {
    backdrop-filter: blur(10px);
}

#chat-messages {
    scrollbar-width: thin;
    scrollbar-color: rgba(0, 240, 255, 0.3) transparent;
}

#chat-messages::-webkit-scrollbar {
    width: 4px;
}

#chat-messages::-webkit-scrollbar-track {
    background: transparent;
}

#chat-messages::-webkit-scrollbar-thumb {
    background: rgba(0, 240, 255, 0.3);
    border-radius: 2px;
}

#chat-input:focus {
    box-shadow: 0 0 15px rgba(0, 240, 255, 0.3);
}

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

#typing-indicator .animate-bounce {
    animation: typingBounce 0.6s infinite;
}

/* ========================================
   3D PREMIUM EFFECTS
   ======================================== */

/* Hero Particles Canvas */
#hero-particles {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

/* 3D Card Tilt Effect */
.feature-card-3d {
    transform-style: preserve-3d;
    perspective: 1000px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.feature-card-3d:hover {
    box-shadow: 0 25px 50px -12px rgba(0, 240, 255, 0.25);
}

.feature-card-3d .card-inner {
    transform-style: preserve-3d;
    transition: transform 0.1s ease;
}

.feature-card-3d .card-shine {
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: linear-gradient(
        135deg,
        rgba(255, 255, 255, 0.1) 0%,
        rgba(255, 255, 255, 0) 50%,
        rgba(255, 255, 255, 0.05) 100%
    );
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.feature-card-3d:hover .card-shine {
    opacity: 1;
}

/* Glow border on tilt */
.feature-card-3d::after {
    content: '';
    position: absolute;
    inset: -2px;
    border-radius: inherit;
    background: linear-gradient(135deg, #00f0ff, #8b5cf6, #00f0ff);
    z-index: -1;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.feature-card-3d:hover::after {
    opacity: 0.5;
}

/* ========================================
   3D INTRO ANIMATION - MULTI-PHONE CIRCLE
   ======================================== */

#intro-overlay {
    background: radial-gradient(ellipse at center, #0d1117 0%, #0a0a1a 100%);
    transition: opacity 0.8s ease, visibility 0.8s ease;
}

#intro-overlay.fade-out {
    opacity: 0;
    visibility: hidden;
}

/* Central glow animation */
@keyframes centralGlow {
    0%, 100% { opacity: 0.3; transform: scale(1); }
    50% { opacity: 0.6; transform: scale(1.1); }
}

#central-glow.show {
    animation: centralGlow 3s ease-in-out infinite;
}

/* Phones circle container */
#phones-circle {
    transition: opacity 0.8s ease, transform 0.8s ease;
}

#phones-circle.show {
    opacity: 1;
    animation: circleEntrance 1s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes circleEntrance {
    0% {
        opacity: 0;
        transform: scale(0.8) rotate(-10deg);
    }
    100% {
        opacity: 1;
        transform: scale(1) rotate(0deg);
    }
}

/* Phone entrance animations */
@keyframes phoneFloat {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-8px);
    }
}

.phone-item {
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.phone-item.show {
    opacity: 1 !important;
    animation: phoneFloat 4s ease-in-out infinite;
    animation-delay: var(--delay, 0s);
}

/* Chat bubble animations in center phone */
@keyframes chatBubbleIn {
    0% {
        opacity: 0;
        transform: translateY(10px) scale(0.95);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.chat-bubble-in.show {
    animation: chatBubbleIn 0.5s ease forwards;
}

/* Floating chat bubbles */
@keyframes floatingBubble {
    0%, 100% {
        transform: translateY(0px) translateX(0px);
        opacity: 0.9;
    }
    25% {
        transform: translateY(-12px) translateX(5px);
        opacity: 1;
    }
    50% {
        transform: translateY(-5px) translateX(-3px);
        opacity: 0.95;
    }
    75% {
        transform: translateY(-15px) translateX(4px);
        opacity: 1;
    }
}

.floating-chat-bubble {
    z-index: 30 !important;
}

.floating-chat-bubble.show {
    animation: floatingBubble 5s ease-in-out infinite;
    animation-delay: var(--float-delay, 0s);
}

@keyframes bubbleEntrance {
    0% {
        opacity: 0;
        transform: translateY(20px) scale(0.8);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.floating-chat-bubble.entering {
    animation: bubbleEntrance 0.6s ease forwards;
}

/* Watermark phone styles are now in the main carousel section */

/* ========================================
   CAROUSEL INTRO ANIMATION
   ======================================== */

#phone-carousel {
    perspective: 1200px;
}

.carousel-phone {
    position: absolute;
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 0;
    transform-style: preserve-3d;
}

.carousel-phone.active {
    opacity: 1;
    z-index: 10;
}

.carousel-phone.side-left {
    opacity: 0.7;
    z-index: 5;
}

.carousel-phone.side-right {
    opacity: 0.7;
    z-index: 5;
}

.carousel-phone.hidden-phone {
    opacity: 0;
    z-index: 1;
}

.phone-frame-wrapper {
    position: relative;
}

.phone-image {
    width: 320px;
    height: auto;
    filter: drop-shadow(0 30px 60px rgba(0, 0, 0, 0.7));
    object-fit: contain;
}

.glow-ring {
    position: absolute;
    inset: -20px;
    border-radius: 40px;
    background: linear-gradient(135deg, rgba(0, 240, 255, 0.25), rgba(139, 92, 246, 0.25));
    filter: blur(20px);
    opacity: 0;
    transition: opacity 0.5s ease;
    z-index: -1;
}

.carousel-phone.active .glow-ring {
    opacity: 1;
    animation: glowPulse 2s ease-in-out infinite;
}

@keyframes glowPulse {
    0%, 100% { opacity: 0.4; filter: blur(20px); }
    50% { opacity: 0.7; filter: blur(25px); }
}

/* Phone overlay for chat content */
.phone-overlay {
    position: absolute;
    top: 12%;
    left: 10%;
    right: 10%;
    bottom: 10%;
    display: flex;
    flex-direction: column;
    padding: 8px;
    pointer-events: none;
    background: rgba(10, 10, 26, 0.4);
    border-radius: 20px;
    backdrop-filter: blur(2px);
}

.chat-header {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 6px;
}

.bot-avatar {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 7px;
    font-weight: bold;
    color: white;
}

.bot-avatar.green { background: linear-gradient(135deg, #4ade80, #22c55e); }
.bot-avatar.cyan { background: linear-gradient(135deg, #22d3ee, #0891b2); }
.bot-avatar.violet { background: linear-gradient(135deg, #a78bfa, #7c3aed); }

.bot-info {
    flex: 1;
}

.bot-name {
    color: white;
    font-size: 9px;
    font-weight: 600;
    text-shadow: 0 1px 3px rgba(0,0,0,0.8);
}

.bot-status {
    font-size: 7px;
    text-shadow: 0 1px 3px rgba(0,0,0,0.8);
}

.bot-status.green { color: #4ade80; }
.bot-status.cyan { color: #22d3ee; }
.bot-status.violet { color: #a78bfa; }

.chat-messages {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
    overflow: hidden;
}

.chat-msg {
    max-width: 80%;
    padding: 5px 8px;
    border-radius: 8px;
    font-size: 8px;
    color: white;
    text-shadow: 0 1px 2px rgba(0,0,0,0.5);
    opacity: 0;
    transform: translateY(8px);
    animation: msgAppear 0.4s ease forwards;
}

.chat-msg.bot {
    background: rgba(32, 44, 51, 0.9);
    align-self: flex-start;
    border-bottom-left-radius: 2px;
}

.chat-msg.user {
    background: rgba(0, 92, 75, 0.9);
    align-self: flex-end;
    border-bottom-right-radius: 2px;
}

.chat-msg.appearing {
    animation: msgBounce 0.5s ease forwards;
}

@keyframes msgAppear {
    to { opacity: 1; transform: translateY(0); }
}

@keyframes msgBounce {
    0% { opacity: 0; transform: translateY(10px) scale(0.9); }
    60% { transform: translateY(-2px) scale(1.02); }
    100% { opacity: 1; transform: translateY(0) scale(1); }
}

.chat-input {
    background: rgba(32, 44, 51, 0.9);
    padding: 5px 8px;
    border-radius: 10px;
    font-size: 7px;
    color: #6b7280;
    text-align: center;
    margin-top: 4px;
}

/* Watermark phone real image */
.watermark-phone {
    position: fixed;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 280px;
    opacity: 0.04;
    pointer-events: none;
    z-index: 0;
    transition: opacity 0.3s ease;
}

.watermark-img {
    width: 100%;
    height: auto;
    filter: drop-shadow(0 0 30px rgba(0, 240, 255, 0.15));
}

/* Floating Messages - Over phones */
.floating-msg {
    position: absolute;
    opacity: 0;
    z-index: 25;
    pointer-events: none;
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.floating-msg.show {
    animation: floatMsgAppear 0.5s ease forwards;
}

@keyframes floatMsgAppear {
    0% { opacity: 0; transform: translateY(15px) scale(0.85); }
    60% { transform: translateY(-3px) scale(1.03); }
    100% { opacity: 1; transform: translateY(0) scale(1); }
}

.msg-bubble {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border-radius: 16px;
    font-size: 11px;
    color: white;
    backdrop-filter: blur(12px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.35);
    white-space: nowrap;
    animation: msgBubbleFloat 3.5s ease-in-out infinite;
}

.msg-bubble.green {
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.92), rgba(22, 163, 74, 0.92));
    border: 1px solid rgba(74, 222, 128, 0.4);
}

.msg-bubble.cyan {
    background: linear-gradient(135deg, rgba(34, 211, 238, 0.92), rgba(6, 182, 212, 0.92));
    border: 1px solid rgba(34, 211, 238, 0.4);
}

.msg-bubble.violet {
    background: linear-gradient(135deg, rgba(167, 139, 250, 0.92), rgba(124, 58, 237, 0.92));
    border: 1px solid rgba(167, 139, 250, 0.4);
}

.msg-icon {
    font-size: 14px;
}

.msg-content strong {
    font-weight: 700;
}

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

/* Phone glow pulse */
@keyframes phoneGlow {
    0%, 100% { opacity: 0.5; filter: blur(20px); }
    50% { opacity: 0.8; filter: blur(25px); }
}

.phone-item .absolute {
    animation: phoneGlow 3s ease-in-out infinite;
}

/* Intro text animation */
@keyframes textReveal {
    0% {
        opacity: 0;
        transform: translateY(15px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

#intro-text.show {
    animation: textReveal 0.8s ease forwards;
}

/* Particle animation - subtle and elegant */
@keyframes particleFloat {
    0% {
        transform: translateY(100vh) rotate(0deg);
        opacity: 0;
    }
    10% {
        opacity: 0.6;
    }
    90% {
        opacity: 0.6;
    }
    100% {
        transform: translateY(-100vh) rotate(360deg);
        opacity: 0;
    }
}

.particle {
    position: absolute;
    width: 3px;
    height: 3px;
    background: linear-gradient(135deg, #00f0ff, #8b5cf6);
    border-radius: 50%;
    animation: particleFloat linear infinite;
}

/* Typing indicator animation */
@keyframes typingBounce {
    0%, 60%, 100% { transform: translateY(0); }
    30% { transform: translateY(-3px); }
}

.typing-dot {
    animation: typingBounce 1.4s infinite;
}

.typing-dot:nth-child(2) {
    animation-delay: 0.2s;
}

.typing-dot:nth-child(3) {
    animation-delay: 0.4s;
}
