@font-face {
    font-family: 'PARTYSIZERegular';
    src: url('../fonts/PARTYSIZERegular.woff2') format('woff2'),
         url('../fonts/PARTYSIZERegular.woff') format('woff');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    width: 100vw;
    height: 100vh;
    overflow: hidden;
    -webkit-overflow-scrolling: touch;
    position: fixed;
}

.background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: url('../images/background.jpg') center center/cover no-repeat;
    background-attachment: fixed;
    z-index: -1;
}

.bg-image {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: url('../images/background.jpg') center center/cover no-repeat;
    transform-origin: center center;
    transition: transform 0.1s ease-out;
    z-index: -1;
    overflow: hidden;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

/* Zoom functionality styles */
.bg-image.zooming {
    transition: none;
}

.bg-image:hover {
    cursor: grab;
}

.bg-image.grabbing {
    cursor: grabbing;
}

/* Ensure UI elements stay fixed during background zoom */
.container {
    pointer-events: auto;
    position: relative;
}

.title {
    pointer-events: none;
    position: absolute; 
    top: 5%;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
}

.buttons {
    pointer-events: auto;
    z-index: 10;
}

.btn {
    pointer-events: auto;
}

/* Mobile zoom functionality */
@media (max-width: 768px) {
    .background {
        background: none;
    }

    .bg-image.zooming {
        transition: none;
    }
}



/* Desktop Layout - Default */
.container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    position: relative;
    z-index: 1;
}

.title {
    max-width: 400px;
    max-height: 200px;
    width: auto;
    height: auto;
    margin-bottom: 3rem;
    position: absolute; 
    top: 5%; /* Change this value to reposition the title vertically */
    left: 50%;
    transform: translateX(-50%);
}

.buttons {
    position: relative;
    width: 100%;
    height: 320px;
    margin-top: 180px; /* Adjust this value for spacing from the title */
}

.btn {
    position: absolute;
    padding: 12px 24px;
    background: #ffffff;
    color: #0055ff;
    border: none;
    border-radius: 8px;
    font-family: 'PARTYSIZERegular', Arial, sans-serif;
    font-size: clamp(24px, 4vw, 50px);
    font-weight: 300;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 220px;
    height: 60px;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    margin: 0;
    left: 50%;
    transform: translateX(-50%);
}

.btn:hover {
    background: #9dbedd;
    transform: translateX(-50%) translateY(-2px);
}

/* Manual button positioning - evenly spaced vertically */
.button1 {
    top: 0px;
}

.button2 {
    top: 80px;
}

.button3 {
    top: 160px;
}

.button4 {
    top: 240px;
}

/* Responsive Design */

/* Tablet styles */
@media (max-width: 1024px) {
    .title {
        max-width: 350px;
        top: 8%;
    }

    .buttons {
        margin-top: 160px;
        height: 280px;
    }

    .btn {
        width: 200px;
        height: 55px;
        font-size: clamp(20px, 3.5vw, 40px);
    }

    .button1 {
        top: 0px;
    }

    .button2 {
        top: 70px;
    }

    .button3 {
        top: 140px;
    }

    .button4 {
        top: 210px;
    }
}

/* Mobile portrait styles */
@media (max-width: 768px) and (orientation: portrait) {
    .title {
        max-width: 280px;
        top: 8%;
    }

    .buttons {
        margin-top: 60px;
        height: 280px;
    }

    .btn {
        width: 180px;
        height: 50px;
        font-size: clamp(18px, 3vw, 32px);
    }

    .button1 {
        top: -80px;
    }

    .button2 {
        top: -15px;
    }

    .button3 {
        top: 50px;
    }

    .button4 {
        top: 115px;
    }
}

/* Mobile landscape - 2x2 grid layout */
@media (max-height: 500px) and (orientation: landscape) {
    .title {
        max-width: 200px;
        top: 5%;
    }

    .buttons {
        margin-top: 60px;
        height: 120px;
        width: 360px;
        position: absolute;
        left: 50%;
        top: 40%;
        transform: translate(-50%, -50%);
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        align-items: center;
        gap: 15px;
    }

    .btn {
        width: 160px;
        height: 45px;
        font-size: clamp(16px, 2.5vw, 24px);
        position: relative;
        left: auto;
        top: auto;
        transform: none;
        margin: 0;
    }

    /* Reset individual button positioning for flex layout */
    .button1,
    .button2,
    .button3,
    .button4 {
        position: relative;
        top: auto;
        left: auto;
        transform: none;
    }
}

/* Small mobile devices - portrait only */
@media (max-width: 480px) and (orientation: portrait) {
    .title {
        max-width: 240px;
        top: 8%;
    }

    .buttons {
        margin-top: 40px;
        height: 260px;
    }

    .btn {
        width: 160px;
        height: 45px;
        font-size: clamp(16px, 3vw, 28px);
    }

    .button1 {
        top: -80px;
    }

    .button2 {
        top: -20px;
    }

    .button3 {
        top: 40px;
    }

    .button4 {
        top: 100px;
    }
}

/* Very small devices */
@media (max-width: 360px) {
    .title {
        max-width: 200px;
        top: 5%;
    }

    .btn {
        width: 140px;
        height: 40px;
        font-size: clamp(14px, 3vw, 24px);
    }
}

/* Popup Styles */
.popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.popup-overlay.active {
    opacity: 1;
    visibility: visible;
}

.popup-content {
    background: #ffffff;
    border-radius: 20px;
    padding: 20px;
    max-width: 90vw;
    max-height: 90vh;
    width: 800px;
    position: relative;
    transform: scale(0.7);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.popup-overlay.active .popup-content {
    transform: scale(1);
}

.popup-close {
    position: absolute;
    top: 15px;
    right: 20px;
    background: none;
    border: none;
    font-size: 30px;
    color: #666;
    cursor: pointer;
    transition: color 0.3s ease;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.popup-close:hover {
    color: #0055ff;
    background: rgba(0, 85, 255, 0.1);
}

.popup-body {
    text-align: center;
    color: #0055ff;
}

.popup-body h2 {
    font-family: 'PARTYSIZERegular', Arial, sans-serif;
    font-size: 32px;
    color: #0055ff;
    margin-bottom: 20px;
    font-weight: 300;
}

.popup-body p {
    font-size: 24px;
    color: #0055ff;
    margin: 20px 0;
    font-family: 'PARTYSIZERegular', Arial, sans-serif;
    font-weight: 300;
}

/* Mobile popup styles - including landscape */
@media (max-width: 768px), (max-height: 500px) and (orientation: landscape) {
    .popup-overlay {
        padding: 20px;
        align-items: center;
        justify-content: center;
        display: flex;
        position: fixed;
        top: 0;
        left: 0;
        width: 100vw;
        height: 100vh;
        height: 100dvh; /* Use dynamic viewport height for better mobile support */
    }

    .popup-content {
        width: 90vw;
        max-width: 400px;
        padding: 30px 20px;
        margin: 0;
        position: relative;
        top: auto;
        left: auto;
        transform: scale(0.7);
    }

    .popup-overlay.active .popup-content {
        transform: scale(1);
    }

    .popup-body h2 {
        font-size: 26px;
    }

    .popup-body p {
        font-size: 20px;
    }

    .popup-close {
        top: 10px;
        right: 15px;
        font-size: 25px;
    }
}

/* Landscape mobile popup optimizations */
@media (max-height: 500px) and (orientation: landscape) {
    .popup-content {
        width: 80vw;
        max-width: 500px;
        max-height: 80vh;
        padding: 20px 25px;
        overflow-y: auto;
    }

    .popup-body h2 {
        font-size: 22px;
        margin-bottom: 15px;
    }

    .popup-body p {
        font-size: 18px;
        margin: 15px 0;
    }
}

@media (max-width: 480px) {
    .popup-overlay {
        height: 100vh;
        height: 100dvh;
        padding: 15px;
    }

    .popup-content {
        width: 95vw;
        max-width: 320px;
        padding: 25px 15px;
        margin: 0;
    }

    .popup-body h2 {
        font-size: 22px;
    }

    .popup-body p {
        font-size: 18px;
    }
}

/* Social Icons Styles */
.social-icons {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 20px;
    z-index: 100;
}

.social-icons a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    color: white;
    font-size: 24px;
    text-decoration: none;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.social-icons a:hover {
    background: rgb(15, 21, 194, 0.2);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

/* Mobile styles for social icons */
@media (max-width: 768px) {
    .social-icons {
        bottom: 20px;
        gap: 15px;
    }

    .social-icons a {
        width: 45px;
        height: 45px;
        font-size: 20px;
    }
}

@media (max-width: 480px) {
    .social-icons {
        bottom: 15px;
        gap: 12px;
    }

    .social-icons a {
        width: 40px;
        height: 40px;
        font-size: 18px;
    }
}