:root { --bg-gradient: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%); }
* { -webkit-tap-highlight-color: transparent; -webkit-touch-callout: none; outline: none; box-sizing: border-box; }
html, body { width: 100%; max-width: 100vw; overflow: hidden; overscroll-behavior-y: none; }
body {
    margin: 0;
    padding: 0;
    font-family: 'Segoe UI', system-ui, sans-serif;
    background: url('https://i.ibb.co/0V66h78k/IMG-20260913-202733.png') center center no-repeat fixed !important;
    background-size: cover !important;
    color: #2d3748;
    height: 100vh;
    display: flex;
    flex-direction: column;
    user-select: none;
    -webkit-user-select: none;
}
.title-text { color: #fef08a !important; font-weight: 800; text-shadow: 1px 1px 2px rgba(0,0,0,0.5); }
.content-text { color: #ffffff !important; font-weight: 700; text-shadow: 1px 1px 2px rgba(0,0,0,0.5); }
#toast-container { position: fixed; top: 15px; left: 50%; transform: translateX(-50%); z-index: 999999; display: flex; flex-direction: column; gap: 8px; pointer-events: none; width: 90%; max-width: 350px;}
.toast { background: rgba(255, 255, 255, 0.98); border-radius: 12px; padding: 12px 16px; display: flex; align-items: center; gap: 10px; box-shadow: 0 8px 25px rgba(0,0,0,0.2); border-left: 6px solid; animation: slideDown 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), fadeOut 0.4s ease 2.6s forwards; font-weight: 700; color: #2d3748; font-size: 0.9rem;}
.toast.success { border-color: #48bb78; }
.toast.success i { color: #48bb78; font-size: 1.2rem;}
.toast.error { border-color: #f56565; }
.toast.error i { color: #f56565; font-size: 1.2rem;}
@keyframes slideDown { from { opacity: 0; transform: translateY(-40px) scale(0.9); } to { opacity: 1; transform: translateY(0) scale(1); } }
@keyframes fadeOut { to { opacity: 0; transform: translateY(-15px); } }
.header-frame { border-style: solid; border-width: 16px; border-image-source: url('https://i.ibb.co/r2Mt3Rrc/Chat-GPT-Image-15-57-18-5-thg-9-2026.png'); border-image-slice: 100; border-image-repeat: stretch; background-color: transparent; margin: 4px; position: relative; }
.content-block { border-style: solid; border-width: 10px; border-image-source: url('https://i.ibb.co/8LsfrCbT/Photoroom-20260905-171701068.png'); border-image-slice: 75 fill; border-image-repeat: stretch; background-color: transparent; margin-bottom: 10px; width: auto; }
.frame-content { position: relative; z-index: 2; margin: 0 !important; padding: 8px !important; box-sizing: border-box; }
.sub-tabs-container { display: flex; background: rgba(0,0,0,0.3); border-radius: 10px; margin-bottom: 15px; padding: 4px; border: 1px solid #4299e1; }
.sub-tab { flex: 1; text-align: center; padding: 8px 0; color: #a0aec0; font-weight: bold; font-size: 0.9rem; cursor: pointer; border-radius: 8px; transition: 0.3s; }
.sub-tab.active { background: linear-gradient(135deg, #4299e1 0%, #2b6cb0 100%); color: white; box-shadow: 0 2px 5px rgba(0,0,0,0.3); }
.custom-input { width: 100%; background: rgba(0,0,0,0.4); border: 1px solid #4299e1; color: white; padding: 10px 12px; border-radius: 8px; margin-bottom: 10px; font-size: 0.9rem; font-weight: bold; box-sizing: border-box; }
.custom-input::placeholder { color: #718096; font-weight: normal; }
.custom-input:focus { border-color: #fef08a; outline: none; }
.linked-card { background: rgba(72,187,120,0.15); border: 1px solid #48bb78; border-radius: 8px; padding: 12px; margin-bottom: 15px; text-align: left; }
.linked-header { font-weight: bold; color: #fef08a; margin-bottom: 5px; font-size: 1rem; }
.linked-details { color: white; font-size: 0.85rem; line-height: 1.5; }
#loading-screen { position: fixed; top: 0; left: 0; right: 0; bottom: 0; display: flex; align-items: center; justify-content: center; background: #1a202c; z-index: 9999; transition: opacity 0.5s ease; }
.loader { position: relative; display: flex; align-items: center; justify-content: center; transform: scale(0.6); }
.loader span { position: relative; width: 250px; height: 250px; background-color: #eaeef0; border: 6px solid #eaeef0; box-shadow: -8px -8px 15px rgba(255, 255, 255, 1), 8px 8px 25px rgba(0, 0, 0, 0.15); border-radius: 50%; overflow: hidden; }
.loader span:before { content: attr(data-text); display: flex; align-items: center; justify-content: center; font-weight: 900; color: #bbb9b9; letter-spacing: 3px; font-size: 23px; position: absolute; inset: 40px; background-color: #eaeef0; box-shadow: -8px -8px 25px rgba(255, 255, 255, 1), 8px 8px 25px rgba(0, 0, 0, 0.15), inset 3px 3px 10px rgba(0, 0, 0, 0.1), inset -1px -1px 15px rgba(255, 255, 255, 1); border: 2px solid #eaeef0; border-radius: 50%; z-index: 1; }
.loader span i { position: absolute; inset: 0; background: linear-gradient(#42abff, #ff4f8b, #ffeb4b); border-radius: 50%; filter: blur(5px); animation: animate 1s linear infinite; }
@keyframes animate { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }
.text { position: absolute; width: 279px; height: 279px; border-radius: 50%; animation: animateText 6s linear infinite; }
@keyframes animateText { 0% { transform: rotate(360deg); } 100% { transform: rotate(0deg); } }
.ball { width: 50px; height: 50px; background: linear-gradient(#42abff, #ff4f8b, #ffeb4b); border: 6px solid #dfdfdf; border-radius: 50%; box-shadow: -8px -8px 15px rgba(255, 255, 255, 1), 8px 8px 25px rgba(0, 0, 0, 0.15); animation: rotate 3s infinite linear; }
.header-top { flex-shrink: 0; z-index: 10; margin-bottom: 0; }
.header-profile { display: flex; align-items: center; justify-content: space-between; border-bottom: 1px dashed rgba(0,0,0,0.15); padding-bottom: 6px; margin-bottom: 6px; position: relative;}
.avatar-container { width: 60px; display: flex; justify-content: flex-start; }
.avatar { width: 45px; height: 45px; border-radius: 8px; border: 2px solid #4299e1; object-fit: cover; }
.header-info { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; height: 45px;}
.header-name-row { display: flex; align-items: center; justify-content: center; gap: 6px; margin-bottom: 3px;}
.header-name { font-weight: 800; font-size: 1.05rem; color: #1a202c; white-space: nowrap;}
.header-level { font-size: 0.75rem; color: #e53e3e; font-weight: 800; background: rgba(229,62,62,0.1); padding: 2px 6px; border-radius: 4px; border: 1px solid rgba(229,62,62,0.3);}
.header-id { font-size: 0.75rem; color: #718096; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 6px; background: rgba(0,0,0,0.05); padding: 3px 8px; border-radius: 10px; width: fit-content;}
.inv-container { width: 60px; display: flex; justify-content: flex-end; }
.inv-header-btn { background: transparent; border: none; cursor: pointer; padding: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.inv-title { font-size: 0.65rem; font-weight: 900; color: #2d3748; margin-bottom: 1px; text-shadow: 1px 1px 0px rgba(255,255,255,0.8); }
.inv-header-btn img { width: 40px; height: 40px; filter: drop-shadow(0 2px 4px rgba(0,0,0,0.3)); transition: transform 0.1s;}
.inv-header-btn:active img { transform: scale(0.9); }
.header-balances { display: flex; justify-content: space-around; }
.balance-item { font-weight: 800; font-size: 0.95rem; color: #2d3748; display: flex; align-items: center; gap: 6px; }
#app-content { opacity: 0; display: flex; flex-direction: column; height: 100%; width: 100%; transition: opacity 0.6s ease; padding: 2px;}
.main-frame { flex: 1; display: flex; flex-direction: column; overflow: hidden; margin-bottom: 0; margin-top: 2px; }
.content-area { flex: 1; position: relative; width: 100%; overflow: hidden; }
.tab-page { position: absolute; top: 0; left: 0; right: 0; bottom: 0; overflow-y: auto; overflow-x: hidden; display: none; flex-direction: column; padding: 4px;}
.tab-page.active { display: flex; animation: fadeIn 0.2s ease; }
.tab-title { font-size: 1rem; font-weight: 900; text-align: center; text-transform: uppercase; margin-bottom: 8px; }
.inventory-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.inv-slot { aspect-ratio: 1/1; background: rgba(0,0,0,0.4); border: 1px solid rgba(255,255,255,0.15); border-radius: 8px; display: flex; justify-content: center; align-items: center; box-shadow: inset 0 2px 5px rgba(0,0,0,0.5); }
.divider-line { width: 60%; height: 2px; background: rgba(255,255,255,0.2); border-radius: 2px; margin: 5px auto 10px auto; }
.item-row { display: flex; justify-content: space-between; align-items: center; padding: 12px 0; border-bottom: 1px dashed rgba(255,255,255,0.2); }
.item-row.no-border { border-bottom: none; }
.item-info h4 { margin: 0 0 4px 0; font-size: 0.9rem; display: flex; align-items: center; gap: 6px;}
.item-info p { margin: 0; font-size: 0.75rem; }
.item-card { display: flex; justify-content: space-between; align-items: center; padding: 10px; }
.btn-action { flex: 1; padding: 10px 8px; border: none; border-radius: 8px; font-weight: 800; font-size: 0.85rem; cursor: pointer; color: white; transition: transform 0.1s; display: flex; align-items: center; justify-content: center; gap: 6px; background: linear-gradient(135deg, #4299e1 0%, #2b6cb0 100%); box-shadow: 0 4px 10px rgba(0,0,0,0.15); }
.btn-fixed { width: 95px !important; flex: 0 0 95px !important; padding: 10px 0 !important; }
.btn-action:active { transform: scale(0.95); }
.btn-secondary { background: linear-gradient(135deg, #48bb78 0%, #2f855a 100%); }
.btn-gacha { background: linear-gradient(135deg, #ed8936 0%, #c05621 100%); }
.btn-danger { background: linear-gradient(135deg, #f56565 0%, #c53030 100%); }
.custom-navbar { display: flex; justify-content: space-between; align-items: center; background: linear-gradient(to bottom, #1e3a8a, #0f172a); border: 2px solid #38bdf8; border-radius: 12px; margin: 4px; padding: 4px; flex-shrink: 0; z-index: 100; box-shadow: 0 4px 15px rgba(0,0,0,0.5); }
.nav-item { flex: 1; display: flex; justify-content: center; align-items: center; cursor: pointer; padding: 0; margin: 0; position: relative; }
.nav-item img { width: 85px; margin: 0 -9px; max-width: unset; height: auto; filter: drop-shadow(0 2px 4px rgba(0,0,0,0.6)); position: relative; z-index: 2; transition: all 0.2s ease; }
.nav-item.active::before { content: ''; position: absolute; top: -4px; left: 20%; width: 60%; height: 3px; background: #fef08a; box-shadow: 0 2px 10px 3px rgba(250, 204, 21, 0.9); border-radius: 3px; z-index: 1; }
.nav-item.active img { filter: drop-shadow(0 0 10px rgba(250, 204, 21, 1)); transform: translateY(-2px); }
.opt-btn { background: rgba(0,0,0,0.3); border: 2px solid transparent; border-radius: 8px; color: white; padding: 8px 5px; font-weight: 800; font-size: 0.9rem; cursor: pointer; transition: all 0.2s; text-align: center; box-shadow: inset 0 2px 5px rgba(0,0,0,0.3); }
.opt-btn:active { transform: scale(0.95); }
.opt-btn.selected-ex { border-color: #4299e1; background: rgba(66, 153, 225, 0.2); box-shadow: 0 0 10px rgba(66, 153, 225, 0.4); }
.opt-btn.selected-wd { border-color: #f56565; background: rgba(245, 101, 101, 0.2); box-shadow: 0 0 10px rgba(245, 101, 101, 0.4); }
.inventory-grid-5x5 { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.inv-slot-5x5 { aspect-ratio: 1/1; background: rgba(0,0,0,0.4); border: 1px solid rgba(255,255,255,0.15); border-radius: 8px; display: flex; justify-content: center; align-items: center; position: relative; cursor: pointer; box-shadow: inset 0 2px 5px rgba(0,0,0,0.5); transition: all 0.2s; }
.inv-slot-5x5 img { width: 70%; height: 70%; object-fit: contain; filter: drop-shadow(0 2px 3px rgba(0,0,0,0.5)); }
.inv-slot-5x5 .item-qty { position: absolute; bottom: 2px; right: 4px; color: white; font-size: 0.65rem; font-weight: bold; text-shadow: 1px 1px 2px black; }
.inv-slot-5x5.active { border-color: #fef08a; background: rgba(254, 240, 138, 0.2); box-shadow: 0 0 8px rgba(254, 240, 138, 0.6); transform: scale(1.05); }
#loading-screen { position: fixed; inset: 0; background: radial-gradient(circle at center, #1e293b 0%, #0f172a 100%); display: flex; align-items: center; justify-content: center; z-index: 9999; transition: opacity 0.5s ease; flex-direction: column; }
.loading-content { display: flex; flex-direction: column; align-items: center; width: 85%; max-width: 320px; z-index: 2; }
.loading-logo { font-size: 4.5rem; color: #f6e05e; filter: drop-shadow(0 0 15px rgba(246, 224, 94, 0.4)); margin-bottom: 15px; }
.pulse-anim { animation: pulseLogo 1.2s infinite alternate ease-in-out; }
@keyframes pulseLogo { 0% { transform: scale(1) translateY(0); filter: drop-shadow(0 0 10px rgba(246, 224, 94, 0.3)); } 100% { transform: scale(1.08) translateY(-5px); filter: drop-shadow(0 0 25px rgba(246, 224, 94, 0.8)); } }
.loading-title { color: #fef08a; font-size: 1.8rem; font-weight: 900; margin: 0 0 5px 0; letter-spacing: 2px; text-shadow: 2px 2px 4px rgba(0,0,0,0.8); text-align: center;}
.loading-subtitle { color: #a0aec0; font-size: 0.85rem; margin: 0 0 30px 0; font-style: italic; font-weight: 600; }
.progress-wrapper { width: 100%; text-align: center; }
.progress-bar-container { width: 100%; height: 14px; background: rgba(0,0,0,0.6); border-radius: 10px; border: 1px solid #4a5568; overflow: hidden; position: relative; box-shadow: inset 0 2px 4px rgba(0,0,0,0.8); }
.progress-fill { width: 0%; height: 100%; background: linear-gradient(90deg, #ed8936, #f6e05e); border-radius: 10px; box-shadow: 0 0 10px rgba(246, 224, 94, 0.8); transition: width 0.15s ease-out; position: relative; overflow: hidden; }
.progress-fill::after { content: ''; position: absolute; top: 0; left: 0; right: 0; bottom: 0; background: linear-gradient(90deg, rgba(255,255,255,0) 0%, rgba(255,255,255,0.5) 50%, rgba(255,255,255,0) 100%); animation: shimmer 1s infinite linear; }
@keyframes shimmer { 0% { transform: translateX(-100%); } 100% { transform: translateX(100%); } }
.progress-text { margin-top: 10px; color: #fbd38d; font-weight: 900; font-size: 1rem; font-family: monospace; text-shadow: 1px 1px 2px #000;}
img, a, button, video { -webkit-touch-callout: none !important; -webkit-user-select: none !important; user-select: none !important; -webkit-user-drag: none !important; }

/* ================= CSS TAB 0 (VERSION 2) ================= */
.mining-dashboard-v2 { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 30px 10px; gap: 15px; min-height: 400px; }
.mining-display { position: relative; width: 250px; height: 250px; border-radius: 50%; background: url('https://i.ibb.co/zWjcNN0c/1789389496718.png') center center no-repeat; background-size: cover; box-shadow: 0 8px 25px rgba(0, 0, 0, 0.6); display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; z-index: 2; padding: 10px; }

/* Nét đứt xoay vòng */
.mining-display::before { content: ''; position: absolute; top: -12px; left: -12px; right: -12px; bottom: -12px; border-radius: 50%; border: 3px dashed #fef08a; animation: rotateDash 12s linear infinite; pointer-events: none; box-shadow: 0 0 15px rgba(254, 240, 138, 0.4); }
@keyframes rotateDash { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }

/* CHỈ BO VIỀN (STROKE) CHO SỐ, BỎ BO VIỀN CHO CHỮ NHỎ */
.mining-display .label { 
    width: 100%; font-size: 0.85rem; color: #ffffff; font-weight: 800; margin-bottom: 5px; 
    text-align: center; 
    text-shadow: 0px 2px 5px rgba(0,0,0,1), 0px 0px 3px rgba(0,0,0,1); 
}

.mining-display .value-main { 
    width: 100%; font-size: 2.6rem; color: #fef08a; margin: 0; font-weight: 900; 
    text-align: center; letter-spacing: 1px;
    -webkit-text-stroke: 1.5px #000; /* Chỉ dùng stroke cho dòng số này */
    text-shadow: 0px 4px 12px rgba(0,0,0,0.8);
}

.mining-display .speed-indicator { 
    width: 100%; display: flex; align-items: center; justify-content: center; gap: 6px; 
    margin-top: 5px; font-size: 0.95rem; color: #4ade80; font-weight: bold; text-align: center;
    text-shadow: 0px 2px 4px rgba(0,0,0,1), 0px 0px 2px rgba(0,0,0,1);
}
.mining-display .speed-indicator img { 
    width: 24px; /* Đã phóng to icon */
    height: 24px; 
    object-fit: contain; 
    filter: drop-shadow(0 1px 2px rgba(0,0,0,0.5)); 
}

.mining-display .timer-indicator { 
    width: 100%; margin-top: 10px; font-size: 0.8rem; color: #cbd5e0; font-weight: bold; 
    text-align: center; 
    text-shadow: 0px 2px 4px rgba(0,0,0,1), 0px 0px 2px rgba(0,0,0,1);
}
.mining-display .timer-indicator span { color: #fbd38d; }

.action-buttons-v2 { display: flex; justify-content: space-between; align-items: center; width: 100%; max-width: 380px; padding: 0 10px; margin-top: -10px; z-index: 3; }
.toggle-action-wrapper { display: flex; justify-content: center; align-items: center; }
.img-btn { background: transparent; border: none; padding: 0; margin: 0; cursor: pointer; outline: none; transition: transform 0.1s cubic-bezier(0.4, 0, 0.2, 1); -webkit-tap-highlight-color: transparent; }
.img-btn img { width: 135px; height: auto; object-fit: contain; filter: drop-shadow(0 6px 10px rgba(0, 0, 0, 0.5)); }
.img-btn:active { transform: scale(0.92); }
.hidden { display: none !important; }
