@font-face {
    font-family: "decoturaicg";
    src: url("fonts/decoturaicg-webfont.eot?#iefix");
    src: url("fonts/decoturaicg-webfont.eot?#iefix") format("eot"),
        url("fonts/decoturaicg-webfont.woff2") format("woff2"),
        url("fonts/decoturaicg-webfont.woff") format("woff"),
        url("fonts/decoturaicg-webfont.ttf") format("truetype");
}

:root {
    --btn-font-size: clamp(10px, 1.4vw, 14px);
    --input-font-size: clamp(9px, 1.3vw, 13px);
    --button-padding: clamp(7px, 1.2vw, 14px);
}

body {
    margin: 0;
    background-color: black;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: calc(var(--vh, 1vh) * 100);
    overflow: hidden;
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none;
    touch-action: manipulation;
    /* allow buttons, disable zoom */
}

canvas {
    display: block;
    width: 100%;
    height: calc(var(--vh, 1vh) * 100);
    max-width: 100vw;
    max-height: 100vh;
    touch-action: manipulation;
}

#gameContainer {
    position: absolute;
    width: 100vw;
    height: calc(var(--vh, 1vh) * 100);
}

/* Phaser canvas */
#gameCanvas {
    width: 100%;
    height: calc(var(--vh, 1vh) * 100);
    display: block;
}

/* Video background */
#jVideo {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    z-index: 1;
    display: none;
}

/* Landing layout */
#landing {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 2;
    padding: 4vh 0;
}

/* Scale all landing images based on height */
#landing .top-image,
#landing .bottom-image {
    max-height: 23vh;
    width: auto;
    height: auto;
    display: block;
    margin: auto;
}
#landing .bottom-homepage{
    font-size: 2.8vh;
    font-weight: bolder;
    font-family: "decoturaicg"!important;
    margin: 1vh;
}
#landing .content {
    font-family: Arial, sans-serif;
    font-size: 1vh;
    text-align: center;
    width: auto;
    height: auto;
}

#landing .content a {
    text-decoration: none;
    color: #47599a;
    font-family: Arial, sans-serif;
    margin: 0 5px;
}

#landing .top-image {
    max-height: 35vh;
}

#landing .top-sub {
    max-height: 4vh;
}

.spacer {
    flex-grow: 1;
}

#playButton {
    border: none;
    background: none;
    padding: 0;
    margin: 18px 0;
    cursor: pointer;
    transition: transform 0.2s ease;
    max-height: 14vh;
}

#playButton:hover {
    transform: scale(1.1);
}

#playButton img {
    display: block;
    height: 100%;
    width: auto;
    margin: auto;
}

#loadingOverlay {
    display: none;
    background-color: #000;
    color: #fff;
    z-index: 999;
    margin: 18px 0;
    padding: 0;
    position: relative;
}

#loadingText {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    margin: auto;
    text-align: center;
    align-content: center;
    align-self: center;
}

.spinner {
    border: 4px solid #444;
    border-top: 4px solid #fff;
    border-radius: 50%;
    width: 14vh;
    height: 14vh;
    animation: spin 1s linear infinite;
    margin-bottom: 20px;
    margin: auto;
}

/* Skip Button Styles */
#skipVideoOption {
    top: 20px;
    right: 20px;
    z-index: 1000;

    background: rgba(0, 0, 0, 0.7);
    color: white;
    border: none;
    padding: 12px 24px;
    padding-bottom: 14px;
    border-radius: 20px;
    font-weight: 600;
    cursor: pointer;
    outline: none;
    display: none;

    position: absolute;
    background-clip: padding-box;

    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    transform: translateY(0);
    opacity: 0.9;
}

#skipVideoOption::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, rgb(165, 103, 41), rgb(231, 177, 41), rgb(165, 103, 41));
    border-radius: 27px;
    z-index: -1;
    transition: all 0.3s ease;
    opacity: 0;
}

#skipVideoOption:hover {
    transform: translateY(-2px);
    opacity: 1;
    background: rgba(0, 0, 0, 0.9);
    box-shadow: 0 8px 25px rgba(165, 103, 41, 0.3);
}

#skipVideoOption:hover::before {
    opacity: 1;
    background: linear-gradient(45deg, rgb(231, 177, 41), rgb(165, 103, 41), rgb(231, 177, 41));
}

#skipVideoOption:active {
    transform: translateY(0);
    transition: transform 0.1s ease;
}

/* Pulsing animation for attention */
@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(231, 177, 41, 0.4);
    }

    70% {
        box-shadow: 0 0 0 10px rgba(231, 177, 41, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(231, 177, 41, 0);
    }
}

#skipVideoOption.pulse {
    animation: pulse 2s infinite;
}

#skipVideoOption.bottom-right {
    top: auto;
    bottom: 50px;
    right: 40px;
}

#skipVideoOption.bottom-left {
    top: auto;
    bottom: 40px;
    right: auto;
    left: 20px;
}

#skipVideoOption.top-left {
    top: 20px;
    right: auto;
    left: 20px;
}

@media (max-width: 768px) {
    #skipVideoOption {
        padding: 10px 20px;
        padding-bottom: 12px;
        font-size: 12px;
        top: 15px;
        right: 15px;
    }
    #skipVideoOption.bottom-right {
        top: auto;
        bottom: 70px;
        right: 20px;
    }
}

#skipVideoOption.with-icon::before {
    content: '⏭';
    margin-right: 6px;
    font-size: 12px;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Safari/iOS fix */
img,
button {
    box-sizing: border-box;
}

.error-message {
    color: #ff6b6b;
    background: rgba(255, 0, 0, 0.1);
    padding: 20px;
    border-radius: 8px;
    text-align: center;
    margin: 20px;
    display: none;
}

.error-message button {
    background: #ff6b6b;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
    margin-top: 10px;
}