@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;500;600;700&family=Inter:wght@300;400;500;600;700;800;900&display=swap');

:root {
    --primary: #0a0f1c;
    --secondary: #1a2332;
    --accent: #7bc142;
    --accent-dim: #5a8f32;
    --navy: #2c4c7a;
    --navy-dark: #1e3456;
    --text: #ffffff;
    --text-dim: #a0a9ba;
    --grid: #1e293b;
}

/* Overriding global styles for AI-CORE page */
body {
    font-family: "Inter", sans-serif;
    background: var(--primary);
    color: var(--text);
    overflow-x: hidden;
    margin: 0;
    padding: 0;
}

.font-mono {
    font-family: "JetBrains Mono", monospace;
}

/* Animated Grid Background */
.grid-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        linear-gradient(var(--grid) 1px, transparent 1px),
        linear-gradient(90deg, var(--grid) 1px, transparent 1px);
    background-size: 50px 50px;
    animation: grid-move 20s linear infinite;
    z-index: -2;
}

@keyframes grid-move {
    0% {
        transform: translate(0, 0);
    }
    100% {
        transform: translate(50px, 50px);
    }
}

/* Floating Particles */
.particle {
    position: absolute;
    width: 2px;
    height: 2px;
    background: var(--accent);
    border-radius: 50%;
    animation: float 15s infinite linear;
}

@keyframes float {
    0% {
        transform: translateY(100vh) rotate(0deg);
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        transform: translateY(-100px) rotate(360deg);
        opacity: 0;
    }
}

/* Neon Glow Effects */
.neon-border {
    border: 1px solid var(--accent);
    box-shadow:
        0 0 10px var(--accent),
        inset 0 0 10px var(--accent);
}

.glass {
    background: rgba(26, 35, 50, 0.3);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(0, 212, 255, 0.2);
}

/* Hero Animations */
@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

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

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

@keyframes matrix {
    0% {
        opacity: 0;
        transform: translateY(-20px);
    }
    50% {
        opacity: 1;
    }
    100% {
        opacity: 0;
        transform: translateY(20px);
    }
}

/* Interactive Elements */
.hover-lift {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.hover-lift:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 212, 255, 0.3);
}

.btn-glow {
    background: linear-gradient(135deg, var(--accent), var(--accent-dim));
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.btn-glow::before {
    content: "";
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.btn-glow:hover::before {
    left: 100%;
}

.btn-glow:hover {
    box-shadow: 0 0 30px var(--accent);
    transform: translateY(-2px);
}

/* Code Matrix Effect */
.code-rain {
    position: absolute;
    font-family: "JetBrains Mono", monospace;
    font-size: 12px;
    color: var(--accent);
    opacity: 0.6;
    white-space: nowrap;
    animation: matrix 3s infinite linear;
}

/* Rotating Orb */
.orb {
    width: 400px;
    height: 400px;
    border-radius: 50%;
    background: conic-gradient(from 0deg, var(--accent), var(--accent-dim), var(--accent));
    animation: rotate 10s linear infinite;
    filter: blur(2px);
    opacity: 0.3;
}

/* Timeline Animation */
.timeline-item {
    opacity: 0;
    transform: translateX(-50px);
    transition: all 0.6s ease;
}

.timeline-item.animate {
    opacity: 1;
    transform: translateX(0);
}

/* Loading Animation */
.loading-bar {
    width: 0%;
    height: 2px;
    background: var(--accent);
    animation: load 2s ease-in-out forwards;
}

@keyframes load {
    to {
        width: 100%;
    }
}

/* Scroll Reveal */
.scroll-reveal {
    opacity: 0;
    transform: translateY(50px);
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.scroll-reveal.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* Stats Counter Animation */
@keyframes countUp {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.counter {
    animation: countUp 2s ease-out;
}

/* Neural Network Animation */
.neural-net {
    position: absolute;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.node {
    position: absolute;
    width: 4px;
    height: 4px;
    background: var(--accent);
    border-radius: 50%;
    animation: pulse 2s infinite;
}

.connection {
    position: absolute;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--accent), transparent);
    animation: data-flow 3s infinite;
    opacity: 0.6;
}

@keyframes data-flow {
    0% {
        transform: scaleX(0);
        opacity: 0;
    }
    50% {
        transform: scaleX(1);
        opacity: 1;
    }
    100% {
        transform: scaleX(0);
        opacity: 0;
    }
}

/* Animated Statistics Graph */
.stats-graph {
    width: 100%;
    height: 80px;
    position: relative;
    overflow: hidden;
}

.graph-line {
    position: absolute;
    bottom: 0;
    width: 2px;
    background: linear-gradient(to top, var(--accent-dim), var(--accent));
    animation: grow-bar 2s ease-out forwards;
    margin: 0 1px;
}

@keyframes grow-bar {
    from {
        height: 0;
    }
    to {
        height: var(--bar-height);
    }
}

/* Mesh Grid Visualization */
.mesh-container {
    position: relative;
    width: 100%;
    height: 400px;
    background: radial-gradient(circle at center, rgba(123, 193, 66, 0.1) 0%, transparent 70%);
    border-radius: 20px;
    overflow: hidden;
}

.mesh-grid {
    position: absolute;
    width: 100%;
    height: 100%;
    background-image:
        linear-gradient(rgba(123, 193, 66, 0.1) 1px, transparent 1px),
        linear-gradient(90deg, rgba(123, 193, 66, 0.1) 1px, transparent 1px);
    background-size: 40px 40px;
    animation: mesh-shift 8s ease-in-out infinite;
}

@keyframes mesh-shift {
    0%,
    100% {
        transform: translate(0, 0) scale(1);
    }
    50% {
        transform: translate(-20px, -20px) scale(1.1);
    }
}

.data-node {
    position: absolute;
    width: 8px;
    height: 8px;
    background: var(--accent);
    border-radius: 50%;
    box-shadow: 0 0 20px var(--accent);
    animation: float-node 6s ease-in-out infinite;
}

@keyframes float-node {
    0%,
    100% {
        transform: translateY(0) scale(1);
    }
    50% {
        transform: translateY(-20px) scale(1.2);
    }
}

/* Hologram Effect */
.hologram {
    position: relative;
    height: 450px;
    background: linear-gradient(
        135deg,
        rgba(123, 193, 66, 0.1) 0%,
        rgba(123, 193, 66, 0.05) 50%,
        rgba(123, 193, 66, 0.1) 100%
    );
    border: 1px solid rgba(0, 212, 255, 0.3);
    backdrop-filter: blur(10px);
    animation: hologram-flicker 3s ease-in-out infinite;
}

@keyframes hologram-flicker {
    0%,
    100% {
        opacity: 1;
    }
    50% {
        opacity: 0.8;
    }
    75% {
        opacity: 1;
    }
    80% {
        opacity: 0.9;
    }
    85% {
        opacity: 1;
    }
}

/* AI Processing Animation */
.ai-process {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 20px 0;
}

.process-dot {
    width: 6px;
    height: 6px;
    background: var(--accent);
    border-radius: 50%;
    animation: process-pulse 1.5s ease-in-out infinite;
}

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

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

/* Interactive Hexagon Grid */
.hex-grid {
    position: relative;
    width: 100%;
    height: 300px;
}

.hexagon {
    position: absolute;
    width: 40px;
    height: 40px;
    background: rgba(44, 76, 122, 0.1);
    border: 1px solid rgba(0, 212, 255, 0.3);
    clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
    animation: hex-glow 3s ease-in-out infinite;
    cursor: pointer;
    transition: all 0.3s ease;
}

.hexagon:hover {
    background: rgba(44, 76, 122, 0.3);
    transform: scale(1.1);
}

@keyframes hex-glow {
    0%,
    100% {
        opacity: 0.3;
    }
    50% {
        opacity: 0.8;
    }
}

/* Mind Map Visualization */
.mind-map {
    position: relative;
    width: 100%;
    height: 600px;
    overflow: hidden;
}

.central-node {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80px;
    height: 80px;
    background: radial-gradient(circle, var(--accent), var(--accent-dim));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 12px;
    z-index: 10;
    animation: pulse 2s infinite;
    box-shadow: 0 0 30px var(--accent);
}

.branch-node {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, rgba(123, 193, 66, 0.8), rgba(90, 143, 50, 0.6));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: 600;
    box-shadow: 0 0 20px rgba(123, 193, 66, 0.5);
    cursor: pointer;
    transition: all 0.3s ease;
    transform-origin: 50% 50%;
}

.branch-node:hover {
    transform: scale(1.2);
    box-shadow: 0 0 40px rgba(123, 193, 66, 0.8);
}

.mind-connection {
    position: absolute;
    height: 2px;
    background: linear-gradient(90deg, var(--accent), transparent, var(--accent));
    transform-origin: left center;
    animation: pulse-line 3s ease-in-out infinite;
}

@keyframes orbit {
    from {
        transform: rotate(0deg) translateX(150px) rotate(0deg);
    }
    to {
        transform: rotate(360deg) translateX(150px) rotate(-360deg);
    }
}

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

/* Workflow Timeline */
.workflow-timeline {
    position: relative;
    height: 200px;
    background: rgba(123, 193, 66, 0.05);
    border-radius: 15px;
    overflow: hidden;
}

.timeline-track {
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--accent), var(--accent-dim), var(--accent));
    transform: translateY(-50%);
}

.workflow-step {
    position: absolute;
    top: 50%;
    width: 60px;
    height: 60px;
    background: rgba(123, 193, 66, 0.2);
    border: 2px solid var(--accent);
    border-radius: 50%;
    transform: translateY(-50%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: bold;
    animation: workflow-pulse 2s ease-in-out infinite;
}

.workflow-step:nth-child(odd) {
    top: 30%;
}

.workflow-step:nth-child(even) {
    top: 70%;
}

@keyframes workflow-pulse {
    0%,
    100% {
        transform: translateY(-50%) scale(0.9);
        box-shadow: 0 0 10px rgba(123, 193, 66, 0.3);
    }
    50% {
        transform: translateY(-50%) scale(1.1);
        box-shadow: 0 0 25px rgba(123, 193, 66, 0.7);
    }
}

/* Schedule Grid */
.schedule-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 2px;
    height: 150px;
    background: rgba(44, 76, 122, 0.05);
    border-radius: 10px;
    padding: 10px;
}

.schedule-cell {
    background: rgba(44, 76, 122, 0.1);
    border-radius: 3px;
    animation: schedule-blink 3s ease-in-out infinite;
    position: relative;
    overflow: hidden;
}

.schedule-cell::before {
    content: "";
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(44, 76, 122, 0.4), transparent);
    animation: schedule-sweep 4s ease-in-out infinite;
}

@keyframes schedule-blink {
    0%,
    90%,
    100% {
        opacity: 0.3;
    }
    45% {
        opacity: 0.8;
    }
}

@keyframes schedule-sweep {
    0% {
        left: -100%;
    }
    100% {
        left: 100%;
    }
}

/* Data Stream Effect */
.data-stream {
    position: absolute;
    width: 2px;
    height: 100px;
    background: linear-gradient(to bottom, transparent, var(--accent), transparent);
    animation: stream-flow 2s linear infinite;
}

@keyframes stream-flow {
    0% {
        transform: translateY(-100px);
        opacity: 0;
    }
    50% {
        opacity: 1;
    }
    100% {
        transform: translateY(400px);
        opacity: 0;
    }
}

/* Matrix Digital Rain */
.matrix-rain {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

.matrix-column {
    position: absolute;
    top: -100%;
    font-family: "JetBrains Mono", monospace;
    font-size: 14px;
    color: var(--accent);
    animation: matrix-fall 10s linear infinite;
    opacity: 0.3;
}

@keyframes matrix-fall {
    to {
        top: 100%;
    }
}

/* Flow Architecture Styles */
.flow-architecture {
    position: relative;
    padding: 4rem 0;
    background: radial-gradient(ellipse at center, rgba(123, 193, 66, 0.05) 0%, transparent 70%);
    overflow: hidden;
}

.flow-container {
    position: relative;
    max-width: 1400px;
    margin: 0 auto;
    height: 1000px;
}

/* Central AI-CORE Hub */
.central-hub {
    position: absolute;
    top: 45%;
    left: 45%;
    transform: translate(-45%, -45%);
    width: 120px;
    height: 120px;
    background: radial-gradient(circle, var(--navy), var(--navy-dark));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 16px;
    z-index: 15;
    animation: pulse 3s infinite;
    box-shadow: 0 0 40px var(--accent);
    color: #000;
    border: 3px solid #fff;
}

.flow-step {
    position: absolute;
    width: 280px;
    height: 280px;
    background: rgba(26, 35, 50, 0.8);
    backdrop-filter: blur(20px);
    border: 2px solid var(--accent);
    border-radius: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 2rem;
    box-shadow: 0 20px 40px rgba(123, 193, 66, 0.3);
    animation: step-float 4s ease-in-out infinite;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    min-height: 280px;
    max-height: 280px;
}

.flow-step:hover {
    transform: translateY(-20px) scale(1.05);
    box-shadow: 0 30px 60px rgba(123, 193, 66, 0.5);
    border-color: #fff;
}

.flow-step-top {
    top: 50px;
    left: 560px;
    animation-delay: 0s;
    z-index: 10;
}

.flow-step-right {
    top: 350px;
    right: 50px;
    animation-delay: 0.5s;
    z-index: 10;
}

.flow-step-bottom {
    bottom: 50px;
    left: 560px;
    animation-delay: 1s;
    z-index: 10;
}

.flow-step-left {
    top: 350px;
    left: 50px;
    animation-delay: 1.5s;
    z-index: 10;
}

@keyframes step-float {
    0%,
    100% {
        transform: translateY(0) rotate(0deg);
    }
    25% {
        transform: translateY(-10px) rotate(1deg);
    }
    50% {
        transform: translateY(0) rotate(0deg);
    }
    75% {
        transform: translateY(-5px) rotate(-1deg);
    }
}

.flow-icon {
    width: 60px;
    height: 60px;
    margin-bottom: 1rem;
    filter: drop-shadow(0 0 20px var(--accent));
    animation: icon-pulse 2s ease-in-out infinite;
}

.flow-icon svg {
    width: 100%;
    height: 100%;
    fill: var(--accent);
    stroke: var(--accent);
}

@keyframes icon-pulse {
    0%,
    100% {
        transform: scale(1);
        filter: drop-shadow(0 0 20px var(--accent));
    }
    50% {
        transform: scale(1.1);
        filter: drop-shadow(0 0 30px var(--accent));
    }
}

.flow-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--accent);
    margin-bottom: 0.5rem;
    text-shadow: 0 0 10px var(--accent);
}

.flow-description {
    font-size: 0.85rem;
    color: var(--text-dim);
    line-height: 1.4;
    flex: 1;
    display: flex;
    align-items: center;
    text-align: center;
}

/* SVG Connection Lines */
.flow-connections {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

.connection-path {
    fill: none;
    stroke: var(--accent);
    stroke-width: 3;
    stroke-dasharray: 10, 5;
    animation: dash-flow 3s linear infinite;
    filter: drop-shadow(0 0 10px var(--accent));
}

@keyframes dash-flow {
    0% {
        stroke-dashoffset: 0;
        opacity: 0.7;
    }
    100% {
        stroke-dashoffset: -100;
        opacity: 1;
    }
}

/* Data Particles along paths */
.data-particle {
    position: absolute;
    width: 6px;
    height: 6px;
    background: var(--accent);
    border-radius: 50%;
    box-shadow: 0 0 15px var(--accent);
    animation: particle-travel 4s ease-in-out infinite;
}

.particle-1 {
    animation-delay: 0s;
}
.particle-2 {
    animation-delay: 1s;
}
.particle-3 {
    animation-delay: 2s;
}
.particle-4 {
    animation-delay: 3s;
}

@keyframes particle-travel {
    0% {
        transform: translate(700px, 190px) scale(0);
        opacity: 0;
    }
    25% {
        transform: translate(1070px, 500px) scale(1);
        opacity: 1;
    }
    50% {
        transform: translate(700px, 810px) scale(1);
        opacity: 1;
    }
    75% {
        transform: translate(330px, 500px) scale(1);
        opacity: 1;
    }
    100% {
        transform: translate(700px, 190px) scale(0);
        opacity: 0;
    }
}

/* Holographic overlay */
.flow-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        linear-gradient(45deg, transparent 30%, rgba(123, 193, 66, 0.05) 50%, transparent 70%),
        radial-gradient(circle at 50% 50%, rgba(123, 193, 66, 0.1) 0%, transparent 50%);
    animation: overlay-shift 8s ease-in-out infinite;
    pointer-events: none;
}

@keyframes overlay-shift {
    0%,
    100% {
        transform: rotate(0deg) scale(1);
        opacity: 0.3;
    }
    50% {
        transform: rotate(2deg) scale(1.02);
        opacity: 0.6;
    }
}

/* Responsive design for flow */
@media (max-width: 1024px) {
    .flow-container {
        height: 900px;
    }

    .flow-step {
        width: 240px;
        height: 240px;
        padding: 1.5rem;
        min-height: 240px;
        max-height: 240px;
    }

    .central-hub {
        width: 100px;
        height: 100px;
        font-size: 14px;
    }
}

@media (max-width: 768px) {
    .flow-container {
        height: 1200px;
        padding: 0 10px;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: space-around;
    }

    .flow-step {
        position: relative !important;
        width: 90%;
        max-width: 300px;
        height: 200px;
        margin: 10px 0;
        top: auto !important;
        left: auto !important;
        right: auto !important;
        bottom: auto !important;
        transform: none !important;
        min-height: 200px;
        max-height: 200px;
    }

    .central-hub {
        position: relative !important;
        top: auto !important;
        left: auto !important;
        transform: none !important;
        order: 2;
        margin: 20px 0;
    }

    .data-particle {
        display: none;
    }

    .flow-connections {
        display: none;
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .orb {
        width: 250px;
        height: 250px;
    }
    .grid-bg {
        background-size: 30px 30px;
    }
    .mesh-container {
        height: 250px;
    }
    .hex-grid {
        height: 200px;
    }
}