/* =========================================
   SKYFALL V3 - PROTOCOL ECOSYSTEM SCHEMA
   Exact copy from v1
   ========================================= */

#skyfall-ecosystem {
    position: relative;
    background: #030304;
    overflow: hidden;
    padding: 6rem 0;
}

/* Constants */
:root {
    --eco-purple: #6366F1;
    --eco-orange: #EA580C;
    --eco-blue: #3B82F6;
}

/* Container */
.eco-schema-container {
    position: relative;
    width: 100%;
    max-width: 1000px;
    margin: 0 auto;
    aspect-ratio: 16/9;
}

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

.eco-path-line {
    fill: none;
    stroke: rgba(255, 255, 255, 0.1);
    stroke-width: 2;
}

/* Animation Dots */
.eco-dot {
    fill: var(--eco-orange);
    filter: drop-shadow(0 0 8px var(--eco-orange));
}

.eco-dot.skyfall-dot {
    fill: var(--eco-purple);
    filter: drop-shadow(0 0 8px var(--eco-purple));
}

/* --- Nodes (Cards) --- */
.eco-node {
    position: absolute;
    transform: translate(-50%, -50%);
    z-index: 10;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    text-align: center;
    width: 140px;
}

/* New HUD Card Style (Glass + Tech effect) */
.eco-card {
    position: relative;
    background: rgba(15, 15, 15, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: 4px;
    padding: 1.5rem;
    transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    aspect-ratio: 1;
    width: 80px;
    height: 80px;
}

.eco-icon {
    width: 32px;
    height: 32px;
    color: rgba(255, 255, 255, 0.8);
    transition: color 0.3s ease;
    position: relative;
    z-index: 2;
}

/* Tech Corners - exact v1 style (L-shaped borders) */
.so-tech-corner {
    position: absolute;
    width: 8px;
    height: 8px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    transition: all 0.3s ease;
    z-index: 5;
}

.so-tl {
    top: 6px;
    left: 6px;
    border-right: none;
    border-bottom: none;
}

.so-tr {
    top: 6px;
    right: 6px;
    border-left: none;
    border-bottom: none;
}

.so-bl {
    bottom: 6px;
    left: 6px;
    border-right: none;
    border-top: none;
}

.so-br {
    bottom: 6px;
    right: 6px;
    border-left: none;
    border-top: none;
}

/* Override HUD corners for ecosystem (fallback if using hud-corner) */
.eco-card .hud-corner {
    width: 8px !important;
    height: 8px !important;
}

.eco-card .hud-corner-tl {
    top: 6px !important;
    left: 6px !important;
}

.eco-card .hud-corner-tr {
    top: 6px !important;
    right: 6px !important;
}

.eco-card .hud-corner-bl {
    bottom: 6px !important;
    left: 6px !important;
}

.eco-card .hud-corner-br {
    bottom: 6px !important;
    right: 6px !important;
}

/* THEME: SKYFALL (Purple) */
.node-skyfall .eco-card {
    border-color: rgba(99, 102, 241, 0.2);
}

.node-skyfall .hud-corner::before {
    background: var(--eco-purple) !important;
}

/* Tech corner theming for Skyfall nodes */
.node-skyfall .so-tech-corner {
    border-color: var(--eco-purple);
}

.node-skyfall:hover .eco-card {
    border-color: var(--eco-purple);
    box-shadow: 0 0 20px rgba(99, 102, 241, 0.4);
}

.node-skyfall:hover .eco-icon {
    color: var(--eco-purple);
    filter: drop-shadow(0 0 5px var(--eco-purple));
}

/* THEME: CLIENT (Orange) */
.node-client .eco-card {
    border-color: rgba(234, 88, 12, 0.2);
}

.node-client .hud-corner::before {
    background: var(--eco-orange) !important;
}

/* Tech corner theming for Client nodes */
.node-client .so-tech-corner {
    border-color: var(--eco-orange);
}

.node-client:hover .eco-card {
    border-color: var(--eco-orange);
    box-shadow: 0 0 20px rgba(234, 88, 12, 0.4);
}

.node-client:hover .eco-icon {
    color: var(--eco-orange);
    filter: drop-shadow(0 0 5px var(--eco-orange));
}

/* THEME: SENTINEL (The Central Box - Large) */
.node-sentinel {
    width: auto;
}

.node-sentinel .eco-card {
    width: 240px;
    height: 140px;
    aspect-ratio: auto;
    background: linear-gradient(145deg, rgba(20, 20, 20, 0.95), rgba(5, 5, 5, 0.95));
    border-color: rgba(255, 255, 255, 0.2);
}

.node-sentinel .hud-corner {
    width: 12px !important;
    height: 12px !important;
}

.node-sentinel .hud-corner::before {
    background: rgba(255, 255, 255, 0.5) !important;
}

/* Tech corner theming for Sentinel node */
.node-sentinel .so-tech-corner {
    width: 12px;
    height: 12px;
    border-color: rgba(255, 255, 255, 0.5);
}

.node-sentinel:hover .eco-card {
    border-color: #fff;
    box-shadow: 0 0 30px rgba(255, 255, 255, 0.15);
}

/* Responsive */
@media (max-width: 768px) {
    .eco-schema-container {
        height: 600px;
        aspect-ratio: auto;
    }

    .node-sentinel .eco-card {
        width: 160px;
        height: 100px;
    }

    .eco-node {
        width: 100px;
    }

    .eco-card {
        width: 70px;
        height: 70px;
        padding: 1rem;
    }

    /* Bigger icons on mobile */
    .eco-icon {
        width: 36px;
        height: 36px;
    }

    .eco-label {
        font-size: 0.65rem;
    }
}

/* Labels */
.eco-label {
    font-size: 0.75rem;
    background: #030304;
    padding: 2px 6px;
    border-radius: 4px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    margin-top: 8px;
}

/* Legend */
.eco-legend {
    display: flex;
    flex-direction: row;
    justify-content: center;
    gap: 2rem;
    margin-top: 3rem;
    z-index: 20;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.75rem;
    text-transform: uppercase;
}

.legend-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.legend-skyfall {
    background: var(--eco-purple);
    box-shadow: 0 0 10px var(--eco-purple);
}

.legend-client {
    background: var(--eco-orange);
    box-shadow: 0 0 10px var(--eco-orange);
}
