/* Lighthouse CSS Variables */
:root {
    --tree1: #2D1427;
    --tree2: #5A0831;
    --tree3: #CD4D45;
    --range: #F46435;
    --mountain1: #F59452;
    --mountain2: #F47A45;
    --wood: #370D09;
    --pole: #791819;
    --flag: #C63737;
    --tower1: #76122C;
    --tower2: #C93D3D;
    --tower3: #821021;
    --tower4: #F4633A;
    --tower5: #4B1205;
    --tower6: #C13C45;
}

/* Container for all lighthouses - designed to work within left panel */
.lighthouses-container {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 250px;
    pointer-events: none;
    z-index: 100;
}

/* Individual Lighthouse Container */
.lighthouse-container {
    position: absolute;
    width: 80px;
    height: 200px;
    pointer-events: none;
    z-index: 200;
}

/* Position each lighthouse along the bottom of the left panel */
.lighthouse-container:nth-child(1) {
    bottom: 20px;
    left: 5%;
}

.lighthouse-container:nth-child(2) {
    bottom: 20px;
    left: 30%;
}

.lighthouse-container:nth-child(3) {
    bottom: 20px;
    left: 55%;
}

.lighthouse-container:nth-child(4) {
    bottom: 20px;
    right: 5%;
}

/* Height variations */
.lighthouse-container.short {
    transform: scale(0.6);
    transform-origin: bottom center;
}

.lighthouse-container.tall {
    transform: scale(0.9);
    transform-origin: bottom center;
}

.lighthouse-container.very-tall {
    transform: scale(1.1);
    transform-origin: bottom center;
}

/* Tower Structure */
.tower {
    position: absolute;
    width: 74px;
    margin-top: 108px;
    margin-left: calc(50% - 37px);
    opacity: 1;
}

/* Shadow */
.tower .shadow {
    position: absolute;
    z-index: 9999;
    top: 12px;
    width: 100%;
    height: 42px;
    background: #000;
    clip-path: polygon(50% 0, 100% 40%, 100% 45%, 87% 45%, 87% 90%, 100% 90%, 100% 100%, 60% 100%, 60% 31%, 50% 0);
    opacity: 0.4;
}

/* Flag Pole */
.tower .flagPole {
    width: 2px;
    height: 12px;
    background: var(--pole);
    margin-left: 36px;
}

.tower .flagPole::after {
    content: '';
    width: 12px;
    height: 6px;
    background: var(--flag);
    position: absolute;
    display: block;
}

/* Roof */
.tower .roof1 {
    border-left: 34px solid transparent;
    border-right: 34px solid transparent;
    border-bottom: 15px solid var(--tower1);
}

.tower .roof2 {
    width: 100%;
    height: 3px;
    background: var(--tower2);
}

/* Wall */
.tower .wall {
    position: relative;
    width: 76%;
    height: 22px;
    background: var(--tower3);
    margin-left: 12%;
    padding-top: 4px;
}

.tower .wall .w1,
.tower .wall .w2,
.tower .wall .w3,
.tower .wall .w4,
.tower .wall .w5 {
    position: absolute;
    width: 8px;
    height: 14px;
    background: var(--tower4);
}

.tower .wall .w1 { left: 4px; }
.tower .wall .w2 { left: 14px; }
.tower .wall .w3 { left: 24px; }
.tower .wall .w4 { left: 34px; }
.tower .wall .w5 { left: 44px; }

/* Legs */
.tower .legs {
    position: relative;
}

.tower .legs .left,
.tower .legs .right {
    position: absolute;
    width: 4px;
    height: 150px;
    background: var(--wood);
}

.tower .legs .left {
    transform: rotate(3deg);
    left: 12px;
}

.tower .legs .right {
    transform: rotate(-3deg);
    right: 12px;
}

/* Support Structures */
.tower .legs .support1,
.tower .legs .support2 {
    position: absolute;
}

.tower .legs .support1 { top: -14px; }
.tower .legs .support2 { top: 28px; }

.tower .legs .support1 .criss,
.tower .legs .support1 .cross,
.tower .legs .support2 .criss,
.tower .legs .support2 .cross {
    position: absolute;
    left: 35px;
    width: 4px;
    height: 64px;
    background: var(--wood);
}

.tower .legs .support1 .criss,
.tower .legs .support2 .criss {
    transform: rotate(45deg);
}

.tower .legs .support1 .cross,
.tower .legs .support2 .cross {
    transform: rotate(-45deg);
}

.tower .legs .support1 .flat,
.tower .legs .support2 .flat {
    position: absolute;
    width: 46px;
    height: 4px;
    background: var(--wood);
    bottom: -55px;
    left: 14px;
}

/* Railing */
.tower .railing {
    position: relative;
    top: -16px;
}

.tower .railing .r1,
.tower .railing .r2,
.tower .railing .r3,
.tower .railing .r4,
.tower .railing .r5,
.tower .railing .r6,
.tower .railing .r7,
.tower .railing .r8,
.tower .railing .r9 {
    position: absolute;
    width: 2px;
    height: 10px;
    background: var(--wood);
}

.tower .railing .r1 { left: 5px; }
.tower .railing .r2 { left: 12px; }
.tower .railing .r3 { left: 20px; }
.tower .railing .r4 { left: 28px; }
.tower .railing .r5 { left: 36px; }
.tower .railing .r6 { left: 44px; }
.tower .railing .r7 { left: 52px; }
.tower .railing .r8 { left: 60px; }
.tower .railing .r9 { right: 5px; }

.tower .railing .top,
.tower .railing .bot1,
.tower .railing .bot2 {
    position: absolute;
}

.tower .railing .top {
    width: 100%;
    height: 2px;
    background: var(--tower5);
}

.tower .railing .bot1 {
    width: 100%;
    height: 4px;
    top: 10px;
    background: var(--tower6);
}

.tower .railing .bot2 {
    width: 80%;
    height: 2px;
    top: 14px;
    left: 8px;
    background: var(--tower5);
    opacity: 1;
}

/* End of lighthouse css */


/* Birds css  */

/* Birds Container - Position at top of left panel */
.birds-animation {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 120px;
    pointer-events: none;
    overflow: hidden;
    z-index: 1;
}

.birds {
    position: absolute;
    z-index: 2;
    width: 100px;
    height: 100px;
}

.birds.front {
    animation: flyFront 8s linear infinite;
    animation-delay: 0.5s;
    top: 30px;
    left: -200px;
}

.birds.back {
    animation: flyBack 10s linear infinite;
    animation-delay: 3s;
    top: 10px;
    left: -250px;
    opacity: 0.7;
}

.bird {
    position: absolute;
    transform: scale(0.08);
    color: black;
}

/* Individual bird positions in formation */
.b1 { top: -30px; }
.b2 { top: -20px; left: -15px; }
.b3 { left: 10px; }
.b4 { top: 15px; left: 20px; }
.b5 { top: 30px; left: -5px; }
.b6 { top: 45px; left: 5px; }
.b7 { top: -5px; left: -35px; }
.b8 { top: 10px; left: -25px; }
.b9 { top: 25px; left: -50px; }
.b10 { top: 40px; left: -40px; }
.b11 { top: -10px; left: -75px; }
.b12 { top: 5px; left: -65px; }

/* Bird body and wing structure */
.body {
    clip-path: polygon(0 100%, 20% 20%, 40% 0, 100% 100%, 20% 80%);
    background: rgba(255, 255, 255, 0.9);
    width: 150px;
    height: 40px;
}

.wing1 {
    position: relative;
    left: 40px;
    top: -20px;
    width: 40px;
    height: 50px;
    background: rgba(255, 255, 255, 0.9);
    transform: skew(10deg);
    transform-origin: 0 0;
}

.wing2 {
    position: absolute;
    bottom: -25px;
    left: 13px;
    transform: rotate(-5deg);
}

.wing3 {
    width: 40px;
    height: 30px;
    background: rgba(255, 255, 255, 0.9);
    transform: skew(40deg);
}

/* Wing flapping animation with random delays */
.b1 .wing1 { animation: flap 0.6s ease-in-out infinite alternate; }
.b2 .wing1 { animation: flap 0.7s ease-in-out infinite alternate; }
.b3 .wing1 { animation: flap 0.5s ease-in-out infinite alternate; }
.b4 .wing1 { animation: flap 0.8s ease-in-out infinite alternate; }
.b5 .wing1 { animation: flap 0.6s ease-in-out infinite alternate; }
.b6 .wing1 { animation: flap 0.7s ease-in-out infinite alternate; }
.b7 .wing1 { animation: flap 0.5s ease-in-out infinite alternate; }
.b8 .wing1 { animation: flap 0.9s ease-in-out infinite alternate; }
.b9 .wing1 { animation: flap 0.6s ease-in-out infinite alternate; }
.b10 .wing1 { animation: flap 0.7s ease-in-out infinite alternate; }
.b11 .wing1 { animation: flap 0.5s ease-in-out infinite alternate; }
.b12 .wing1 { animation: flap 0.8s ease-in-out infinite alternate; }

@keyframes flap {
    0% {
        transform: skew(10deg) rotateX(50deg);
    }
    100% {
        transform: skew(15deg) rotateX(120deg);
    }
}

@keyframes flyFront {
    0% {
        transform: translate3d(0, 0, 0) rotate(15deg);
    }
    100% {
        transform: translate3d(calc(100% + 200px), -20px, 0) rotate(15deg);
    }
}

@keyframes flyBack {
    0% {
        transform: translate3d(0, 0, 0) scale(0.6) scaleX(-1) rotate(-15deg);
    }
    100% {
        transform: translate3d(calc(100% + 250px), -15px, 0) scale(0.6) scaleX(-1) rotate(15deg);
    }
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .birds {
        transform: scale(0.5);
    }
    
    .birds-animation {
        height: 80px;
    }
}

/* End of birds css */