/* ===================================================================
   Deep Scan Visual – Layout & Visual Styles
   =================================================================== */

.axion-deep-scan-visual {
    aspect-ratio: 1 / 1;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

/* -----------------------------------------------------------------------
   Hexagon Grid Background
   ----------------------------------------------------------------------- */
.ds-hex-grid {
    position: absolute;
    inset: 0;
    opacity: 0.2;
    color: #94a3b8;
    pointer-events: none;
}

.ds-hex-grid svg {
    width: 100%;
    height: 100%;
}

.dark .ds-hex-grid {
    opacity: 0.4;
}

/* -----------------------------------------------------------------------
   Central Scanner
   ----------------------------------------------------------------------- */
.ds-scanner {
    position: relative;
    z-index: 10;
    width: 12rem;
    height: 12rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ds-ring-outer {
    position: absolute;
    inset: 0;
    border: 4px dashed rgba(59, 130, 246, 0.3);
    border-radius: 9999px;
    animation: ds-spin 10s linear infinite;
}

.ds-ring-inner {
    position: absolute;
    inset: 1rem;
    border: 2px solid rgba(168, 85, 247, 0.4);
    border-radius: 9999px;
    animation: ds-spin 15s linear infinite reverse;
}

.ds-diamond {
    width: 6rem;
    height: 6rem;
    border-radius: 1rem;
    background: white;
    border: 2px solid #3b82f6;
    display: flex;
    align-items: center;
    justify-content: center;
    transform: rotate(45deg);
    box-shadow: 0 0 40px rgba(59, 130, 246, 0.4);
}

.dark .ds-diamond {
    background: black;
}

.ds-diamond-inner {
    transform: rotate(-45deg);
    display: flex;
    align-items: center;
    justify-content: center;
}

.ds-diamond-icon {
    width: 2.5rem;
    height: 2.5rem;
    color: #3b82f6;
}

/* -----------------------------------------------------------------------
   Scanning Beam
   ----------------------------------------------------------------------- */
.ds-beam {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}

.ds-beam-line {
    width: 100%;
    height: 0.25rem;
    background: linear-gradient(to right, transparent, #3b82f6, transparent);
    opacity: 0.5;
    filter: blur(1px);
    animation: ds-scan 3s ease-in-out infinite;
}

/* -----------------------------------------------------------------------
   Analysis Tags
   ----------------------------------------------------------------------- */
.ds-tags {
    position: absolute;
    inset: 0;
    z-index: 20;
    pointer-events: none;
}

.ds-tag {
    position: absolute;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
}

.ds-tag-label {
    padding: 0.375rem 0.75rem;
    border-radius: 0.5rem;
    border: 1px solid #e2e8f0;
    background: rgba(255, 255, 255, 0.9);
    -webkit-backdrop-filter: blur(16px);
    backdrop-filter: blur(16px);
    font-size: 9px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    white-space: nowrap;
    color: #0f172a;
}

.dark .ds-tag-label {
    border-color: rgba(255, 255, 255, 0.1);
    background: rgba(0, 0, 0, 0.9);
    color: white;
}

.ds-tag-line {
    width: 0.25rem;
    height: 2rem;
    border-radius: 9999px;
    opacity: 0.4;
}

/* Tag color lines */
.ds-tag-red    { background: linear-gradient(to bottom, #ef4444, transparent); }
.ds-tag-blue   { background: linear-gradient(to bottom, #3b82f6, transparent); }
.ds-tag-purple { background: linear-gradient(to bottom, #a855f7, transparent); }
.ds-tag-emerald { background: linear-gradient(to bottom, #10b981, transparent); }

/* Tag positions — pushed outward to clear the scanner rings */
.ds-tag-risk        { top: 10%; right: 5%; }
.ds-tag-constraint  { top: 38%; left: 0%; }
.ds-tag-optimization { bottom: 18%; right: 8%; }
.ds-tag-verification { bottom: 5%; left: 20%; }

/* -----------------------------------------------------------------------
   Keyframes
   ----------------------------------------------------------------------- */
@keyframes ds-spin {
    from { transform: rotate(0deg); }
    to   { transform: rotate(360deg); }
}

@keyframes ds-scan {
    0%, 100% { transform: translateY(-150px); opacity: 0; }
    50%      { transform: translateY(150px); opacity: 0.8; }
}

/* -----------------------------------------------------------------------
   Dark Mode
   ----------------------------------------------------------------------- */
.dark .ds-ring-outer {
    border-color: rgba(59, 130, 246, 0.4);
}

.dark .ds-ring-inner {
    border-color: rgba(168, 85, 247, 0.5);
}

.dark .ds-diamond-icon {
    color: #60a5fa;
}

/* -----------------------------------------------------------------------
   Responsive – Tablet
   ----------------------------------------------------------------------- */
@media (max-width: 768px) {
    .ds-scanner {
        width: 10rem;
        height: 10rem;
    }
    .ds-ring-inner {
        inset: 0.75rem;
    }
    .ds-diamond {
        width: 5rem;
        height: 5rem;
    }
    .ds-diamond-icon {
        width: 2rem;
        height: 2rem;
    }
    .ds-tag-label {
        font-size: 8px;
        padding: 0.25rem 0.5rem;
        letter-spacing: 0.15em;
    }
    .ds-tag-line {
        height: 1.5rem;
    }
}

/* -----------------------------------------------------------------------
   Responsive – Mobile
   ----------------------------------------------------------------------- */
@media (max-width: 480px) {
    .ds-scanner {
        width: 8rem;
        height: 8rem;
    }
    .ds-ring-inner {
        inset: 0.5rem;
    }
    .ds-diamond {
        width: 4rem;
        height: 4rem;
        border-radius: 0.75rem;
    }
    .ds-diamond-icon {
        width: 1.5rem;
        height: 1.5rem;
    }
    .ds-tag-label {
        font-size: 7px;
        padding: 0.2rem 0.4rem;
        letter-spacing: 0.1em;
    }
    .ds-tag-line {
        height: 1rem;
    }
    .ds-tag-risk        { top: 8%; right: 2%; }
    .ds-tag-constraint  { top: 35%; left: 2%; }
    .ds-tag-optimization { bottom: 15%; right: 5%; }
    .ds-tag-verification { bottom: 5%; left: 10%; }

    @keyframes ds-scan {
        0%, 100% { transform: translateY(-100px); opacity: 0; }
        50%      { transform: translateY(100px); opacity: 0.8; }
    }
}

/* -----------------------------------------------------------------------
   Reduced Motion
   ----------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
    .ds-ring-outer,
    .ds-ring-inner,
    .ds-beam-line {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
    }
}
