        body {
            margin: 0;
            padding: 0;
            background: #111827;
            color: white;
            font-family: 'Arial', sans-serif;
            overflow-x: hidden;
            width: 100vw;
            min-height: 100vh;
            zoom: 1 !important;
            transform: scale(1) !important;
            transform-origin: 0 0 !important;
        }

        /* 스킬 모달이 열렸을 때 메인 메뉴 스크롤 방지 */
        body.modal-open {
            overflow: hidden;
            height: 100vh;
        }

        /* 왼쪽 위 로그인 영역 (메인 메뉴 내부) */
        .auth-section {
            position: absolute;
            top: 15px;
            left: 15px;
            z-index: 100;
            background: rgba(15, 23, 42, 0.95);
            border-radius: 12px;
            padding: 12px 16px;
            box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
            border: 1px solid rgba(255, 255, 255, 0.1);
            backdrop-filter: blur(10px);
        }

        .auth-section .auth-buttons {
            display: flex;
            flex-direction: row;
            gap: 8px;
            margin-bottom: 8px;
        }

        .auth-section .email-login-button,
        .auth-section .signup-button {
            padding: 8px 12px;
            font-size: 12px;
            border-radius: 6px;
            border: none;
            cursor: pointer;
            font-weight: 600;
            transition: all 0.2s ease;
        }

        .auth-section .email-login-button {
            background: linear-gradient(135deg, #3b82f6, #2563eb);
            color: white;
        }

        .auth-section .email-login-button:hover {
            background: linear-gradient(135deg, #2563eb, #1d4ed8);
            transform: translateY(-1px);
        }

        .auth-section .signup-button {
            background: linear-gradient(135deg, #10b981, #059669);
            color: white;
        }

        .auth-section .signup-button:hover {
            background: linear-gradient(135deg, #059669, #047857);
            transform: translateY(-1px);
        }

        .auth-notice-small {
            font-size: 10px;
            color: #94a3b8;
            text-align: center;
        }

        .auth-section .user-mode {
            margin: 0;
        }

        .auth-section .user-info-card {
            display: flex;
            align-items: center;
            gap: 10px;
            padding: 0;
            background: transparent;
            border: none;
        }

        .auth-section .user-avatar {
            width: 36px;
            height: 36px;
            font-size: 18px;
            display: flex;
            align-items: center;
            justify-content: center;
            background: linear-gradient(135deg, #4f46e5, #7c3aed);
            border-radius: 50%;
        }

        .auth-section .user-details {
            flex: 1;
        }

        .auth-section .user-nickname {
            font-size: 13px;
            font-weight: 600;
            color: #f8fafc;
        }

        .auth-section .user-kcal {
            font-size: 11px;
            color: #fbbf24;
        }

        .auth-section .logout-button {
            background: rgba(239, 68, 68, 0.2);
            border: 1px solid rgba(239, 68, 68, 0.3);
            color: #ef4444;
            padding: 6px 8px;
            font-size: 14px;
            border-radius: 6px;
            cursor: pointer;
            transition: all 0.2s ease;
        }

        .auth-section .logout-button:hover {
            background: rgba(239, 68, 68, 0.3);
        }

        /* 유저 스탯 행 */
        .user-stats-row {
            display: flex;
            gap: 6px;
            align-items: center;
            margin-top: 2px;
        }

        /* 레벨 배지 */
        .auth-section .user-level-badge {
            font-size: 10px;
            font-weight: bold;
            color: #a78bfa;
            background: rgba(167, 139, 250, 0.2);
            padding: 2px 6px;
            border-radius: 4px;
        }

        /* 게임 횟수 */
        .auth-section .user-games {
            font-size: 10px;
            font-weight: bold;
            color: #60a5fa;
            background: rgba(96, 165, 250, 0.2);
            padding: 2px 6px;
            border-radius: 4px;
        }

        /* 경험치 섹션 */
        .user-exp-section {
            margin-top: 10px;
            padding-top: 10px;
            border-top: 1px solid rgba(255, 255, 255, 0.1);
        }

        .exp-labels {
            display: flex;
            justify-content: space-between;
            font-size: 11px;
            font-weight: bold;
            margin-bottom: 4px;
        }

        .exp-level-current {
            color: #a78bfa;
        }

        .exp-level-next {
            color: #6366f1;
        }

        .exp-bar-container {
            width: 100%;
            height: 8px;
            background: rgba(0, 0, 0, 0.3);
            border-radius: 4px;
            overflow: hidden;
            border: 1px solid rgba(99, 102, 241, 0.3);
        }

        .exp-bar-fill {
            height: 100%;
            background: linear-gradient(90deg, #a78bfa 0%, #6366f1 100%);
            border-radius: 3px;
            transition: width 0.5s ease;
        }

        .exp-text {
            text-align: center;
            font-size: 10px;
            color: #94a3b8;
            margin-top: 4px;
        }

        /* 게임 닉네임 섹션 */
        .game-nickname-section {
            margin-bottom: 15px;
        }

        .game-nickname-section .input-section {
            margin: 0;
        }

        /* 모바일 여부 감지 및 가로 모드 강제 */
        .rotate-message {
            display: none;
            position: fixed;
            top: 0;
            left: 0;
            width: 100vw;
            height: 100vh;
            background: #0f172a;
            color: white;
            font-size: 24px;
            text-align: center;
            justify-content: center;
            align-items: center;
            flex-direction: column;
            z-index: 9999;
        }

        @media (max-width: 768px) and (orientation: portrait) {
            .rotate-message {
                display: flex !important;
            }
            #mainMenu, #gameContainer {
                display: none !important;
            }
        }
        
        .menu-container {
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: flex-start;
            width: 100vw;
            min-height: 100vh;
            background: linear-gradient(135deg, #1f2937 0%, #111827 100%);
            position: relative;
            padding: 100px 0 50px 0;
            z-index: 1000;
        }
        
        .menu-title {
            margin-bottom: -3rem;
            text-align: center;
            margin-top: -200px;
        }

        .menu-logo {
            width: 76vw;
            max-width: 960px;
            height: auto;
            filter: drop-shadow(3px 3px 6px rgba(0,0,0,0.8));
        }

        .menu-content {
            display: flex;
            flex-direction: column;
            gap: 2rem;
            background: rgba(0,0,0,0.3);
            backdrop-filter: blur(10px);
            border-radius: 20px;
            padding: 2rem;
            border: 2px solid rgba(251,191,36,0.3);
            box-shadow: 0 20px 40px rgba(0,0,0,0.4);
            width: 95vw;
            max-width: 1200px;
            overflow-x: hidden;
            margin-bottom: 50px;
            margin-top: 50px;
        }

        .menu-top {
            display: flex;
            gap: 2rem;
            align-items: flex-start;
        }

        .menu-left {
            flex: 1;
            min-width: 300px;
        }

        .menu-right {
            flex: 1;
            min-width: 300px;
        }
        
        .input-section {
            margin-bottom: 2rem;
        }

        .input-label {
            display: block;
            color: #d1d5db;
            font-size: 1.1rem;
            font-weight: 600;
            margin-bottom: 0.5rem;
            text-align: center;
        }

        .nickname-input {
            width: 100%;
            padding: 1rem;
            font-size: 1.1rem;
            border: 2px solid #374151;
            border-radius: 12px;
            background: rgba(17,24,39,0.8);
            color: white;
            text-align: center;
            transition: all 0.3s ease;
            box-sizing: border-box;
        }

        .nickname-input:focus {
            outline: none;
            border-color: #fbbf24;
            box-shadow: 0 0 20px rgba(251,191,36,0.3);
        }

        .nickname-input::placeholder {
            color: #6b7280;
        }

        .button-row {
            display: flex;
            gap: 0.8rem;
            align-items: center;
        }

        .play-button {
            flex: 1;
            padding: 1rem 2rem;
            font-size: 1.3rem;
            font-weight: bold;
            background: linear-gradient(135deg,#fbbf24 0%, #f59e0b 100%);
            color: #1f2937;
            border: none;
            border-radius: 12px;
            cursor: pointer;
            transition: all 0.3s ease;
            text-transform: uppercase;
            letter-spacing: 1px;
            box-shadow: 0 8px 20px rgba(251,191,36,0.4);
        }

        .play-button:hover {
            transform: translateY(-2px);
            box-shadow: 0 12px 25px rgba(251,191,36,0.5);
            background: linear-gradient(135deg,#f59e0b 0%, #d97706 100%);
        }

        .costume-button {
            width: 60px;
            height: 60px;
            font-size: 1.8rem;
            background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
            color: white;
            border: none;
            border-radius: 50%;
            cursor: pointer;
            transition: all 0.3s ease;
            box-shadow: 0 8px 20px rgba(139,92,246,0.4);
            display: flex;
            align-items: center;
            justify-content: center;
        }

        .costume-button:hover {
            transform: translateY(-2px) scale(1.05);
            box-shadow: 0 12px 25px rgba(139,92,246,0.5);
            background: linear-gradient(135deg, #7c3aed 0%, #6d28d9 100%);
        }
        
        .menu-footer {
            position: absolute;
            bottom: 20px;
            color: #6b7280;
            font-size: 0.9rem;
            text-align: center;
        }
        
        .game-container {
            display: none;
            width: 100vw;
            height: 100vh;
            position: fixed;
            top: 0;
            left: 0;
            z-index: 100;
        }
        
        .game-canvas {
            background: #1f2937;
            display: block;
            position: absolute;
            top: 0;
            left: 0;
        }

        /* 모바일 컨트롤 UI */
        .mobile-controls {
            display: none;
            position: fixed;
            top: 0;
            left: 0;
            width: 100vw;
            height: 100vh;
            pointer-events: none; /* 기본적으로 터치 차단 */
            z-index: 200;
        }

        /* 인벤토리 영역은 터치 통과 허용 */
        .mobile-device .mobile-controls {
            pointer-events: none !important;
        }

        /* 모바일 기기에서 조이스틱 표시 (User Agent 기반) */
        .mobile-device .mobile-controls {
            display: block !important;
        }


        /* 이동 조이스틱 */
        .move-joystick {
            position: fixed;
            bottom: calc(env(safe-area-inset-bottom, 20px) + 100px);
            left: 20px;
            width: 110px;
            height: 110px;
            pointer-events: all;
            z-index: 300;
        }

        .joystick-base {
            width: 100%;
            height: 100%;
            border-radius: 50%;
            background: rgba(255, 255, 255, 0.1);
            border: 3px solid rgba(255, 255, 255, 0.3);
            position: relative;
        }

        .joystick-handle {
            width: 40px;
            height: 40px;
            border-radius: 50%;
            background: rgba(251, 191, 36, 0.8);
            border: 2px solid #fbbf24;
            position: absolute;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
            transition: all 0.1s ease;
        }

        /* 조준 조이스틱 */
        .aim-joystick {
            position: fixed;
            bottom: calc(env(safe-area-inset-bottom, 20px) + 100px);
            right: 20px;
            width: 110px;
            height: 110px;
            pointer-events: all;
            z-index: 300;
        }

        /* 스킬 버튼 - 조준 조이스틱 왼쪽 아래 */
        .skill-button-mobile {
            position: fixed;
            bottom: calc(env(safe-area-inset-bottom, 20px) + 90px);
            right: 150px; /* 조준 조이스틱 왼쪽으로 배치 */
            width: 50px;
            height: 50px;
            border-radius: 50%;
            background: rgba(34, 197, 94, 0.9);
            border: 3px solid #22c55e;
            color: white;
            font-size: 22px;
            display: flex;
            align-items: center;
            justify-content: center;
            pointer-events: all;
            font-weight: bold;
            box-shadow: 0 2px 8px rgba(0,0,0,0.3);
            z-index: 300;
        }

        .skill-button-mobile.cooldown {
            background: rgba(107, 114, 128, 0.8);
            border-color: #6b7280;
        }

        /* 쿨타임 진행 표시를 위한 오버레이 */
        .skill-button-mobile::after {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            border-radius: 50%;
            background: conic-gradient(
                from 0deg,
                rgba(0, 0, 0, 0.6) 0deg,
                rgba(0, 0, 0, 0.6) var(--cooldown-progress, 0deg),
                transparent var(--cooldown-progress, 0deg),
                transparent 360deg
            );
            opacity: 0;
            transition: opacity 0.2s ease;
            pointer-events: none;
        }

        .skill-button-mobile.cooldown::after {
            opacity: 1;
        }

        /* 터치 영역 확대를 위한 가상 요소 */
        .skill-button-mobile::before {
            content: '';
            position: absolute;
            top: -10px;
            left: -10px;
            right: -10px;
            bottom: -10px;
            border-radius: 50%;
        }

        /* 모바일 UI 재배치 */
        .mobile-device .inventory-slot {
            transform: scale(0.8);
            pointer-events: all; /* 모바일에서 재료 선택 가능하도록 */
        }
        
        .game-title {
            position: absolute;
            top: 10px;
            left: 50%;
            transform: translateX(-50%);
            font-size: 2rem;
            font-weight: bold;
            color: #fbbf24;
            z-index: 10;
            text-shadow: 2px 2px 4px rgba(0,0,0,0.8);
            pointer-events: none;
        }
        
        .cheat-notification {
            position: fixed;
            top: 60px;
            right: 20px;
            background: rgba(34,197,94,0.9);
            color: white;
            padding: 10px 15px;
            border-radius: 8px;
            font-size: 14px;
            z-index: 9998;
            font-weight: bold;
            box-shadow: 0 4px 12px rgba(0,0,0,0.3);
            transition: all 0.3s ease;
        }
        
        .cheat-notification.error {
            background: rgba(239,68,68,0.9);
        }

        .update-log-container {
            display: flex;
            flex-direction: column;
        }

        .update-log-title {
            color: #fbbf24;
            font-size: 1.1rem;
            font-weight: bold;
            margin-bottom: 0.5rem;
            text-align: center;
            text-shadow: 2px 2px 4px rgba(0,0,0,0.8);
        }

        .update-log-content {
            background: rgba(17,24,39,0.8);
            border: 2px solid #374151;
            border-radius: 12px;
            padding: 1rem;
            color: #d1d5db;
            font-size: 0.85rem;
            line-height: 1.3;
            overflow-y: auto;
            height: 150px;
            white-space: pre-line;
            font-family: Arial, sans-serif;
        }

        .update-log-content::-webkit-scrollbar {
            width: 8px;
        }

        .update-log-content::-webkit-scrollbar-track {
            background: rgba(55,65,81,0.3);
            border-radius: 4px;
        }

        .update-log-content::-webkit-scrollbar-thumb {
            background: rgba(251,191,36,0.5);
            border-radius: 4px;
        }

        .update-log-content::-webkit-scrollbar-thumb:hover {
            background: rgba(251,191,36,0.7);
        }

        /* 패시브/스킬 선택 UI */
        .skill-selection-container {
            width: 100%;
            background: rgba(17,24,39,0.5);
            border-radius: 15px;
            padding: 1.5rem;
            border: 1px solid rgba(251,191,36,0.2);
        }

        .skill-section {
            margin-bottom: 1.5rem;
        }

        .skill-section:last-child {
            margin-bottom: 0;
        }

        .skill-section-title {
            color: #fbbf24;
            font-size: 1.1rem;
            font-weight: bold;
            text-align: center;
            margin-bottom: 0.8rem;
            text-shadow: 2px 2px 4px rgba(0,0,0,0.8);
        }

        .skill-grid {
            display: grid;
            grid-template-columns: repeat(3, 1fr);
            gap: 0.8rem;
            width: 100%;
        }

        .skill-button {
            background: rgba(17,24,39,0.8);
            border: 2px solid #374151;
            border-radius: 8px;
            padding: 0.8rem;
            color: #d1d5db;
            font-size: 0.85rem;
            cursor: pointer;
            transition: all 0.3s ease;
            text-align: center;
            min-height: 80px;
            display: flex;
            flex-direction: column;
            justify-content: center;
            line-height: 1.2;
        }

        .skill-button:hover {
            border-color: #fbbf24;
            background: rgba(251,191,36,0.1);
            transform: translateY(-2px);
        }

        .skill-button.selected {
            border-color: #fbbf24;
            background: rgba(251,191,36,0.2);
            color: #fbbf24;
            box-shadow: 0 0 15px rgba(251,191,36,0.3);
        }

        .skill-icon {
            font-size: 1.2rem;
            margin-bottom: 0.3rem;
        }

        .skill-name {
            font-weight: bold;
            font-size: 0.9rem;
            margin-bottom: 0.2rem;
        }

        .skill-desc {
            font-size: 0.75rem;
            opacity: 0.8;
        }

        /* 모자 선택 모달 */
        .hat-modal {
            display: none;
            position: fixed;
            top: 0;
            left: 0;
            width: 100vw;
            height: 100vh;
            background: rgba(0, 0, 0, 0.8);
            z-index: 2000;
            align-items: center;
            justify-content: center;
        }

        .hat-modal.active {
            display: flex;
        }

        .hat-modal-content {
            background: linear-gradient(135deg, #1f2937 0%, #111827 100%);
            border-radius: 20px;
            padding: 2rem;
            max-width: 600px;
            width: 90%;
            max-height: 85vh;
            display: flex;
            flex-direction: column;
            border: 2px solid rgba(251,191,36,0.3);
            box-shadow: 0 20px 40px rgba(0,0,0,0.5);
        }

        .hat-modal-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 1.5rem;
        }

        .hat-modal-header h2 {
            color: #fbbf24;
            font-size: 1.5rem;
            margin: 0;
        }

        .hat-modal-close {
            background: none;
            border: none;
            color: #d1d5db;
            font-size: 2rem;
            cursor: pointer;
            width: 40px;
            height: 40px;
            display: flex;
            align-items: center;
            justify-content: center;
            border-radius: 50%;
            transition: all 0.3s ease;
        }

        .hat-modal-close:hover {
            background: rgba(239,68,68,0.2);
            color: #ef4444;
        }

        .hat-grid {
            display: grid;
            grid-template-columns: repeat(3, 1fr);
            gap: 1rem;
            overflow-y: auto;
            max-height: calc(85vh - 120px);
            padding-right: 0.5rem;
        }

        .hat-grid::-webkit-scrollbar {
            width: 8px;
        }

        .hat-grid::-webkit-scrollbar-track {
            background: rgba(0,0,0,0.2);
            border-radius: 4px;
        }

        .hat-grid::-webkit-scrollbar-thumb {
            background: rgba(251,191,36,0.5);
            border-radius: 4px;
        }

        .hat-grid::-webkit-scrollbar-thumb:hover {
            background: rgba(251,191,36,0.7);
        }

        .hat-item {
            background: rgba(17,24,39,0.8);
            border: 2px solid #374151;
            border-radius: 12px;
            padding: 1rem;
            cursor: pointer;
            transition: all 0.3s ease;
            text-align: center;
        }

        .hat-item:hover {
            border-color: #fbbf24;
            background: rgba(251,191,36,0.1);
            transform: translateY(-4px);
        }

        .hat-item.selected {
            border-color: #fbbf24;
            background: rgba(251,191,36,0.2);
            box-shadow: 0 0 20px rgba(251,191,36,0.3);
        }

        .hat-preview {
            position: relative;
            width: 100%;
            height: 120px;
            display: flex;
            align-items: center;
            justify-content: center;
            margin-bottom: 0.5rem;
            background: rgba(0,0,0,0.2);
            border-radius: 8px;
        }

        .hat-preview img {
            max-width: 90%;
            max-height: 90%;
            object-fit: contain;
        }

        .hat-preview-none {
            background: transparent;
        }

        .hat-name {
            color: #d1d5db;
            font-size: 1rem;
            font-weight: 600;
            margin-bottom: 0.3rem;
        }

        .hat-price {
            color: #fbbf24;
            font-size: 0.9rem;
            font-weight: bold;
            margin-top: 0.3rem;
        }

        .hat-item.locked .hat-preview::before {
            content: '🔒';
            position: absolute;
            font-size: 2rem;
            opacity: 0.8;
        }

        .hat-item.locked .hat-preview {
            opacity: 0.5;
        }

        .hat-item.locked .hat-name {
            opacity: 0.6;
        }

        /* 잠금된 스킨은 클릭 불가 (구매 버튼만 클릭 가능) */
        .hat-item.locked {
            cursor: not-allowed;
        }

        .hat-purchase-btn {
            margin-top: 0.5rem;
            padding: 0.5rem 1rem;
            background: linear-gradient(135deg, #4ade80 0%, #22c55e 100%);
            color: #000;
            border: 2px solid #86efac;
            border-radius: 8px;
            cursor: pointer;
            font-size: 0.9rem;
            font-weight: bold;
            transition: all 0.3s ease;
            width: 100%;
            text-shadow: 0 1px 0 rgba(255,255,255,0.3);
            box-shadow: 0 2px 8px rgba(74, 222, 128, 0.4);
        }

        .hat-purchase-btn:hover {
            transform: translateY(-2px);
            background: linear-gradient(135deg, #86efac 0%, #4ade80 100%);
            box-shadow: 0 4px 16px rgba(74, 222, 128, 0.6);
        }

        .hat-purchase-btn:disabled {
            background: #6b7280;
            cursor: not-allowed;
            opacity: 0.5;
            border-color: #6b7280;
            box-shadow: none;
        }

        /* 토스트 알림 */
        .toast-container {
            position: fixed;
            bottom: 100px;
            left: 20px;
            z-index: 9999;
            display: flex;
            flex-direction: column-reverse;
            gap: 10px;
            pointer-events: none;
        }

        .toast {
            pointer-events: auto;
            padding: 12px 20px;
            border-radius: 10px;
            color: white;
            font-weight: bold;
            font-size: 0.95rem;
            box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
            animation: toastSlideIn 0.3s ease, toastFadeOut 0.3s ease 2.7s forwards;
            max-width: 350px;
        }

        .toast.success {
            background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
            border: 1px solid #4ade80;
        }

        .toast.error {
            background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
            border: 1px solid #f87171;
        }

        .toast.warning {
            background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
            border: 1px solid #fbbf24;
        }

        @keyframes toastSlideIn {
            from {
                transform: translateX(-100%);
                opacity: 0;
            }
            to {
                transform: translateX(0);
                opacity: 1;
            }
        }

        @keyframes toastFadeOut {
            from {
                opacity: 1;
            }
            to {
                opacity: 0;
            }
        }

        /* 인증 UI 스타일 */
        .auth-notice {
            background: rgba(59, 130, 246, 0.1);
            border: 1px solid rgba(59, 130, 246, 0.3);
            border-radius: 8px;
            padding: 0.8rem;
            text-align: center;
            color: #93c5fd;
            font-size: 0.9rem;
            margin-bottom: 1rem;
        }

        .login-button {
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 0.6rem;
            width: 100%;
            padding: 0.9rem 1.5rem;
            background: white;
            color: #1f2937;
            border: 2px solid #e5e7eb;
            border-radius: 10px;
            font-size: 1rem;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.3s ease;
            margin-bottom: 1rem;
            box-shadow: 0 2px 8px rgba(0,0,0,0.15);
        }

        .login-button:hover {
            background: #f9fafb;
            transform: translateY(-2px);
            box-shadow: 0 4px 12px rgba(0,0,0,0.2);
        }

        .google-icon {
            width: 18px;
            height: 18px;
        }

        .user-mode {
            margin-bottom: 1rem;
        }

        .user-info-card {
            display: flex;
            align-items: center;
            gap: 1rem;
            background: rgba(17,24,39,0.8);
            border: 2px solid #374151;
            border-radius: 12px;
            padding: 1rem;
        }

        .user-avatar {
            width: 50px;
            height: 50px;
            border-radius: 50%;
            background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 1.8rem;
            flex-shrink: 0;
        }

        .user-details {
            flex: 1;
        }

        .user-nickname {
            color: #fbbf24;
            font-size: 1.1rem;
            font-weight: bold;
            margin-bottom: 0.2rem;
        }

        .user-kcal {
            color: #d1d5db;
            font-size: 0.95rem;
        }

        .logout-button {
            width: 40px;
            height: 40px;
            border-radius: 50%;
            background: rgba(239, 68, 68, 0.2);
            border: 2px solid rgba(239, 68, 68, 0.3);
            color: #ef4444;
            font-size: 1.2rem;
            cursor: pointer;
            transition: all 0.3s ease;
            display: flex;
            align-items: center;
            justify-content: center;
        }

        .logout-button:hover {
            background: rgba(239, 68, 68, 0.3);
            border-color: #ef4444;
            transform: scale(1.1);
        }

        /* Email Authentication Buttons */
        .auth-buttons {
            display: flex;
            flex-direction: column;
            gap: 0.6rem;
            margin-bottom: 1rem;
        }

        .email-login-button,
        .signup-button {
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 0.6rem;
            width: 100%;
            padding: 0.8rem 1.5rem;
            border: 2px solid;
            border-radius: 10px;
            font-size: 0.95rem;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.3s ease;
            box-shadow: 0 2px 8px rgba(0,0,0,0.15);
        }

        .email-login-button {
            background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
            color: white;
            border-color: #2563eb;
        }

        .email-login-button:hover {
            background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
            transform: translateY(-2px);
            box-shadow: 0 4px 12px rgba(37, 99, 235, 0.4);
        }

        .signup-button {
            background: linear-gradient(135deg, #10b981 0%, #059669 100%);
            color: white;
            border-color: #059669;
        }

        .signup-button:hover {
            background: linear-gradient(135deg, #059669 0%, #047857 100%);
            transform: translateY(-2px);
            box-shadow: 0 4px 12px rgba(16, 185, 129, 0.4);
        }

        /* Auth Modal */
        .auth-modal {
            position: fixed;
            top: 0;
            left: 0;
            width: 100vw;
            height: 100vh;
            background: rgba(0, 0, 0, 0.7);
            backdrop-filter: blur(5px);
            display: flex;
            align-items: center;
            justify-content: center;
            z-index: 10000;
        }

        .auth-modal-content {
            background: linear-gradient(135deg, #1f2937 0%, #111827 100%);
            border: 2px solid rgba(251, 191, 36, 0.3);
            border-radius: 16px;
            padding: 2rem;
            width: 90%;
            max-width: 450px;
            box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
        }

        .auth-modal-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 1.5rem;
        }

        .auth-modal-header h2 {
            color: #fbbf24;
            font-size: 1.5rem;
            margin: 0;
        }

        .modal-close-btn {
            background: none;
            border: none;
            color: #9ca3af;
            font-size: 2rem;
            cursor: pointer;
            transition: all 0.3s ease;
            padding: 0;
            width: 40px;
            height: 40px;
            display: flex;
            align-items: center;
            justify-content: center;
        }

        .modal-close-btn:hover {
            color: #ef4444;
            transform: scale(1.1);
        }

        .auth-form {
            display: flex;
            flex-direction: column;
            gap: 1rem;
        }

        .form-group {
            display: flex;
            flex-direction: column;
            gap: 0.4rem;
        }

        .form-group label {
            color: #d1d5db;
            font-size: 0.9rem;
            font-weight: 500;
        }

        .form-group input {
            padding: 0.8rem 1rem;
            background: rgba(17, 24, 39, 0.8);
            border: 2px solid #374151;
            border-radius: 8px;
            color: white;
            font-size: 1rem;
            transition: all 0.3s ease;
        }

        .form-group input:focus {
            outline: none;
            border-color: #fbbf24;
            box-shadow: 0 0 0 3px rgba(251, 191, 36, 0.2);
        }

        .form-group input::placeholder {
            color: #6b7280;
        }

        .auth-submit-btn {
            margin-top: 0.5rem;
            padding: 1rem;
            background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
            color: #111827;
            border: none;
            border-radius: 10px;
            font-size: 1rem;
            font-weight: bold;
            cursor: pointer;
            transition: all 0.3s ease;
            box-shadow: 0 4px 12px rgba(251, 191, 36, 0.3);
        }

        .auth-submit-btn:hover {
            background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
            transform: translateY(-2px);
            box-shadow: 0 6px 16px rgba(251, 191, 36, 0.4);
        }

        /* Skill Selection Modal */
        .skill-modal {
            position: fixed;
            top: 0;
            left: 0;
            width: 100vw;
            height: 100vh;
            background: rgba(0, 0, 0, 0.85);
            backdrop-filter: blur(10px);
            display: flex;
            align-items: center;
            justify-content: center;
            z-index: 10001;
            overflow-y: auto;
        }

        .skill-modal-content {
            background: linear-gradient(135deg, #1f2937 0%, #111827 100%);
            border: 3px solid rgba(251, 191, 36, 0.5);
            border-radius: 20px;
            padding: 2rem;
            width: 90%;
            max-width: 900px;
            max-height: 90vh;
            overflow-y: auto;
            box-shadow: 0 20px 60px rgba(0, 0, 0, 0.7);
        }

        .skill-modal-header {
            text-align: center;
            margin-bottom: 2rem;
        }

        .skill-modal-header h2 {
            color: #fbbf24;
            font-size: 2rem;
            margin: 0;
            text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
        }

        .start-game-button {
            width: 100%;
            padding: 1.2rem;
            margin-top: 2rem;
            background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
            color: white;
            border: none;
            border-radius: 12px;
            font-size: 1.3rem;
            font-weight: bold;
            cursor: pointer;
            transition: all 0.3s ease;
            box-shadow: 0 4px 12px rgba(34, 197, 94, 0.4);
        }

        .start-game-button:hover {
            background: linear-gradient(135deg, #16a34a 0%, #15803d 100%);
            transform: translateY(-2px);
            box-shadow: 0 6px 16px rgba(34, 197, 94, 0.6);
        }

        .start-game-button:disabled {
            background: linear-gradient(135deg, #6b7280 0%, #4b5563 100%);
            cursor: not-allowed;
            opacity: 0.6;
        }

        /* 애니메이션 */
        @keyframes slideDown {
            from {
                transform: translateX(-50%) translateY(-100%);
                opacity: 0;
            }
            to {
                transform: translateX(-50%) translateY(0);
                opacity: 1;
            }
        }

        @keyframes fadeIn {
            from {
                opacity: 0;
                transform: scale(0.8);
            }
            to {
                opacity: 1;
                transform: scale(1);
            }
        }

        /* Loading animation for redirect */
        @keyframes loading {
            0% {
                transform: translateX(-100%);
            }
            100% {
                transform: translateX(200%);
            }
        }
