/* Animations CSS */

/* Shared Animation Styles */
.animated-hero {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Desktop Animation Styles */
.desktop-animation {
    position: relative;
    width: 400px;
    height: 300px;
    perspective: 1000px;
    transform-style: preserve-3d;
    animation: float 6s ease-in-out infinite;
}

.desktop-screen {
    position: relative;
    width: 350px;
    height: 220px;
    background: #2a2a3c;
    border-radius: 10px;
    padding: 10px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    transform-style: preserve-3d;
    transform: rotateX(10deg);
    overflow: hidden;
}

.desktop-content {
    width: 100%;
    height: 100%;
    background: #1a1a2e;
    border-radius: 5px;
    padding: 15px;
    display: flex;
    flex-direction: column;
}

.desktop-icon {
    width: 30px;
    height: 30px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 5px;
    margin-bottom: 10px;
    animation: pulse 3s infinite alternate;
}

.desktop-window {
    flex: 1;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    margin-top: 20px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.window-header {
    height: 25px;
    background: rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    padding: 0 10px;
}

.window-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: 5px;
    background: #ff5f56;
}

.window-dot:nth-child(2) {
    background: #ffbd2e;
}

.window-dot:nth-child(3) {
    background: #27c93f;
}

.window-content {
    padding: 10px;
    height: calc(100% - 25px);
}

.window-line {
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    margin-bottom: 8px;
    border-radius: 4px;
    width: 80%;
}

.window-line:nth-child(2) {
    width: 60%;
}

.window-line:nth-child(3) {
    width: 70%;
}

.window-chart {
    height: 60px;
    margin-top: 15px;
    background: linear-gradient(to right, #4e6ef2, #7986cb);
    border-radius: 4px;
    position: relative;
    overflow: hidden;
}

.window-chart::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, 
        rgba(255,255,255,0) 0%, 
        rgba(255,255,255,0.1) 50%, 
        rgba(255,255,255,0) 100%);
    animation: shine 3s infinite linear;
}

.desktop-keyboard {
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 380px;
    height: 20px;
    background: #2a2a3c;
    border-radius: 0 0 10px 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

/* Web Animation Styles */
.web-animation {
    position: relative;
    width: 450px;
    height: 320px;
    display: flex;
    flex-direction: column;
    perspective: 1000px;
    animation: float 6s ease-in-out infinite;
}

.browser-window {
    width: 350px;
    height: 220px;
    background: #2a2a3c;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    position: absolute;
    top: 0;
    right: 0;
    transform: rotate(5deg);
    z-index: 2;
}

.browser-header {
    height: 30px;
    background: #1a1a2e;
    display: flex;
    align-items: center;
    padding: 0 10px;
}

.browser-actions {
    display: flex;
    align-items: center;
}

.browser-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: 5px;
    background: #ff5f56;
}

.browser-dot:nth-child(2) {
    background: #ffbd2e;
}

.browser-dot:nth-child(3) {
    background: #27c93f;
}

.browser-address-bar {
    flex: 1;
    height: 20px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    margin-left: 10px;
}

.browser-content {
    height: calc(100% - 30px);
    background: #f5f5f7;
    display: flex;
}

.browser-sidebar {
    width: 80px;
    height: 100%;
    background: rgba(0, 0, 0, 0.05);
    padding: 10px;
}

.sidebar-item {
    width: 100%;
    height: 20px;
    background: rgba(0, 0, 0, 0.1);
    border-radius: 4px;
    margin-bottom: 10px;
}

.browser-main {
    flex: 1;
    padding: 10px;
}

.browser-block {
    width: 100%;
    height: 30px;
    background: rgba(0, 0, 0, 0.05);
    border-radius: 4px;
    margin-bottom: 10px;
}

.browser-cards {
    display: flex;
    justify-content: space-between;
    margin-top: 20px;
}

.browser-card {
    width: 30%;
    height: 80px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.code-editor {
    width: 300px;
    height: 200px;
    background: #1e1e3f;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    position: absolute;
    bottom: 0;
    left: 0;
    z-index: 1;
}

.editor-header {
    height: 30px;
    background: #2d2b55;
    display: flex;
    align-items: center;
    padding: 0 10px;
}

.editor-tabs {
    display: flex;
    align-items: center;
}

.editor-tab {
    width: 60px;
    height: 20px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px 4px 0 0;
    margin-right: 5px;
}

.editor-tab.active {
    background: #1e1e3f;
}

.editor-content {
    padding: 10px;
}

.code-line {
    display: flex;
    margin-bottom: 8px;
    font-family: monospace;
    font-size: 12px;
}

.code-number {
    color: #565869;
    width: 20px;
    text-align: right;
    margin-right: 10px;
}

.code-text {
    flex: 1;
    height: 12px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 2px;
}

/* Data Dashboard Animation Styles */
.data-dashboard-animation {
    position: relative;
    width: 450px;
    height: 300px;
    perspective: 1000px;
    transform-style: preserve-3d;
}

.dashboard-screen {
    position: relative;
    width: 380px;
    height: 240px;
    background: #2a2a3c;
    border-radius: 10px;
    padding: 0;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    transform-style: preserve-3d;
    transform: rotateX(10deg);
    overflow: hidden;
}

.dashboard-header {
    height: 30px;
    background: #1a1a2e;
    display: flex;
    align-items: center;
    padding: 0 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.dashboard-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: 5px;
    background: #ff5f56;
}

.dashboard-dot:nth-child(2) {
    background: #ffbd2e;
}

.dashboard-dot:nth-child(3) {
    background: #27c93f;
}

.dashboard-title {
    margin-left: 10px;
    color: rgba(255, 255, 255, 0.7);
    font-size: 12px;
    font-family: 'Poppins', sans-serif;
}

.dashboard-content {
    display: flex;
    height: calc(100% - 30px);
}

.dashboard-sidebar {
    width: 40px;
    height: 100%;
    background: rgba(0, 0, 0, 0.3);
    padding: 15px 8px;
    border-right: 1px solid rgba(255, 255, 255, 0.05);
}

.sidebar-item {
    width: 30px;
    height: 30px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 5px;
    margin-bottom: 15px;
    transition: all 0.3s ease;
}

.sidebar-item.active {
    background: rgba(60, 80, 170, 0.6);
    box-shadow: 0 0 5px rgba(60, 80, 170, 0.3);
}

.dashboard-main {
    flex: 1;
    padding: 15px;
    background: #1a1a2e;
    display: flex;
    flex-direction: column;
    width: 100%;
}

.dashboard-stats {
    display: flex;
    justify-content: space-between;
    margin-bottom: 15px;
}

.stat-card {
    width: 30%;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    padding: 10px;
    text-align: center;
    animation: pulse 3s infinite alternate;
}

.stat-card:nth-child(2) {
    animation-delay: 0.5s;
}

.stat-card:nth-child(3) {
    animation-delay: 1s;
}

.stat-value {
    font-size: 16px;
    font-weight: bold;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 5px;
}

.stat-label {
    font-size: 10px;
    color: rgba(255, 255, 255, 0.6);
}

.dashboard-chart {
    flex: 1;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    padding: 0 10px;
    margin-bottom: 15px;
}

.dashboard-chart .chart-bar {
    width: 15%;
    background: linear-gradient(to top, #2d3a6d, #4e6ef2);
    border-radius: 3px 3px 0 0;
    animation: chartGrow 2s ease-out forwards;
    transform-origin: bottom;
    opacity: 0;
}

.dashboard-chart .chart-bar:nth-child(1) {
    animation-delay: 0.2s;
}

.dashboard-chart .chart-bar:nth-child(2) {
    animation-delay: 0.4s;
}

.dashboard-chart .chart-bar:nth-child(3) {
    animation-delay: 0.6s;
}

.dashboard-chart .chart-bar:nth-child(4) {
    animation-delay: 0.8s;
}

.dashboard-chart .chart-bar:nth-child(5) {
    animation-delay: 1s;
}

.dashboard-pie {
    position: relative;
    width: 100%;
    height: 60px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 5px;
    overflow: hidden;
}

.pie-segment {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: conic-gradient(
        #2d3a6d 0% 25%,
        #4caf50 25% 55%,
        #ff9800 55% 70%,
        #f44336 70% 85%,
        #673ab7 85% 100%
    );
    animation: rotatePie 15s linear infinite;
    opacity: 0.8;
}

.dashboard-reflection {
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 380px;
    height: 20px;
    background: rgba(78, 110, 242, 0.1);
    border-radius: 50%;
    filter: blur(5px);
}

@keyframes chartGrow {
    0% {
        transform: scaleY(0);
        opacity: 0;
    }
    100% {
        transform: scaleY(1);
        opacity: 1;
    }
}

@keyframes rotatePie {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

/* Bot Animation Styles */
.bot-animation {
    position: relative;
    width: 400px;
    height: 300px;
    perspective: 1000px;
    animation: float 6s ease-in-out infinite;
}

.bot-container {
    position: relative;
    width: 150px;
    height: 200px;
    margin: 0 auto;
    z-index: 2;
}

.bot-head {
    width: 100px;
    height: 80px;
    background: #4e6ef2;
    border-radius: 50% 50% 10px 10px;
    position: relative;
    margin: 0 auto;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
    animation: botHeadMove 3s infinite alternate;
}

.bot-eye {
    width: 20px;
    height: 20px;
    background: white;
    border-radius: 50%;
    position: absolute;
    top: 30px;
    animation: blink 4s infinite;
}

.bot-eye:first-child {
    left: 20px;
}

.bot-eye:last-child {
    right: 20px;
}

.bot-antenna {
    width: 8px;
    height: 30px;
    background: #4e6ef2;
    position: absolute;
    top: -25px;
    left: 50%;
    transform: translateX(-50%);
    z-index: -1;
    border-radius: 4px;
}

.bot-antenna::after {
    content: '';
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 15px;
    height: 15px;
    background: #ff5f56;
    border-radius: 50%;
    animation: pulse 2s infinite;
}

.bot-body {
    width: 120px;
    height: 100px;
    background: #5a77f6;
    border-radius: 10px;
    margin: 10px auto 0;
    position: relative;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

.bot-screen {
    width: 80px;
    height: 50px;
    background: #1a1a2e;
    border-radius: 5px;
    position: absolute;
    top: 15px;
    left: 50%;
    transform: translateX(-50%);
    overflow: hidden;
}

.bot-data {
    padding: 8px;
}

.data-line {
    height: 5px;
    background: rgba(255, 255, 255, 0.2);
    margin-bottom: 5px;
    border-radius: 2px;
    width: 80%;
    animation: dataMove 2s infinite alternate;
}

.data-line:nth-child(2) {
    width: 60%;
    animation-delay: 0.3s;
}

.data-line:nth-child(3) {
    width: 70%;
    animation-delay: 0.6s;
}

.bot-buttons {
    display: flex;
    justify-content: center;
    position: absolute;
    bottom: 15px;
    width: 100%;
}

.bot-button {
    width: 15px;
    height: 15px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    margin: 0 5px;
    animation: glow 3s infinite alternate;
}

.bot-button:nth-child(2) {
    animation-delay: 0.5s;
}

.bot-button:nth-child(3) {
    animation-delay: 1s;
}

.bot-arms {
    position: absolute;
    width: 100%;
    top: 40px;
}

.bot-arm {
    width: 40px;
    height: 10px;
    background: #5a77f6;
    border-radius: 5px;
    position: absolute;
}

.bot-arm.left {
    left: -35px;
    transform-origin: right center;
    animation: armWave 3s infinite alternate;
}

.bot-arm.right {
    right: -35px;
    transform-origin: left center;
    animation: armWave 3s infinite alternate-reverse;
}

.bot-shadow {
    width: 120px;
    height: 20px;
    background: rgba(0, 0, 0, 0.1);
    border-radius: 50%;
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1;
    animation: shadow 6s infinite alternate;
}

.bot-messages {
    position: absolute;
    top: 0;
    right: 0;
}

.message-bubble {
    background: white;
    padding: 8px 12px;
    border-radius: 15px;
    font-size: 12px;
    margin-bottom: 10px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
    opacity: 0;
    transform: translateY(20px);
    animation: messagePop 10s infinite;
}

.message-bubble:nth-child(2) {
    animation-delay: 3s;
}

.message-bubble:nth-child(3) {
    animation-delay: 6s;
}

.bot-particles {
    position: absolute;
    width: 100%;
    height: 100%;
}

.particle {
    position: absolute;
    width: 8px;
    height: 8px;
    background: #4e6ef2;
    border-radius: 50%;
    opacity: 0.5;
}

.particle:nth-child(1) {
    top: 20%;
    left: 10%;
    animation: particleFloat 8s infinite;
}

.particle:nth-child(2) {
    top: 40%;
    left: 80%;
    animation: particleFloat 10s infinite 1s;
}

.particle:nth-child(3) {
    top: 70%;
    left: 30%;
    animation: particleFloat 7s infinite 2s;
}

.particle:nth-child(4) {
    top: 30%;
    left: 60%;
    animation: particleFloat 9s infinite 3s;
}

.particle:nth-child(5) {
    top: 60%;
    left: 70%;
    animation: particleFloat 6s infinite 4s;
}

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

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

@keyframes shine {
    0% {
        transform: translateX(-100%);
    }
    100% {
        transform: translateX(100%);
    }
}

@keyframes blink {
    0%, 45%, 50%, 55%, 100% {
        transform: scaleY(1);
    }
    48%, 52% {
        transform: scaleY(0.1);
    }
}

@keyframes botHeadMove {
    0%, 100% {
        transform: rotate(0deg);
    }
    25% {
        transform: rotate(-5deg);
    }
    75% {
        transform: rotate(5deg);
    }
}

@keyframes dataMove {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(15%);
    }
}

@keyframes glow {
    0%, 100% {
        background: rgba(255, 255, 255, 0.3);
    }
    50% {
        background: rgba(255, 255, 255, 0.8);
        box-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
    }
}

@keyframes armWave {
    0%, 100% {
        transform: rotate(0deg);
    }
    50% {
        transform: rotate(30deg);
    }
}

@keyframes shadow {
    0%, 100% {
        transform: translateX(-50%) scale(1);
        opacity: 0.1;
    }
    50% {
        transform: translateX(-50%) scale(1.2);
        opacity: 0.2;
    }
}

@keyframes messagePop {
    0%, 100% {
        opacity: 0;
        transform: translateY(20px);
    }
    10%, 30% {
        opacity: 1;
        transform: translateY(0);
    }
    40% {
        opacity: 0;
        transform: translateY(-20px);
    }
}

@keyframes particleFloat {
    0%, 100% {
        transform: translate(0, 0);
    }
    25% {
        transform: translate(10px, 10px);
    }
    50% {
        transform: translate(0, 20px);
    }
    75% {
        transform: translate(-10px, 10px);
    }
}

/* Media Queries */
@media (max-width: 992px) {
    .desktop-animation, .web-animation, .bot-animation {
        transform: scale(0.8);
    }
}

@media (max-width: 768px) {
    .desktop-animation, .web-animation, .bot-animation {
        transform: scale(0.7);
    }
}

@media (max-width: 576px) {
    .desktop-animation, .web-animation, .bot-animation {
        transform: scale(0.6);
    }
    
    .browser-window, .code-editor {
        position: relative;
        top: auto;
        right: auto;
        bottom: auto;
        left: auto;
        margin: 0 auto;
    }
    
    .web-animation {
        height: 450px;
    }
    
    .code-editor {
        margin-top: 20px;
    }
}
