<!DOCTYPE html>
<html lang="en">
<!--begin::Head-->

<head>
    <?php require $_SERVER['DOCUMENT_ROOT'].'/hethong/head2.php';?>
    <title>Danh Sách Server Hosting | <?=$lxtdev['ten_web'];?></title>
    <?php require $_SERVER['DOCUMENT_ROOT'].'/hethong/nav.php';?>

    <!-- Nhúng bộ Icon FontAwesome phục vụ các thông số Server -->
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">

    <style>
        /* Hiệu ứng thẻ Server Cloud Cao Cấp */
        .premium-server-card {
            border: 1px solid rgba(0, 0, 0, 0.05) !important;
            border-radius: 16px !important;
            transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1) !important;
            background: #ffffff;
            overflow: hidden;
        }

        [data-bs-theme="dark"] .premium-server-card {
            background: #1e1e2d;
            border: 1px solid rgba(255, 255, 255, 0.05) !important;
        }

        .premium-server-card:hover {
            transform: translateY(-8px);
            box-shadow: 0 20px 40px rgba(0, 102, 255, 0.08) !important;
            border-color: rgba(0, 114, 255, 0.2) !important;
        }

        [data-bs-theme="dark"] .premium-server-card:hover {
            box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4) !important;
        }

        /* Khung ảnh minh họa Cloud Server */
        .server-img-container {
            position: relative;
            width: 100%;
            padding-top: 52%;
            background: radial-gradient(circle, rgba(241,245,249,1) 0%, rgba(226,232,240,1) 100%);
            overflow: hidden;
            border-radius: 12px;
        }

        [data-bs-theme="dark"] .server-img-container {
            background: radial-gradient(circle, #1b1b2a 0%, #151521 100%);
        }

        .server-img-container img {
            position: absolute;
            top: 50%;
            left: 50%;
            width: 85%;
            height: 85%;
            object-fit: contain;
            transform: translate(-50%, -50%);
            transition: transform 0.4s ease;
        }

        .premium-server-card:hover .server-img-container img {
            transform: translate(-50%, -55%) scale(1.05);
        }

        /* Nút lựa chọn cấu hình */
        .btn-server-action {
            background: linear-gradient(135deg, #0072ff, #00c6ff) !important;
            color: #ffffff !important;
            border: none !important;
            font-weight: 700 !important;
            border-radius: 10px !important;
            padding: 10px 24px !important;
            transition: 0.3s !important;
            box-shadow: 0 4px 15px rgba(0, 114, 255, 0.25) !important;
        }

        .btn-server-action:hover {
            transform: translateY(-1px) !important;
            box-shadow: 0 6px 20px rgba(0, 114, 255, 0.4) !important;
            opacity: 0.95;
        }
    </style>
</head>

<body id="kt_app_body" data-kt-app-layout="light-sidebar" data-kt-app-header-fixed="true"
    data-kt-app-sidebar-enabled="true" data-kt-app-sidebar-fixed="true" data-kt-app-sidebar-hoverable="true"
    data-kt-app-sidebar-push-header="true" data-kt-app-sidebar-push-toolbar="true"
    data-kt-app-sidebar-push-footer="true" data-kt-app-toolbar-enabled="true" class="app-default">
    
    <script>var defaultThemeMode = "light"; var themeMode; if (document.documentElement) { if (document.documentElement.hasAttribute("data-bs-theme-mode")) { themeMode = document.documentElement.getAttribute("data-bs-theme-mode"); } else { if (localStorage.getItem("data-bs-theme") !== null) { themeMode = localStorage.getItem("data-bs-theme"); } else { themeMode = defaultThemeMode; } } if (themeMode === "system") { themeMode = window.matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light"; } document.documentElement.setAttribute("data-bs-theme", themeMode); }</script>
    
    <div class="d-flex flex-column flex-root app-root" id="kt_app_root">
        <div class="app-page flex-column flex-column-fluid" id="kt_app_page">
            
            <div class="app-wrapper flex-column flex-row-fluid" id="kt_app_wrapper">
                <?php require $_SERVER['DOCUMENT_ROOT'].'/hethong/sider.php';?>
            </div>
            
            <div class="app-main flex-column flex-row-fluid" id="kt_app_main">
                <div class="d-flex flex-column flex-column-fluid">
                    
                    <!-- TOOLBAR TIÊU ĐỀ HỆ THỐNG -->
                    <div id="kt_app_toolbar" class="app-toolbar py-3 py-lg-6">
                        <div id="kt_app_toolbar_container" class="app-container container-fluid d-flex flex-stack">
                            <div class="page-title d-flex flex-column justify-content-center flex-wrap me-3">
                                <h1 class="page-heading d-flex text-dark fw-bold fs-3 flex-column justify-content-center my-0">
                                    <i class="fa-solid fa-server text-primary fs-4 mb-1"></i> Danh Sách Cụm Server Hosting
                                </h1>
                                <ul class="breadcrumb breadcrumb-separatorless fw-semibold fs-7 my-0 pt-1">
                                    <li class="breadcrumb-item text-muted">
                                        <a href="/" class="text-muted text-hover-primary">Home</a>
                                    </li>
                                    <li class="breadcrumb-item">
                                        <span class="bullet bg-gray-400 w-5px h-2px"></span>
                                    </li>
                                    <li class="breadcrumb-item text-muted">Bảng Tính</li>
                                </ul>
                            </div>
                            <div class="d-flex align-items-center gap-2 gap-lg-3">
                                <a href="#" class="btn btn-sm fw-bold btn-light-success px-4 py-3" data-bs-toggle="modal" data-bs-target="#kt_modal_create_app">
                                    <i class="fa-solid fa-wallet me-1"></i> <?=tien($user['money']);?>đ
                                </a>
                            </div>
                        </div>
                    </div>

                    <!-- KHU VỰC HIỂN THỊ SERVER -->
                    <div class="content d-flex flex-column flex-column-fluid" id="kt_content">
                        <div class="container-xxl" id="kt_content_container">
                            
                            <!-- Responsive lưới tự động co giãn thông minh dựa theo thiết bị -->
                            <div class="row row-cols-1 row-cols-md-2 row-cols-xl-3 g-6 g-xl-9">
                                <?php
                                    $result = mysqli_query($ketnoi,"SELECT * FROM `list_server_host` WHERE `status` = 'ON' ");
                                    while($row = mysqli_fetch_assoc($result)) { ?>
                                
                                <div class="col">
                                    <div class="card premium-server-card h-100 d-flex flex-column justify-content-between p-5">
                                        <div>
                                            <!-- Container chứa hình ảnh vector server -->
                                            <div class="server-img-container mb-5">
                                                <img src="https://inet.vn/public/img/service/cloudserver_bg_illus.webp" alt="Cloud Server Linux" />
                                            </div>

                                            <!-- Tên cụm máy chủ / Quốc gia -->
                                            <div class="mb-4">
                                                <span class="badge badge-light-primary fw-bolder fs-8 px-2 py-1 mb-2 text-uppercase">
                                                    <i class="fa-solid fa-cloud me-1"></i> High Performance
                                                </span>
                                                <h3 class="text-dark fs-4 fw-black text-hover-primary mb-1">
                                                    <?=$row['name_server'];?>
                                                </h3>
                                                <p class="text-muted fs-7 fw-semibold">Hạ tầng Cloud NVMe thế hệ mới, Uptime 99.99%</p>
                                            </div>

                                            <!-- Các thông số tài nguyên tượng trưng tăng độ chuyên nghiệp -->
                                            <div class="bg-light bg-opacity-50 rounded-3 p-3 mb-4">
                                                <div class="row g-2">
                                                    <div class="col-6 d-flex align-items-center fs-7 text-gray-700 fw-semibold">
                                                        <i class="fa-solid fa-microchip text-muted me-2 w-15px"></i>Intel Xeon v4
                                                    </div>
                                                    <div class="col-6 d-flex align-items-center fs-7 text-gray-700 fw-semibold">
                                                        <i class="fa-solid fa-memory text-muted me-2 w-15px"></i>DDR4 ECC
                                                    </div>
                                                    <div class="col-6 d-flex align-items-center fs-7 text-gray-700 fw-semibold">
                                                        <i class="fa-solid fa-hard-drive text-muted me-2 w-15px"></i>Pure NVMe SSD
                                                    </div>
                                                    <div class="col-6 d-flex align-items-center fs-7 text-gray-700 fw-semibold">
                                                        <i class="fa-solid fa-network-wired text-muted me-2 w-15px"></i>10Gbps Port
                                                    </div>
                                                </div>
                                            </div>
                                        </div>

                                        <!-- Chân thẻ: Nút chuyển hướng chi tiết gói -->
                                        <div class="d-flex align-items-center justify-content-between pt-3 border-top border-gray-100 border-opacity-70">
                                            <div class="d-flex flex-column">
                                                <span class="text-muted fs-8 fw-bold text-uppercase">Bảng giá</span>
                                                <span class="fs-6 fw-bold text-success">Giá cực tốt</span>
                                            </div>
                                            <a href="/server-hosting/<?=$row['id'];?>" class="btn btn-sm btn-server-action d-flex align-items-center gap-1">
                                                Xem Cấu Hình <i class="fa-solid fa-arrow-right fs-8 ms-1"></i>
                                            </a>
                                        </div>
                                    </div>
                                </div>
                                
                                <?php } ?>
                            </div>

                        </div>
                    </div>
                    
                </div>
                <!-- Chân trang hệ thống -->
                <?php require $_SERVER['DOCUMENT_ROOT'].'/hethong/foot.php';?>
            </div>
        </div>
    </div>
</body>
</html>
