/* Voidmesh Platform - Custom Styles */

:root {
    --vm-primary: #198754;
    --vm-primary-dark: #146c43;
    --vm-bg-dark: #1a1a1a;
    --vm-bg-darker: #0d0d0d;
}

/* General */
body {
    background-color: var(--vm-bg-darker);
    min-height: 100vh;
}

.main-content {
    padding-top: 56px;
}

/* Navbar */
.navbar {
    backdrop-filter: blur(10px);
    background-color: rgba(33, 37, 41, 0.95) !important;
}

.navbar-brand {
    font-size: 1.25rem;
    letter-spacing: 1px;
}

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, var(--vm-bg-darker) 0%, var(--vm-bg-dark) 100%);
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image:
        radial-gradient(circle at 20% 50%, rgba(25, 135, 84, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 50%, rgba(25, 135, 84, 0.05) 0%, transparent 50%);
    pointer-events: none;
}

/* Particles Container */
#particles-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

/* Canvas Background */
#mesh-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

/* Hero Content Layers */
.hero-section .container {
    position: relative;
    z-index: 1;
}

/* Mesh Animation */
.hero-animation {
    position: relative;
    width: 400px;
    height: 300px;
    margin: 0 auto;
}

.mesh-node {
    position: absolute;
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--vm-primary) 0%, var(--vm-primary-dark) 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
    box-shadow: 0 0 20px rgba(25, 135, 84, 0.5);
    animation: pulse 2s ease-in-out infinite;
    z-index: 2;
}

.mesh-node.node-1 {
    top: 50px;
    left: 70px;
    animation-delay: 0s;
}

.mesh-node.node-2 {
    top: 50px;
    right: 70px;
    animation-delay: 0.5s;
}

.mesh-node.node-3 {
    bottom: 50px;
    left: 70px;
    animation-delay: 1s;
}

.mesh-node.node-4 {
    bottom: 50px;
    right: 70px;
    animation-delay: 1.5s;
}

.mesh-lines {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.mesh-line {
    stroke: var(--vm-primary);
    stroke-width: 2;
    stroke-dasharray: 5, 5;
    opacity: 0.5;
    animation: dash 2s linear infinite;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 0 20px rgba(25, 135, 84, 0.5);
    }
    50% {
        transform: scale(1.1);
        box-shadow: 0 0 40px rgba(25, 135, 84, 0.8);
    }
}

@keyframes dash {
    to {
        stroke-dashoffset: -20;
    }
}

/* Feature Icons */
.feature-icon {
    width: 64px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
}

/* Cards */
.card {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {
    transform: translateY(-2px);
}

.product-card:hover {
    border-color: var(--vm-primary) !important;
    box-shadow: 0 0 20px rgba(25, 135, 84, 0.2);
}

.product-image {
    border-bottom: 1px solid var(--bs-border-color);
}

/* Buttons */
.btn-success {
    background: linear-gradient(135deg, var(--vm-primary) 0%, var(--vm-primary-dark) 100%);
    border: none;
}

.btn-success:hover {
    background: linear-gradient(135deg, var(--vm-primary-dark) 0%, #0f5132 100%);
}

/* ESP Web Tools Button */
esp-web-install-button {
    display: inline-block;
}

esp-web-install-button::part(button) {
    background: linear-gradient(135deg, var(--vm-primary) 0%, var(--vm-primary-dark) 100%);
    border: none;
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 0.375rem;
    font-size: 1.125rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

esp-web-install-button::part(button):hover {
    background: linear-gradient(135deg, var(--vm-primary-dark) 0%, #0f5132 100%);
    transform: translateY(-2px);
}

/* Accordion */
.accordion-button:not(.collapsed) {
    background-color: rgba(25, 135, 84, 0.1);
    color: var(--vm-primary);
}

.accordion-button:focus {
    box-shadow: 0 0 0 0.25rem rgba(25, 135, 84, 0.25);
}

.accordion-button::after {
    filter: invert(1);
}

/* Footer */
.footer a:hover {
    color: var(--vm-primary) !important;
}

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

::-webkit-scrollbar-track {
    background: var(--vm-bg-darker);
}

::-webkit-scrollbar-thumb {
    background: var(--vm-primary);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--vm-primary-dark);
}

/* Responsive */
@media (max-width: 768px) {
    .hero-animation {
        width: 300px;
        height: 200px;
        transform: scale(0.8);
    }

    .mesh-node {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }

    .mesh-node.node-1,
    .mesh-node.node-3 {
        left: 30px;
    }

    .mesh-node.node-2,
    .mesh-node.node-4 {
        right: 30px;
    }

    .mesh-node.node-1,
    .mesh-node.node-2 {
        top: 20px;
    }

    .mesh-node.node-3,
    .mesh-node.node-4 {
        bottom: 20px;
    }
}

/* Code blocks */
pre {
    overflow-x: auto;
}

code {
    font-family: 'JetBrains Mono', 'Fira Code', monospace;
}

/* Loading spinner */
.spinner-border {
    width: 1rem;
    height: 1rem;
}

/* Badge */
.badge {
    font-weight: 500;
}

/* Table */
.table-dark {
    --bs-table-bg: transparent;
}

/* Nav pills for docs sidebar */
.nav-link {
    color: var(--bs-gray-500);
    padding: 0.5rem 1rem;
    border-left: 2px solid transparent;
}

.nav-link:hover {
    color: var(--vm-primary);
    border-left-color: var(--vm-primary);
}

.nav-link.active {
    color: var(--vm-primary);
    border-left-color: var(--vm-primary);
    background-color: rgba(25, 135, 84, 0.1);
}
