/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: #000000;
    height: 100vh;
    margin: 0;
    padding: 0;
    overflow: hidden;
    font-family: Arial, sans-serif;
    display: flex;
    justify-content: center;
    align-items: center;
}

.container {
    position: relative;
    width: 720px;
    height: 720px;
    margin: 0 auto;
    transform: scale(1.2);
}

/* Responsive scaling for smaller screens */
@media (max-width: 1200px) {
    .container {
        transform: scale(1.0);
    }
}

@media (max-width: 900px) {
    .container {
        transform: scale(0.8);
    }
}

@media (max-width: 700px) {
    .container {
        transform: scale(0.6);
    }
}

@media (max-width: 500px) {
    .container {
        transform: scale(0.6);
    }
}

@media (max-width: 400px) {
    .container {
        transform: scale(0.5);
    }
}

@media (max-width: 350px) {
    .container {
        transform: scale(0.4);
    }
}

@media (max-width: 300px) {
    .container {
        transform: scale(0.3);
    }
}

/* Y-shaped text element */
.y-text {
    position: absolute;
    font-size: 850px;
    font-weight: bold;
    color: white;
    -webkit-text-stroke: 5px black;
    text-stroke: 5px black;
    text-shadow: 6px 6px 0px black;
    z-index: -1;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%) translateY(45px);
    font-family: Arial, sans-serif;
    line-height: 1;
    text-align: center;
    width: 1em;
    height: 1em;
}

/* Circular design container */
.circular-design {
    position: absolute;
    width: 720px;
    height: 720px;
    z-index: 1;
}

/* Outer ring styling */
.outer-ring {
    position: absolute;
    width: 720px;
    height: 720px;
    border: 80px solid white;
    border-radius: 50%;
    box-shadow: 0 5px 24px rgba(0, 0, 0, 0.5);
    outline: 5px solid black;
    left: 0;
    top: 0;
}

/* Square base styling */
.qr-code {
    position: absolute;
    width: 50px;
    height: 50px;
    background-color: white;
    border: 5px solid black;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3), 0 2px 10px rgba(255, 255, 255, 0.1);
    z-index: 3;
    transform-origin: center;
    border-radius: 8px;
    left: 50%;
    top: 50%;
    cursor: pointer;
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(1px);
}

/* Position circles around the white ring area (320px radius from center) */
.qr-1 { transform: translate(-50%, -50%) translate(320px, 0px) rotate(0deg); }
.qr-2 { transform: translate(-50%, -50%) translate(300px, 109px) rotate(20deg); }
.qr-3 { transform: translate(-50%, -50%) translate(245px, 205px) rotate(40deg); }
.qr-4 { transform: translate(-50%, -50%) translate(160px, 277px) rotate(60deg); }
.qr-5 { transform: translate(-50%, -50%) translate(56px, 315px) rotate(80deg); }
.qr-6 { transform: translate(-50%, -50%) translate(-56px, 315px) rotate(100deg); }
.qr-7 { transform: translate(-50%, -50%) translate(-160px, 277px) rotate(120deg); }
.qr-8 { transform: translate(-50%, -50%) translate(-245px, 205px) rotate(140deg); }
.qr-9 { transform: translate(-50%, -50%) translate(-300px, 109px) rotate(160deg); }
.qr-10 { transform: translate(-50%, -50%) translate(-320px, 0px) rotate(180deg); }
.qr-11 { transform: translate(-50%, -50%) translate(-300px, -109px) rotate(200deg); }
.qr-12 { transform: translate(-50%, -50%) translate(-245px, -205px) rotate(220deg); }
.qr-13 { transform: translate(-50%, -50%) translate(-160px, -277px) rotate(240deg); }
.qr-14 { transform: translate(-50%, -50%) translate(-56px, -315px) rotate(260deg); }
.qr-15 { transform: translate(-50%, -50%) translate(56px, -315px) rotate(280deg); }
.qr-16 { transform: translate(-50%, -50%) translate(160px, -277px) rotate(300deg); }
.qr-17 { transform: translate(-50%, -50%) translate(245px, -205px) rotate(320deg); }
.qr-18 { transform: translate(-50%, -50%) translate(300px, -109px) rotate(340deg); }

/* Peace symbol structure - create the peace symbol using CSS */
.y-structure {
    position: absolute;
    width: 240px;
    height: 240px; /* Square for the peace symbol */
    z-index: 3;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
}

/* Vertical line down the center */
.y-structure::before {
    content: '';
    position: absolute;
    width: 24px;
    height: 180px; /* Shorter than full height */
    background-color: white;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    border-radius: 2px;
}

/* Left diagonal arm */
.y-structure::after {
    content: '';
    position: absolute;
    width: 24px;
    height: 120px; /* Left diagonal line */
    background-color: white;
    top: 60px;
    left: 50%;
    transform: translateX(-50%) rotate(-45deg);
    transform-origin: bottom center;
    border-radius: 2px;
}

/* Right diagonal arm - add a third line element */
.y-structure::before {
    content: '';
    position: absolute;
    width: 24px;
    height: 180px; /* Shorter than full height */
    background-color: white;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    border-radius: 2px;
}

/* Right diagonal arm element */
.peace-right-arm {
    position: absolute;
    width: 24px;
    height: 120px;
    background-color: white;
    top: 60px;
    left: 50%;
    transform: translateX(-50%) rotate(45deg);
    transform-origin: bottom center;
    border-radius: 2px;
    z-index: 3;
}

/* QR codes on Y-structure (scaled up 20%) */
.qr-y-stem {
    bottom: 24px;
    left: 50%;
    transform: translate(-50%, -50%) translateX(0px) translateY(125px) rotate(0deg);
}

.qr-y-left {
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) translateX(-105px) translateY(-125px) rotate(-30deg);
}

.qr-y-right {
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) translateX(105px) translateY(-125px) rotate(30deg);
}

/* Additional circles for each arm */
.qr-y-stem-top {
    bottom: 84px; /* Higher up on the vertical stem */
    left: 50%;
    transform: translate(-50%, -50%) translateX(0px) translateY(0px) rotate(0deg);
}

.qr-y-left-top {
    top: 48px; /* Higher up on the left arm */
    left: 12px;
    transform: translate(-50%, -50%) translateX(-30px) translateY(-48px) rotate(-30deg);
}

.qr-y-right-top {
    top: 48px; /* Higher up on the right arm */
    right: 12px;
    transform: translate(-50%, -50%) translateX(30px) translateY(-48px) rotate(30deg);
}

/* QR codes will be generated by JavaScript */

/* Landscape orientation adjustments */
@media (max-height: 600px) and (orientation: landscape) {
    .container {
        transform: scale(0.7);
    }
}

@media (max-height: 400px) and (orientation: landscape) {
    .container {
        transform: scale(0.5);
    }
}

/* Ultra-wide screens */
@media (min-width: 1920px) {
    .container {
        transform: scale(1.4);
    }
}

@media (min-width: 2560px) {
    .container {
        transform: scale(1.6);
    }
}

/* Touch-friendly adjustments for mobile */
@media (max-width: 768px) {
    .qr-code {
        cursor: pointer;
        -webkit-tap-highlight-color: transparent;
        touch-action: manipulation;
        -webkit-touch-callout: none;
        -webkit-user-select: none;
        -moz-user-select: none;
        -ms-user-select: none;
        user-select: none;
    }
    
    /* Ensure proper sizing on mobile */
    body {
        -webkit-text-size-adjust: 100%;
        -webkit-font-smoothing: antialiased;
        -moz-osx-font-smoothing: grayscale;
    }
    
    /* Fix for iOS Safari viewport issues */
    .container {
        min-height: 100vh;
        min-height: -webkit-fill-available;
    }
}

/* Very small phones */
@media (max-width: 375px) and (max-height: 667px) {
    .container {
        transform: scale(0.45);
    }
}

@media (max-width: 320px) {
    .container {
        transform: scale(0.35);
    }
}

/* High DPI displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .qr-code {
        border-width: 2px; /* Thinner borders on high DPI */
    }
    
    .outer-ring {
        outline-width: 3px;
    }
    
    .y-text {
        -webkit-text-stroke-width: 3px;
        text-stroke-width: 3px;
    }
}

