/* 
  OmniDragon CSS v1: Optimized Autonomous Serpentine Architecture
  Zero-Layout Thrashing / Force hardware-accelerated 3D compositions.
*/

.dragon-host {
    position: fixed;
    inset: 0;
    z-index: 0; /* Align with live particle layer above background mesh */
    pointer-events: none;
    contain: strict;
    perspective: 1000px;
    opacity: 0.4; /* Adjusted aesthetic translucency throttle */
}

.dragon-segment {
    position: absolute;
    border-radius: 50%;
    transform-origin: center center;
    will-change: transform;
    opacity: 0.75;
    box-shadow: 0 0 15px rgba(0, 212, 255, 0.3);
    transition: background 0.3s ease;
}

/* Specialized Segment Gradient Flows */
.dragon-segment.head {
    width: 30px;
    height: 30px;
    background: radial-gradient(circle at 30% 30%, #fff, #00d4ff, #005b96);
    box-shadow: 0 0 30px #00d4ff, 0 0 10px #fff;
    z-index: 20; /* The head rides atop the stacking order */
}

/* Horns/Eyes for the Head */
.dragon-segment.head::before,
.dragon-segment.head::after {
    content: '';
    position: absolute;
    top: -4px;
    width: 4px;
    height: 10px;
    background: #7b61ff;
    border-radius: 2px;
    box-shadow: 0 0 8px #7b61ff;
}
.dragon-segment.head::before { left: 6px; transform: rotate(-20deg); }
.dragon-segment.head::after { right: 6px; transform: rotate(20deg); }

/* Body Segments alternate hue slightly */
.dragon-segment.body {
    background: linear-gradient(135deg, rgba(0, 212, 255, 0.6), rgba(123, 97, 255, 0.4));
    border: 1px solid rgba(0, 212, 255, 0.6);
}

/* Tail segments taper and use deep purple theme */
.dragon-segment.tail {
    background: radial-gradient(circle at 50% 50%, #7b61ff, #2e1065);
    border: 1px solid rgba(123, 97, 255, 0.8);
    box-shadow: 0 0 10px rgba(123, 97, 255, 0.5);
}

/* Smooth Scaling Definition for the 15-segment chain */
.dragon-segment:nth-child(2)  { width: 26px; height: 26px; opacity: 0.72; }
.dragon-segment:nth-child(3)  { width: 24px; height: 24px; opacity: 0.68; }
.dragon-segment:nth-child(4)  { width: 22px; height: 22px; opacity: 0.64; }
.dragon-segment:nth-child(5)  { width: 20px; height: 20px; opacity: 0.60; }
.dragon-segment:nth-child(6)  { width: 19px; height: 19px; opacity: 0.56; }
.dragon-segment:nth-child(7)  { width: 18px; height: 18px; opacity: 0.52; }
.dragon-segment:nth-child(8)  { width: 17px; height: 17px; opacity: 0.48; }
.dragon-segment:nth-child(9)  { width: 16px; height: 16px; opacity: 0.44; }
.dragon-segment:nth-child(10) { width: 14px; height: 14px; opacity: 0.40; }
.dragon-segment:nth-child(11) { width: 12px; height: 12px; opacity: 0.36; }
.dragon-segment:nth-child(12) { width: 10px; height: 10px; opacity: 0.32; }
.dragon-segment:nth-child(13) { width: 8px;  height: 8px;  opacity: 0.28; }
.dragon-segment:nth-child(14) { width: 6px;  height: 6px;  opacity: 0.24; }
.dragon-segment:nth-child(15) { width: 4px;  height: 4px;  opacity: 0.20; }
