@import url("https://fonts.googleapis.com/css2?family=Nunito+Sans:opsz,wght@6..12,400;6..12,500;6..12,700&family=Roboto+Condensed&display=swap");
@import url('https://fonts.googleapis.com/css2?family=Open+Sans:ital,wght@0,300..800;1,300..800&family=Roboto:ital,wght@0,100;0,300;0,400;0,500;0,700;0,900;1,100;1,300;1,400;1,500;1,700;1,900&display=swap');

/* Reset and Base Styles */
* {
    box-sizing: border-box;
    padding: 0;
    margin: 0;
}

body {
    font-family: "Nunito Sans", sans-serif;
    background-size: cover;
    padding: clamp(15px, 3vw, 30px);
    overflow: hidden;
    -webkit-text-size-adjust: 100%;
    -webkit-tap-highlight-color: transparent;
    min-height: 100vh;
}

#app {
    border-radius: 15px;
    height: 95vh;
    position: relative;
}

/* Background Video */
.background-clip {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: -1;
}

/* Support Button */
.support {
    width: clamp(45px, 8vw, 55px);
    height: clamp(45px, 8vw, 55px);
    background-color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1001;
    position: fixed;
    bottom: 5%;
    right: 5%;
    box-shadow: rgba(149, 157, 165, 0.2) 0px 8px 24px;
    border: 1px solid black;
    cursor: pointer;
    transition: transform 0.3s ease, background-color 0.3s ease;
    animation: pulse 2s infinite;
}

.support:hover {
    transform: scale(1.1) rotate(360deg);
    background-color: #f0f0f0;
    box-shadow: rgba(149, 157, 165, 0.4) 0px 12px 32px;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

.support i {
    font-size: clamp(20px, 4vw, 30px);
}

/* Support Container */
.support-container {
    width: min(90vw, 1400px);
    height: min(80vh, 600px);
    position: fixed;
    border-radius: 20px;
    background-color: rgb(255, 255, 255);
    padding: clamp(15px, 3vw, 20px);
    z-index: 1001;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    overflow-y: auto;
}

.support-container h2 {
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: clamp(18px, 4vw, 24px);
    margin-bottom: 20px;
}

.support-container .formClosed {
    position: absolute;
    right: -10px;
    top: -10px;
    color: #ffffff;
    background: #ff0000;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    cursor: pointer;
}

.support-container .support-content {
    width: 100%;
    height: auto;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: flex-start;
    gap: 20px;
}

.support-container .support-content .videoSup {
    flex: 1;
    min-width: 300px;
    max-width: 400px;
}

.support-container .support-content .videoSup h4 {
    text-align: center;
    margin-bottom: 10px;
}

.support-container .support-content .videoSup video {
    width: 100%;
    height: auto;
    border-radius: 10px;
    border: 2px solid black;
}

/* Main Menu */
.menu {
    position: relative;
    width: 100%;
    height: 90vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 1px;
}

.menu li {
    position: absolute;
    list-style: none;
    font-size: clamp(30px, 6vw, 40px);
    width: clamp(80px, 12vw, 100px);
    height: clamp(80px, 12vw, 100px);
    display: flex;
    justify-content: center;
    left: 27%;
    align-items: center;
    transition: 0.5s;
    transition-delay: calc(0.1s * var(--i));
    transform: rotate(0deg) translateX(clamp(300px, 50vw, 400px));
    transform-origin: clamp(350px, 60vw, 460px);
}

.menu.active li {
    transform: rotate(calc(360deg / 8 * var(--i)));
}

.menu li img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transform: rotate(calc(360deg / -8 * var(--i)));
    transition: transform 0.3s ease;
}

.menu li:hover img {
    transform: rotate(calc(360deg / -8 * var(--i))) scale(1.1);
}

/* Toggle (Center Figure) */
.toggle {
    position: absolute;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 100;
    cursor: pointer;
    width: clamp(200px, 35vw, 235px);
    height: clamp(600px, 80vh, 750px);
}

.toggle img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* Hotspots for Mobile */
.hotspot {
    position: absolute;
    width: 13px;
    height: 13px;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
}

.hotspot:hover {
    background: rgba(255, 255, 255, 1);
    transform: scale(1.2);
}

.hotspot span {
    position: absolute;
    width: 100%;
    height: 100%;
    background: inherit;
    border-radius: inherit;
    opacity: .8;
    animation: pulseAnimate 2s ease-out infinite;
    animation-delay: calc(1s * var(--i));
}

@keyframes pulseAnimate {
    100% {
        opacity: 0;
        transform: scale(3);
    }
}

/* Navigation Button */
.nav-button {
    position: fixed;
    bottom: 5%;
    left: 5%;
    transition: all 0.3s ease-in-out;
    box-shadow: 0px 10px 20px rgba(0, 0, 0, 0.2);
    padding: clamp(8px, 2vw, 12px) clamp(16px, 3vw, 20px);
    background-color: rgb(0 107 179);
    border-radius: 9999px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffff;
    gap: 10px;
    font-weight: bold;
    border: 3px solid #ffffff4d;
    text-decoration: none;
    font-size: clamp(12px, 2.5vw, 15px);
    z-index: 1000;
}

.nav-button .icon {
    width: clamp(18px, 4vw, 24px);
    height: clamp(18px, 4vw, 24px);
    transition: all 0.3s ease-in-out;
}

.nav-button:hover {
    transform: scale(1.05);
    border-color: #fff9;
    text-decoration: none;
    color: #fff;
}

.nav-button:hover .icon {
    transform: translateX(4px);
}

/* Popup Onload */
.popup-onload {
    width: min(90vw, 800px);
    display: none;
    position: fixed;
    z-index: 1001;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
}

.popup-onload .cnt223 {
    width: 100%;
    padding: clamp(15px, 3vw, 20px);
    background: #f3f3f3;
    z-index: 103;
    border-radius: 10px;
    box-shadow: 0 2px 5px #000;
}

.popup-onload .cnt223 video {
    width: 100%;
    max-width: 450px;
    height: auto;
    margin: 10px auto;
    display: block;
    border-radius: 20px;
}

.popup-content {
    padding: clamp(15px, 3vw, 20px);
    text-align: center;
}

.popup-content h2 {
    font-family: "Roboto", sans-serif;
    font-weight: 500;
    font-size: clamp(20px, 4vw, 30px);
    color: red;
    margin-bottom: 15px;
}

.popup-content p {
    color: #000000;
    text-align: justify;
    font-size: clamp(16px, 3vw, 22px);
    font-family: sans-serif;
    margin-bottom: 20px;
}

.closes {
    width: min(350px, 80vw);
    height: 40px;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 10px;
    background: rgb(20, 188, 255);
    border: none;
    margin: 0 auto;
    text-decoration: none;
}

.closes:hover {
    text-decoration: none;
    background: rgb(15, 160, 220);
}

.popup-content a {
    font-family: "Roboto", sans-serif;
    font-weight: 500;
    font-size: clamp(18px, 3vw, 25px);
    color: #fff;
    text-decoration: none;
}

/* Modal Styles */
.modal-dialog {
    max-width: min(90vw, 800px);
    width: 100%;
    margin: 1.75rem auto;
}

.modal-content {
    border-radius: 10px;
    overflow: hidden;
}

.modal-header {
    background: #f8f9fa;
    border-bottom: 2px solid #dee2e6;
    padding: clamp(10px, 2vw, 15px) clamp(15px, 3vw, 20px);
}

.modal-title {
    font-size: clamp(14px, 3vw, 18px);
    font-weight: bold;
    margin: 0;
}

.modal-body {
    padding: clamp(15px, 3vw, 20px);
    max-height: 70vh;
    overflow-y: auto;
}

.modal-body h5 {
    width: 100%;
    border-bottom: 2px solid gray;
    margin: 15px 0 10px 0;
    font-size: clamp(14px, 2.5vw, 16px);
}

.item-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 20px;
    gap: 15px;
}

.modal-img {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
}

.modal-img img {
    width: 100%;
    max-width: clamp(120px, 25vw, 180px);
    height: auto;
    cursor: zoom-in;
    transition: transform 0.25s ease;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.modal-img img.zoomed {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(3);
    z-index: 1050;
    cursor: zoom-out;
    max-width: 90vw;
    max-height: 90vh;
}

.modal-text {
    width: 100%;
}

.modal-body p {
    font-size: clamp(14px, 2.8vw, 17px);
    line-height: 1.6;
    text-align: justify;
    margin-bottom: 15px;
    color: #333;
}

.modal-header .close {
    font-size: clamp(20px, 4vw, 24px);
    color: #000;
    opacity: 1;
    text-shadow: none;
    background: none;
    border: none;
    padding: 0;
    margin: -1rem -1rem -1rem auto;
}

.modal-header .close:hover {
    opacity: 0.7;
}

/* Overlay for popup */
#overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 100;
}

/* Responsive Breakpoints */

/* Large Desktop */
@media (min-width: 1200px) {
    .menu li {
        transform-origin: 460px;
        transform: rotate(0deg) translateX(400px);
        /* Hidden initially */
        opacity: 0;
        visibility: hidden;
    }
    
    .menu.active li {
        transform: rotate(calc(360deg / 8 * var(--i)));
        opacity: 1;
        visibility: visible;
    }
    
    .toggle {
        width: 235px;
        height: 750px;
    }
    
    /* Hide hotspots on desktop */
    .hotspot {
        display: none;
    }
}

/* Desktop */
@media (min-width: 992px) and (max-width: 1199px) {
    .menu li {
        transform-origin: 400px;
        transform: rotate(0deg) translateX(350px);
        /* Hidden initially */
        opacity: 0;
        visibility: hidden;
    }
    
    .menu.active li {
        transform: rotate(calc(360deg / 8 * var(--i)));
        opacity: 1;
        visibility: visible;
    }
    
    /* Hide hotspots on desktop */
    .hotspot {
        display: none;
    }
    
    .support-container .support-content .videoSup {
        min-width: 250px;
        max-width: 350px;
    }
}

/* Tablet */
@media (min-width: 768px) and (max-width: 991px) {
    .menu li {
        transform-origin: 350px;
        transform: rotate(0deg) translateX(300px);
        width: 90px;
        height: 90px;
        /* Hidden initially */
        opacity: 0;
        visibility: hidden;
    }
    
    .menu.active li {
        transform: rotate(calc(360deg / 8 * var(--i)));
        opacity: 1;
        visibility: visible;
    }
    
    /* Hide hotspots on tablet */
    .hotspot {
        display: none;
    }
    
    .toggle {
        width: 200px;
        height: 650px;
    }
    
    .support-container .support-content {
        flex-direction: column;
    }
    
    .support-container .support-content .videoSup {
        min-width: 100%;
        max-width: 100%;
    }
}

/* Mobile Large */
@media (min-width: 481px) and (max-width: 767px) {
    body {
        overflow-x: hidden;
    }
    
    .menu li {
        display: none;
    }
    
    .toggle {
        width: 70%;
        height: 85vh;
        max-width: 300px;
    }
    
    /* Show hotspots */
    .hotspot {
        display: block;
    }
    
    /* Hotspot positions - adjust these based on your image */
    #pos1 { top: 4.5%; left: 47%; }  /* Hat */
    #pos2 { top: 38%; left: 47%; }   /* Jacket */
    #pos3 { top: 20%; left: 60%; }   /* Shirt */
    #pos4 { top: 25%; left: 47%; }   /* Name tag */
    #pos5 { top: 32%; left: 26%; }   /* Belt */
    #pos6 { top: 60%; left: 15%; }   /* Boots */
    #pos7 { top: 70%; left: 47%; }   /* Additional item */
    #pos8 { top: 90%; left: 47%; }   /* Additional item */
    #pos9 { top: 28%; left: 12%; }   /* Raincoat */
    #pos10 { top: 32%; left: 66%; }  /* Additional item */
    #pos11 { top: 42.5%; left: 30%; } /* Rank */
    #pos12 { top: 30%; left: 90%; }  /* Logo */
    #pos13 { top: 30%; left: 7%; }   /* Additional item */
    
    .item-container {
        flex-direction: column;
        text-align: center;
    }
    
    .modal-dialog {
        margin: 10px;
    }
    
    .support-container {
        width: 95vw;
        height: 85vh;
        padding: 15px;
    }
    
    .support-container .support-content .videoSup {
        min-width: 100%;
    }
}

/* Mobile Small */
@media (max-width: 480px) {
    body {
        padding: 10px;
        overflow-x: hidden;
    }
    
    .menu {
        height: 87vh;
    }
    
    .menu li {
        display: none;
    }
    
    .toggle {
        width: 80%;
        height: 80vh;
        max-width: 250px;
    }
    
    /* Adjust hotspot positions for smaller screens */
    #pos1 { top: 5%; left: 47%; }
    #pos2 { top: 25%; left: 67%; }
    #pos3 { top: 15%; left: 49%; }
    #pos4 { top: 27%; left: 47%; }
    #pos5 { top: 34%; left: 47%; }
    #pos6 { top: 28%; left: 32%; }
    #pos7 { top: 80%; left: 47%; }
    #pos8 { top: 50%; left: 78%; }
    #pos9 { top: 32%; left: 33%; }
    #pos10 { top: 34%; left: 64%; }
    #pos11 { top: 44%; left: 32%; }
    #pos12 { top: 32%; left: 88%; }
    #pos13 { top: 32%; left: 9%; }
    
    .modal-dialog {
        margin: 5px;
        max-width: 95vw;
    }
    
    .modal-body {
        padding: 15px;
    }
    
    .support-container {
        width: 95vw;
        height: 90vh;
        padding: 10px;
    }
    
    .support-container h2 {
        font-size: 18px;
    }
    
    .nav-button {
        bottom: 10px;
        left: 10px;
        padding: 8px 12px;
    }
    
    .support {
        bottom: 10px;
        right: 10px;
        width: 45px;
        height: 45px;
    }
}

/* Extra Small Mobile */
@media (max-width: 320px) {
    .toggle {
        width: 90%;
        height: 75vh;
    }
    
    .modal-title {
        font-size: 12px;
    }
    
    .modal-body p {
        font-size: 13px;
    }
    
    .support-container .support-content .videoSup video {
        border: 1px solid black;
    }
    
    .popup-content h2 {
        font-size: 16px;
    }
    
    .popup-content p {
        font-size: 14px;
    }
}

/* Landscape orientation adjustments */
@media (max-height: 600px) and (orientation: landscape) {
    .toggle {
        height: 70vh;
    }
    
    .menu {
        height: 85vh;
    }
    
    .support-container {
        height: 85vh;
    }
}

/* High DPI displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .modal-img img {
        image-rendering: -webkit-optimize-contrast;
        image-rendering: optimize-contrast;
    }
}

/* Accessibility improvements */
@media (prefers-reduced-motion: reduce) {
    .hotspot span {
        animation: none;
    }
    
    .support {
        animation: none;
    }
    
    .menu li {
        transition: none;
    }
    
    .modal-img img {
        transition: none;
    }
}

/* Print styles */
@media print {
    .background-clip,
    .support,
    .nav-button {
        display: none;
    }
    
    body {
        background: white;
    }
}