/* 스트레스 킬러 부장 | Stress Killer Game */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html,
body {
    width: 100%;
    height: 100%;
    overflow: hidden;
    background-color: #0f0f1a;
    font-family: 'Segoe UI', 'Malgun Gothic', '맑은 고딕', sans-serif;
    touch-action: none;
    user-select: none;
    -webkit-user-select: none;
    -webkit-touch-callout: none;
}

#gameCanvas {
    display: block;
    width: 100%;
    height: 100%;
    cursor: pointer;
}

/* 모바일 최적화 */
@media (max-width: 768px) {
    #gameCanvas {
        cursor: default;
    }
}

/* 로딩 화면 */
#loading {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #0f0f1a;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 100;
    transition: opacity 0.5s ease;
}

#loading.hidden {
    opacity: 0;
    pointer-events: none;
}

#loading h1 {
    color: #ffffff;
    font-size: 28px;
    margin-bottom: 15px;
    font-weight: 300;
}

#loading p {
    color: rgba(255, 255, 255, 0.5);
    font-size: 14px;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(136, 204, 255, 0.2);
    border-top-color: #88ccff;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin-bottom: 20px;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* 홈 버튼 스타일 - 가시성 강화 */
.home-button {
    position: fixed;
    top: 20px;
    right: 20px;
    width: 48px;
    height: 48px;
    background: rgba(255, 255, 255, 0.25);
    /* 배경 투명도 증가 */
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.4);
    /* 테두리 강화 */
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    font-size: 24px;
    /* 크기 증가 */
    color: white;
    z-index: 9999;
    /* 최상단 보장 */
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.home-button:hover {
    background: rgba(255, 255, 255, 0.4);
    transform: scale(1.15) rotate(5deg);
    border-color: #ffcc00;
    box-shadow: 0 0 20px rgba(255, 204, 0, 0.5);
}