/* ============================================ */
/* TOWERS.CSS - Codebreaker, Gatling Tower,    */
/* Laser Tower, Tech-Pyramide (Command Center) */
/* ============================================ */

/* ============================================ */
/* CODEBREAKER - Matrix Data Stream Design     */
/* Hacker-Theme: Gegner hacken & deaktivieren  */
/* ============================================ */
.coding-tower {
    width: 37px;
    height: 38px;
    background: #000;
    border: 2px solid #00d4ff;
    border-radius: 4px;
    position: relative;
    top: 2px;
    overflow: hidden;
    box-shadow: 0 0 10px rgba(0, 212, 255, 0.5);
    pointer-events: none;
}
.coding-tower .matrix-col {
    position: absolute;
    top: -20px;
    width: 6px;
    font-size: 6px;
    font-family: 'Consolas', 'Courier New', monospace;
    color: #00ff88;
    text-shadow: 0 0 5px #00ff88;
    animation: matrixFall 2s linear infinite;
    line-height: 1;
    text-align: center;
}
.coding-tower .matrix-col:nth-child(1) { left: 1px; animation-delay: 0s; }
.coding-tower .matrix-col:nth-child(2) { left: 8px; animation-delay: 0.5s; }
.coding-tower .matrix-col:nth-child(3) { left: 15px; animation-delay: 0.2s; }
.coding-tower .matrix-col:nth-child(4) { left: 22px; animation-delay: 0.7s; }
.coding-tower .matrix-col:nth-child(5) { left: 29px; animation-delay: 0.4s; }
@keyframes matrixFall {
    0% { transform: translateY(0); opacity: 1; }
    100% { transform: translateY(60px); opacity: 0; }
}
/* Glow effect on border */
.coding-tower::before {
    content: '';
    position: absolute;
    inset: -2px;
    border: 2px solid #00d4ff;
    border-radius: 6px;
    animation: borderGlow 2s ease-in-out infinite;
    pointer-events: none;
}
@keyframes borderGlow {
    0%, 100% { box-shadow: 0 0 5px #00d4ff, 0 0 10px rgba(0, 212, 255, 0.3); }
    50% { box-shadow: 0 0 15px #00d4ff, 0 0 25px rgba(0, 212, 255, 0.5); }
}

/* ============================================ */
/* GATLING TOWER - DOM Design (Design 02)      */
/* Schwere Industrie-Gatling                   */
/* ============================================ */
.tower-gatling {
    width: 40px;
    height: 40px;
    position: relative;
    pointer-events: none;
}
.tower-gatling .tg-base {
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 32px;
    height: 5px;
    background: linear-gradient(180deg, #4a4a4a, #2a2a2a);
}
.tower-gatling .tg-legs {
    position: absolute;
    bottom: 4px;
    left: 50%;
    transform: translateX(-50%);
    width: 26px;
    height: 8px;
    border-left: 3px solid #555;
    border-right: 3px solid #555;
}
.tower-gatling .tg-body {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    width: 20px;
    height: 14px;
    background: linear-gradient(180deg, #606060, #404040);
    border: 1px solid #333;
    border-radius: 2px;
}
.tower-gatling .tg-turret {
    position: absolute;
    bottom: 23px;
    left: 50%;
    transform: translateX(-50%);
    width: 16px;
    height: 8px;
    background: linear-gradient(180deg, #707070, #454545);
    border-radius: 3px 3px 1px 1px;
}
.tower-gatling .tg-gun {
    position: absolute;
    bottom: 26px;
    left: 50%;
    width: 18px;
    height: 5px;
    background: #444;
    border-radius: 1px 3px 3px 1px;
}
.tower-gatling .tg-gun::after {
    content: '';
    position: absolute;
    right: -5px;
    top: 0;
    width: 6px;
    height: 5px;
    background: #333;
    border-radius: 0 2px 2px 0;
}
.tower-gatling .tg-scope {
    position: absolute;
    bottom: 33px;
    left: 50%;
    transform: translateX(-50%);
    width: 6px;
    height: 4px;
    background: #333;
    border-radius: 1px;
}
.tower-gatling .tg-scope::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 3px;
    height: 3px;
    background: #0ff;
    border-radius: 50%;
    box-shadow: 0 0 3px #0ff;
}

/* ============================================ */
/* LASER TOWER (AA) - DOM Design               */
/* Skaliert auf 40x40 für 1x1 Grid             */
/* ============================================ */
.tower-laser {
    width: 40px;
    height: 40px;
    position: relative;
    pointer-events: none;
}
.tower-laser .tl-base {
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 32px;
    height: 4px;
    background: linear-gradient(180deg, #4a4a5a, #2a2a3a);
    border-radius: 2px;
}
.tower-laser .tl-body {
    position: absolute;
    bottom: 3px;
    left: 50%;
    transform: translateX(-50%);
    width: 22px;
    height: 21px;
    background: linear-gradient(180deg, #505060 0%, #303040 100%);
    border: 2px solid #404050;
    border-radius: 3px 3px 2px 2px;
}
.tower-laser .tl-energy-core {
    position: absolute;
    top: 5px;
    left: 50%;
    transform: translateX(-50%);
    width: 8px;
    height: 8px;
    background: radial-gradient(circle, #f0a, #a06);
    border-radius: 50%;
    box-shadow: 0 0 8px #f0a, inset 0 0 4px #fff;
    animation: coreGlow 1s ease-in-out infinite alternate;
}
@keyframes coreGlow {
    0% { box-shadow: 0 0 6px #f0a, inset 0 0 3px #fff; }
    100% { box-shadow: 0 0 12px #f0a, inset 0 0 6px #fff; }
}
.tower-laser .tl-emitter-mount {
    position: absolute;
    bottom: 22px;
    left: 50%;
    transform: translateX(-50%);
    width: 14px;
    height: 5px;
    background: #404050;
    border-radius: 2px;
}
.tower-laser .tl-emitter {
    position: absolute;
    bottom: 26px;
    left: 50%;
    transform: translateX(-50%);
    width: 10px;
    height: 10px;
    background: linear-gradient(180deg, #606070, #404050);
    border-radius: 50%;
    border: 2px solid #505060;
}
.tower-laser .tl-lens {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 5px;
    height: 5px;
    background: radial-gradient(circle, #faf, #a0a);
    border-radius: 50%;
    box-shadow: 0 0 5px #f0f;
}
.tower-laser .tl-antenna {
    position: absolute;
    bottom: 34px;
    left: 50%;
    transform: translateX(-50%);
    width: 2px;
    height: 5px;
    background: #606070;
}
.tower-laser .tl-antenna-tip {
    position: absolute;
    top: -2px;
    left: 50%;
    transform: translateX(-50%);
    width: 3px;
    height: 3px;
    background: #f0f;
    border-radius: 50%;
    box-shadow: 0 0 3px #f0f;
}

/* ============================================ */
/* TECH-PYRAMIDE - Command Center Building     */
/* ============================================ */
.command-center-container {
    pointer-events: none;
    width: 95px;
    height: 100px;
    position: relative;
}
.cc-foundation {
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 90px;
    height: 6px;
    background: #4a4a40;
}
.cc-base {
    position: absolute;
    bottom: 4px;
    left: 50%;
    transform: translateX(-50%);
    width: 85px;
    height: 25px;
    background: linear-gradient(180deg, #908878 0%, #605848 100%);
    border: 2px solid #504840;
}
.cc-base-windows {
    position: absolute;
    top: 6px;
    left: 8px;
    right: 8px;
    display: flex;
    justify-content: space-between;
}
.cc-base-window {
    width: 14px;
    height: 12px;
    background: #203040;
    border: 1px solid #304050;
    position: relative;
}
.cc-base-window::after {
    content: '';
    position: absolute;
    inset: 2px;
    background: #d4a030;
    opacity: 0.5;
    animation: ccWindowFlicker 2s ease-in-out infinite;
}
@keyframes ccWindowFlicker {
    0%, 100% { opacity: 0.4; }
    50% { opacity: 0.9; }
}
.cc-level2 {
    position: absolute;
    bottom: 27px;
    left: 50%;
    transform: translateX(-50%);
    width: 65px;
    height: 22px;
    background: linear-gradient(180deg, #a09080 0%, #706858 100%);
    border: 2px solid #585048;
}
.cc-level3 {
    position: absolute;
    bottom: 47px;
    left: 50%;
    transform: translateX(-50%);
    width: 45px;
    height: 20px;
    background: linear-gradient(180deg, #b0a090 0%, #807868 100%);
    border: 2px solid #605850;
}
.cc-command-window {
    position: absolute;
    top: 4px;
    left: 50%;
    transform: translateX(-50%);
    width: 25px;
    height: 10px;
    background: #102030;
    border: 2px solid #203040;
    overflow: hidden;
}
.cc-holo {
    position: absolute;
    inset: 1px;
    background: radial-gradient(ellipse at center, rgba(212, 160, 48, 0.4) 0%, transparent 70%);
    animation: ccHoloFlicker 0.5s ease-in-out infinite;
}
@keyframes ccHoloFlicker {
    0%, 100% { opacity: 0.8; }
    50% { opacity: 1; }
}
.cc-peak {
    position: absolute;
    bottom: 65px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 20px solid transparent;
    border-right: 20px solid transparent;
    border-bottom: 25px solid #706050;
}
.cc-peak::before {
    content: '';
    position: absolute;
    top: 10px;
    left: -8px;
    width: 16px;
    height: 12px;
    background: #203040;
    clip-path: polygon(50% 0%, 0% 100%, 100% 100%);
}
.cc-eye {
    position: absolute;
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
    width: 14px;
    height: 8px;
    background: radial-gradient(ellipse, #ffd040 0%, #d4a030 50%, #a07020 100%);
    border-radius: 50%;
    animation: ccEyeGlow 2s ease-in-out infinite;
}
@keyframes ccEyeGlow {
    0%, 100% { box-shadow: 0 0 10px #d4a030; transform: translateX(-50%) scale(1); }
    50% { box-shadow: 0 0 25px #d4a030, 0 0 50px rgba(212, 160, 48, 0.5); transform: translateX(-50%) scale(1.1); }
}
.cc-beam {
    position: absolute;
    top: -20px;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 25px;
    background: linear-gradient(180deg, transparent 0%, rgba(212, 160, 48, 0.8) 100%);
    animation: ccBeamPulse 1.5s ease-in-out infinite;
}
@keyframes ccBeamPulse {
    0%, 100% { opacity: 0.5; height: 20px; }
    50% { opacity: 1; height: 30px; }
}
.cc-energy-ring {
    position: absolute;
    top: -25px;
    left: 50%;
    transform: translateX(-50%);
    width: 20px;
    height: 20px;
    border: 2px solid rgba(212, 160, 48, 0.5);
    border-radius: 50%;
    animation: ccRingPulse 2s ease-out infinite;
}
.cc-energy-ring:nth-child(2) { animation-delay: 0.7s; }
@keyframes ccRingPulse {
    0% { width: 15px; height: 15px; opacity: 1; }
    100% { width: 50px; height: 50px; opacity: 0; }
}
