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 DoKhanhPro";
    margin-bottom: 18px;
    color: #aaa;
    font: 400 14px/1.2 Arial, sans-serif;
    letter-spacing: 0.5px;
}

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

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

#unity-progress-bar-empty {
    width: 100%;
    height: 6px;
    margin: 16px 0 4px;
    border-radius: 3px;
    background: rgba(255, 255, 255, 0.12);
    overflow: hidden;
}

#unity-progress-bar-full {
    width: 0%;
    height: 100%;
    border-radius: inherit;
    background: #ccc;
    transition: width 0.18s ease-out;
}

.light #unity-progress-bar-empty {
    background: rgba(0, 0, 0, 0.1);
}

.light #unity-progress-bar-full {
    background: #555;
}

#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);
}

.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(255, 255, 255, 0.15);
    border-right: 1.1em solid rgba(255, 255, 255, 0.15);
    border-bottom: 1.1em solid rgba(255, 255, 255, 0.15);
    border-left: 1.1em solid #ccc;
    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;
    }
}
