:root { --ssx: #ffffff; --ssr: #ff3333; --sss: #ffea00; --ss: #00f2ff; --s: #ff00e5; --a: #26ff00; --b: #ff9800; --c: #a0a0a0; --bg: #121212; }
        body { margin: 0; background: var(--bg); color: #fff; font-family: 'Pretendard', sans-serif; text-align: center; padding-bottom: 70px; overflow-x: hidden; }
        header { background: rgba(0,0,0,0.9); padding: 15px; position: sticky; top: 0; z-index: 100; border-bottom: 1px solid #333; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 10px; }
        .stats-bar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; justify-content: center; }
        .money { font-size: 1.1rem; color: var(--sss); font-weight: bold; }
        #notification-banner { display: none; background: #ff3366; color: white; padding: 15px; font-weight: bold; cursor: pointer; animation: flash 1s infinite alternate; font-size: 1rem; line-height: 1.4; position: fixed; top: 0; left: 0; width: 100%; z-index: 9999; box-sizing: border-box;}
        @keyframes flash { from { opacity: 1; } to { opacity: 0.7; } }
        #login-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: var(--bg); z-index: 10000; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 20px; box-sizing: border-box; gap:15px; }
        .google-btn, .guest-btn { color: #fff; font-weight: bold; padding: 15px 30px; border-radius: 30px; font-size: 1.1rem; border: none; cursor: pointer; display: flex; align-items: center; gap: 10px; width: 100%; max-width: 300px; justify-content: center; }
        .google-btn { background: #4285F4; } .guest-btn { background: #555; }
        .tabs { display: flex; justify-content: center; gap: 2px; position: fixed; bottom: 0; left: 0; width: 100%; background: #000; padding: 10px 5px; box-sizing: border-box; z-index: 90; border-top: 1px solid #333; flex-wrap:wrap; }
        .tab { padding: 10px 2px; background: #222; border-radius: 5px; cursor: pointer; font-weight: bold; transition: 0.2s; font-size: 0.75rem; flex: 1 1 20%; min-width: 40px; text-overflow: ellipsis; white-space: nowrap; overflow: hidden;}
        .tab.active { background: #ff006e; color: white; }
        .section { display: none; padding: 15px; padding-top: 20px; max-width: 1000px; margin: 0 auto; box-sizing: border-box; }
        .section.active { display: block; }
        
        .grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); gap: 10px; margin-top: 15px; }
        .card { position: relative; border-radius: 8px; background: #000; border: 2px solid #444; overflow: hidden; aspect-ratio: 2/3; display: flex; flex-direction: column; cursor: pointer; transition: transform 0.1s; -webkit-tap-highlight-color: transparent;}
        .card:active { transform: scale(0.95); }
        .card img { width: 100%; height: 100%; object-fit: cover; pointer-events: none; }
        .card-grade { position: absolute; bottom: 4px; right: 4px; font-size: 1.2rem; font-weight: 900; font-style: italic; -webkit-text-stroke: 1px #000; z-index: 2; text-shadow: 2px 2px 4px rgba(0,0,0,0.8); pointer-events: none;}
        .card.ssx { border-color: var(--ssx); box-shadow: 0 0 15px var(--ssx); animation: pulse 1s infinite alternate; }
        .card.ssr { border-color: var(--ssr); box-shadow: 0 0 12px var(--ssr); }
        .card.sss { border-color: var(--sss); box-shadow: 0 0 10px var(--sss); } .card.ss { border-color: var(--ss); box-shadow: 0 0 8px var(--ss); } .card.s { border-color: var(--s); } .card.a { border-color: var(--a); } .card.b { border-color: var(--b); } .card.c { border-color: var(--c); }
        @keyframes pulse { from { box-shadow: 0 0 10px #fff; } to { box-shadow: 0 0 25px #fff, inset 0 0 10px #fff; } }
        .card.selected { border: 3px solid #ff3366; box-shadow: 0 0 15px #ff3366; opacity: 0.8; }
        .locked-icon { position: absolute; top: 35%; left: 50%; transform: translate(-50%, -50%); font-size: 2.5rem; text-shadow: 0 0 10px #000; pointer-events: none; z-index: 5; opacity: 0.8;}
        button { padding: 10px 15px; border: none; border-radius: 6px; background: #ff006e; color: white; font-weight: bold; cursor: pointer; transition: 0.2s; font-size: 0.9rem; -webkit-tap-highlight-color: transparent;}
        button:active { transform: scale(0.97); filter: brightness(1.1); } button:disabled { background: #555; cursor: not-allowed; transform: none; opacity: 0.7;}
        
        .gacha-box { background: #1a1a1a; padding: 15px; border-radius: 12px; margin: 10px 0; border: 1px solid #333; }
        .vs-board { display: flex; justify-content: space-around; align-items: center; flex-wrap: wrap; background: #111; padding: 15px 5px; border-radius: 12px; margin-top: 15px; border: 2px solid #ff006e; gap: 5px; }
        .pvp-deck { display: flex; gap: 5px; width: 100%; justify-content: center; }
        .pvp-slot { width: 30%; max-width: 100px; aspect-ratio: 2/3; border: 2px dashed #666; border-radius: 8px; display: flex; flex-direction: column; align-items: center; justify-content: center; font-size: 0.75rem; background:#000; cursor: pointer; position: relative; color:#aaa; transition: 0.2s; -webkit-tap-highlight-color: transparent;}
        .pvp-slot:active { background: #222; border-color: #999; } .pvp-slot.filled { border-style: solid; color: #fff; border-width: 1px;} .slot-add-icon { font-size: 2rem; margin-bottom: 5px; color: #555; pointer-events: none;}
        
        .modal-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.95); display: none; z-index: 10000; flex-direction: column; align-items: center; justify-content: center; padding: 20px; box-sizing: border-box; }
        .zoom-card { width: 100%; max-width: 260px; height: auto; aspect-ratio: 2/3; border-radius: 12px; border: 3px solid #fff; }
        .item-toggle-container { display: flex; justify-content: center; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
        .item-toggle { display: flex; align-items: center; gap: 6px; background: #2a2a2a; padding: 8px 10px; border-radius: 6px; cursor: pointer; font-size: 0.8rem; border: 1px solid #333; }
        .item-toggle input { transform: scale(1.1); cursor: pointer; margin: 0; }
        ::-webkit-scrollbar { width: 6px; } ::-webkit-scrollbar-track { background: #111; border-radius: 4px; } ::-webkit-scrollbar-thumb { background: #555; border-radius: 4px; } ::-webkit-scrollbar-thumb:hover { background: #ff006e; }
        .battle-log-container { background:#000; padding:15px; margin:10px 0; height:120px; overflow-y:auto; text-align:left; font-size:0.8rem; color:#aaa; border-radius: 8px; border:1px solid #333; line-height:1.4; }
        .mail-btn, .chat-btn { background: #3d0036; border: 1px solid #ff00e5; padding: 5px 10px; border-radius: 6px; color: white; font-size: 0.8rem; cursor: pointer; position: relative; }
        .mail-badge { position: absolute; top: -5px; right: -5px; font-size: 0.7rem; background: red; color: white; border-radius: 50%; padding: 2px 5px; display: none; font-weight:bold; }
        .mail-item { background: #222; border: 1px solid #444; padding: 10px; margin-bottom: 10px; border-radius: 8px; text-align: left; }
        #chat-container { width: 100%; height: 350px; background: #000; border: 1px solid #333; border-radius: 8px; overflow-y: auto; padding: 10px; box-sizing: border-box; text-align: left; margin-bottom: 10px; display: flex; flex-direction: column; gap: 8px; }
        .chat-msg { font-size: 0.85rem; line-height: 1.4; padding: 6px 10px; border-radius: 8px; background: #222; width: fit-content; max-width: 90%; word-break: break-word; }
        .chat-msg.me { background: #004d40; align-self: flex-end; border: 1px solid #009688; }
        .chat-msg.system { background: rgba(255, 0, 229, 0.2); border: 1px solid #ff00e5; color: #ffea00; align-self: center; text-align: center; max-width: 95%; font-weight: bold; }
        .chat-name { font-size: 0.7rem; color: #aaa; margin-bottom: 2px; }
        .online-dot { display:inline-block; width:8px; height:8px; background-color:#26ff00; border-radius:50%; margin-right:5px; box-shadow:0 0 5px #26ff00; }
        .offline-dot { display:inline-block; width:8px; height:8px; background-color:#ff3366; border-radius:50%; margin-right:5px; }
        .tourn-match-row { display:flex; justify-content:space-between; align-items:center; background:#1a1a1a; border:1px solid #444; border-radius:8px; padding:5px; margin-bottom:8px; }
        .tourn-card-mini { width:45px; height:67px; border-radius:4px; overflow:hidden; position:relative; border:1px solid #fff; }
        .tourn-card-mini img { width:100%; height:100%; object-fit:cover; pointer-events:none; }
        .tourn-card-mini-grade { position:absolute; bottom:1px; right:1px; font-size:0.5rem; font-weight:bold; -webkit-text-stroke:0.5px #000; }
