@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Playfair+Display:ital,wght@0,700;1,700&display=swap');

:root {
    --bg-deep: #020617;
    --bg-card: rgba(15, 23, 42, 0.85);
    --text-main: #e2e8f0;
    --text-dim: #94a3b8;
    --accent: #38bdf8;
    --border: rgba(56, 189, 248, 0.15);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { font-family: 'Inter', sans-serif; color: var(--text-main); background-color: var(--bg-deep); line-height: 1.6; }

/* === 3 HỌA TIẾT NỀN CÔNG NGHỆ === */
.bg-robot { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='60' height='60' viewBox='0 0 60 60'%3E%3Cpath d='M30 0l30 30-30 30L0 30z' fill='%231e293b' fill-opacity='0.15'/%3E%3C/svg%3E"); }
.bg-circuit { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='100' height='100' viewBox='0 0 100 100'%3E%3Cpath d='M10 10h15v15H10zM75 75h15v15H75zM17 25v50h2V25zM75 17h-50v-2h50z' fill='%231e293b' fill-opacity='0.4'/%3E%3C/svg%3E"); }
.bg-internet { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='80' height='80' viewBox='0 0 80 80'%3E%3Ccircle cx='40' cy='40' r='2' fill='%2338bdf8' fill-opacity='0.4'/%3E%3Cpath d='M0 0l40 40M80 0L40 40M0 80l40-40M80 80L40 40' stroke='%231e293b' stroke-opacity='0.2'/%3E%3C/svg%3E"); }

/* NAVBAR */
.navbar { position: fixed; top: 0; width: 100%; background: rgba(2, 6, 23, 0.95); backdrop-filter: blur(10px); padding: 15px 40px; display: flex; justify-content: space-between; align-items: center; z-index: 1000; border-bottom: 1px solid var(--border); }
.nav-logo { font-size: 22px; font-weight: 700; color: white; text-decoration: none; }
.nav-logo span { color: var(--accent); }
.nav-menu { display: flex; list-style: none; gap: 30px; }
.nav-item { position: relative; }
.nav-link { color: var(--text-dim); text-decoration: none; font-weight: 500; transition: 0.3s; padding: 10px 0; display: block; }
.nav-link:hover { color: var(--accent); }

/* DROPDOWN */
.dropdown-menu { position: absolute; top: 100%; left: 0; background: #1e293b; min-width: 280px; border-radius: 8px; border: 1px solid var(--border); display: none; padding: 10px 0; }
.nav-item:hover .dropdown-menu { display: block; }
.dropdown-item { display: block; padding: 10px 20px; color: var(--text-main); text-decoration: none; font-size: 14px; }
.dropdown-item:hover { background: #0f172a; color: var(--accent); }

/* CONTAINER & HERO */
.container { max-width: 1000px; margin: 0 auto; padding: 100px 20px 50px 20px; }
.hero { background: var(--bg-card); border: 1px solid var(--border); border-radius: 16px; padding: 50px; margin-bottom: 40px; box-shadow: 0 10px 30px rgba(0,0,0,0.3); }
h1, h2, h3 { font-family: 'Playfair Display', serif; color: white; }
.hero h1 { font-size: 45px; margin: 15px 0; }
.hero h1 span { color: var(--accent); font-style: italic; }
.text-dim { color: var(--text-dim); }

/* INFO CARDS */
.info-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 15px; margin-top: 30px; }
.card { background: rgba(30, 41, 59, 0.5); border: 1px solid var(--border); padding: 15px; border-radius: 10px; }
.card-label { font-size: 11px; color: var(--accent); text-transform: uppercase; }
.card-val { font-size: 15px; font-weight: bold; margin-top: 5px; }

/* TAB BÀI TẬP */
.project-layout { display: flex; gap: 30px; }
.tab-menu { flex: 0 0 300px; display: flex; flex-direction: column; gap: 10px; }
.tablinks { background: rgba(30, 41, 59, 0.8); border: 1px solid var(--border); color: var(--text-dim); padding: 15px; text-align: left; border-radius: 8px; cursor: pointer; font-size: 14px; font-weight: 600; transition: 0.3s; }
.tablinks:hover { background: rgba(56, 189, 248, 0.1); }
.tablinks.active { background: var(--accent); color: var(--bg-deep); }
.tabcontent { flex: 1; background: var(--bg-card); border: 1px solid var(--border); padding: 40px; border-radius: 12px; display: none; }
.tabcontent h2 { margin-bottom: 20px; color: var(--accent); }
.tabcontent p { margin-bottom: 15px; text-align: justify; }

/* BẢNG & NÚT */
table { width: 100%; border-collapse: collapse; margin: 20px 0; font-size: 14px; }
th, td { border: 1px solid var(--border); padding: 12px; text-align: left; }
th { background: rgba(56, 189, 248, 0.1); color: var(--accent); }
.proof-btn { display: inline-block; background: var(--accent); color: var(--bg-deep); padding: 10px 20px; border-radius: 6px; text-decoration: none; font-weight: 600; font-size: 13px; margin-top: 20px; }
/* LƯỚI ĐỐI XỨNG 3 CỘT CHO TRANG TỔNG KẾT */
.grid-sym {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-top: 40px;
}

/* Đảm bảo hiển thị đẹp trên cả điện thoại và tablet */
@media (max-width: 768px) {
    .grid-sym { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 480px) {
    .grid-sym { grid-template-columns: 1fr; }
}
/* === NÚT ĐIỀU HƯỚNG CUỐI TRANG (BOTTOM NAV) === */
.bottom-nav {
    display: flex;
    justify-content: center; /* Ép tất cả các nút nằm ngay chính giữa */
    align-items: center;
    gap: 20px; /* Khoảng cách giữa 2 nút nếu có nhiều nút */
    margin-top: 50px;
    padding-top: 30px;
    border-top: 1px dashed var(--border);
    width: 100%;
}

/* Định dạng nút bấm */
.btn-page {
    display: inline-flex;
    align-items: center;
    background: rgba(30, 41, 59, 0.6);
    border: 1px solid var(--border);
    color: var(--text-main);
    padding: 12px 25px;
    border-radius: 8px;
    text-decoration: none;
    font-size: 15px;
    font-weight: 600;
    transition: all 0.3s ease;
}
.btn-page:hover {
    background: var(--accent);
    color: var(--bg-deep);
    box-shadow: 0 0 15px var(--accent-glow);
    transform: translateY(-3px);
}
/* === HIỆU ỨNG CHUYỂN TRANG MƯỢT MÀ === */
body {
    animation: fadeInPage 0.5s ease-out forwards;
}

/* Class được kích hoạt khi bấm nút chuyển trang */
body.fade-out {
    animation: fadeOutPage 0.3s ease-in forwards;
}

@keyframes fadeInPage {
    0% { opacity: 0; transform: translateY(15px); }
    100% { opacity: 1; transform: translateY(0); }
}

@keyframes fadeOutPage {
    0% { opacity: 1; transform: translateY(0); }
    100% { opacity: 0; transform: translateY(-15px); }
}