/* --- GLOBAL STYLES --- */
* { margin: 0; padding: 0; box-sizing: border-box; }
html { width: 100%; height: 100%; overflow-y: auto; }
body { width: 100%; min-height: 100%; font-family: 'Nunito', sans-serif; overflow-x: hidden; background-color: #000; user-select: none; -webkit-user-select: none; }
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background-color: transparent; border-radius: 10px; border: 2px solid transparent; background-clip: content-box; transition: background-color 0.3s; }
body.is-scrolling ::-webkit-scrollbar-thumb { background-color: rgba(255, 255, 255, 0.6); }

/* --- BACKGROUND --- */
.video-background { position: fixed; top: 0; left: 0; width: 100%; height: 100%; object-fit: cover; z-index: -100; pointer-events: none; }
/* --- RESPONSIVE MOBILE TỐI ƯU --- */
@media (max-width: 1024px) {
    .video-background { top: 0; left: 0; width: 100vw; height: 100vh; }
    .qr-tooltip-dark, .discord-tooltip {
        display: none !important;
    }
    
    .main-wrapper { 
        height: auto !important; 
        min-height: 100vh;
        display: flex; 
        flex-direction: column; 
        align-items: center; 
        gap: 25px; 
        padding: 80px 0 150px 0; /* Chừa không gian cho trình phát nhạc ở dưới */
    }
    
    /* Gỡ bỏ position absolute để layout tự do co giãn */
    .blur-box, .blur-name-box-2, .blur-social-box, .blur-portfolio-box, .blur-games-box {
        position: relative !important;
        top: auto !important;
        left: auto !important;
        transform: none !important;
        width: 90% !important;
    }
    
    /* Box 1: Profile */
    .blur-box { height: 350px; }
    .layer-avatar { left: 50%; transform: translateX(-50%); top: 100px; }
    .layer-avatar:hover { transform: translateX(-50%) scale(1.05); }
    .layer-info { top: 240px; left: 0; width: 100%; text-align: center; display: flex; flex-direction: column; align-items: center; }
    .name-glitch { font-size: 32px; }
    
    /* Box 2: Giới thiệu */
    .blur-name-box-2 { height: auto; min-height: 200px; padding-bottom: 25px; display: flex; flex-direction: column; align-items: center; }
    .me { font-size: 24px; position: relative; top: 15px; left: auto; padding: 5px 20px; border-radius: 30px; margin-bottom: 15px; background: rgba(255, 67, 155, 0.5); }
    .me-2 { position: relative; top: auto; left: auto; width: 90%; font-size: 16px; line-height: 1.6; text-align: center; }
    
/* Box 3: Social */
    .blur-social-box { 
        width: 90% !important; 
        height: auto; 
        padding: 15px 10px; 
        display: flex; 
        justify-content: center; /* Căn giữa các icon */
        align-items: center;
        flex-wrap: nowrap; /* Giữ tất cả trên 1 hàng, nếu muốn rớt dòng thì đổi thành wrap */
        gap: 12px; /* Khoảng cách giữa các icon */
    }

/* Box 3: Social - Chế độ cuộn ngang */
    .blur-social-box { 
        width: 90% !important; 
        height: 85px !important; 
        padding: 0 15px !important; 
        display: flex !important; 
        align-items: center !important;
        flex-wrap: nowrap !important; /* Bắt buộc nằm trên 1 hàng để cuộn */
        
        /* KÍCH HOẠT CUỘN NGANG */
        overflow-x: auto !important; 
        overflow-y: hidden !important;
        -webkit-overflow-scrolling: touch; /* Giúp cuộn mượt trên iPhone */
        
        /* Khoảng cách giữa các icon */
        gap: 15px !important; 
        
        /* Căn chỉnh vị trí xuất hiện ban đầu */
        justify-content: flex-start !important; 
    }

    /* Ẩn thanh cuộn cho đẹp (tùy chọn) */
    .blur-social-box::-webkit-scrollbar {
        display: none;
    }

    .my-social { display: none; }

    /* Chỉnh kích thước icon */
    .fb-pos, .ig-pos, .x-pos, .ani-pos, .line-wrapper, .discord-wrapper { 
        position: relative !important; 
        top: auto !important; 
        left: auto !important; 
        margin: 0 !important;
        
        /* Kích thước khung icon */
        width: 50px !important;  
        height: 50px !important; 
        
        /* Giữ nguyên kích thước, không cho phép trình duyệt bóp nhỏ icon lại */
        flex: 0 0 50px !important; 
        
        transform: scale(0.9) !important;
        display: flex;
        justify-content: center;
        align-items: center;
    }
    
    /* Box 4: Portfolio */
    .blur-portfolio-box { height: auto; padding: 20px; }
    .what-can-i-do { margin-bottom: 5px; font-size: 26px; padding: 0; text-align: center; }
    .what-can-i-do-2 { padding-top: 0; text-align: center; font-size: 15px; margin-bottom: 15px; }
    .portfolio-sections-container { flex-direction: column; overflow-y: hidden; } 
    .portfolio-section { flex: 0 0 auto; min-height: 130px; }
    .portfolio-modal-content { width: 90vw; height: 80vh; }
    .modal-pf-grid { grid-template-columns: repeat(2, 1fr); }
    
    /* Box 5: Games */
    .blur-games-box { height: auto; padding-bottom: 20px; display: flex; flex-direction: column; align-items: center; }
    .my-games { margin: 15px 0; font-size: 26px; text-align: center; width: 100%; }
    .games-container { gap: 12px; }
    .game-card { width: 95%; height: auto; min-height: 80px; padding: 10px; }
    .game-username { font-size: 18px; }
    .game-uid { font-size: 15px; }
    
    /* GIAO DIỆN MUSIC MOBILE */
    .music-playlist-container {
        position: fixed !important; top: auto !important; bottom: 20px !important; 
        left: 50% !important; width: 92vw !important; height: 90px !important;
        transform: translateX(-50%) !important; z-index: 9999 !important;
        display: flex !important; flex-direction: row !important; 
        align-items: center !important; justify-content: center !important; gap: 15px !important;
    }
    .carousel-viewport {
        display: block !important; position: relative !important; width: 75vw !important; 
        height: 85px !important; overflow: visible !important; padding: 0 !important; 
        perspective: none !important; transform-style: flat !important;
    }
    .carousel-viewport::after { display: none !important; }
    .carousel-viewport .music-box-new {
        position: absolute !important; width: 100% !important; max-width: 100% !important;
        height: 100% !important; left: 0 !important; top: 0 !important; margin: 0 !important;
        background: rgba(255, 255, 255, 0.15) !important; filter: none !important; 
        transition: opacity 0.4s ease !important; border-radius: 25px !important;
    }
    .carousel-viewport .music-box-new.active { opacity: 1 !important; visibility: visible !important; pointer-events: auto !important; z-index: 10 !important; transform: none !important; }
    .carousel-viewport .music-box-new.prev-card,
    .carousel-viewport .music-box-new.next-card,
    .carousel-viewport .music-box-new.hidden { opacity: 0 !important; visibility: hidden !important; pointer-events: none !important; transform: none !important; z-index: 0 !important; }
    .carousel-controls { display: flex !important; flex-direction: column !important; gap: 12px !important; z-index: 20 !important; }
    .nav-btn { display: block !important; font-size: 22px !important; color: rgba(255,255,255,0.7) !important; padding: 5px !important; }
    .nav-btn:active { color: #fff !important; transform: scale(1.1) !important; }
    .track-artist { display: none !important; }
    .track-name { font-size: 16px !important; max-width: 150px !important; }
    
    body::after { display: none; }
}

/* --- ĐIỀU CHỈNH VỊ TRÍ NÚT SETTING TRÊN MOBILE --- */
    #floating-settings-btn {
        /* 1. Chọn góc hiển thị: 
           Nếu muốn ở dưới: dùng 'bottom', ở trên: dùng 'top'
           Nếu muốn ở phải: dùng 'right', ở trái: dùng 'left' */
        bottom: 25px !important; 
        right: 14px !important; 
        top: auto !important;   /* Để là auto nếu dùng bottom */
        left: auto !important;  /* Để là auto nếu dùng right */

        /* 2. Chỉnh kích thước nút nếu thấy to/nhỏ quá */
        width: 45px !important;
        height: 45px !important;
        font-size: 20px !important;

        /* 3. Độ ưu tiên hiển thị (để không bị các box khác đè lên) */
        z-index: 100000 !important;
    }


.main-wrapper { position: relative; width: 100%; max-width: 850px; height: 1900px; margin: 0 auto; }

/* --- WELCOME POP-UP --- */
#welcome-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(24, 15, 23, 0.625); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); display: flex; justify-content: center; align-items: center; z-index: 999999; transition: 0.5s; }
.welcome-card { width: 300px; padding: 30px; background: rgba(253, 142, 255, 0.301); border: 1px solid rgba(255, 255, 255, 0.2); border-radius: 30px; backdrop-filter: blur(20px) saturate(160%); box-shadow: 0 15px 35px rgba(0, 0, 0, 0.5); text-align: center; color: #fff; }
#welcome-title { font-family: 'M PLUS Rounded 1c', sans-serif; font-size: 24px; margin-bottom: 15px; color: #fff9a2; }
#welcome-text { font-family: 'Nunito', sans-serif; font-size: 15px; margin-bottom: 25px; line-height: 1.4; opacity: 0.9; }
.welcome-btn { padding: 10px 20px; border-radius: 12px; border: none; background: #fff; color: #000; font-weight: 700; cursor: pointer; transition: 0.3s; margin-top: 15px; }
.welcome-btn:hover { background: #fff; color: #000; transform: scale(1.05); }

/* --- PROFILE BOX --- */
.blur-box { position: absolute; top: 10%; left: 50%; transform: translate(-50%, -50%); width: 600px; height: 280px; z-index: 0; }
.inner-3d-card { width: 100%; height: 100%; border-radius: 40px; background: rgba(255, 255, 255, 0.05); backdrop-filter: blur(20px) saturate(140%); -webkit-backdrop-filter: blur(20px) saturate(140%); border: 1px solid rgba(255, 255, 255, 0.2); box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2); overflow: hidden; }
.layer-cover { position: absolute; top: 15px; left: 15px; right: 15px; height: 150px; border-radius: 30px; box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3); overflow: hidden; }
.layer-cover img { width: 100%; height: 100%; object-fit: cover; }
.layer-avatar { position: absolute; top: 115px; left: 45px; width: 130px; height: 130px; border-radius: 50%; border: 4px solid rgba(255, 182, 193, 0.9); box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3); z-index: 10; overflow: hidden; transition: 0.3s; }
.layer-avatar img { width: 100%; height: 100%; object-fit: cover; }
.layer-avatar:hover { transform: scale(1.05); border-color: #ff9ebd; }
.layer-info { position: absolute; top: 180px; left: 200px; }
.name-glitch { font-family: 'M PLUS Rounded 1c', sans-serif; font-size: 40px; font-weight: 800; color: white; margin: 0; text-shadow: 2px 2px 0px rgba(0, 0, 0, 0.2); position: relative; }

/* --- DISCORD STATUS --- */
.status-badge { display: flex; align-items: center; gap: 8px; font-family: 'Nunito', sans-serif; font-size: 14px; font-weight: 700; color: rgba(255, 255, 255, 0.9); margin-top: 5px; background: rgba(0, 0, 0, 0.2); padding: 4px 12px; border-radius: 20px; width: fit-content; }
.status-dot { width: 8px; height: 8px; border-radius: 50%; background: #747f8d; transition: all 0.3s ease; }
.status-dot.online { background: #06c755; box-shadow: 0 0 10px #06c755; animation: pulse 2s infinite; }
.status-dot.idle { background: transparent; width: 14px; height: 14px; box-shadow: inset -3px -2px 0 0 #feffcf; filter: drop-shadow(0 0 2px rgba(255, 230, 0, 0.6)); animation: moon-pulse 2s infinite alternate; transform: rotate(-10deg); }
.status-dot.dnd { background: #f04747; box-shadow: 0 0 10px #f04747; animation: pulse 2s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.4); } 70% { box-shadow: 0 0 0 6px rgba(255, 255, 255, 0); } 100% { box-shadow: 0 0 0 0 rgba(255, 255, 255, 0); } }
@keyframes moon-pulse { from { filter: drop-shadow(0 0 1px rgba(255, 255, 200, 0.4)); } to { filter: drop-shadow(0 0 5px rgba(255, 255, 220, 1)); } }

/* --- INTRO BOX --- */
.blur-name-box-2 { position: absolute; top: 23%; left: 38.2%; transform: translate(-50%, -50%); width: 400px; height: 170px; border-radius: 40px; background: transparent; backdrop-filter: blur(20px) saturate(140%); border: 1px solid rgba(255, 255, 255, 0.2); box-shadow: 0 8px 32px rgba(0, 0, 0, 0.25); }
.me { font-family: 'M PLUS Rounded 1c', sans-serif; color: rgb(255, 249, 162); font-size: 28px; position: absolute; top: 5%; left: 6%; font-weight: 700; }
.me-2 { font-family: 'Nunito', sans-serif; color: rgb(255, 255, 255); font-size: 15px; position: absolute; top: 28%; left: 6%; width: 90%; font-weight: 600; line-height: 1.4; }

/* --- SOCIAL BOX --- */
.blur-social-box { position: absolute; top: 23%; left: 74.4%; transform: translate(-50%, -50%); width: 185px; height: 170px; border-radius: 40px; background: transparent; backdrop-filter: blur(20px) saturate(140%); border: 1px solid rgba(255, 255, 255, 0.2); box-shadow: 0 8px 32px rgba(0, 0, 0, 0.25); }
.my-social { font-family: 'M PLUS Rounded 1c', sans-serif; color: rgb(255, 255, 255); font-size: 18px; position: absolute; top: 7%; left: 24%; font-weight: 700; pointer-events: none; }
.social-btn { position: absolute; width: 45px; height: 45px; border-radius: 15px; background: rgba(255, 255, 255, 0.1); border: 1px solid rgba(255, 255, 255, 0.1); display: flex; justify-content: center; align-items: center; font-size: 25px; color: white; text-decoration: none; cursor: pointer; transition: all 0.3s ease; box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1); }
.social-btn img { width: 24px; height: 24px; filter: invert(1); } 
.social-btn:hover { transform: translateY(-5px) scale(1.1); border-color: rgba(255, 255, 255, 0.5); color: white; z-index: 100; }
.fb-pos { top: 28%; left: 7%; } .ig-pos { top: 28%; left: 39%; } .x-pos { top: 28%; left: 70%; } .ani-pos { top: 60%; left: 7%; }
.line-wrapper { position: absolute; top: 60%; left: 39%; width: 45px; height: 45px; } 
.discord-wrapper { position: absolute; top: 60%; left: 70%; width: 45px; height: 45px; cursor: pointer; }

/* Các màu khi di chuột vào icon */
.fb-color:hover { background: #1877F2; } 
.ig-color:hover { background: linear-gradient(45deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888); }
.x-color:hover { background: #000; } 
.ani-color:hover { background: #02A9FF; } 
.line-color:hover { background: #06C755; } 
.dc-color:hover { background: #5865F2; }

/* QR VÀ TOOLTIP */
.qr-tooltip-dark { position: absolute; bottom: 120%; left: 50%; transform: translateX(-50%) scale(0.5); background: rgba(0, 0, 0, 0.6); backdrop-filter: blur(15px); border: 1px solid rgba(255, 255, 255, 0.2); padding: 8px; border-radius: 12px; opacity: 0; pointer-events: none; transition: 0.3s ease; z-index: 999; }
.qr-tooltip-dark img { width: 100px; height: 100px; display: block; border-radius: 4px; }
.line-wrapper:hover .qr-tooltip-dark { opacity: 1; transform: translateX(-50%) scale(1); }
.discord-tooltip { position: absolute; bottom: 120%; left: 50%; transform: translateX(-50%) translateY(10px); background: rgba(0, 0, 0, 0.85); color: white; padding: 5px 8px; border-radius: 6px; font-size: 11px; white-space: nowrap; opacity: 0; pointer-events: none; transition: 0.3s ease; }
.discord-wrapper:hover .discord-tooltip { opacity: 1; transform: translateX(-50%) translateY(0); }

/* --- PORTFOLIO BOX --- */
.blur-portfolio-box { 
    position: absolute; 
    top: 38%; left: 50%; 
    transform: translate(-50%, -50%); 
    width: 600px; height: 350px; 
    border-radius: 40px; 
    background: transparent; 
    backdrop-filter: blur(20px) saturate(140%); 
    -webkit-backdrop-filter: blur(20px) saturate(140%);
    border: 1px solid rgba(255, 255, 255, 0.2); 
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.25); 
    display: flex; 
    flex-direction: column; 
    padding: 20px 25px; 
    overflow: hidden; 
}

.what-can-i-do { 
    font-family: 'M PLUS Rounded 1c', sans-serif; 
    color: rgb(255, 249, 162); 
    font-size: 26px; 
    font-weight: 700; 
    margin-bottom: 2px; 
}

.what-can-i-do-2 { 
    font-family: 'Nunito', sans-serif; 
    color: rgb(255, 255, 255); 
    font-size: 14px; 
    font-weight: 600; 
    margin-bottom: 12px; 
}

/* ÉP DÙNG GRID 2 Ô/HÀNG & CUỘN DỌC */
.portfolio-sections-container { 
    display: grid !important; 
    grid-template-columns: repeat(2, 1fr) !important; 
    gap: 15px; 
    flex: 1; 
    overflow-y: auto !important; 
    overflow-x: hidden !important; 
    padding-right: 8px; 
    padding-bottom: 10px;
    align-content: start; 
}

.portfolio-sections-container::-webkit-scrollbar { width: 6px; }
.portfolio-sections-container::-webkit-scrollbar-thumb { 
    background: rgba(255, 255, 255, 0.3); 
    border-radius: 10px; 
}

.portfolio-section { 
    width: 100%; 
    min-height: 110px; 
    position: relative; 
    border: 1px solid rgba(255, 255, 255, 0.15); 
    border-radius: 18px; 
    background: rgba(255, 255, 255, 0.05); 
    overflow: hidden; 
    cursor: pointer; 
    display: flex; 
    flex-direction: column; 
    transition: all 0.3s ease; 
    box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.1); 
}

.portfolio-section:hover { 
    border-color: rgba(255, 255, 255, 0.6); 
    transform: scale(1.02); 
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.section-title { 
    font-family: 'M PLUS Rounded 1c', sans-serif; 
    color: rgba(255,255,255,0.95); 
    font-size: 13px; 
    text-transform: uppercase;
    font-weight: 800;
    letter-spacing: 1.5px;
    text-align: center; 
    padding: 9px 0; 
    border-bottom: 1px solid rgba(255, 255, 255, 0.1); 
    margin: 0 12px; 
    z-index: 2; 
    text-shadow: 0 2px 8px rgba(0,0,0,0.6); 
}

.section-preview-scroll { 
    flex: 1; 
    padding: 10px; 
    display: flex; 
    flex-direction: row; 
    gap: 8px; 
    justify-content: center;
    align-items: center;
    overflow: hidden; 
}

.pf-img-prev { 
    width: calc(50% - 4px); 
    height: 68px; 
    border-radius: 10px; 
    object-fit: cover; 
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.4);
    transition: transform 0.3s ease;
}

/* LỚP PHỦ FROSTED GLASS XỊN */
.section-hover-overlay { 
    position: absolute; 
    top: 0; left: 0; width: 100%; height: 100%; 
    background: rgba(20, 12, 28, 0.45); 
    backdrop-filter: blur(12px) saturate(180%);
    -webkit-backdrop-filter: blur(12px) saturate(180%);
    display: flex; 
    justify-content: center; 
    align-items: center; 
    opacity: 0; 
    transition: all 0.35s cubic-bezier(0.25, 0.8, 0.25, 1); 
    z-index: 10; 
    border-radius: inherit; 
}

.section-hover-overlay span { 
    color: #fff; 
    font-family: 'Nunito', sans-serif; 
    font-weight: 800; 
    font-size: 12px; 
    text-transform: uppercase;
    letter-spacing: 1.5px;
    text-shadow: 0 2px 10px rgba(0,0,0,0.4); 
    padding: 8px 18px;
    background: rgba(255, 255, 255, 0.18); 
    border: 1px solid rgba(255,255,255,0.4);
    border-radius: 30px;
    transform: translateY(8px) scale(0.95); 
    transition: transform 0.35s ease, opacity 0.35s ease;
    opacity: 0;
}

.portfolio-section:hover .section-hover-overlay { 
    opacity: 1; 
}

.portfolio-section:hover .section-hover-overlay span {
    transform: translateY(0) scale(1); 
    opacity: 1;
}

@media (max-width: 1024px) {
    .portfolio-sections-container { grid-template-columns: 1fr !important; } 
}

/* --- PORTFOLIO MODAL --- */
.portfolio-modal-overlay { position: fixed; top: 0; left: 0; width: 100vw; height: 100vh; background: rgba(0, 0, 0, 0.85); backdrop-filter: blur(15px); -webkit-backdrop-filter: blur(15px); z-index: 99999; display: flex; justify-content: center; align-items: center; visibility: hidden; opacity: 0; transition: all 0.3s ease-in-out; }
.portfolio-modal-overlay.active { visibility: visible; opacity: 1; }
.portfolio-modal-content { width: 75vw; max-width: 1000px; height: 75vh; background: rgba(30, 30, 30, 0.6); border: 1px solid rgba(255, 255, 255, 0.2); border-radius: 30px; padding: 30px; position: relative; display: flex; flex-direction: column; transform: scale(0.8); transition: transform 0.3s ease-in-out; }
.portfolio-modal-overlay.active .portfolio-modal-content { transform: scale(1); }
.close-pf-modal { position: absolute; top: 20px; right: 30px; color: #fff; font-size: 35px; font-weight: bold; cursor: pointer; transition: 0.2s; z-index: 10; }
.close-pf-modal:hover { color: #ffeb3b; transform: scale(1.2); }
#modal-pf-title { font-family: 'M PLUS Rounded 1c', sans-serif; color: #ffeb3b; margin-bottom: 20px; font-size: 28px; text-align: center; }
.modal-pf-grid { flex: 1; overflow-y: auto; padding-right: 10px; display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 15px; align-content: start; }
.modal-pf-grid::-webkit-scrollbar { width: 6px; }
.modal-pf-grid::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.4); border-radius: 10px; }
.pf-img-full { width: 100%; height: 160px; object-fit: cover; border-radius: 15px; cursor: zoom-in; transition: transform 0.3s; }
.pf-img-full:hover { transform: scale(1.05); box-shadow: 0 5px 15px rgba(0,0,0,0.5); }

/* --- LIGHTBOX --- */
#lightbox { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0, 0, 0, 0.85); backdrop-filter: blur(5px); display: flex; justify-content: center; align-items: center; visibility: hidden; opacity: 0; transition: opacity 0.3s ease, visibility 0.3s ease; z-index: 100000; }
#lightbox-img { max-width: 90%; max-height: 90%; border-radius: 12px; box-shadow: 0 0 30px rgba(0, 0, 0, 0.7); transition: transform 0.3s ease; transform: scale(0.9); }
#lightbox.active { visibility: visible; opacity: 1; }
#lightbox.active #lightbox-img { transform: scale(1); }

/* --- GAMES BOX --- */
.blur-games-box { position: absolute; top: 60%; left: 31.3%; transform: translate(-50%, -50%); width: 280px; height: 440px; border-radius: 40px; background: transparent; backdrop-filter: blur(20px) saturate(140%); border: 1px solid rgba(255, 255, 255, 0.2); box-shadow: 0 8px 32px rgba(0, 0, 0, 0.25); display: flex; flex-direction: column; }
.my-games { font-family: 'M PLUS Rounded 1c', sans-serif; color: rgb(255, 249, 162); font-size: 28px; font-weight: 700; margin: 15px 0 15px 20px; }
.games-container { display: flex; flex-direction: column; gap: 10px; align-items: center; width: 100%; }
.game-card { width: 240px; height: 75px; border-radius: 20px; background: rgba(255, 255, 255, 0.08); border: 1px solid rgba(255, 255, 255, 0.15); display: flex; align-items: center; padding: 0 12px; box-sizing: border-box; }
.game-logo { width: 50px; height: 50px; border-radius: 12px; overflow: hidden; flex-shrink: 0; margin-right: 12px; background: #eee; }
.game-logo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.game-details { display: flex; flex-direction: column; flex-grow: 1; }
.game-username { font-family: 'M PLUS Rounded 1c', sans-serif; font-weight: 800; font-size: 17px; color: #ffffff; margin-bottom: 2px; text-shadow: 0 2px 4px rgba(0, 0, 0, 0.4); }
.game-uid-wrapper { display: flex; align-items: center; justify-content: space-between; padding-right: 5px; }
.game-uid { font-family: 'Nunito', sans-serif; font-weight: 600; font-size: 13px; color: #b388ff; }
.copy-icon { font-size: 14px; color: #ffffffcc; cursor: pointer; transition: all 0.2s ease; }
.copy-icon:hover { color: #b388ff; transform: scale(1.2); }

/* --- 3D MUSIC CAROUSEL SYSTEM --- */
.music-playlist-container {
    position: absolute;
    top: 54.8%; 
    left: 70.5%;
    transform: translate(-50%, -50%);
    width: 480px; 
    display: flex;
    flex-direction: row; 
    align-items: center;
    justify-content: center;
    gap: 15px;
    z-index: 20;
    perspective: 1200px;
}
.carousel-viewport {
    height: 350px;
    width: 320px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    transform-style: preserve-3d;
}
.music-box-new {
    position: absolute;
    width: 300px;
    height: 90px;
    border-radius: 30px;
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(18px) saturate(140%);
    border: 1px solid rgba(255, 255, 255, 0.25);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.25);
    display: flex;
    align-items: center;
    padding: 15px;
    gap: 15px;
    transition: all 0.6s cubic-bezier(0.23, 1, 0.32, 1);
    cursor: pointer;
    left: 10px;
}
.music-box-new.active { transform: translate3d(0, 0, 0) scale(1); opacity: 1; filter: blur(0px); z-index: 10; pointer-events: auto; }
.music-box-new.prev-card { transform: translate3d(0, -100px, -150px) scale(0.85); opacity: 1; filter: blur(3.6px); z-index: 5; pointer-events: none; }
.music-box-new.next-card { transform: translate3d(0, 100px, -150px) scale(0.85); opacity: 1; filter: blur(3.6px); z-index: 5; pointer-events: none; }
.music-box-new.hidden { transform: translate3d(0, 0, -300px) scale(0.6); opacity: 1; pointer-events: none; }

.nav-btn { background: none; border: none; color: rgba(255, 255, 255, 0.5); font-size: 24px; cursor: pointer; transition: 0.3s; z-index: 30; }
.nav-btn:hover { color: #fff; transform: scale(1.2); }
.player-header { display: flex; align-items: center; gap: 12px; flex-grow: 1; overflow: hidden; }
.album-art { width: 60px; height: 60px; border-radius: 12px; overflow: hidden; flex-shrink: 0; }
.album-art img { width: 100%; height: 100%; object-fit: cover; }
.track-info { display: flex; flex-direction: column; overflow: hidden; }
.track-name { font-family: 'M PLUS Rounded 1c', sans-serif; font-size: 14px; color: #fff; white-space: nowrap; text-overflow: ellipsis; overflow: hidden; }
.track-artist { font-family: 'Nunito', sans-serif; font-size: 11px; color: rgba(255,255,255,0.6); }
.play-btn-circle { width: 45px; height: 45px; background: rgba(255,255,255,0.2); border-radius: 50%; display: flex; justify-content: center; align-items: center; cursor: pointer; transition: 0.3s; pointer-events: auto; }
.play-btn-circle:hover { background: #fff; }
.play-btn-circle:hover i { color: #000; }

/* --- DRAGGABLE BEAR --- */
#draggableImg {
    position: fixed;
    left: 20px;
    top: 38%;
    width: 120px;
    z-index: 9999;
    cursor: grab;
    user-select: none;
    -webkit-user-drag: none;
    pointer-events: auto;
    filter: drop-shadow(0 8px 16px rgba(0,0,0,0.4));
}
#draggableImg:active { cursor: grabbing; }

body::after { content: ""; display: block; position: absolute; top: 1700px; left: 0; width: 100%; height: 80px; background: transparent; z-index: -10; }

/* --- RESPONSIVE MOBILE TỐI ƯU --- */
@media (max-width: 1024px) {
    .main-wrapper { height: 1800px; }
    
    .blur-box { width: 90%; height: 340px; top: 190px; left: 50%; transform: translate(-50%, -50%); }
    .layer-avatar { left: 32.5%; transform: translateX(-50%); top: 100px; }
    .layer-avatar:hover { transform: translateX(-50%); }
    .layer-info { top: 240px; left: 0; width: 100%; text-align: center; display: flex; flex-direction: column; align-items: center; }
    
    .blur-name-box-2 { width: 90%; height: auto; min-height: 230px; padding-bottom: 30px; top: 500px; left: 50%; transform: translate(-50%, -50%); }
    .me { font-size: 26px; top: 10px; left: 20px; padding: 5px 20px; border-radius: 30px; margin-bottom: 10px; display: inline-block; background: rgba(255, 67, 155, 0.5); }
    .me-2 { top: 69px; left: 25px; width: 85%; font-size: 15px; line-height: 1.5; }
    
    .blur-social-box { width: 90%; height: 100px; top: 677px; left: 50%; transform: translate(-50%, -50%); display: flex; justify-content: space-evenly; align-items: center; }
    .my-social { display: none; }
    .fb-pos, .ig-pos, .x-pos, .ani-pos, .line-wrapper, .discord-wrapper { position: relative; top: auto; left: auto; margin: 0; }
    
    .blur-portfolio-box { width: 90%; height: 480px; padding: 20px; top: 980px; left: 50%; transform: translate(-50%, -50%); }
    .what-can-i-do { margin-bottom: 5px; font-size: 26px; padding: 0; }
    .what-can-i-do-2 { padding-top: 0; }
    .portfolio-sections-container { flex-direction: column; } 
    .portfolio-modal-content { width: 90vw; height: 80vh; }
    .modal-pf-grid { grid-template-columns: repeat(2, 1fr); }
    
    .blur-games-box { width: 90%; height: auto; padding-bottom: 20px; top: 1450px; left: 50%; transform: translate(-50%, -50%); }
    .game-card { width: 90%; }
    
    /* GIAO DIỆN MUSIC MOBILE */
    .music-playlist-container {
        position: fixed !important; top: auto !important; bottom: 20px !important; 
        left: 50% !important; width: 92vw !important; height: 90px !important;
        transform: translateX(-50%) !important; z-index: 9999 !important;
        display: flex !important; flex-direction: row !important; 
        align-items: center !important; justify-content: center !important; gap: 15px !important;
    }
    .carousel-viewport {
        display: block !important; position: relative !important; width: 75vw !important; 
        height: 85px !important; overflow: visible !important; padding: 0 !important; 
        perspective: none !important; transform-style: flat !important;
    }
    .carousel-viewport::after { display: none !important; }
    .carousel-viewport .music-box-new {
        position: absolute !important; width: 100% !important; max-width: 100% !important;
        height: 100% !important; left: 0 !important; top: 0 !important; margin: 0 !important;
        background: rgba(255, 255, 255, 0.15) !important; filter: none !important; 
        transition: opacity 0.4s ease !important; border-radius: 25px !important;
    }
    .carousel-viewport .music-box-new.active { opacity: 1 !important; visibility: visible !important; pointer-events: auto !important; z-index: 10 !important; transform: none !important; }
    .carousel-viewport .music-box-new.prev-card,
    .carousel-viewport .music-box-new.next-card,
    .carousel-viewport .music-box-new.hidden { opacity: 0 !important; visibility: hidden !important; pointer-events: none !important; transform: none !important; z-index: 0 !important; }
    .carousel-controls { display: flex !important; flex-direction: column !important; gap: 12px !important; z-index: 20 !important; }
    .nav-btn { display: block !important; font-size: 22px !important; color: rgba(255,255,255,0.7) !important; padding: 5px !important; }
    .nav-btn:active { color: #fff !important; transform: scale(1.1) !important; }
    .track-artist { display: none !important; }
    .track-name { font-size: 14px !important; max-width: 150px !important; }
    

    body::after { content: ""; display: block; height: 100px; width: 100%; }
}

/* ===============================================================
   --- SETTINGS MODAL (GLASSMORPHISM SÁNG MÀU) ---
   =============================================================== */
.settings-modal {
    display: none; 
    position: fixed; 
    top: 0; 
    left: 0; 
    width: 100%; 
    height: 100%;
    background: rgba(0, 0, 0, 0.7); /* Làm tối nền nhẹ để nổi bật box sáng */
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 99999;
    align-items: center; 
    justify-content: center;
    font-family: 'Nunito', sans-serif;
}

.settings-modal.active {
    display: flex;
    animation: fadeIn 0.3s ease;
}

.settings-content {
    background: rgba(255, 255, 255, 0.15); /* Glassmorphism sáng màu */
    backdrop-filter: blur(25px) saturate(180%);
    -webkit-backdrop-filter: blur(25px) saturate(180%);
    padding: 30px; 
    border-radius: 30px;
    border: 1px solid rgba(255, 255, 255, 0.4); 
    width: 90%; 
    max-width: 450px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
    color: white;
    position: relative;
}

.settings-title {
    color: #fff; 
    margin-top: 0; 
    font-size: 1.6rem; 
    margin-bottom: 20px;
    font-family: 'M PLUS Rounded 1c', sans-serif;
    text-shadow: 0 2px 10px rgba(0,0,0,0.2);
}

/* --- INPUT STYLES --- */
.settings-input, .setting-input-type, .setting-input-url {
    width: 100%; 
    padding: 12px; 
    margin-bottom: 15px; 
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.3); 
    background: rgba(255, 255, 255, 0.1); 
    color: #fff; 
    outline: none;
    transition: all 0.3s ease;
}

.settings-input::placeholder { color: rgba(255, 255, 255, 0.6); }

.settings-input:focus, .setting-input-type:focus, .setting-input-url:focus { 
    border-color: rgba(255, 255, 255, 0.8); 
    background: rgba(255, 255, 255, 0.2);
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.1);
}

/* --- ADMIN ZONE (ẨN/HIỆN) --- */
#settings-admin-zone {
    animation: slideUp 0.4s ease;
}

.link-inputs-container {
    max-height: 250px; 
    overflow-y: auto; 
    margin-bottom: 15px;
    padding-right: 5px;
}

/* Scrollbar cho container nhập liệu */
.link-inputs-container::-webkit-scrollbar { width: 5px; }
.link-inputs-container::-webkit-scrollbar-thumb { 
    background: rgba(255, 255, 255, 0.3); 
    border-radius: 10px; 
}

.link-row {
    display: flex; 
    gap: 8px; 
    margin-bottom: 10px; 
    align-items: center;
}

.setting-input-type { width: 100px; margin-bottom: 0; }
.setting-input-url { flex: 1; margin-bottom: 0; }

.remove-row-btn {
    background: rgba(255, 77, 77, 0.2); 
    border: none; 
    color: #ff4d4d;
    cursor: pointer; 
    font-size: 18px; 
    width: 35px;
    height: 35px;
    border-radius: 10px;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: 0.3s;
}
.remove-row-btn:hover { background: rgba(255, 77, 77, 0.5); color: #fff; }

.add-row-btn {
    background: rgba(255, 255, 255, 0.08); 
    color: rgba(255, 255, 255, 0.8); 
    border: 1px dashed rgba(255, 255, 255, 0.4);
    width: 100%; 
    padding: 12px; 
    cursor: pointer; 
    margin-bottom: 20px;
    border-radius: 12px; 
    transition: 0.3s;
}
.add-row-btn:hover { 
    color: #fff; 
    border-color: #fff; 
    background: rgba(255, 255, 255, 0.15); 
}

/* --- FOOTER & ACTIONS --- */
.settings-footer {
    display: flex; 
    justify-content: space-between; 
    align-items: center;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 20px;
}

.sync-status-msg {
    font-size: 13px; 
    color: #fff; 
    font-weight: 600; 
    flex: 1; 
    padding-right: 10px; 
    line-height: 1.2;
}

.settings-actions { display: flex; gap: 10px; }

.cancel-btn, .sync-btn {
    padding: 10px 20px;
    border-radius: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: 0.3s;
    border: none;
}

.cancel-btn { 
    background: rgba(255, 255, 255, 0.1); 
    color: #fff; 
}
.cancel-btn:hover { background: rgba(255, 255, 255, 0.2); }

.sync-btn { 
    background: #fff; 
    color: #333; 
}
.sync-btn:hover { 
    background: #ffeb3b; 
    transform: translateY(-2px); 
    box-shadow: 0 5px 15px rgba(255, 235, 59, 0.3);
}

/* --- PORTFOLIO LOADING ANIMATION --- */
.pf-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    width: 100%;
    color: rgba(255, 255, 255, 0.7);
    font-family: 'Nunito', sans-serif;
    font-size: 14px;
    font-weight: 600;
    min-height: 120px;
}
.pf-spinner {
    width: 36px;
    height: 36px;
    border: 3px solid rgba(255, 255, 255, 0.15);
    border-top-color: rgba(255, 255, 255, 0.8);
    border-radius: 50%;
    animation: spin 0.9s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* --- LAZY IMG FADE IN --- */
.lazy-img {
    opacity: 0;
    transition: opacity 0.5s ease;
    background: rgba(255,255,255,0.05);
}
.lazy-img.loaded { opacity: 1; }

/* --- ACCESS BUTTON --- */
.access-btn {
    width: 100%;
    padding: 11px;
    margin-top: 8px;
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,0.35);
    background: rgba(255,255,255,0.12);
    color: #fff;
    font-family: 'Nunito', sans-serif;
    font-weight: 700;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}
.access-btn:hover {
    background: rgba(255,255,255,0.25);
    border-color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255,255,255,0.1);
}


#floating-settings-btn {
    position: fixed;
    bottom: 25px;
    right: 25px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(15px) saturate(150%);
    -webkit-backdrop-filter: blur(15px) saturate(150%);
    border: 1px solid rgba(255, 255, 255, 0.4);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    display: flex;
    justify-content: center;
    align-items: center;
    color: #fff;
    font-size: 22px;
    cursor: pointer;
    z-index: 99990;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
#floating-settings-btn:hover {
    transform: scale(1.1) rotate(45deg);
    background: rgba(255, 255, 255, 0.25);
    border-color: #fff;
}

/* ===============================================================
   --- PORTFOLIO SCROLLING (TỐI ƯU CUỘN NGANG) ---
   =============================================================== */
.portfolio-sections-container { 
    display: flex; 
    gap: 15px; 
    flex: 1; 
    overflow-x: auto; 
    overflow-y: hidden;
    padding-bottom: 10px; 
    scroll-behavior: smooth;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.3) transparent;
}

/* Tùy chỉnh thanh cuộn Portfolio */
.portfolio-sections-container::-webkit-scrollbar { height: 6px; }
.portfolio-sections-container::-webkit-scrollbar-track { background: transparent; }
.portfolio-sections-container::-webkit-scrollbar-thumb { 
    background: rgba(255, 255, 255, 0.3); 
    border-radius: 10px; 
}

.portfolio-section { 
    flex: 0 0 200px; /* Độ rộng cố định để kích hoạt cuộn khi đông item */
    position: relative; 
    border: 1px solid rgba(255, 255, 255, 0.15); 
    border-radius: 20px; 
    background: rgba(255, 255, 255, 0.04); 
    overflow: hidden; 
    cursor: pointer; 
    display: flex; 
    flex-direction: column; 
    transition: all 0.35s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.portfolio-section:hover { 
    border-color: rgba(255, 255, 255, 0.5); 
    transform: translateY(-6px) scale(1.02);
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 12px 30px rgba(0,0,0,0.3);
}

@media (max-width: 1024px) {
    .portfolio-section { flex: 0 0 170px; }
}

/* Animations */
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideUp { from { transform: translateY(20px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }