/* --- 1. CẤU HÌNH CHUNG --- */
:root {
    --primary-color: #6e57e0;
    --secondary-color: #2c2c38;
    --bg-color: #191924;
    --text-color: #e0e0e0;
    --text-muted: #a1a1a1;
    --sidebar-collapsed-width: 80px;
    --sidebar-expanded-width: 280px;
    --font-main: 'Poppins', sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; text-decoration: none; list-style: none; scroll-behavior: smooth; }
body { font-family: var(--font-main); background-color: var(--bg-color); color: var(--text-color); display: flex; min-height: 100vh; }

/* --- 2. SIDEBAR (MÁY TÍNH) --- */
.sidebar {
    width: var(--sidebar-collapsed-width);
    background-color: var(--secondary-color);
    padding: 30px 0;
    position: fixed;
    height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    border-right: 1px solid rgba(255,255,255,0.05);
    z-index: 1000;
    transition: width 0.4s ease;
    overflow: hidden;
    white-space: nowrap;
}

/* Nút đóng (Mặc định ẩn trên PC) */
.close-btn { display: none; }

/* --- 3. PROFILE --- */
.profile-area { display: flex; flex-direction: column; align-items: center; margin-bottom: 20px; width: 100%; }
.profile-img {
    width: 50px; height: 50px;
    border-radius: 50%;
    background-size: cover; background-position: center;
    border: 2px solid var(--primary-color);
    margin-bottom: 10px;
    transition: all 0.4s ease;
    flex-shrink: 0;
}
.profile-info { opacity: 0; transform: translateX(-20px); transition: all 0.3s ease; text-align: center; }
.profile-name { font-size: 1.2rem; font-weight: 700; color: var(--text-color); }
.profile-role { font-size: 0.8rem; color: var(--text-muted); }

/* --- 4. MENU LINKS --- */
.nav-links { width: 100%; margin-bottom: auto; }
.nav-links li { width: 100%; }
.nav-links a {
    display: flex; align-items: center;
    padding: 15px 0; padding-left: 28px;
    color: var(--text-muted); font-size: 1rem;
    transition: all 0.3s ease; width: 100%;
}
.nav-links a i { font-size: 1.3rem; width: 24px; text-align: center; margin-right: 20px; flex-shrink: 0; }
.nav-text { opacity: 0; transition: opacity 0.2s ease; }
.nav-links a:hover, .nav-links a.active { background-color: var(--primary-color); color: white; }

/* --- 5. FOOTER ICONS --- */
.sidebar-footer { display: flex; flex-direction: column; gap: 15px; padding-bottom: 20px; width: 100%; align-items: center; margin-top: 20px; }
.social-icon svg { width: 24px; height: 24px; fill: var(--text-muted); transition: 0.3s; }
.social-icon:hover svg { fill: var(--primary-color); transform: scale(1.2); }
.riot-icon:hover svg { fill: #eb0029 !important; }

/* --- 6. HIỆU ỨNG HOVER (CHỈ DÀNH CHO PC) --- */
/* Quan trọng: Chỉ kích hoạt hover khi màn hình lớn hơn 768px */
@media (min-width: 769px) {
    .sidebar:hover { width: var(--sidebar-expanded-width); }
    .sidebar:hover .profile-img { width: 100px; height: 100px; border-width: 3px; }
    .sidebar:hover .profile-info, .sidebar:hover .nav-text { opacity: 1; transform: translateX(0); transition-delay: 0.1s; }
}

/* --- 7. MAIN CONTENT --- */
.main-content { margin-left: var(--sidebar-collapsed-width); flex: 1; padding: 50px 80px; transition: margin-left 0.4s ease; }
section { margin-bottom: 80px; padding-top: 20px; }
.section-title { font-size: 2.2rem; font-weight: 700; margin-bottom: 30px; position: relative; display: inline-block; }
.section-title::after { content: ''; position: absolute; width: 50%; height: 4px; background-color: var(--primary-color); bottom: -5px; left: 0; border-radius: 2px; }

/* --- 8. GAMING & OTHERS --- */
.gaming-grid { display: flex; flex-direction: column; gap: 20px; }
.game-card {
    background: #1e1e28; padding: 20px; border-radius: 15px;
    display: flex; flex-direction: row; align-items: center;
    text-align: left; width: 100%;
    border: 1px solid rgba(255,255,255,0.02); transition: 0.3s;
}
.game-card:hover { transform: translateX(10px); border-left: 5px solid var(--primary-color); background: #252530; }
.game-img, .game-icon-svg { flex-shrink: 0; }
.game-info h3 { margin-bottom: 5px; color: #fff; font-size: 1.2rem; }
.game-info p { color: var(--text-muted); font-size: 0.95rem; }
.tft-card .game-info { width: 100%; }
.tft-rank-container iframe { margin-top: 10px; border-radius: 8px; }

/* Footer */
.footer { margin-top: 80px; padding-top: 40px; padding-bottom: 20px; border-top: 1px solid rgba(255, 255, 255, 0.05); text-align: center; }
.contact-info { display: flex; justify-content: center; gap: 30px; margin-bottom: 30px; flex-wrap: wrap; }
.contact-item { display: flex; align-items: center; background: rgba(110, 87, 224, 0.1); padding: 10px 20px; border-radius: 50px; color: var(--text-color); transition: 0.3s; border: 1px solid transparent; }
.contact-item i { color: var(--primary-color); margin-right: 10px; }
.contact-item:hover { background: var(--primary-color); color: white; transform: translateY(-3px); }
.copyright { color: var(--text-muted); font-size: 0.85rem; opacity: 0.7; }
.skills-container { display: flex; flex-wrap: wrap; gap: 15px; }
.skill-tag { background: rgba(110, 87, 224, 0.15); color: var(--primary-color); padding: 10px 20px; border-radius: 50px; font-weight: 600; border: 1px solid var(--primary-color); transition: 0.3s; }
.skill-tag:hover { background: var(--primary-color); color: white; }
.about-content p { line-height: 1.8; color: #d1d1d1; font-size: 1.1rem; margin-bottom: 20px; }
.highlight { color: var(--primary-color); font-weight: 600; }
.timeline-item { background: var(--secondary-color); padding: 30px; border-radius: 15px; border-left: 5px solid var(--primary-color); }
.year { font-size: 0.9rem; color: var(--primary-color); font-weight: 600; margin-bottom: 10px; display: block; }

/* --- 9. MOBILE RESPONSIVE (ĐIỆN THOẠI) --- */
@media (max-width: 768px) {
    /* Sidebar nhỏ mặc định */
    .sidebar {
        width: 70px;
        padding: 20px 0;
        z-index: 9999;
        overflow: hidden;
        transition: width 0.3s ease;
        height: 100vh;
        left: 0; top: 0;
        /* Ngăn chặn hover kiểu cũ */
        pointer-events: auto; 
    }

    /* KHI CÓ CLASS .OPEN (Do JS thêm vào) THÌ MỚI MỞ */
    .sidebar.open {
        width: 280px; /* Bung lụa */
        box-shadow: 10px 0 30px rgba(0,0,0,0.8);
    }

    /* Hiệu ứng bên trong khi mở */
    .sidebar.open .profile-img { width: 100px; height: 100px; border-width: 3px; }
    .sidebar.open .profile-info, .sidebar.open .nav-text { opacity: 1 !important; display: block !important; transform: translateX(0); }
    
    /* Ẩn khi chưa mở */
    .profile-info, .nav-text { display: none; opacity: 0; }

    /* NÚT ĐÓNG [X] - CHỈ HIỆN KHI MỞ */
    .close-btn {
        display: none; 
        position: absolute;
        top: 10px; right: 10px;
        color: #fff;
        font-size: 1.8rem;
        cursor: pointer;
        padding: 10px;
        z-index: 10000;
        background: rgba(0,0,0,0.2);
        border-radius: 50%;
        width: 40px; height: 40px;
        align-items: center; justify-content: center;
    }
    
    .sidebar.open .close-btn {
        display: flex; /* Hiện lên */
    }

    .main-content { margin-left: 70px; padding: 20px 15px; }
    .game-card { flex-direction: column; text-align: center; }
    .game-img, .game-icon-svg { margin-right: 0 !important; margin-bottom: 15px; }
    .contact-info { flex-direction: column; }
    .contact-item { width: 100%; justify-content: center; }
}
