/* ============================================
   기본 리셋 및 전역 스타일
   ============================================ */

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

html, body {
    margin: 0;
    padding: 0;
    overflow: hidden;
    width: 100%;
    height: 100%;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
    background-size: 200% 200%;
    animation: gradientShift 15s ease infinite;
    min-height: 100vh;
    max-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    color: #fff;
    position: fixed;
    width: 100%;
    height: 100%;
}

@keyframes gradientShift {
    0%, 100% { 
        background-position: 0% 50%; 
    }
    50% { 
        background-position: 100% 50%; 
    }
}

/* ============================================
   공통 컴포넌트
   ============================================ */

.container {
    max-width: 1200px;
    width: 100%;
    height: 100%;
    padding: clamp(1rem, 2vw, 1.25rem);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.screen {
    display: none !important;
    animation: fadeIn 0.3s ease-in;
    width: 100%;
    height: 100%;
    box-sizing: border-box;
    position: absolute;
    top: 0;
    left: 0;
    z-index: 1;
}

.screen.active {
    display: block !important;
    z-index: 10;
}

/* game-screen은 flex로 표시 */
.game-screen.active {
    display: flex !important;
    z-index: 10;
}

/* 활성화되지 않은 화면은 완전히 숨김 */
.screen:not(.active) {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

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

