/* =================================================================
   SYSTEM DIAGNOSTIC STYLES (Legacy vs Laboratory)
   ================================================================= */

.s-diagnostic {
    padding: 140px 0;
    background: var(--color-bg);
    position: relative;
    overflow: visible;
    z-index: 5;
}

.s-diagnostic__bg-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-family: var(--font-heading);
    font-size: 22vw;
    font-weight: 900;
    color: rgba(255, 255, 255, 0.015);
    pointer-events: none;
    z-index: 0;
    white-space: nowrap;
}

.s-diagnostic__header {
    text-align: center;
    margin-bottom: 100px;
    position: relative;
    z-index: 1;
}

.s-diagnostic__header .tagline {
    display: block;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 4px;
    font-size: 0.9rem;
    color: var(--color-primary-light);
    margin-bottom: 20px;
    opacity: 0.8;
}

.s-diagnostic__header .title {
    font-family: var(--font-heading);
    font-size: clamp(3rem, 6vw, 5rem);
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 30px;
    letter-spacing: -0.02em;
}

.s-diagnostic__header .subtitle {
    max-width: 750px;
    margin: 0 auto;
    color: var(--color-text-muted);
    font-size: 1.2rem;
    line-height: 1.7;
}

.diagnostic-interface {
    display: flex;
    align-items: center;
    justify-content: center;
    max-width: 1300px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
    gap: 60px;
}

.diag-sector {
    flex: 1;
    padding: 50px;
    background: rgba(255, 255, 255, 0.01);
    border: 1px solid rgba(255, 255, 255, 0.03);
    border-radius: 32px;
    display: flex;
    flex-direction: column;
    gap: 40px;
    transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1);
    position: relative;
    min-height: 550px;
    overflow: hidden;
    will-change: transform;
}

.legacy-sector {
    border-color: rgba(239, 68, 68, 0.2);
    background: rgba(255, 255, 255, 0.02);
}

.lab-sector {
    border-color: rgba(138, 66, 255, 0.4);
    background: rgba(138, 66, 255, 0.05);
    box-shadow: 0 0 30px rgba(138, 66, 255, 0.05);
}

/* Scanning Line Effect */
.diag-sector::after {
    content: '';
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 1px;
    background: linear-gradient(90deg, transparent, var(--color-primary-light), transparent);
    z-index: 5;
    animation: diagScan 4s linear infinite;
    pointer-events: none;
    opacity: 0.3;
}

.legacy-sector::after {
    background: linear-gradient(90deg, transparent, #ef4444, transparent);
    animation-duration: 6s;
    animation-delay: 1s;
    opacity: 0.15;
}

.sector-header .status-tag {
    font-family: monospace;
    font-size: 0.7rem;
    letter-spacing: 2px;
    margin-bottom: 15px;
    color: #ef4444;
    opacity: 0.6;
}

.sector-header .status-tag.optimized {
    color: var(--color-accent);
    opacity: 1;
    display: flex;
    align-items: center;
    gap: 8px;
}

.sector-header .status-tag.optimized::before {
    content: '';
    width: 6px;
    height: 6px;
    background: var(--color-accent);
    border-radius: 50%;
    box-shadow: 0 0 10px var(--color-accent);
    animation: modStatusBlink 1.5s infinite;
}

.sector-header h3 {
    font-family: var(--font-heading);
    font-size: 2.2rem;
    color: #fff;
}

.diag-points {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.diag-point {
    display: flex;
    gap: 20px;
    padding: 25px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 20px;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
}

.diag-point h4 {
    font-size: 1.2rem;
    margin-bottom: 8px;
    color: #fff;
}

.diag-point p {
    font-size: 0.95rem;
    color: var(--color-text-muted);
    line-height: 1.5;
}

.diag-point .point-icon {
    font-size: 1.6rem;
    color: #ef4444;
    flex-shrink: 0;
}

.lab-sector .diag-point .point-icon {
    color: var(--color-accent);
}

.diag-point:hover,
.diag-point.active {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.1);
    transform: translateX(10px);
}

.lab-sector .diag-point:hover,
.lab-sector .diag-point.active {
    border-color: var(--color-primary-light);
    box-shadow: 0 0 30px rgba(138, 66, 255, 0.1);
}

.diag-divider {
    width: 2px;
    align-self: stretch;
    background: linear-gradient(to bottom, transparent, rgba(255, 255, 255, 0.1), transparent);
    position: relative;
    min-height: 300px;
}

.diag-divider::after {
    content: 'VS';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: var(--color-bg);
    padding: 10px;
    font-family: var(--font-heading);
    font-weight: 900;
    font-size: 1.2rem;
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
}

/* Animations & Interactions */
@keyframes modStatusBlink {
    0%, 100% { opacity: 1; box-shadow: 0 0 10px var(--color-accent); }
    50% { opacity: 0.4; box-shadow: none; }
}

@keyframes diagScan {
    0% { top: 0%; opacity: 0; }
    10%, 90% { opacity: 1; }
    100% { top: 100%; opacity: 0; }
}

@keyframes iconGlitch {
    0% { transform: translate(0); }
    20% { transform: translate(-2px, 1px); }
    40% { transform: translate(-2px, -1px); }
    60% { transform: translate(2px, 1px); }
    80% { transform: translate(2px, -1px); }
    100% { transform: translate(0); }
}

.legacy-sector .diag-point:hover .point-icon {
    animation: iconGlitch 0.3s infinite;
}

.sector-footer {
    margin-top: auto;
    font-family: monospace;
    font-size: 0.75rem;
    color: var(--color-text-muted);
    opacity: 0.4;
    letter-spacing: 2px;
}

@media (max-width: 1024px) {
    .diagnostic-interface {
        flex-direction: column;
        gap: 40px;
    }

    .diag-divider {
        width: 100%;
        height: 2px;
        background: linear-gradient(to right, transparent, rgba(255, 255, 255, 0.1), transparent);
    }

    .diag-divider::after {
        padding: 5px;
        font-size: 1rem;
    }

    .diag-sector {
        width: 100%;
        min-height: auto;
        padding: 40px 30px;
    }
}

@media (max-width: 768px) {
    .s-diagnostic {
        padding: 100px 0;
    }

    .s-diagnostic__header {
        margin-bottom: 60px;
    }

    .sector-header h3 {
        font-size: 1.8rem;
    }

    .diag-point {
        padding: 20px;
    }

    .diag-point h4 {
        font-size: 1.1rem;
    }
}