* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
:root {
    --text-color : rgb(96, 98, 102);
    --heading-color : #363626;
    --primary-color : #3489f9;
    --bg-color : #ffffff;
}

@font-face {
    font-family: 'CustomFont'; 
    src: url('../fonts/font.ttf') format('truetype'); 
    font-weight: normal;
    font-style: normal;
}

body{
    font-family: CustomFont, sans-serif;
    color: var(--text-color);
    background-color: var(--bg-color);
}
h1, h2, h3, h4, h5, h6 {
    font-family: 'CustomFont', sans-serif;
    color: var(--heading-color);
}




/* =========================================
   Thông báo toaster
   ========================================= */
#toast-container {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none; 
    z-index: 9999;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.toast-box {
    background-color: rgba(0, 0, 0, 0.5);
    color: white;
    padding: 10px 20px;
    border-radius: 8px;
    text-align: center;
    max-width: 80%;
    transition: transform 0.3s ease;
    transform: scale(0.9);
    font-size: 14px;
}

/* Class được JS gọi để hiển thị thông báo */
#toast-container.toast-show {
    opacity: 1;
}

#toast-container.toast-show .toast-box {
    transform: scale(1);
}

/* =========================================
   GIAO DIỆN TRANG Đăng nhập
   ========================================= */


.login-container {
    margin: 0 auto; /* Căn giữa khung */
    padding: 15px;
    display: flex;
    flex-direction: column;
}

.login-container .logo {
    padding-top: 50px;
    padding-bottom: 25px;
    display: flex;
    justify-content: center;
}

.login-container .logo img {
    width: 80px;
    height: 80px;
    object-fit: contain;
}

/* Kiểu dáng cho Input */
.login-container .form-group {
    margin-bottom: 20px;
    display: flex;
    flex-direction: column;
}

.login-container .form-group label {
    font-size: 14px;
    color: var(--text-color);
    margin-bottom: 8px;
}

.login-container .input-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

.login-container .input-wrap input {
    width: 100%;
    padding: 5px 60px 5px 5px; /* Chừa khoảng trống bên phải cho icon */
    border: 1px solid #ebebeb;
    border-radius: 4px;
    font-size: 16px;
    color: var(--heading-color);
    outline: none;
    transition: 0.2s;
}

.login-container .input-wrap input:focus {
    border-color: var(--primary-color);
}

/* Icons trong Input */
.login-container .icon-clear, .icon-group {
    position: absolute;
    right: 12px;
    color: var(--text-color);
    cursor: pointer;
    display: flex;
    gap: 8px;
    font-size: 18px;
}

/* Các tuỳ chọn bên dưới Input */
.login-container .forgot-pass-wrap {
    text-align: right;
    margin-bottom: 15px;
}

.login-container .forgot-pass {
    color: var(--heading-color);
    font-weight: 600;
    text-decoration: none;
    font-size: 14px;
}

.login-container .remember-wrap {
    display: flex;
    align-items: center;
    margin-bottom: 25px;
}

.login-container .remember-wrap input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin-right: 8px;
    accent-color: var(--primary-color); /* Tạo màu xanh cho checkbox */
    cursor: pointer;
}

.login-container .remember-wrap label {
    font-size: 13px;
    color: var(--text-color);
    cursor: pointer;
}

/* Nút Submit */
.login-container .btn-submit {
    width: 100%;
    background-color: var(--primary-color);
    color: #ffffff;
    border: none;
    padding: 14px;
    border-radius: 4px;
    font-size: 16px;
    cursor: pointer;
    margin-bottom: 12px;
}

.login-container .btn-submit:hover {
    opacity: 0.9;
}

/* Liên kết Đăng ký */
.login-container .register-wrap { 
    display: block;
    text-align: right;
    font-size: 12px;
    color: var(--text-color);
    text-decoration: none;
}

.login-container .register-link {
    color: var(--heading-color);
    text-decoration: none;
}

.login-container .footer-bottom {
    position: fixed;
    bottom: 30px; /* Khoảng cách từ footer đến mép dưới trình duyệt */
    left: 0;
    width: 100%; /* Cần có để text-align: center hoạt động đúng */
    text-align: center;
    font-size: 12px;
}

.login-container .footer-bottom a {
    color: var(--heading-color);
    text-decoration: none;
}

.login-container .divider {
    margin: 0 10px;
    color: #ccc;
}





/* =========================================
   GIAO DIỆN TRANG ĐĂNG KÝ
   ========================================= */

/* Khung bọc ngoài */
.register-container {
    margin: 40px auto;
    padding: 20px;
}

/* Tabs (Điện thoại / Email) */
.register-container .register-tabs {
    display: flex;
    gap: 20px;
    margin-bottom: 25px;
    border-bottom: 1px solid #ebebeb;
}

.register-container .tab {
    padding: 10px 0;
    cursor: pointer;
    font-size: 16px;
    color: var(--text-color);
    font-weight: 600;
}

.register-container .tab.active {
    color: var(--heading-color);
    border-bottom: 2px solid var(--primary-color);
}

/* Các trường nhập liệu */
.register-container .form-group {
    margin-bottom: 15px;
}

.register-container .input-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

/* Icon bên trái */
.register-container .icon-left {
    position: absolute;
    left: 5px;
    color: #606266;
    display: flex;
    align-items: center;
}

/* Ô input */
.register-container .input-wrap input {
    width: 100%;
    padding: 5px 5px 5px 30px; /* Thụt vào 45px để chừa chỗ cho icon bên trái */
    border: 1px solid #ebebeb;
    border-radius: 4px;
    font-size: 14px;
    color: var(--heading-color);
    outline: none;
    transition: 0.2s;
}

.register-container .input-wrap input:focus {
    border-color: var(--primary-color);
}

/* Mã CAPTCHA nằm bên phải */
.register-container .captcha-img {
    position: absolute;
    right: 15px;
    font-size: 22px;
    font-weight: bold;
    letter-spacing: 5px;
    user-select: none;
}

/* Hiệp định */
.register-container .agreement-wrap {
    margin-top: 25px;
    margin-bottom: 15px;
    font-size: 15px;
    color: var(--text-color);
}

.register-container .agreement-wrap a {
    color: var(--primary-color);
    text-decoration: none;
}

/* Nút Submit */
.register-container .btn-submit {
    width: 100%;
    padding: 14px;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    cursor: pointer;
    margin-bottom: 10px;
}

.register-container .btn-submit:hover {
    opacity: 0.9;
}

/* Link Đăng nhập ngay */
.register-container .login-wrap {
    text-align: right;
}

.register-container .login-link {
    font-size: 14px;
    color: var(--text-color);
    text-decoration: none;
}



/* =========================================
   GIAO DIỆN CHỌN NGÔN NGỮ
   ========================================= */
.language-page {
    background-color: #ffffff;
    min-height: 100vh;
}

/* Header cố định ở trên cùng */
.language-page .lang-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 50px;
    background-color: #ffffff;
    z-index: 50;
    display: flex;
    align-items: center;
    padding: 0 16px;
    border-bottom: 1px solid #f9fafb; /* gray-50 */
    box-sizing: border-box;
}

/* Nút quay lại */
.language-page .lang-header .back-btn {
    position: absolute;
    left: 16px;
    color: #4b5563; /* gray-600 */
}

.language-page .lang-header .back-btn svg {
    width: 20px;
    height: 20px;
}

/* Tiêu đề */
.language-page .lang-header .lang-title {
    width: 100%;
    text-align: center;
    font-size: 16px;
    font-weight: bold;
    color: #000000;
    margin: 0;
    /* Nếu bạn có font-serif riêng thì thêm vào đây, ví dụ: font-family: 'Times New Roman', serif; */
}

/* Khu vực nội dung */
.language-page .lang-content {
    padding-top: 50px; /* Bằng với chiều cao của header để không bị che khuất */
    padding-left: 16px;
    padding-right: 16px;
}

.language-page .lang-list {
    display: flex;
    flex-direction: column;
}

/* Từng dòng ngôn ngữ */
.language-page .lang-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0; /* py-2 */
    border-bottom: 1px solid #f9fafb; /* gray-50 */
    text-decoration: none;
    transition: background-color 0.2s;
}

.language-page .lang-item:active {
    background-color: #f9fafb;
}

/* Tên ngôn ngữ */
.language-page .lang-name {
    font-size: 13px;
    font-weight: bold;
    color: #1f2937; /* gray-800 - Màu mặc định khi chưa chọn */
}

.language-page .lang-name.active-text {
    color: #000000; /* Màu đen đậm khi được chọn */
}

/* Icon Check tròn màu xanh */
.language-page .check-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    background-color: #3b82f6; /* blue-500 */
    border-radius: 50%;
}

.language-page .check-icon svg {
    width: 14px;
    height: 14px;
    color: #ffffff;
}



/* =========================================
   GIAO DIỆN CHỌN ĐƯỜNG TRUYỀN (SERVER)
   ========================================= */

.server-page {
    background-color: #ffffff;
    min-height: 100vh;
    font-family: var(--default-font-family, sans-serif);
    -webkit-tap-highlight-color: transparent;
    user-select: none;
}

/* Header */
.server-page .server-header {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px 16px; /* py-2 px-2 của bạn */
    background-color: #ffffff;
    border-bottom: 1px solid #f9fafb; /* Thêm gạch chân mờ cho giống header */
}

.server-page .server-header .back-btn {
    position: absolute;
    left: 8px;
    color: #000000;
}

.server-page .server-header .back-btn svg {
    width: 24px;
    height: 24px;
}

.server-page .server-header .server-title {
    font-size: 15px;
    font-weight: bold;
    color: #000000;
    margin: 0;
    font-family: 'Lora', serif; /* Font chữ gốc của bạn */
}

/* Danh sách máy chủ */
.server-page .server-list {
    margin-top: 16px; /* mt-4 */
}

.server-page .server-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px; /* py-2 px-4 */
    cursor: pointer;
    border-bottom: 1px solid #f9fafb;
    transition: background-color 0.2s;
}

.server-page .server-item:active {
    background-color: #f3f4f6; /* Hiệu ứng nhấn trên điện thoại */
}

/* Thông tin chữ */
.server-page .server-info {
    font-size: 13px; /* Đổi từ 12px lên 13px cho dễ nhìn hơn một xíu */
}

.server-page .server-name {
    color: #000000;
}

.server-page .ping-value {
    color: #3b82f6; /* text-blue-500 */
    font-weight: 500;
}

/* Dấu tích xanh */
.server-page .check-icon {
    color: #3b82f6; /* text-blue-500 */
}

.server-page .check-icon svg {
    width: 20px;
    height: 20px;
}

/* Utility Class để phục vụ logic JavaScript bật/tắt dấu tích */
.server-page .hidden {
    display: none !important;
}

.server-page .block {
    display: block !important;
}



/* =========================================
   GIAO DIỆN TRANG CHÍNH
   ========================================= */
.home-page .home-header {
    position: relative;
    background-color: #f8f8f8;
    height: 50px;
    padding: 0 15px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.home-page .home-header .avatar-wrap {
    width: 30px;
    height: 30px;
    margin-right: 15px;
    background-color: transparent;
}

.home-page .home-header .avatar-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.home-page .home-header .support-wrap {
    width: 30px;
    height: 30px;
    margin-left: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.home-page .x-bi-headset {
    width: 28px;
    height: 28px;
    color: #707070;
}

/* Slider */
.home-page .home-slider .swiper-slide {
    padding: 0 15px;
    box-sizing: border-box;
}

.home-page .home-slider .swiper-slide img {
    width: 100%;
    height: 100%;
    max-height: 150px;
    object-fit: cover;
    border-radius: 4px;
}

/* Thanh thông báo */
.home-page .home-ticker {
    width: 100%;
    background-color: #f8f8f8;
    padding: 10px 15px 30px 15px;
    border-bottom: 1px solid #f8f8f8;
    display: flex;
    justify-content: space-between;
    box-sizing: border-box;
    color: #707070;
}




/* Lưới Menu */
.home-page .home-menu-grid {
    display: flex;
    flex-wrap: wrap;
    background-color: #ffffff;
    margin-top: -25px; 
    border-top-left-radius: 20px;
    border-top-right-radius: 20px;
    padding: 15px 5px; /* Tăng padding một chút cho thoáng */
    position: relative;
    z-index: 10;
}

.home-page .home-menu-grid .menu-item {
    width: 25%;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 10px 5px;
    box-sizing: border-box;
}

.home-page .home-menu-grid .menu-icon-wrap {
    width: 100%;
    /* Không dùng aspect-ratio nếu muốn khống chế chiều cao icon cố định */
    display: flex;
    align-items: center;
    justify-content: center;
    height: 45px; /* Khống chế chiều cao vùng chứa icon để nó không bị quá to */
    margin-bottom: 8px;
}

.home-page .home-menu-grid .menu-icon-wrap img {
    /* Quan trọng: Fix cứng kích thước tối đa của hình ảnh */
    width: 35px;  /* Kích thước lý tưởng trên mobile */
    height: 35px;
    max-width: 45px; /* Giới hạn tuyệt đối không cho to hơn nữa */
    object-fit: contain;
}

.home-page .home-menu-grid .menu-text {
    /* Đổi từ 3.2vw sang font-size cố định hoặc dùng clamp */
    font-size: 13px; 
    color: #333333;
    text-align: center;
    white-space: nowrap;
    font-weight: 500;
}
/* Container slider coin */
.home-page .coinSwiper {
    margin: 15px;
    background-color: #ffffff;
}
/* Từng ô coin */
.home-page .coin-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 10px;
    border-radius: 8px;
    background: #fdfdfd;
    /* Giúp các ô có khoảng cách nhẹ nếu cần */
}
.home-page .coin-name {
    font-size: 13px;
    font-weight: 700;
    color: #333;
    margin-bottom: 4px;
}
.home-page .coin-price {
    font-size: 15px;
    font-weight: bold;
    margin-bottom: 2px;
}
.home-page .coin-change {
    font-size: 12px;
    font-weight: 500;
}
/* Màu sắc tăng giảm */
.home-page .text-success { color: #03ad8f; } /* Xanh */
.home-page .text-danger { color: #f04438; }  /* Đỏ */
/* Container chứa các chấm */
.home-page .coinSwiper-pagination {
    position: relative !important; /* Đẩy xuống dưới slider thay vì đè lên */
    margin-top: 15px;
    bottom: 0 !important;
}
/* Kiểu dáng mặc định của các dấu chấm (chưa active) */
.home-page .coinSwiper-pagination .swiper-pagination-bullet {
    width: 3px;
    height: 3px;
    background: #ccc;
    opacity: 0.5;
    border-radius: 10px;
    transition: all 0.3s ease; /* Hiệu ứng mượt khi chuyển thanh dài */
}
/* Kiểu dáng khi được chọn (Active - Thanh dài) */
.home-page .coinSwiper-pagination .swiper-pagination-bullet-active {
    width: 10px; /* Độ dài thanh khi active */
    background: #007aff; /* Màu thương hiệu của bạn */
    opacity: 1;
    border-radius: 10px;
}


/* Thanh Tab giống app sàn */
.home-page .coin-tabs {
    display: flex;
    gap: 25px;
    border-bottom: 1px solid #f1f1f1;
    background: #fff;
    margin: 15px;
}

.home-page .tab-item {
    font-size: 15px;
    color: #888;
    font-weight: 500;
    cursor: pointer;
    padding-bottom: 10px;
    position: relative;
}

.home-page .tab-item.active {
    color: #000;
    font-weight: 700;
}

.home-page .tab-item.active::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: #f0b90b; /* Màu vàng đặc trưng Crypto */
    border-radius: 2px;
}

/* Table Style */
.home-page .tab-content {
    margin: 15px;
}
.home-page .coin-table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
}

.home-page .coin-table th {
    padding: 12px 0px;
    font-size: 12px;
    color: #999;
    text-transform: uppercase;
    border-bottom: 1px solid #fafafa;
    text-align: left;
}

.home-page .coin-table td {
    padding: 12px 0px;
    border-bottom: 1px solid #f9f9f9;
    font-size: 14px;
}

.home-page .coin-table td.text-right-flex {
    display: flex;
    justify-content: flex-end; /* Đẩy nội dung sang phải */
    align-items: center;       /* Căn giữa theo chiều dọc */
    height: 100%;              /* Đảm bảo chiều cao khớp với dòng */
    border-bottom: 1px solid #f9f9f9; /* Giữ border của table */
}

.home-page .coin-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.home-page .coin-info img {
    width: 24px;
    height: 24px;
}

.home-page .symbol { font-weight: bold; display: block;  color :black;}
.home-page .name { font-size: 11px; color: #999; }

.home-page .text-right { text-align: right; font-weight: bold; }
.home-page .text-success { color: #03ad8f; }
.home-page .bg-success {
    background-color: #03ad8f; /* Màu xanh crypto */
    color: #fff;
    padding: 6px 10px;         /* Khoảng cách trong hộp */
    border-radius: 4px;        /* Bo góc nhẹ */
    font-weight: bold;
    font-size: 13px;
    min-width: 70px;           /* Đảm bảo các hộp có độ dài bằng nhau cho đẹp */
    text-align: center;
}
.home-page .text-danger { color: #f04438; }
.home-page .bg-danger {
    background-color: #f04438;
    color: #fff;
    padding: 6px 10px;
    border-radius: 4px;
    font-weight: bold;
    font-size: 13px;
    min-width: 70px;
    text-align: center;
}

/* Ẩn hiện tab */
.home-page .tab-pane { display: none; }
.home-page .tab-pane.active { display: block; }
/* Container chính của Bottom Nav */
.navigation .bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 60px;
    background-color: #ffffff;
    display: flex;
    justify-content: space-around;
    align-items: center;
    border-top: 1px solid #eeeeee;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.05);
    z-index: 1000;
    padding-bottom: env(safe-area-inset-bottom); /* Hỗ trợ iPhone có tai thỏ/nút gạt */
}

/* Từng mục Menu */
.navigation .nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    flex: 1;
}

/* Icon Menu */
.navigation .nav-item img {
    width: 24px;
    height: 24px;
    object-fit: contain;
    margin-bottom: 4px;
    transition: transform 0.2s ease;
}

/* Chữ dưới Icon */
.navigation .nav-item span {
    font-size: 11px;
    color: #888888;
    font-weight: 500;
}

/* Trạng thái khi đang ở trang đó (Active) */
.navigation .nav-item.active span {
    color: #000000; /* Hoặc màu vàng #f0b90b nếu theo style Binance */
}

.navigation .nav-item.active img {
    transform: scale(1.1); /* Phóng nhẹ icon khi active */
}

/* Đảm bảo nội dung trang không bị menu đè mất dòng cuối */
.navigation {
    padding-bottom: 70px; 
}





/* =========================================
   GIAO DIỆN TRANG CHÍNH
   ========================================= */
.market-page .home-header {
    position: relative;
    background-color: #f8f8f8;
    height: 50px;
    padding: 0 15px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.market-page .home-header .avatar-wrap {
    width: 30px;
    height: 30px;
    margin-right: 15px;
    background-color: transparent;
}

.market-page .home-header .avatar-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.market-page .home-header .support-wrap {
    width: 30px;
    height: 30px;
    margin-left: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.market-page .x-bi-headset {
    width: 28px;
    height: 28px;
    color: #707070;
}

/* Slider */
.market-page .home-slider .swiper-slide {
    padding: 0 15px;
    box-sizing: border-box;
}

.market-page .home-slider .swiper-slide img {
    width: 100%;
    height: 100%;
    max-height: 150px;
    object-fit: cover;
    border-radius: 4px;
}

/* Thanh thông báo */
.market-page .home-ticker {
    width: 100%;
    background-color: #f8f8f8;
    padding: 10px 15px 30px 15px;
    border-bottom: 1px solid #f8f8f8;
    display: flex;
    justify-content: space-between;
    box-sizing: border-box;
    color: #707070;
}




/* Lưới Menu */
.market-page .home-menu-grid {
    display: flex;
    flex-wrap: wrap;
    background-color: #ffffff;
    margin-top: -25px; 
    border-top-left-radius: 20px;
    border-top-right-radius: 20px;
    padding: 15px 5px; /* Tăng padding một chút cho thoáng */
    position: relative;
    z-index: 10;
}

.market-page .home-menu-grid .menu-item {
    width: 25%;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 10px 5px;
    box-sizing: border-box;
}

.market-page .home-menu-grid .menu-icon-wrap {
    width: 100%;
    /* Không dùng aspect-ratio nếu muốn khống chế chiều cao icon cố định */
    display: flex;
    align-items: center;
    justify-content: center;
    height: 45px; /* Khống chế chiều cao vùng chứa icon để nó không bị quá to */
    margin-bottom: 8px;
}

.market-page .home-menu-grid .menu-icon-wrap img {
    /* Quan trọng: Fix cứng kích thước tối đa của hình ảnh */
    width: 35px;  /* Kích thước lý tưởng trên mobile */
    height: 35px;
    max-width: 45px; /* Giới hạn tuyệt đối không cho to hơn nữa */
    object-fit: contain;
}

.market-page .home-menu-grid .menu-text {
    /* Đổi từ 3.2vw sang font-size cố định hoặc dùng clamp */
    font-size: 13px; 
    color: #333333;
    text-align: center;
    white-space: nowrap;
    font-weight: 500;
}
/* Container slider coin */
.market-page .coinSwiper {
    margin: 15px;
    background-color: #ffffff;
}
/* Từng ô coin */
.market-page .coin-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 10px;
    border-radius: 8px;
    background: #fdfdfd;
    /* Giúp các ô có khoảng cách nhẹ nếu cần */
}
.market-page .coin-name {
    font-size: 13px;
    font-weight: 700;
    color: #333;
    margin-bottom: 4px;
}
.market-page .coin-price {
    font-size: 15px;
    font-weight: bold;
    margin-bottom: 2px;
}
.market-page .coin-change {
    font-size: 12px;
    font-weight: 500;
}
/* Màu sắc tăng giảm */
.market-page .text-success { color: #03ad8f; } /* Xanh */
.market-page .text-danger { color: #f04438; }  /* Đỏ */
/* Container chứa các chấm */
.market-page .coinSwiper-pagination {
    position: relative !important; /* Đẩy xuống dưới slider thay vì đè lên */
    margin-top: 15px;
    bottom: 0 !important;
}
/* Kiểu dáng mặc định của các dấu chấm (chưa active) */
.market-page .coinSwiper-pagination .swiper-pagination-bullet {
    width: 3px;
    height: 3px;
    background: #ccc;
    opacity: 0.5;
    border-radius: 10px;
    transition: all 0.3s ease; /* Hiệu ứng mượt khi chuyển thanh dài */
}
/* Kiểu dáng khi được chọn (Active - Thanh dài) */
.market-page .coinSwiper-pagination .swiper-pagination-bullet-active {
    width: 10px; /* Độ dài thanh khi active */
    background: #007aff; /* Màu thương hiệu của bạn */
    opacity: 1;
    border-radius: 10px;
}


/* Thanh Tab giống app sàn */
.market-page .coin-tabs {
    display: flex;
    gap: 25px;
    border-bottom: 1px solid #f1f1f1;
    background: #fff;
    margin: 15px;
}

.market-page .tab-item {
    font-size: 15px;
    color: #888;
    font-weight: 500;
    cursor: pointer;
    padding-bottom: 10px;
    position: relative;
}

.market-page .tab-item.active {
    color: #000;
    font-weight: 700;
}

.market-page .tab-item.active::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: #f0b90b; /* Màu vàng đặc trưng Crypto */
    border-radius: 2px;
}

/* Table Style */
.market-page .tab-content {
    margin: 15px;
}
/* 1. Khóa cứng tỷ lệ bảng - Chống nhảy khi giá cập nhật */
/* 1. Khóa cứng tỷ lệ bảng - Chống nhảy khi giá cập nhật */
.market-page .coin-table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    table-layout: fixed; /* Bắt buộc để số không bị nhảy */
}

/* 2. Chia tỷ lệ mặc định (Dành cho Mobile/Màn hình nhỏ) */
.market-page .coin-table th:nth-child(1),
.market-page .coin-table td:nth-child(1) {
    width: 50%; /* Tên chiếm 50% trên Mobile */
    padding: 12px 0px;
    text-align: left;
}

.market-page .coin-table th:nth-child(2),
.market-page .coin-table td:nth-child(2) {
    width: 25%;
    padding: 12px 0px;
    text-align: right; 
}

.market-page .coin-table th:nth-child(3),
.market-page .coin-table td:nth-child(3) {
    width: 25%;
}

/* 3. ĐIỀU CHỈNH CHO MÀN HÌNH LỚN (Desktop/Tablet rộng) */
@media (min-width: 768px) {
    .market-page .coin-table th:nth-child(1),
    .market-page .coin-table td:nth-child(1) {
        width: 70%; /* Màn to cho Tên chiếm hẳn 70% để hiện đủ nội dung */
    }
    .market-page .coin-table th:nth-child(2),
    .market-page .coin-table td:nth-child(2) {
        width: 15%; /* Giá chỉ cần 15% */
    }
    .market-page .coin-table th:nth-child(3),
    .market-page .coin-table td:nth-child(3) {
        width: 15%; /* Tăng/giảm chỉ cần 15% */
    }
}

/* 4. Xử lý phần Text bên trong (Coin Info) */
.market-page .coin-info {
    display: flex;
    align-items: center;
    width: 100%;
    min-width: 0; /* Quan trọng để flexbox hiểu lệnh cắt chữ */
}

.market-page .coin-info div {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    padding-right: 10px;
}

.market-page .symbol { 
    font-weight: bold; 
    display: block; 
    white-space: nowrap; 
    overflow: hidden;
    /* text-overflow: ellipsis; Hiện ... khi chạm vách cột Giá */
}

.market-page .name { 
    display: block;
    font-size: 11px;
    color: #999;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* 5. Style cho Tiêu đề và Ô dữ liệu */
.market-page .coin-table th {
    font-size: 12px;
    color: #999;
    text-transform: uppercase;
    border-bottom: 1px solid #fafafa;
}

.market-page .coin-table td {
    border-bottom: 1px solid #f9f9f9;
    font-size: 14px;
    vertical-align: middle;
}

.market-page .coin-table td.text-right-flex {
    padding: 12px 0px;
    display: flex;
    justify-content: flex-end; 
    align-items: center;       
    width: 100%;
}

.market-page .coin-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.market-page .coin-info img {
    width: 24px;
    height: 24px;
}
.market-page .symbol {
    font-weight: bold;
    display: block;
    white-space: nowrap;      /* Không cho phép xuống dòng */
    overflow: hidden;         /* Ẩn phần văn bản bị thừa ra ngoài */
    text-overflow: ellipsis;   /* Tự động thêm dấu "..." khi bị ẩn */
    max-width: 100%;         /* QUAN TRỌNG: Giới hạn độ rộng tối đa để nó không đè vào cột Giá */
}
.market-page .name { font-size: 11px; color: #999; }

.market-page .text-right { text-align: right; font-weight: bold; }
.market-page .text-success { color: #03ad8f; }
.market-page .bg-success {
    background-color: #03ad8f; /* Màu xanh crypto */
    color: #fff;
    padding: 6px 10px;         /* Khoảng cách trong hộp */
    border-radius: 4px;        /* Bo góc nhẹ */
    font-weight: bold;
    font-size: 13px;
    min-width: 70px;           /* Đảm bảo các hộp có độ dài bằng nhau cho đẹp */
    text-align: center;
}
.market-page .text-danger { color: #f04438; }
.market-page .bg-danger {
    background-color: #f04438;
    color: #fff;
    padding: 6px 10px;
    border-radius: 4px;
    font-weight: bold;
    font-size: 13px;
    min-width: 70px;
    text-align: center;
}

/* Ẩn hiện tab */
.market-page .tab-pane { display: none; }
.market-page .tab-pane.active { display: block; }











/* Bao ngoài cùng để căn giữa toàn màn hình (Bạn có thể bỏ nếu chỉ muốn nhét vào 1 khối nhỏ) */
.solar-loader-container {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0;
}

/* Khung chứa hệ mặt trời */
.solar-system {
    position: relative;
    width: 300px;
    height: 300px;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Mặt trời tỏa sáng */
.sun {
    width: 60px;
    height: 60px;
    background: radial-gradient(circle, #FFF500 20%, #FFB000 80%);
    border-radius: 50%;
    box-shadow: 0 0 15px rgba(255, 200, 0, 0.6), 0 0 30px rgba(255, 150, 0, 0.4);
    position: absolute;
    z-index: 10;
}

/* Các vòng quỹ đạo */
.orbit {
    position: absolute;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.3); /* Viền tròn mờ */
    animation: spin linear infinite;
}

/* Hành tinh */
.planet {
    position: absolute;
    border-radius: 50%;
    left: 50%;
    transform: translateX(-50%); /* Căn giữa hành tinh nằm ngay trên vạch quỹ đạo */
}

/* --- TÙY CHỈNH TỪNG QUỸ ĐẠO & HÀNH TINH --- */

/* Hành tinh trong cùng (Màu vàng nhỏ) */
.orbit-1 {
    width: 120px;
    height: 120px;
    animation-duration: 3s; /* Quay nhanh nhất */
}
.planet-1 {
    width: 14px;
    height: 14px;
    background: #FFD700;
    top: -7px; /* Kéo lên mép viền, bằng 1 nửa chiều cao */
}

/* Hành tinh giữa (Trái đất Xanh lam - Xanh lục) */
.orbit-2 {
    width: 200px;
    height: 200px;
    animation-duration: 6s; /* Quay tốc độ vừa */
}
.planet-2 {
    width: 22px;
    height: 22px;
    background: linear-gradient(135deg, #00FF33, #0099FF);
    top: -11px;
}

/* Hành tinh ngoài cùng (Cam - Đỏ) */
.orbit-3 {
    width: 280px;
    height: 280px;
    animation-duration: 10s; /* Quay chậm nhất */
}
.planet-3 {
    width: 20px;
    height: 20px;
    background: linear-gradient(135deg, #FF6600, #FF0000);
    top: -10px;
}

/* Animation quay vòng tròn */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}