/* KS Datawall V2 - Refined Technical Blueprint */

.ks-datawall-v2 {
    width: 100%;
    min-height: 600px;
    position: relative;
    background-color: #0b1d2e;
    background-image: 
        linear-gradient(rgba(0, 204, 255, 0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 204, 255, 0.05) 1px, transparent 1px);
    background-size: 30px 30px;
    font-family: 'Courier New', Courier, monospace;
    overflow: hidden;
    color: #00ccff;
}

.ks-dw-layout {
    display: flex;
    width: 100%;
    height: 100%;
    justify-content: space-between;
    padding: 60px; /* Increased padding */
    position: relative;
    z-index: 10;
}

.ks-dw-col {
    display: flex;
    flex-direction: column;
    position: relative;
}

.ks-dw-left {
    width: 25%;
    align-items: flex-end;
    text-align: right;
}

.ks-dw-center {
    width: 40%;
    align-items: center;
    justify-content: center;
}

.ks-dw-right {
    width: 25%;
    align-items: flex-start;
    text-align: left;
}

/* Headers */
.ks-dw-header {
    margin-bottom: 20px;
}

.ks-dw-header h3 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 10px;
    color: #fff;
    text-transform: uppercase;
    letter-spacing: 2px;
    border-bottom: 2px solid #00ccff;
    display: inline-block;
    padding-bottom: 5px;
}

.ks-dw-header p {
    font-size: 0.8rem;
    color: #aaddff;
    line-height: 1.4;
    max-width: 300px;
}

/* Stakeholder List */
.ks-dw-stakeholder-list {
    display: flex;
    flex-direction: column;
    gap: 15px; /* Increased gap */
    width: 100%;
}

.ks-dw-stakeholder {
    padding: 10px 15px;
    border: 1px solid rgba(0, 204, 255, 0.3);
    background: rgba(0, 20, 40, 0.5);
    color: #00ccff;
    font-size: 0.9rem;
    cursor: default;
    transition: all 0.3s ease;
    text-transform: uppercase;
    position: relative;
}

.ks-dw-stakeholder:hover {
    background: rgba(0, 204, 255, 0.1);
    border-color: #00ccff;
}

.ks-dw-stakeholder.active-pulse {
    background: #fff;
    color: #000;
    box-shadow: 0 0 12px rgba(255,255,255,0.8);
    border-color: #fff;
    z-index: 2;
    transform: scale(1.02);
}

.ks-dw-stakeholder.active-error {
    background: #ff3333;
    color: #fff;
    border-color: #ff3333;
    box-shadow: 0 0 15px #ff3333;
    z-index: 2;
}

/* Central Gate */
.ks-dw-gate-wrapper {
    margin-bottom: 30px;
    position: relative;
}

.ks-dw-gate-box {
    width: 260px;
    height: 180px;
    border: 3px solid #00ccff;
    background: rgba(0, 20, 40, 0.8);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    box-shadow: 0 0 20px rgba(0, 204, 255, 0.2);
}

.ks-dw-gate-box::before, .ks-dw-gate-box::after {
    content: '';
    position: absolute;
    width: 10px;
    height: 10px;
    border: 2px solid #00ccff;
    transition: all 0.3s;
}

.ks-dw-gate-box::before { top: -2px; left: -2px; border-right: none; border-bottom: none; }
.ks-dw-gate-box::after { bottom: -2px; right: -2px; border-left: none; border-top: none; }

.ks-dw-gate-title {
    font-size: 1.4rem;
    font-weight: bold;
    color: #fff;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.ks-dw-gate-sot {
    font-size: 1.1rem;
    color: #00ff41; 
    border: 1px solid #00ff41;
    padding: 5px 10px;
    margin-bottom: 15px;
    background: rgba(0, 255, 65, 0.1);
    font-weight: bold;
    letter-spacing: 1px;
}

.ks-dw-scanner-visual {
    width: 80%;
    height: 4px;
    background: rgba(255,255,255,0.1);
    position: relative;
    overflow: hidden;
}

.ks-dw-scan-line {
    width: 30%;
    height: 100%;
    background: #00ccff;
    position: absolute;
    animation: scan-horizontal 2s infinite linear;
}

@keyframes scan-horizontal {
    0% { left: -30%; }
    100% { left: 100%; }
}

.ks-dw-center-desc {
    text-align: center;
    max-width: 300px;
}

.ks-dw-center-desc p {
    font-size: 0.9rem;
    color: #fff;
    line-height: 1.5;
}

/* Site / Result */
.ks-dw-site-wrapper {
    width: 100%;
    height: 300px;
    border-bottom: 4px solid #fff;
    position: relative;
    display: flex;
    flex-direction: column-reverse;
    align-items: flex-start;
    padding-bottom: 0;
    background: rgba(255,255,255,0.02);
}

.ks-dw-block {
    width: 90%;
    background: #00ff41;
    border: 1px solid #000;
    margin-bottom: 1px;
    box-shadow: 0 0 5px rgba(0, 255, 65, 0.3);
}

/* Canvas Layer */
.ks-dw-canvas-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 5;
    pointer-events: none;
}

/* Responsive */
@media (max-width: 900px) {
    .ks-dw-layout {
        flex-direction: column;
        align-items: center;
        padding: 20px;
    }

    .ks-dw-left, .ks-dw-center, .ks-dw-right {
        width: 100%;
        text-align: center;
        align-items: center;
        margin-bottom: 40px;
    }

    .ks-dw-stakeholder-list {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
        gap: 8px;
    }

    .ks-dw-stakeholder {
        font-size: 0.8rem;
        padding: 6px 10px;
    }

    .ks-dw-header h3 {
        margin: 0 auto 10px auto;
    }
    
    .ks-dw-header p {
        margin: 0 auto;
    }

    .ks-dw-site-wrapper {
        align-items: center; 
    }
    
    .ks-datawall-v2 {
        min-height: 1000px;
    }
}
