html {
    box-sizing: border-box;
}

*,
*:before,
*:after {
    box-sizing: inherit;
}

html,
body {
    height: 100%;
}

canvas {
    display: block;
}

body {
    margin: 0;
}

#unity-container {
    width: 100%;
    height: 100%;
}

#unity-canvas {
    width: 100% !important;
    height: 100% !important;
    background: #231F20;
}

#loading-cover {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    background: #231f20;
}

#unity-loading-bar {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: relative;
    z-index: 1;
    width: min(520px, 86vw);
    padding: 0 28px;
}

#unity-loading-bar::before {
    content: "Developed by DucVuPro";
    margin-bottom: 18px;
    color: #f6fbff;
    font: 700 18px/1.2 Arial, sans-serif;
    letter-spacing: 2px;
    text-shadow:
        0 0 12px rgba(0, 234, 255, 0.82),
        0 0 26px rgba(255, 20, 147, 0.28);
}

#unity-logo {
    text-align: center;
}

#unity-logo img {
    max-width: 80%;
}

#unity-progress-bar-empty {
    width: 100%;
    height: 20px;
    margin: 16px 0 4px;
    text-align: left;
    border: 1px solid rgba(0, 234, 255, 0.55);
    border-radius: 999px;
    padding: 3px;
    background: rgba(255, 255, 255, 0.08);
    box-shadow:
        0 0 18px rgba(0, 234, 255, 0.2),
        inset 0 1px 6px rgba(0, 0, 0, 0.45);
    overflow: hidden;
}

#unity-progress-bar-full {
    width: 0%;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #00eaff 0%, #39ff88 48%, #ff3fb4 100%);
    box-shadow:
        0 0 14px rgba(0, 234, 255, 0.7),
        0 0 22px rgba(255, 63, 180, 0.44);
    transition: width 0.18s ease-out;
}

.light #unity-progress-bar-empty {
    border-color: rgba(0, 234, 255, 0.55);
}

.light #unity-progress-bar-full {
    background: linear-gradient(90deg, #00eaff 0%, #39ff88 48%, #ff3fb4 100%);
}

#unity-fullscreen-button {
    position: absolute;
    left: 10px;
    top: 10px;
    width: 25px;
    height: 25px;
    background: url('fullscreen-button.png') no-repeat center;
    background-size: contain;
    background-color: rgba(255, 255, 255, 0.9);
    border-radius: 5px;
    z-index: 10;
}

#start-overlay {
    position: fixed;
    inset: 0;
    background: #050505;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
}

#start-btn {
    padding: 15px 35px;
    font-size: 24px;
    font-weight: bold;
    background: linear-gradient(145deg, #ff69b4, #ff1493);
    color: white;
    border: 2px solid #ff69b4;
    border-radius: 12px;
    cursor: pointer;
    box-shadow: 0 0 20px rgba(255, 105, 180, 0.6);
    transition: transform 0.2s, box-shadow 0.2s;
    font-family: Arial, sans-serif;
    text-transform: uppercase;
    animation: pulseBtn 1.5s infinite;
}

@keyframes pulseBtn {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 0 20px rgba(255, 105, 180, 0.6);
    }
    50% {
        transform: scale(1.05);
        box-shadow: 0 0 30px rgba(255, 105, 180, 0.9);
    }
}

#start-btn:active {
    transform: scale(0.95);
}

#ios-guide {
    position: fixed;
    inset: 0;
    background: #050505;
    z-index: 10001;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    font-family: Arial, sans-serif;
}

.ios-guide-box {
    background: #555555;
    border-radius: 16px;
    padding: 25px;
    width: 90vw;
    max-width: 340px;
    max-height: 90vh;
    overflow-y: auto;
    box-sizing: border-box;
    color: white;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.4);
    animation: slideUp 0.4s ease-out;
}

@media (max-width: 380px) {
    .ios-guide-box {
        padding: 15px;
    }
    .ios-guide-box h3 {
        font-size: 18px;
    }
    .ios-guide-box p, .ios-guide-box ul {
        font-size: 13px;
    }
    .ios-guide-box ul li {
        padding: 6px 10px;
    }
    .ios-guide-box button {
        padding: 10px 15px;
        font-size: 14px;
    }
}

.ios-guide-box h3 {
    margin: 0 0 15px 0;
    color: #ffffff;
    font-size: 20px;
    text-transform: uppercase;
    text-align: center;
}

.ios-guide-box p {
    font-size: 14px;
    line-height: 1.5;
    margin: 0 0 15px 0;
    color: #ffffff;
    text-align: left;
}

.ios-guide-box ul {
    text-align: left;
    margin: 0 0 20px 0;
    padding-left: 0;
    list-style: none;
    font-size: 14px;
    color: #ffffff;
    line-height: 1.6;
}

.ios-guide-box ul li {
    margin-bottom: 12px;
    background: rgba(255, 255, 255, 0.1);
    padding: 8px 12px;
    border-radius: 8px;
}

.ios-guide-box button {
    display: block;
    width: 100%;
    padding: 12px 20px;
    font-size: 16px;
    font-weight: bold;
    background: linear-gradient(145deg, #ff69b4, #ff1493);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    box-shadow: 0 0 15px rgba(255, 105, 180, 0.4);
    transition: transform 0.2s;
    text-transform: uppercase;
}

.ios-guide-box button:active {
    transform: scale(0.95);
}

@keyframes slideUp {
    from { transform: translateY(50px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.spinner,
.spinner:after {
    border-radius: 50%;
    width: 5em;
    height: 5em;
}

.spinner {
    margin: 10px;
    font-size: 10px;
    position: relative;
    text-indent: -9999em;
    border-top: 1.1em solid rgba(0, 234, 255, 0.18);
    border-right: 1.1em solid rgba(255, 63, 180, 0.2);
    border-bottom: 1.1em solid rgba(57, 255, 136, 0.18);
    border-left: 1.1em solid #00eaff;
    box-shadow:
        0 0 24px rgba(0, 234, 255, 0.34),
        inset 0 0 18px rgba(255, 255, 255, 0.08);
    transform: translateZ(0);
    animation: spinner-spin 1.1s infinite linear;
}

@keyframes spinner-spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

#rotate-ui {
    position: fixed;
    inset: 0;
    background: radial-gradient(circle at center, #0a0a0a, #000);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: #00eaff;
    font-family: Arial, sans-serif;
    z-index: 9999;
    transition: opacity 0.3s ease;
}

.phone-wrapper {
    padding: 20px;
    border-radius: 20px;
    background: rgba(0, 234, 255, 0.05);
    box-shadow: 0 0 30px rgba(0, 234, 255, 0.2);
}

.phone {
    width: 70px;
    height: 120px;
    border: 3px solid #00eaff;
    border-radius: 16px;
    position: relative;
    box-shadow: 0 0 15px #00eaff;
    animation: rotatePhone 1.4s infinite ease-in-out;
}

.phone::after {
    content: "";
    position: absolute;
    top: 6px;
    left: 50%;
    transform: translateX(-50%);
    width: 24px;
    height: 4px;
    background: #00eaff;
    border-radius: 2px;
}

@keyframes rotatePhone {
    0% {
        transform: rotate(0deg);
    }

    50% {
        transform: rotate(90deg);
    }

    100% {
        transform: rotate(0deg);
    }
}

.text {
    margin-top: 20px;
    font-size: 18px;
    letter-spacing: 1px;
    opacity: 0.85;
    text-shadow: 0 0 10px #00eaff;
    animation: pulseText 1.5s infinite;
}

@keyframes pulseText {

    0%,
    100% {
        opacity: 0.6;
    }

    50% {
        opacity: 1;
    }
}
