/* The login illustration is deliberately self-contained: no canvas or 3D runtime. */
.archive-scene {
    --cube-size: clamp(164px, 26cqw, 222px);
    --cube-cell: calc(var(--cube-size) / 3 - 4px);
    --cube-step: calc(var(--cube-size) / 3);
    position: absolute;
    width: 100%;
    height: 100%;
    min-height: 340px;
    container-type: inline-size;
    isolation: isolate;
    perspective: 1200px;
}

.archive-scene .scene-floor {
    position: absolute;
    left: 24%;
    right: 8%;
    top: 48%;
    height: 44%;
    border-radius: 50%;
    background: radial-gradient(ellipse at center, rgba(29, 77, 140, .22), rgba(37, 99, 235, .035) 49%, transparent 70%);
    transform: rotate(-8deg);
    pointer-events: none;
}

.archive-scene .scene-floor::before {
    content: "";
    position: absolute;
    width: 42%;
    height: 26%;
    top: 36%;
    left: 34%;
    background: rgba(0, 5, 15, .84);
    border-radius: 50%;
    filter: blur(16px);
    transform: rotate(8deg);
    animation: archive-shadow 9s ease-in-out infinite;
}

.archive-scene .scene-floor::after {
    content: "";
    position: absolute;
    width: 58%;
    height: 36%;
    left: 24%;
    top: 24%;
    border: 1px solid rgba(117, 163, 228, .13);
    border-radius: 50%;
    transform: rotate(8deg);
}

.archive-scene .scene-routes {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    overflow: visible;
    pointer-events: none;
}

.archive-scene .route-rail {
    fill: none;
    stroke: rgba(112, 153, 213, .19);
    stroke-width: 1;
}

.archive-scene .route-bridge {
    fill: none;
    stroke: url(#archive-route-light);
    stroke-width: 1.7;
    filter: drop-shadow(0 0 5px rgba(51, 121, 255, .45));
}

.archive-scene .route-return {
    fill: none;
    stroke: rgba(137, 189, 233, .29);
    stroke-width: 1;
    stroke-dasharray: 3 7;
}

.archive-scene .route-node {
    fill: #dbeafe;
    filter: drop-shadow(0 0 5px rgba(69, 139, 255, .85));
}

.archive-scene .route-node-halo {
    fill: rgba(37, 99, 235, .08);
    stroke: rgba(96, 165, 250, .24);
    stroke-width: 1;
}

.archive-scene .route-packet {
    filter: drop-shadow(0 0 6px rgba(73, 136, 244, .62));
}

.archive-scene .route-packet rect {
    fill: #d9e8fa;
    stroke: #eef6ff;
    stroke-width: .7;
}

.archive-scene .route-packet path {
    fill: none;
    stroke: #6f8cb3;
    stroke-width: .8;
    stroke-linecap: round;
}

.archive-scene .route-packet.is-restore rect {
    fill: #d4eee9;
    stroke: #e7fbf4;
}

.archive-scene .route-packet.is-restore path {
    stroke: #518b86;
}

.archive-scene .scene-core {
    position: absolute;
    width: var(--cube-size);
    height: var(--cube-size);
    left: 62%;
    top: 44%;
    transform: translate(-50%, -50%);
    perspective: 1050px;
    z-index: 2;
}

.archive-scene .archive-cube,
.archive-scene .cube-layer,
.archive-scene .cubelet {
    transform-style: preserve-3d;
}

.archive-scene .archive-cube {
    position: relative;
    width: 100%;
    height: 100%;
    transform: rotateX(-21deg) rotateY(-31deg) rotateZ(-4deg);
    animation: archive-orbit 38s linear infinite;
    will-change: transform;
}

.archive-scene .cube-layer {
    position: absolute;
    inset: 0;
    transform: translateY(calc(var(--layer) * var(--cube-step)));
}

.archive-scene .cube-layer[data-layer="-1"] {
    animation: archive-layer-top 18s cubic-bezier(.4, 0, .2, 1) infinite;
}

.archive-scene .cube-layer[data-layer="1"] {
    animation: archive-layer-bottom 18s cubic-bezier(.4, 0, .2, 1) infinite;
}

.archive-scene .cubelet {
    position: absolute;
    left: 50%;
    top: 50%;
    width: var(--cube-cell);
    height: var(--cube-cell);
    margin: calc(var(--cube-cell) / -2);
    transform: translate3d(calc(var(--column) * var(--cube-step)), 0, calc(var(--depth) * var(--cube-step)));
}

.archive-scene .cube-face {
    position: absolute;
    inset: 0;
    border: 1px solid rgba(158, 188, 224, .22);
    border-radius: 5px;
    background: linear-gradient(145deg, #24384f, #102036 50%, #0b1423);
    box-shadow: inset 0 1px 1px rgba(210, 229, 255, .13), inset 0 -1px 4px rgba(0, 5, 16, .5);
    backface-visibility: hidden;
}

.archive-scene .cube-face::before {
    content: "";
    position: absolute;
    inset: 5px;
    border-radius: 2px;
    background: repeating-linear-gradient(125deg, rgba(202, 222, 255, .024) 0, rgba(202, 222, 255, .024) 1px, transparent 1px, transparent 3px);
    opacity: .7;
}

.archive-scene .cube-face.face-front { transform: translateZ(calc(var(--cube-cell) / 2)); }
.archive-scene .cube-face.face-back { transform: rotateY(180deg) translateZ(calc(var(--cube-cell) / 2)); }
.archive-scene .cube-face.face-right { transform: rotateY(90deg) translateZ(calc(var(--cube-cell) / 2)); background: linear-gradient(145deg, #15283d, #0c182a 60%, #08111f); }
.archive-scene .cube-face.face-left { transform: rotateY(-90deg) translateZ(calc(var(--cube-cell) / 2)); }
.archive-scene .cube-face.face-top { transform: rotateX(90deg) translateZ(calc(var(--cube-cell) / 2)); background: linear-gradient(150deg, #384e68, #243850 57%, #172b41); border-color: rgba(188, 213, 246, .28); }
.archive-scene .cube-face.face-bottom { transform: rotateX(-90deg) translateZ(calc(var(--cube-cell) / 2)); background: #0b1525; }

.archive-scene .cubelet.is-light .face-front,
.archive-scene .cubelet.is-light .face-back,
.archive-scene .cubelet.is-light .face-top {
    background: linear-gradient(135deg, #527099, #243e60 48%, #19324e);
    border-color: rgba(187, 216, 255, .38);
}

.archive-scene .cubelet.is-vent .cube-face::before {
    inset: 8px;
    background: radial-gradient(circle, rgba(3, 10, 22, .8) .7px, transparent .9px) 0 0 / 3px 3px;
    opacity: .65;
}

.archive-scene .cubelet.is-accent .cube-face {
    border-color: rgba(80, 143, 255, .59);
    box-shadow: inset 0 0 9px rgba(37, 99, 235, .16), 0 0 5px rgba(37, 99, 235, .18);
}

.archive-scene .cubelet.is-accent .face-front::after,
.archive-scene .cubelet.is-accent .face-back::after {
    content: "";
    position: absolute;
    left: 17%;
    right: 17%;
    bottom: 16%;
    height: 2px;
    border-radius: 2px;
    background: #75a6ff;
    box-shadow: 0 0 8px rgba(74, 135, 255, .8);
    animation: archive-seam-light 6s ease-in-out infinite;
}

.archive-scene .archive-cube:not(.is-ready)::before {
    content: "";
    position: absolute;
    inset: 12%;
    border: 1px solid rgba(135, 171, 228, .48);
    border-radius: 10px;
    background: linear-gradient(135deg, #304860, #102037);
    box-shadow: 15px 15px 0 #101d31, 16px 16px 0 rgba(135, 171, 228, .26);
}

.archive-scene .source-files {
    position: absolute;
    left: 19%;
    top: 61%;
    width: 76px;
    height: 85px;
    transform: translate(-50%, -50%);
    z-index: 1;
}

.archive-scene .source-platform {
    position: absolute;
    left: -20px;
    bottom: -8px;
    width: 116px;
    height: 42px;
    border: 1px solid rgba(134, 170, 218, .22);
    border-radius: 50%;
    background: radial-gradient(ellipse, rgba(32, 72, 120, .4), transparent 70%);
    box-shadow: 0 12px 20px rgba(1, 7, 17, .4);
}

.archive-scene .source-file {
    position: absolute;
    width: 43px;
    height: 57px;
    left: calc(13px + var(--file) * 12px);
    top: calc(12px - var(--file) * 9px);
    border: 1px solid rgba(195, 218, 249, .54);
    border-radius: 4px 11px 4px 4px;
    background: linear-gradient(135deg, #4a617f, #233950 75%);
    box-shadow: -5px 9px 13px rgba(0, 5, 14, .3), inset 0 1px 0 rgba(220, 235, 255, .15);
    transform: rotate(-12deg) skewY(7deg);
    animation: archive-file-hover 6s ease-in-out infinite;
    animation-delay: calc(var(--file) * -.7s);
}

.archive-scene .source-file::before {
    content: "";
    position: absolute;
    top: 9px;
    left: 9px;
    width: 15px;
    height: 2px;
    background: #c2d8f5;
    box-shadow: 0 8px 0 rgba(160, 189, 226, .58), 0 16px 0 rgba(160, 189, 226, .35), 0 24px 0 rgba(160, 189, 226, .35);
    border-radius: 2px;
}

.archive-scene .source-file::after {
    content: "";
    position: absolute;
    right: 5px;
    top: 5px;
    width: 6px;
    height: 6px;
    border-top: 1px solid rgba(207, 225, 251, .45);
    border-right: 1px solid rgba(207, 225, 251, .45);
}

.archive-scene[data-paused="true"] *,
.archive-scene[data-paused="true"] *::before,
.archive-scene[data-paused="true"] *::after,
.archive-scene[data-motion-state="paused"] *,
.archive-scene[data-motion-state="paused"] *::before,
.archive-scene[data-motion-state="paused"] *::after {
    animation-play-state: paused !important;
}

.archive-scene[data-motion-state="static"] *,
.archive-scene[data-motion-state="static"] *::before,
.archive-scene[data-motion-state="static"] *::after {
    animation: none !important;
}

@keyframes archive-orbit {
    from { transform: rotateX(-21deg) rotateY(-31deg) rotateZ(-4deg); }
    to { transform: rotateX(-21deg) rotateY(329deg) rotateZ(-4deg); }
}

@keyframes archive-layer-top {
    0%, 8%, 84%, 100% { transform: translateY(calc(-1 * var(--cube-step))) rotateY(0deg); }
    13%, 18%, 72%, 77% { transform: translateY(calc(-1.3 * var(--cube-step))) rotateY(0deg); }
    24%, 28%, 60%, 66% { transform: translateY(calc(-1.3 * var(--cube-step))) rotateY(90deg); }
    34%, 55% { transform: translateY(calc(-1 * var(--cube-step))) rotateY(90deg); }
}

@keyframes archive-layer-bottom {
    0%, 41%, 100% { transform: translateY(var(--cube-step)) rotateY(0deg); }
    48%, 53%, 90%, 94% { transform: translateY(calc(1.26 * var(--cube-step))) rotateY(0deg); }
    59%, 64%, 80%, 84% { transform: translateY(calc(1.26 * var(--cube-step))) rotateY(-90deg); }
    70%, 75% { transform: translateY(var(--cube-step)) rotateY(-90deg); }
}

@keyframes archive-seam-light { 0%, 100% { opacity: .45; } 45%, 60% { opacity: 1; } }
@keyframes archive-file-hover { 0%, 100% { transform: translateY(0) rotate(-12deg) skewY(7deg); } 50% { transform: translateY(-5px) rotate(-12deg) skewY(7deg); } }
@keyframes archive-shadow { 0%, 100% { opacity: .8; transform: scale(1) rotate(8deg); } 50% { opacity: .6; transform: scale(.91) rotate(8deg); } }

@media (prefers-reduced-motion: reduce) {
    .archive-scene *, .archive-scene *::before, .archive-scene *::after { animation: none !important; }
}

@media (max-width: 600px) {
    .archive-scene { --cube-size: clamp(144px, 31cqw, 184px); min-height: 300px; }
    .archive-scene .source-files { transform: translate(-50%, -50%) scale(.8); }
}
