body {
    padding: 0;
    margin: 0;
    overflow: hidden;
}

#intro {
    display: flex;
    flex-direction: column;
    width: 100vw;
    height: 100%;
    z-index: 99;
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;
}

#intro #app-version {
    position: absolute;
    top: 10px;
    right: 10px;
    padding: 10px;
    font-size: 14px;
    color: black;
}

#intro #logo {
    width: 130px;
    height: auto;
    position: absolute;
    z-index: 10;
    left: 50%;
    top: 8%;
    transform: translateX(-50%);
}

.back video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: fixed;
}

#bottom-layout {
    position: absolute;
    bottom: 8%;
    left: 0;
    width: 100%;
    /*padding: 20px;*/
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

/* 카메라 권한 안내 문구 → 현재는 비활성화(숨김). 요소는 유지하므로 이 규칙만 지우면 복구됨 */
/* (#bottom-layout label 보다 우선순위가 높아야 하므로 선택자를 구체화) */
#bottom-layout #cam-permission-hint {
    display: none;
}

/* 카메라 권한 안내 문구 → 아이콘이 붙은 작은 알약형 힌트로 표시 */
#bottom-layout label {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    margin-bottom: 16px;
    padding: 9px 16px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.14);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    border: 1px solid rgba(255, 255, 255, 0.22);
    color: #ffffff;
    font-size: 14px;
    font-weight: 500;
    letter-spacing: -0.2px;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.45);
}

/* 문구 앞 카메라 아이콘 (SVG, 이미지 에셋 불필요) */
#bottom-layout label::before {
    content: "";
    width: 16px;
    height: 16px;
    flex: 0 0 16px;
    background: no-repeat center / contain
        url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M23 7l-7 5 7 5V7z'/><rect x='1' y='5' width='15' height='14' rx='2' ry='2'/></svg>");
}

#bottom-layout button {
    position: relative;
    overflow: hidden;
    width: 86%;
    max-width: 440px;
    padding: 17px 20px;
    border-radius: 16px;
    background: linear-gradient(135deg, #6D8BFF 0%, #4A63E7 55%, #3D5BE0 100%);
    color: #ffffff;
    border: none;
    font-size: 17px;
    font-weight: 700;
    letter-spacing: -0.2px;
    cursor: pointer;
    box-shadow: 0 10px 26px rgba(61, 91, 224, 0.42), inset 0 1px 0 rgba(255, 255, 255, 0.25);
    transition: transform 0.08s ease, box-shadow 0.2s ease, opacity 0.2s ease, filter 0.2s ease;
}

/* 버튼 위를 천천히 지나가는 광택(셰인) 효과 */
#bottom-layout button::after {
    content: "";
    position: absolute;
    top: 0;
    left: -60%;
    width: 40%;
    height: 100%;
    background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.35), transparent);
    transform: skewX(-20deg);
    animation: btnShine 3.2s ease-in-out infinite;
}

@keyframes btnShine {
    0%   { left: -60%; }
    55%  { left: 130%; }
    100% { left: 130%; }
}

#bottom-layout button:hover {
    filter: brightness(1.04);
    box-shadow: 0 12px 30px rgba(61, 91, 224, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

#bottom-layout button:active {
    transform: translateY(1px) scale(0.99);
    box-shadow: 0 4px 12px rgba(61, 91, 224, 0.32);
}

#bottom-layout button:disabled {
    opacity: 0.78;
    cursor: default;
    transform: none;
    filter: saturate(0.85);
}

/* 로딩 중에는 광택 애니메이션 정지 */
#bottom-layout button:disabled::after {
    animation: none;
    display: none;
}

/* 카메라 선택 드롭다운은 사용하지 않음(완전 비활성화) */
#bottom-layout #chooseCamSel {
    display: none !important;
    visibility: hidden !important;
}

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

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

#unity-loading-bar {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    display: none
}

#unity-logo {
    width: 154px;
    height: 130px;
    background: url('unity-logo-dark.png') no-repeat center
}

#unity-progress-bar-empty {
    margin-left: auto;
    margin-right: auto;
    width: 141px;
    height: 18px;
    margin-top: 10px;
    background: url('progress-bar-empty-dark.png') no-repeat center
}

#unity-progress-bar-full {
    width: 0%;
    height: 18px;
    margin-top: 10px;
    background: url('progress-bar-full-dark.png') no-repeat center
}

#unity-warning {
    position: absolute;
    left: 50%;
    top: 5%;
    transform: translate(-50%);
    background: white;
    padding: 10px;
    display: none
}

#unity-ui {
    z-index: 9999;
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    pointer-events: none;
}

#unity-ui button {
    width: 80px;
    height: 40px;
    padding: 0;
    background-size: contain;
    position: absolute;
    pointer-events: auto;
    border: none;
}

#nupy-logo {
    width: 120px;
    height: 40px;
    background: url("UnityUI/NupyLogo.png") no-repeat center;
    background-size: contain;
    position: absolute;
    left: 50%;
    top: 5%;
    transform: translateX(-50%);
}

#guide-line {
    align-self: center;
    width: 75%;
    height: 75%;
    background: url("UnityUI/Guide-Line.png") no-repeat center;
    background-size: contain;
    object-fit: cover;
    position: absolute;
    pointer-events: none;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    opacity: 0.5;
}

#guide-line.recognition {
    filter: invert(39%) sepia(92%) saturate(2080%) hue-rotate(68deg) brightness(85%) contrast(97%);
}

#guide-line.play {
    opacity: 0;
}

#record-button {
    background: url("UnityUI/Record-Off.png") no-repeat center;
    left: 10%;
    bottom: 7%;
}

#record-button.reco-on {
    background: url("UnityUI/Record-On.png") no-repeat center;
    background-size: contain;
}


#mute-button {
    background: url("UnityUI/Volume-On.png") no-repeat center;
    right: 10%;
    bottom: 7%;
}

#mute-button.mute-off {
    background: url("UnityUI/Volume-Off.png") no-repeat center;
    background-size: contain;
}


/* 팝업 스타일 */
.popup-wrapper {
    position: fixed;
    display: none; /* 처음엔 숨김 */
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5); /* 반투명 배경 */
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

.popup {
    background: white;
    padding: 20px;
    width: 300px;
    text-align: center;
    border-radius: 10px;
    box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.2);
}

.popup button {
    margin: 10px;
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}

.popup button:hover {
    filter: brightness(0.9);
}

.btn-cancel {
    background-color: #f44336;
    color: white;
}

.btn-save {
    background-color: #4CAF50;
    color: white;
}

.btn-share {
    background-color: #008CBA;
    color: white;
}
