/**
 * ============================================================================
 * 🎨 [style-home.css] 두쫀쿠 UNIVERSE - 메인 로비 전용 스타일 시트
 * ============================================================================
 * [설명] 
 * 메인 화면의 우주 배경, 너구리 애니메이션, 라이징 메뉴 등 홈 전용 UI를 관리합니다.
 * 
 * [목차]
 * 1. 🎨 THEME VARIABLES : 로컬 컬러 변수
 * 2. 🌌 SPACE WAR VFX : GPU 가속 최적화 우주 배경 및 파티클
 * 3. 🦝 HERO & TITLE : 메인 스테이지, 너구리 영웅, 레트로 네온 타이틀
 * 4. 💳 WALLET CARD : 지갑 연동 카드 및 상태 UI
 * 5. 📱 RISING MENU : 하단 스와이프 패널 및 카테고리
 * 6. 🪟 HOME MODALS : 홈 전용 팝업 (다이어리, 샌더, 가이드 등)
 * ============================================================================
 */

@import url('https://cdn.jsdelivr.net/npm/galmuri@latest/dist/galmuri.css'); /* 👈 이거 한 줄 추가! */

/* ==========================================
   1. 🎨 THEME VARIABLES & RESET (로컬 변수 및 리셋)
========================================== */
:root {
    --panel-bg: #1e1e24;
    --solana-mint: #14F195;
    --solana-purple: #9945FF;
    --bakery-orange: #ff9d00;
    --locked: #555;
}

/* 🚨 [복구 완벽 해결] 브라우저 기본 여백을 없애서 우측 상단 지갑 버튼 잘림 원천 차단! */
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

body, html {
    margin: 0; padding: 0; width: 100%; height: 100%; /* 여백 0으로 밀착! */
    overflow: hidden; 
    font-family: 'Galmuri9', sans-serif;
    background-color: #000; 
    color: white; 
}

/* ==========================================
   2. 🌌 SPACE WAR VFX (GPU 가속 우주 배경)
========================================== */
/* 🚨 배경 이미지를 2배로 키워서 위치만 이동 (연산량 90% 감소) */
#space-war-bg {
    position: absolute !important; top: -50% !important; left: -50% !important; 
    width: 200% !important; height: 200% !important; z-index: -1 !important;
    background-image: 
        radial-gradient(white, rgba(255,255,255,.2) 2px, transparent 3px),
        radial-gradient(white, rgba(255,255,255,.15) 1px, transparent 2px),
        radial-gradient(white, rgba(255,255,255,.1) 2px, transparent 3px),
        radial-gradient(circle at 15% 15%, rgba(20, 241, 149, 0.08) 0%, transparent 40%),
        radial-gradient(circle at 85% 85%, rgba(14, 165, 233, 0.08) 0%, transparent 40%);
    background-size: 550px 550px, 350px 350px, 250px 250px, 100% 100%, 100% 100%;
    will-change: transform; /* GPU 사용 강제 */
    animation: spaceScrollGPU 180s linear infinite;
    pointer-events: none;
}

@keyframes spaceScrollGPU { 
    0% { transform: translate3d(0, 0, 0) rotate(0deg); } 
    100% { transform: translate3d(-10%, -10%, 0) rotate(5deg); } 
}

/* 🌠 별똥별 이펙트 */
.shooting-star {
    position: absolute; width: 150px; height: 2px;
    background: linear-gradient(90deg, rgba(255,255,255,1), transparent);
    transform: rotate(-45deg) translateZ(0); 
    animation: shootGPU 5s linear infinite; opacity: 0; z-index: -1;
    will-change: transform, opacity;
}

@keyframes shootGPU { 
    0% { transform: rotate(-45deg) translate3d(0,0,0); opacity: 0; } 
    10% { opacity: 1; } 
    30% { transform: rotate(-45deg) translate3d(-500px,0,0); opacity: 0; } 
    100% { opacity: 0; } 
}

/* 🦝 제다이 포스 아우라 (필터 렌더링 최적화) */
.jedi-aura {
    position: absolute; width: 220px; height: 220px;
    background: transparent; border-radius: 50%;
    box-shadow: 0 0 40px rgba(20, 241, 149, 0.4), inset 0 0 20px rgba(14, 165, 233, 0.3);
    animation: forcePulseGPU 2.5s ease-in-out infinite; z-index: 1;
    will-change: transform, opacity;
}

@keyframes forcePulseGPU { 
    0%, 100% { transform: translate3d(-50%, -50%, 0) scale(1); opacity: 0.5; } 
    50% { transform: translate3d(-50%, -50%, 0) scale(1.1); opacity: 0.9; } 
}


/* ==========================================
   3. 🦝 HERO & TITLE (메인 스테이지 & 영웅)
========================================== */
#main-stage {
    position: relative; height: 100%; z-index: 10;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    padding-bottom: 120px; text-align: center;
}

/* 영웅 이미지 최적화 */
.raccoon-hero {
    position: relative; width: 150px; height: 150px; border-radius: 50%; object-fit: cover;
    z-index: 5; border: 3px solid #14F195; box-shadow: 0 0 20px rgba(0,0,0,0.8);
    background: #111; margin-bottom: 15px; flex-shrink: 0;
    filter: drop-shadow(0 0 25px rgba(255, 157, 0, 0.5)); 
    animation: floatHeroGPU 3s ease-in-out infinite, auraPulse 2s infinite alternate; 
    will-change: transform, filter;
}

@keyframes floatHeroGPU { 
    0%, 100% { transform: translate3d(0, 0, 0); } 
    50% { transform: translate3d(0, -12px, 0); } 
}
@keyframes auraPulse { 
    from { filter: drop-shadow(0 0 15px rgba(255,157,0,0.3)); } 
    to { filter: drop-shadow(0 0 35px rgba(20,241,149,0.5)); } 
}

/* ✨ 화려한 네온 타이틀 */
.retro-title { 
    font-size: 30px; margin: 0 0 8px 0; letter-spacing: 3px;
    background: linear-gradient(90deg, #fff, #14F195, #9945FF, #fff);
    background-size: 300% 100%;
    -webkit-background-clip: text; background-clip: text; 
    -webkit-text-fill-color: transparent; color: transparent; 
    animation: textShine 4s linear infinite;
    text-shadow: 0 0 20px rgba(20,241,149,0.3);
}

@keyframes textShine { 0% { background-position: 100% 0; } 100% { background-position: -200% 0; } }

.subtitle { 
    font-size: 11px; font-weight: bold; padding: 6px 15px;
    background: rgba(255, 255, 255, 0.05); border: 1px solid rgba(255, 157, 0, 0.4);
    border-radius: 50px; color: var(--bakery-orange);
    box-shadow: 0 0 10px rgba(255, 157, 0, 0.2);
    display: inline-block; margin-bottom: 30px;
}


/* ==========================================
   4. 💳 WALLET CARD (지갑 연동 카드)
========================================== */
.wallet-card {
    background: rgba(15, 15, 20, 0.75); border: 1px solid rgba(20, 241, 149, 0.4);
    border-radius: 20px; padding: 25px 20px; width: 85%; max-width: 350px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.8), inset 0 0 20px rgba(153, 69, 255, 0.15);
    backdrop-filter: blur(10px); transition: all 0.3s; z-index: 5;
}

.btn-wallet {
    background: linear-gradient(90deg, var(--solana-purple), var(--solana-mint), var(--solana-purple));
    background-size: 200% 200%; color: #000; font-family: 'Galmuri9'; font-weight: 900;
    border: none; border-radius: 14px; padding: 18px; width: 100%; font-size: 16px; 
    cursor: pointer; box-shadow: 0 0 20px rgba(20, 241, 149, 0.5); 
    animation: gradientMove 3s ease infinite; display: flex; justify-content: center; align-items: center; gap: 10px;
}
.btn-wallet:active { transform: scale(0.96); }

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

#main-connect-btn {
    background: linear-gradient(135deg, #14F195, #0ea5e9); color: #000;
    box-shadow: 0 0 15px #14F195, 0 0 30px #14F195; text-shadow: 0 0 5px rgba(255,255,255,0.8);
}
#main-connect-btn:hover { box-shadow: 0 0 40px #14F195, 0 0 60px #14F195; transform: scale(1.03); }

.guest-btn-force {
    width: 100%; padding: 14px; background: transparent; color: #aaa;
    border: 1px solid rgba(14, 165, 233, 0.8); border-radius: 14px;
    font-weight: bold; font-family: 'Galmuri9'; font-size: 13px; cursor: pointer;
    box-shadow: 0 0 15px rgba(14, 165, 233, 0.4); text-shadow: 0 0 5px rgba(14, 165, 233, 1);
    transition: 0.2s; display: flex; justify-content: center; align-items: center; gap: 8px;
}
.guest-btn-force:hover { background: rgba(14, 165, 233, 0.1); color: #fff; box-shadow: 0 0 30px rgba(14, 165, 233, 0.8); }

.holder-info { display: none; text-align: left; }
.address-badge { display: inline-block; background: rgba(255,255,255,0.1); padding: 6px 12px; border-radius: 20px; font-size: 11px; color: #ddd; margin-bottom: 15px; border: 1px solid rgba(255,255,255,0.1); }
.level-badge { display: block; background: linear-gradient(135deg, var(--solana-purple), var(--solana-mint)); padding: 10px 15px; border-radius: 10px; font-size: 14px; color: #000; font-weight: 900; margin-bottom: 10px; text-align: center; }
.buff-box { background: rgba(0, 0, 0, 0.6); border: 1px dashed #777; border-radius: 10px; padding: 12px; }
.buff-text { font-size: 11px; color: #ddd; line-height: 1.6; text-align: left; }


/* ==========================================
   5. 📱 RISING MENU (하단 스와이프 패널)
========================================== */
#bottom-bar { 
    position: fixed; bottom: 0; left: 0; width: 100%; height: 90px; 
    background: rgba(15, 15, 18, 0.9); backdrop-filter: blur(15px); 
    border-top: 1px solid rgba(20, 241, 149, 0.3); display: grid; 
    grid-template-columns: repeat(4, 1fr); padding: 10px; z-index: 100;
}

.main-category-btn { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; cursor: pointer; color: #888; transition: color 0.2s; }
.main-category-btn:hover, .main-category-btn.active { color: var(--solana-mint); text-shadow: 0 0 10px var(--solana-mint); }
.main-category-btn i { font-size: 22px; }
.main-category-btn span { font-size: 10px; font-weight: bold; }

#rising-panel { 
    position: fixed; bottom: -100%; left: 0; width: 100%; height: 60%; 
    background: var(--panel-bg); border-top: 2px solid var(--solana-mint); 
    border-top-left-radius: 30px; border-top-right-radius: 30px; 
    z-index: 50000 !important; 
    transition: bottom 0.4s cubic-bezier(0.16, 1, 0.3, 1); 
    padding: 20px; display: flex; flex-direction: column; align-items: center; 
    box-shadow: 0 -10px 40px rgba(0,0,0,0.8);
}
#rising-panel.show { bottom: 0; }
.handle-bar { width: 50px; height: 5px; background: #555; border-radius: 10px; margin-bottom: 20px; cursor: pointer; }
.sub-menu-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; width: 100%; max-width: 400px; overflow-y: auto; padding-bottom: 20px; }

.sub-menu-item { 
    background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.1); 
    border-radius: 16px; padding: 20px 10px; text-align: center; position: relative; 
    cursor: pointer; transition: all 0.2s; 
}
.sub-menu-item:active { transform: scale(0.95); }
.sub-menu-item:hover { background: rgba(20, 241, 149, 0.1); border-color: var(--solana-mint); }
.sub-menu-item i { font-size: 24px; color: #fff; margin-bottom: 10px; display: block; }
.sub-menu-item span { font-size: 11px; color: #ddd; }

.sub-menu-item.locked { background: rgba(0,0,0,0.5); border-color: transparent; cursor: not-allowed; }
.sub-menu-item.locked i, .sub-menu-item.locked span { color: var(--locked); }
.lock-icon { position: absolute; top: 10px; right: 10px; font-size: 12px; color: #ff4757; }


/* ==========================================
   6. 🪟 HOME MODALS (홈 전용 팝업)
========================================== */
#overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.8); display: none; z-index: 150; backdrop-filter: blur(5px); }

/* 홈 전용 모달 컨테이너 */
.ms-modal { 
    display: none; position: fixed; top: 5%; left: 50%; transform: translateX(-50%); 
    width: 92%; max-width: 400px; max-height: 85vh; background: #111114; 
    border: 2px solid var(--solana-mint); border-radius: 20px; padding: 25px 20px; 
    z-index: 60000 !important;
    box-shadow: 0 0 40px rgba(20, 241, 149, 0.2); 
    overflow-y: auto; animation: slideUp 0.3s ease-out; 
}

.install-guide-modal {
    position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%);
    width: 85%; max-width: 340px; background: rgba(15,15,18,0.98);
    border: 2px solid #14F195; border-radius: 24px; padding: 25px;
    z-index: 70000 !important; color: #fff; text-align: center;
    box-shadow: 0 0 50px rgba(0,0,0,0.9); font-family: 'Galmuri9';
}

@keyframes slideUp { 
    from { transform: translate(-50%, 20%); opacity: 0; } 
    to { transform: translate(-50%, 0); opacity: 1; } 
}

.ms-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 15px; }
.ms-close { background: none; border: none; color: #888; font-size: 24px; cursor: pointer; transition: color 0.2s; padding: 0; }
.ms-close:hover { color: #ff4757; }

.ms-input-area { background: #0a0a0c; border: 1px solid #333; border-radius: 12px; padding: 12px; margin-bottom: 10px; transition: border-color 0.3s; }
.ms-input-area:focus-within { border-color: var(--solana-purple); box-shadow: 0 0 10px rgba(153,69,255,0.3); }

/* 샌더 요약 박스 */
.ms-summary-box { background: rgba(20, 241, 149, 0.05); border: 1px solid rgba(20, 241, 149, 0.3); border-radius: 12px; padding: 15px; margin: 15px 0; }
.ms-summary-row { display: flex; justify-content: space-between; margin-bottom: 5px; font-size: 13px; }
.ms-total-sol { font-size: 18px; font-weight: bold; color: var(--solana-mint); }

/* 실행 버튼 */
.btn-execute { 
    background: var(--solana-mint); color: #000; font-size: 15px; padding: 16px; 
    border-radius: 12px; font-weight: 900; border: none; width: 100%; font-family: 'Galmuri9'; 
    cursor: pointer; transition: all 0.2s; box-shadow: 0 4px 15px rgba(20, 241, 149, 0.3); 
}
.btn-execute:disabled { background: #333; color: #777; cursor: not-allowed; box-shadow: none; }
.btn-execute:not(:disabled):active { transform: scale(0.95); }

/* 다이어리 아이템 */
.diary-item { 
    background: rgba(255, 255, 255, 0.05); border-radius: 8px; 
    padding: 10px; margin-bottom: 8px; border-left: 3px solid var(--solana-purple); 
    box-shadow: 0 2px 5px rgba(0,0,0,0.5); 
}
.diary-item-date { font-size: 9px; color: #888; margin-bottom: 4px; }

/* 볼트 & 팬텀 로그인 툴 */
.help-btn {
    width: 22px; height: 22px; border-radius: 50%; background: #FFD700; color: #000;
    display: flex; align-items: center; justify-content: center; font-size: 13px;
    font-weight: bold; cursor: pointer; box-shadow: 0 0 10px #FFD700;
    border: 1px solid #000; transition: all 0.2s; flex-shrink: 0;
}
.help-btn:hover { transform: scale(1.2); box-shadow: 0 0 20px #FFD700; }

.vault-login-btn {
    flex: 1; padding: 15px; background: linear-gradient(135deg, #14F195, #9945FF);
    border: none; border-radius: 12px; color: #fff; font-family: 'Galmuri9';
    font-size: 14px; font-weight: bold; cursor: pointer;
    box-shadow: 0 4px 15px rgba(153, 69, 255, 0.4);
    display: flex; align-items: center; justify-content: center; gap: 10px;
}
.vault-login-btn:active { transform: scale(0.98); }

.phantom-login-btn {
    flex: 1; padding: 15px; background: #fff; color: #000; border: none;
    border-radius: 12px; font-family: 'Galmuri9'; font-size: 14px; font-weight: bold;
    cursor: pointer; display: flex; align-items: center; justify-content: center;
}