/* ===== ALL EXISTING STYLES - GIỮ NGUYÊN 100% ===== */
body{
    margin:0;
    background:#0b0b12;
    color:white;
    font-family:Arial,sans-serif;
    overflow:hidden;
    transition:.25s;
}
body.light{
    background:#f2f2f7;
    color:#111;
}

/* ===== THEME ICONS ===== */
#themeToggle{
    position:absolute;
    left:10px;
    top:10px;
    display:flex;
    gap:6px;
    z-index:200;
}
.themeBtn{
    width:26px;
    height:26px;
    border-radius:50%;
    display:flex;
    align-items:center;
    justify-content:center;
    background:#111;
    border:1px solid #00ffcc55;
    cursor:pointer;
    font-size:14px;
    user-select:none;
}
body.light .themeBtn{
    background:#fff;
    color:#000;
}

/* ===== AUTH MODAL ===== */
#authOverlay{
    position:fixed;
    inset:0;
    background:rgba(0,0,0,.95);
    z-index:1000;
    display:flex;
    justify-content:center;
    align-items:center;
    backdrop-filter:blur(10px);
}
.auth-container{
    background:#0f0f1a;
    border:2px solid #00ffcc33;
    border-radius:20px;
    padding:30px;
    width:90%;
    max-width:400px;
    box-shadow:0 0 50px #00ffcc33;
    position:relative;
    max-height:80vh;
    overflow-y:auto;
}
body.light .auth-container{
    background:#fff;
    border:2px solid #007a6a33;
}
.auth-tabs{
    display:flex;
    margin-bottom:25px;
    gap:10px;
}
.auth-tab{
    flex:1;
    padding:12px;
    background:#111;
    border:none;
    color:white;
    border-radius:12px;
    cursor:pointer;
    font-size:16px;
    font-weight:bold;
    transition:.25s;
}
body.light .auth-tab{
    background:#f4f4f7;
    color:#000;
}
.auth-tab.active{
    background:linear-gradient(135deg,#00ffcc,#7b00ff);
    color:#000;
}
.auth-input{
    width:100%;
    margin-bottom:15px;
    padding:14px;
    background:#111;
    border:1px solid #00ffcc33;
    color:white;
    border-radius:12px;
    font-size:14px;
    box-sizing:border-box;
}
body.light .auth-input{
    background:#f4f4f7;
    border:1px solid #0002;
    color:#000;
}
.auth-input:focus{
    outline:none;
    border-color:#00ffcc;
    box-shadow:0 0 15px #00ffcc66;
}
.auth-btn{
    width:100%;
    padding:14px;
    background:linear-gradient(135deg,#00ffcc,#7b00ff);
    border:none;
    color:black;
    font-weight:bold;
    border-radius:12px;
    font-size:16px;
    cursor:pointer;
    margin-bottom:15px;
    transition:.25s;
}
.auth-btn:hover{
    transform:scale(1.02);
    box-shadow:0 0 20px #00ffcc;
}
.otp-section{
    margin-top:20px;
    padding:20px;
    background:#111;
    border-radius:12px;
    border:1px solid #00ffcc22;
}
body.light .otp-section{
    background:#f4f4f7;
}
.forgot-password{
    color:#00ffcc;
    text-align:right;
    font-size:12px;
    margin-bottom:15px;
    cursor:pointer;
}
body.light .forgot-password{
    color:#007a6a;
}
.error-message{
    color:#ff4444;
    font-size:12px;
    margin-bottom:10px;
    display:none;
}
.success-message{
    color:#00ff88;
    font-size:12px;
    margin-bottom:10px;
    display:none;
}

/* ===== AVATAR & USER INFO ===== */
.avatar-section{
    padding:20px;
    text-align:center;
    border-bottom:1px solid #00ffcc22;
}
.avatar-img{
    width:120px;
    height:120px;
    border-radius:50%;
    border:4px solid #00ffcc;
    margin-bottom:15px;
    object-fit:cover;
    cursor:pointer;
    transition:0.3s;
    box-shadow:0 0 20px rgba(0,255,204,0.3);
}
.avatar-img:hover{
    transform:scale(1.1);
    box-shadow:0 0 30px #00ffcc;
    border-color:#fff;
}
.avatar-name{
    font-size:20px;
    font-weight:bold;
    color:#00ffcc;
    margin-bottom:8px;
    text-shadow:0 0 10px rgba(0,255,204,0.5);
}
.avatar-email{
    font-size:13px;
    color:#aaa;
    margin-bottom:8px;
}
.avatar-phone{
    font-size:12px;
    color:#888;
    margin-bottom:15px;
    padding:5px 10px;
    background:rgba(0,255,204,0.1);
    border-radius:20px;
    display:inline-block;
}
.change-avatar-btn{
    background:linear-gradient(135deg,#00ffcc,#7b00ff);
    border:none;
    color:black;
    font-weight:bold;
    padding:12px 25px;
    border-radius:25px;
    cursor:pointer;
    font-size:14px;
    margin-top:10px;
    transition:0.3s;
    box-shadow:0 0 15px rgba(0,255,204,0.3);
}
.change-avatar-btn:hover{
    transform:scale(1.05);
    box-shadow:0 0 25px #00ffcc;
}

/* ===== AVATAR CROP MODAL ===== */
#cropModal{
    position:fixed;
    inset:0;
    background:rgba(0,0,0,0.95);
    z-index:2000;
    display:none;
    justify-content:center;
    align-items:center;
    backdrop-filter:blur(10px);
}
.crop-container{
    background:#0f0f1a;
    border:2px solid #00ffcc33;
    border-radius:20px;
    padding:20px;
    width:90%;
    max-width:500px;
    box-shadow:0 0 50px #00ffcc33;
}
.crop-area{
    width:100%;
    max-height:300px;
    overflow:hidden;
    margin-bottom:15px;
    border-radius:10px;
    background:#111;
}
#cropImage{
    width:100%;
    max-height:300px;
    object-fit:contain;
}
.crop-controls{
    display:flex;
    gap:10px;
    margin-top:15px;
}
.crop-btn{
    flex:1;
    padding:12px;
    border:none;
    border-radius:10px;
    font-weight:bold;
    cursor:pointer;
    transition:0.3s;
}
.crop-btn.save{
    background:linear-gradient(135deg,#00ffcc,#7b00ff);
    color:black;
}
.crop-btn.cancel{
    background:#333;
    color:white;
    border:1px solid #ff4444;
}
.crop-btn:hover{
    transform:scale(1.02);
}

/* ===== LANGUAGE SELECTOR ===== */
.language-selector{
    margin-top:10px;
    padding:10px;
    background:#111;
    border-radius:8px;
    border:1px solid #00ffcc22;
}
.language-selector select{
    width:100%;
    padding:8px;
    background:#0b0b12;
    color:white;
    border:1px solid #00ffcc55;
    border-radius:6px;
    font-size:12px;
    cursor:pointer;
}
body.light .language-selector select{
    background:#fff;
    color:#000;
    border:1px solid #0002;
}
.language-selector select option{
    background:#111;
    color:white;
}
body.light .language-selector select option{
    background:#fff;
    color:#000;
}

/* ===== SIDE MENU SCROLL ===== */
#sideMenu{
    overflow-y:auto !important;
    overflow-x:hidden;
}
.menu-content{
    flex:1;
    overflow-y:auto;
    overflow-x:hidden;
    padding-bottom:20px;
}
/* ======================= */

header{
    position:relative;
    text-align:center;
    padding:12px;
    font-size:20px;
    font-weight:bold;
    background:#0b0b12;
    border-bottom:1px solid #00ffcc33;
    transition:.25s;
}
body.light header{
    background:#f2f2f7;
    border-bottom:1px solid #0002;
}
.menu-btn{
    position:absolute;
    right:12px;
    top:10px;
    width:28px;
    height:22px;
    cursor:pointer;
}
.menu-btn span{
    display:block;
    height:3px;
    background:#00ffcc;
    margin:4px 0;
    border-radius:3px;
}

.rainbow{
    background:linear-gradient(270deg,
        #ff004c,#ff7b00,#ffee00,#00ff88,#00c8ff,#7b00ff,#ff00ff);
    background-size:400% 400%;
    -webkit-background-clip:text;
    -webkit-text-fill-color:transparent;
    animation:rainbowMove 4s linear infinite;
}
@keyframes rainbowMove{
    0%{background-position:0% 50%}
    50%{background-position:100% 50%}
    100%{background-position:0% 50%}
}

/* ===== SIDE MENU ===== */
#overlay{
    position:fixed;
    inset:0;
    background:rgba(0,0,0,.55);
    opacity:0;
    pointer-events:none;
    transition:.3s;
    z-index:50;
}
#overlay.show{
    opacity:1;
    pointer-events:auto;
}

#sideMenu{
    position:fixed;
    top:0;
    right:-280px;
    width:280px;
    height:100%;
    background:#0f0f1a;
    border-left:1px solid #00ffcc33;
    box-shadow:-6px 0 20px #000;
    transition:.3s;
    z-index:60;
    display:flex;
    flex-direction:column;
    overflow:hidden;
}
body.light #sideMenu{
    background:#fff;
    border-left:1px solid #0002;
    box-shadow:-6px 0 20px #0003;
}

#sideMenu.show{
    right:0;
}

.menu-header{
    padding:14px;
    border-bottom:1px solid #00ffcc22;
    font-weight:bold;
    text-align:center;
    color:#00ffcc;
    position:relative;
    z-index:2;
}
body.light .menu-header{
    color:#007a6a;
    border-bottom:1px solid #0002;
}

.menu-section{
    padding:10px;
    border-bottom:1px solid #00ffcc11;
    position:relative;
    z-index:2;
}
body.light .menu-section{
    border-bottom:1px solid #0001;
}

.menu-section h4{
    margin:0 0 6px;
    font-size:13px;
    color:#7b7bff;
}
body.light .menu-section h4{
    color:#555;
}

.menu-btn2{
    width:100%;
    padding:8px;
    margin:4px 0;
    border:none;
    border-radius:8px;
    background:#111;
    color:white;
    font-size:12px;
    cursor:pointer;
    border:1px solid #00ffcc33;
}
body.light .menu-btn2{
    background:#f4f4f7;
    color:#000;
    border:1px solid #0002;
}
.menu-btn2.google{background:linear-gradient(135deg,#ff3c3c,#ff9a3c);}
.menu-btn2.facebook{background:linear-gradient(135deg,#1877f2,#4aa3ff);}
.menu-btn2.logout{background:linear-gradient(135deg,#ff0066,#7b00ff);}

/* ===== ĐÃ ĐỔI NÚT ĐĂNG NHẬP THÀNH DÒNG CHỮ NHỎ ===== */
.small-text-link{
    font-size:12px;
    color:#00ffcc;
    text-align:center;
    margin:5px 0;
    cursor:pointer;
    text-decoration:underline;
    opacity:0.8;
    transition:0.3s;
}
.small-text-link:hover{
    opacity:1;
    color:#7b00ff;
}
body.light .small-text-link{
    color:#007a6a;
}

.menu-list{
    max-height:120px;
    overflow:auto;
    font-size:12px;
}
.menu-list div{
    padding:4px 6px;
    border-radius:6px;
    background:#111;
    margin-bottom:4px;
    border:1px solid #00ffcc22;
    cursor:pointer;
}
body.light .menu-list div{
    background:#f4f4f7;
    border:1px solid #0002;
}
.menu-list div:hover{
    background:#00ffcc22;
}
body.light .menu-list div:hover{
    background:#0001;
}

.menu-footer{
    margin-top:auto;
    padding:10px;
    text-align:center;
    font-size:12px;
    border-top:1px solid #00ffcc22;
    color:#00ffcc;
    text-shadow:0 0 6px #00ffcc;
    font-weight:bold;
    position:relative;
    z-index:2;
}
body.light .menu-footer{
    color:#007a6a;
    border-top:1px solid #0002;
    text-shadow:none;
}

/* ===== HIỆU ỨNG TƠ NHỆN 3D TRONG MENU ===== */
#menuWeb{
    position:absolute;
    inset:0;
    z-index:1;
    pointer-events:none;
}
#menuWeb canvas{
    width:100%;
    height:100%;
    display:block;
}

/* ===== MAIN CONTENT ===== */
#container{
    padding:10px;
    height:calc(100vh - 120px);
    overflow:auto;
}

#container::-webkit-scrollbar{
    width:8px;
    height:8px;
}
#container::-webkit-scrollbar-track{
    background:#0b0b12;
}
body.light #container::-webkit-scrollbar-track{
    background:#f2f2f7;
}
#container::-webkit-scrollbar-thumb{
    background:linear-gradient(180deg,#00ffcc,#7b00ff);
    border-radius:10px;
}

/* ===== FILE TABS ===== */
#fileTabs{
    display:flex;
    gap:6px;
    margin-bottom:6px;
    overflow-x:auto;
}
.fileTab{
    display:flex;
    align-items:center;
    gap:6px;
    padding:4px 8px;
    border-radius:8px;
    background:#111;
    border:1px solid #00ffcc33;
    font-size:11px;
    cursor:pointer;
    white-space:nowrap;
}
body.light .fileTab{
    background:#f4f4f7;
    border:1px solid #0002;
}
.fileTab.active{
    background:linear-gradient(135deg,#00ffcc,#7b00ff);
    color:#000;
    font-weight:bold;
}
.fileTab .closeBtn{
    color:#ff5c5c;
    font-weight:bold;
    cursor:pointer;
}

/* ===== HEX VIEW ===== */
#hexView{
    margin-top:10px;
    background:#111;
    border-radius:10px;
    padding:8px;
    max-height:55vh;
    overflow-y:auto;
    overflow-x:hidden;
    white-space:normal;
    font-family:monospace;
    font-size:12px;
    line-height:1.4;
}
body.light #hexView{
    background:#fff;
}

/* ===== INPUT + BUTTON ===== */
input,button{
    background:#111;
    border:1px solid #00ffcc55;
    color:white;
    border-radius:8px;
    padding:7px;
    font-size:12px;
}
body.light input,
body.light button{
    background:#f4f4f7;
    color:#000;
    border:1px solid #0002;
}
button{
    background:linear-gradient(135deg,#00ffcc,#7b00ff);
    font-weight:bold;
}
button.small{
    font-size:11px;
    padding:5px 8px;
}

/* ===== HEX LINE ===== */
.line{
    display:flex;
    gap:8px;
    align-items:flex-start;
    flex-wrap:wrap;
}
.addr{
    width:90px;
    color:#00ffcc;
    flex-shrink:0;
}
body.light .addr{
    color:#007a6a;
}
.hex{
    display:flex;
    flex-wrap:wrap;
    flex:1;
}
.ascii{
    display:flex;
    flex-wrap:wrap;
    flex:1;
    min-width:140px;
}
.hex span, .ascii span{
    display:inline-block;
    width:20px;
    text-align:center;
    cursor:pointer;
    border-radius:4px;
}
.hex span:hover, .ascii span:hover{
    background:#00ffcc33;
}
body.light .hex span:hover,
body.light .ascii span:hover{
    background:#0001;
}
.ascii span{
    width:12px;
}
.modified{
    background:#ff006655 !important;
}
.match{
    background:#00ffcc33;
}
.byteMatch{
    background:#00ffccaa !important;
    color:#000;
    font-weight:bold;
}
.contextMatch{
    background:#00ffcc33 !important;
}
.tools{
    display:flex;
    gap:6px;
    margin-top:8px;
    flex-wrap:wrap;
}
.panel{
    margin-top:8px;
    padding:8px;
    background:#111;
    border-radius:10px;
    border:1px solid #00ffcc33;
    font-size:12px;
}
body.light .panel{
    background:#fff;
    border:1px solid #0002;
}
.badge{
    display:inline-block;
    padding:2px 6px;
    border-radius:6px;
    background:#00ffcc33;
    color:#00ffcc;
    margin-right:6px;
    margin-bottom:4px;
}
body.light .badge{
    background:#007a6a22;
    color:#007a6a;
}
.result{
    font-family:monospace;
    font-size:11px;
    max-height:120px;
    overflow:auto;
    background:#0b0b12;
    padding:6px;
    border-radius:6px;
    border:1px solid #00ffcc22;
    white-space:pre;
}
body.light .result{
    background:#f2f2f7;
    border:1px solid #0002;
}

/* ===== POPUP DUMP OFFSET TXT ===== */
#dumpOverlay{
    position:fixed;
    inset:0;
    background:rgba(0,0,0,.65);
    z-index:100;
    display:none;
}
#dumpBox{
    position:absolute;
    inset:8%;
    background:#0f0f18;
    border-radius:14px;
    border:1px solid #00ffcc55;
    display:flex;
    flex-direction:column;
    box-shadow:0 0 25px #000;
}
body.light #dumpBox{
    background:#fff;
    border:1px solid #0002;
}
#dumpHeader{
    padding:10px;
    border-bottom:1px solid #00ffcc33;
    display:flex;
    justify-content:space-between;
    align-items:center;
    font-weight:bold;
    color:#00ffcc;
}
body.light #dumpHeader{
    color:#007a6a;
    border-bottom:1px solid #0002;
}
#dumpClose{
    cursor:pointer;
    font-size:18px;
    padding:2px 8px;
    border-radius:6px;
    background:#111;
    border:1px solid #00ffcc55;
}
body.light #dumpClose{
    background:#f4f4f7;
    border:1px solid #0002;
}
#dumpClose:hover{
    background:#ff006655;
}
#dumpContent{
    flex:1;
    padding:10px;
    overflow:auto;
    white-space:pre;
    font-family:monospace;
    font-size:12px;
    background:#0b0b12;
}
body.light #dumpContent{
    background:#f2f2f7;
}

/* Footer liên hệ */
footer{
    position:fixed;
    bottom:0;
    left:0;
    width:100%;
    text-align:center;
    padding:6px 0;
    font-size:12px;
    background:#0b0b12;
    border-top:1px solid #00ffcc22;
}
body.light footer{
    background:#f2f2f7;
    border-top:1px solid #0002;
}
footer span{
    color:#00ffcc;
    text-shadow:0 0 6px #00ffcc;
    font-weight:bold;
}
body.light footer span{
    color:#007a6a;
    text-shadow:none;
}
