/*
 * Unity Styles
 */

 body {
    background-color: black;
    padding: 0;
    margin: 0;
}

#unity-container {
    display: flex;
    justify-content: center;
}

#unity-container.unity-desktop {
    left: 50%;
    top: 50%;
}

#unity-container.unity-mobile {
    width: 100%;
    height: 100%
}

#unity-canvas {
    background: #231F20
}

.unity-mobile #unity-canvas {
    width: 100%;
    height: 100%
}

#unity-loading-bar {
    position: absolute;
    top: 50%;
    transform: translate(0, -50%);
    display: none;
    color: white;
    font-size: 1.5rem;
    font-weight: bold;
}

/**
 * Passcode Styles
 */

:root {
    --primary-color: #07C160;
    --border-color: #E5E5E5;
    --focus-color: #07C160;
    --error-color: #FF4D4F;
    --text-color: #333;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    margin: 0;
    min-height: 100vh;
}

.password-ui {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: none;
    display: flex;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    animation: fadeIn 0.3s ease;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    visibility: visible;
    opacity: 1;
}

.password-ui.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        visibility: hidden;
    }

    to {
        opacity: 1;
        visibility: visible;
    }
}

.container {
    text-align: center;
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    transform: translateY(0);
    animation: slideUp 0.3s ease;
    min-width: 320px;
    position: relative;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.password-ui.hidden .container {
    transform: translateY(20px);
    opacity: 0;
}

h1 {
    color: var(--text-color);
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
}

.verification-code {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
    margin-bottom: 1rem;
}

.verification-code input {
    width: 3rem;
    height: 3.5rem;
    font-size: 1.5rem;
    text-align: center;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    outline: none;
    transition: all 0.3s ease;
    background: white;
}

.verification-code input:focus {
    border-color: var(--focus-color);
    box-shadow: 0 0 0 3px rgba(7, 193, 96, 0.1);
}

.verification-code input.error {
    border-color: var(--error-color);
    animation: shake 0.5s;
}

.message {
    margin-top: 1rem;
    font-size: 0.9rem;
    color: var(--text-color);
    height: 1.2em;
}

.success {
    color: var(--primary-color);
}

.error-message {
    color: var(--error-color);
}

.fullscreen-btn {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background-color: var(--primary-color);
    border: none;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
    z-index: 1000;
}

.fullscreen-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

.fullscreen-btn svg {
    width: 24px;
    height: 24px;
    fill: currentColor;
}

.fullscreen-btn.hidden {
    display: none;
}

@keyframes shake {

    0%,
    100% {
        transform: translateX(0);
    }

    25% {
        transform: translateX(-5px);
    }

    75% {
        transform: translateX(5px);
    }
}

@media (max-width: 480px) {
    .container {
        margin: 1.5rem;
        padding: 1.5rem;
        width: calc(100% - 2rem);
        min-width: auto;
    }

    .verification-code input {
        width: 2.5rem;
        height: 3rem;
        font-size: 1.25rem;
    }
}

.close-btn {
    position: absolute;
    top: -12px;
    right: -12px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background-color: #fff;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    transition: all 0.2s ease;
    z-index: 1001;
}

.close-btn:hover {
    transform: scale(1.1);
    background-color: #f5f5f5;
}

.close-btn::before,
.close-btn::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 2px;
    background-color: #666;
    transform-origin: center;
    transition: background-color 0.2s ease;
}

.close-btn::before {
    transform: rotate(45deg);
}

.close-btn::after {
    transform: rotate(-45deg);
}

.close-btn:hover::before,
.close-btn:hover::after {
    background-color: #333;
}

/* 数字输入界面样式 */
.number-input-ui {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: none;
    display: flex;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    animation: fadeIn 0.3s ease;
    visibility: visible;
    opacity: 1;
}

.number-input-ui.hidden {
    display: none;
}

.number-input-container {
    margin-bottom: 1.5rem;
}

.number-input-container input {
    width: 100%;
    height: 3.5rem;
    font-size: 1.5rem;
    text-align: center;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    outline: none;
    background: white;
    padding: 0 1rem;
    box-sizing: border-box;
}

.number-input-container input:focus {
    border-color: var(--focus-color);
    box-shadow: 0 0 0 3px rgba(7, 193, 96, 0.1);
}

.number-input-container input.error {
    border-color: var(--error-color);
    animation: shake 0.5s;
}

.number-message {
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
    color: var(--text-color);
    height: 1.2em;
    text-align: center;
}

.number-message.error-message {
    color: var(--error-color);
}

.button-group {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.btn {
    padding: 0.75rem 2rem;
    font-size: 1rem;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 500;
    min-width: 100px;
}

.btn-cancel {
    background-color: #f5f5f5;
    color: #666;
    border: 2px solid #e5e5e5;
}

.btn-cancel:hover {
    background-color: #e5e5e5;
    color: #333;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.btn-confirm {
    background-color: var(--primary-color);
    color: white;
}

.btn-confirm:hover {
    background-color: #06a050;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(7, 193, 96, 0.3);
}

.btn:active {
    transform: translateY(0);
}

@media (max-width: 480px) {
    .button-group {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .btn {
        width: 100%;
        min-width: auto;
    }
}
