* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #1769e0;
    --primary-dark: #104da8;
    --primary-light: #eaf2ff;
    --text: #17243a;
    --text-light: #718096;
    --background: #f5f8fd;
    --white: #ffffff;
    --border: #e2e8f0;
    --green: #168653;
    --green-light: #e7f8ef;
    --red: #dc3545;
    --shadow: 0 8px 25px rgba(30, 64, 120, 0.07);
}
html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}
body {
    min-height: 100vh;
    font-family: Arial, Helvetica, sans-serif;
    background: var(--background);
    color: var(--text);
    line-height: 1.6;
}
a {
    color: inherit;
    text-decoration: none;
}
button,
input,
select {
    font: inherit;
}
button {
    cursor: pointer;
}
button:disabled {
    cursor: not-allowed;
}
img {
    max-width: 100%;
}
button,
input,
select,
a {
    -webkit-tap-highlight-color: transparent;
}
/* =========================
   HEADER
========================= */
.header {
    position: sticky;
    top: 0;
    z-index: 100;
    width: 100%;
    background: var(--white);
    border-bottom: 1px solid var(--border);
}
.header-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    width: 100%;
    max-width: 1200px;
    min-height: 78px;
    margin: 0 auto;
    padding: 14px 24px;
    gap: 25px;
}
.logo {
    flex-shrink: 0;
    color: #101828;
    font-size: 30px;
    font-weight: 900;
    letter-spacing: 2px;
}
.navbar {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 22px;
}
.navbar a {
    flex-shrink: 0;
    color: #526078;
    font-size: 14px;
    font-weight: 600;
    white-space: nowrap;
    transition: color 0.2s;
}
.navbar a:hover,
.navbar a.active {
    color: var(--primary);
}
.header-actions {
    display: flex;
    align-items: center;
    flex-shrink: 0;
    gap: 10px;
}
.btn-login,
.btn-register {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 16px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 700;
    white-space: nowrap;
    transition:
    background 0.2s,
    color 0.2s,
    border-color 0.2s;
}
.btn-login {
    color: var(--primary);
    background: var(--white);
    border: 1px solid var(--primary);
}
.btn-login:hover {
    background: var(--primary-light);
}
.btn-register {
    color: var(--white);
    background: var(--primary);
    border: 1px solid var(--primary);
}
.btn-register:hover {
    background: var(--primary-dark);
    border-color: var(--primary-dark);
}
/* =========================
   BANNER
========================= */
.page-banner {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 250px;
    padding: 45px 20px;
    text-align: center;
    color: var(--white);
    background:
    radial-gradient(
        circle at 80% 20%,
        rgba(111, 170, 255, 0.5),
        transparent 35%
        ),
    linear-gradient(
        120deg,
        #0d2f70,
        #1769e0
        );
}
.banner-content {
    width: 100%;
    max-width: 800px;
}
.banner-label {
    margin-bottom: 12px;
    color: #c7dcff;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 4px;
}
.page-banner h1 {
    margin-bottom: 12px;
    font-size: 32px;
    line-height: 1.3;
    overflow-wrap: anywhere;
}
.page-banner p:last-child {
    color: #e3edff;
    font-size: 15px;
}
/* MAIN CONTAINER */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 45px 24px 65px;
}
/*TIÊU ĐỀ TRANG*/
.page-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 28px;
}
.page-heading > div {
    min-width: 0;
    flex: 1;
}
.section-label {
    margin-bottom: 5px;
    color: var(--primary);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 2px;
}
.page-heading h2 {
    font-size: 28px;
    line-height: 1.3;
    overflow-wrap: anywhere;
}
.heading-description {
    margin-top: 8px;
    color: var(--text-light);
    font-size: 14px;
}
.account-count {
    flex-shrink: 0;
    padding: 12px 16px;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 10px;
    color: var(--text-light);
    font-size: 13px;
    white-space: nowrap;
}
.account-count strong {
    color: var(--primary);
}
/* =========================
   THANH TÌM KIẾM
========================= */
.search-section {
    margin-bottom: 24px;
}
.search-box {
    display: flex;
    align-items: center;
    width: 100%;
    min-height: 58px;
    padding: 8px;
    gap: 12px;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 12px;
    box-shadow: var(--shadow);
}
.search-icon {
    flex-shrink: 0;
    padding-left: 10px;
    color: var(--primary);
    font-size: 26px;
}
.search-box input {
    flex: 1;
    min-width: 0;
    width: 100%;
    padding: 10px 0;
    border: none;
    outline: none;
    color: var(--text);
    background: transparent;
    font-size: 14px;
}
.search-box input::placeholder {
    color: #a0aec0;
}
.search-box input:focus-visible {
    outline: none;
}
.search-box button {
    flex-shrink: 0;
    padding: 12px 22px;
    color: var(--white);
    background: var(--primary);
    border: none;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 700;
    transition: background 0.2s;
}
.search-box button:hover {
    background: var(--primary-dark);
}
/* =========================
   BỘ LỌC
   SỬ DỤNG FLEXBOX
========================= */
.filter-section {
    margin-bottom: 45px;
    padding: 25px;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 14px;
    box-shadow: var(--shadow);
}
.filter-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 22px;
}
.filter-heading > div {
    flex: 1;
    min-width: 0;
}
.filter-heading h3 {
    font-size: 18px;
}
.filter-heading p {
    margin-top: 4px;
    color: var(--text-light);
    font-size: 13px;
}
.reset-button {
    flex-shrink: 0;
    padding: 9px 13px;
    color: var(--primary);
    background: var(--white);
    border: 1px solid #c8dcff;
    border-radius: 7px;
    font-size: 12px;
    font-weight: 700;
    transition: background 0.2s;
}
.reset-button:hover {
    background: var(--primary-light);
}
.filter-grid {
    display: flex;
    flex-wrap: wrap;
    width: 100%;
    gap: 18px;
}
.filter-item {
    display: flex;
    flex-direction: column;
    flex: 1 1 calc(25% - 18px);
    min-width: 150px;
    max-width: 100%;
    gap: 8px;
}
.filter-item label {
    color: #45546a;
    font-size: 13px;
    font-weight: 700;
}
.filter-item select {
    width: 100%;
    min-height: 44px;
    padding: 10px;
    color: var(--text);
    background: #fbfcff;
    border: 1px solid var(--border);
    border-radius: 8px;
    outline: none;
    font-size: 13px;
}
.filter-item select:focus {
    border-color: var(--primary);
}
/* =========================
   TIÊU ĐỀ DANH SÁCH
========================= */
.account-section-heading {
    margin-bottom: 22px;
}
.account-section-heading h2 {
    font-size: 24px;
}
.account-section-heading p {
    margin-top: 6px;
    color: var(--text-light);
    font-size: 14px;
}
/* =========================
   DANH SÁCH ACC
   SỬ DỤNG FLEXBOX
========================= */
.account-list {
    display: flex;
    align-items: stretch;
    flex-wrap: wrap;
    width: 100%;
    gap: 22px;
}
/* =========================
   THẺ ACC
========================= */
.account-card {
    display: flex;
    flex-direction: column;
    flex: 0 0 calc((100% - 66px) / 4);
    min-width: 0;
    max-width: 100%;
    overflow: hidden;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 14px;
    box-shadow: var(--shadow);
    transition:
        transform 0.25s,
        box-shadow 0.25s,
        border-color 0.25s;
}
.account-card:hover {
    transform: translateY(-5px);
    border-color: #b5d0ff;
    box-shadow: 0 14px 32px rgba(30, 64, 120, 0.13);
}
.account-image {
    display: block;
    width: 100%;
    height: 180px;
    object-fit: cover;
    background: #eaf2ff;
}
.account-card-body {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    flex: 1;
    min-width: 0;
    padding: 17px 17px 10px;
}
.account-card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    width: 100%;
    gap: 8px;
    margin-bottom: 12px;
}
.game-label {
    display: inline-block;
    padding: 5px 8px;
    color: var(--primary);
    background: var(--primary-light);
    border-radius: 5px;
    font-size: 10px;
    font-weight: 700;
}
.account-id {
    color: #8b98aa;
    font-size: 11px;
    white-space: nowrap;
}
.account-card-body h3 {
    margin-bottom: 8px;
    font-size: 16px;
    line-height: 1.45;
    overflow-wrap: anywhere;
}
.account-description {
    width: 100%;
    min-height: 42px;
    color: var(--text-light);
    font-size: 12px;
    line-height: 1.7;
    overflow-wrap: anywhere;
}
.account-badge {
    display: inline-block;
    margin-top: 12px;
    padding: 5px 9px;
    color: #a45a00;
    background: #fff4db;
    border-radius: 5px;
    font-size: 10px;
    font-weight: 700;
}
/* =========================
   GIÁ VÀ NÚT THUÊ
========================= */
.account-card-bottom {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
    padding: 15px 17px 17px;
    margin-top: auto;
}
.price-box {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px;
}
.price-box span {
    color: var(--text-light);
    font-size: 12px;
}
.price-box strong {
    color: var(--primary);
    font-size: 20px;
    white-space: nowrap;
}
.account-status {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    align-self: flex-start;
    padding: 6px 8px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 700;
}
.account-status.available {
    color: var(--green);
    background: var(--green-light);
}
.account-status.rented {
    color: var(--red);
    background: #fff0f0;
}
.rent-button {
    width: 100%;
    min-height: 43px;
    padding: 10px;
    color: var(--white);
    background: var(--primary);
    border: none;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 700;
    transition: background 0.2s;
}
.rent-button:hover:not(:disabled) {
    background: var(--primary-dark);
}
.rent-button:disabled {
    color: #8b98aa;
    background: #edf0f5;
}
/* =========================
   KHÔNG CÓ KẾT QUẢ
========================= */
.empty-state {
    width: 100%;
    padding: 55px 20px;
    text-align: center;
    background: var(--white);
    border: 1px dashed #cbd5e1;
    border-radius: 14px;
}
.empty-state[hidden] {
    display: none;
}
.empty-icon {
    margin-bottom: 12px;
    color: var(--primary);
    font-size: 42px;
}
.empty-state h3 {
    margin-bottom: 8px;
    font-size: 20px;
}
.empty-state p {
    margin-bottom: 20px;
    color: var(--text-light);
    font-size: 14px;
}
.empty-state button {
    padding: 11px 18px;
    color: var(--white);
    background: var(--primary);
    border: none;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 700;
}
/* =========================
   LƯU Ý
========================= */
.notice-section {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    margin-top: 45px;
    padding: 22px;
    background: #edf5ff;
    border: 1px solid #d4e5ff;
    border-radius: 12px;
}

.notice-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 30px;
    height: 30px;
    color: var(--white);
    background: var(--primary);
    border-radius: 50%;
    font-weight: 800;
}
.notice-section > div:last-child {
    flex: 1;
    min-width: 0;
}
.notice-section h3 {
    margin-bottom: 6px;
    font-size: 16px;
}
.notice-section p {
    color: #526078;
    font-size: 13px;
    line-height: 1.8;
}
.notice-section a {
    display: inline-block;
    margin-top: 10px;

    color: var(--primary);
    font-size: 13px;
    font-weight: 700;
}

.notice-section a:hover {
    text-decoration: underline;
}


/*FLEXBOX */

.footer {
    background: #101c30;
    color: #d4deed;
}

.footer-container {
    display: flex;
    align-items: flex-start;
    flex-wrap: wrap;

    width: 100%;
    max-width: 1200px;

    margin: 0 auto;
    padding: 45px 24px;

    gap: 50px;
}

.footer-brand {
    flex: 2 1 300px;
    min-width: 0;
}

.footer-logo {
    display: inline-block;

    margin-bottom: 12px;

    color: var(--white);
}

.footer-brand p {
    max-width: 330px;

    color: #9baac0;
    font-size: 13px;
    line-height: 1.8;
}

.footer-links {
    display: flex;
    flex: 1 1 150px;
    flex-direction: column;
    align-items: flex-start;

    min-width: 0;
    gap: 11px;
}

.footer-links h4 {
    margin-bottom: 5px;

    color: var(--white);
    font-size: 14px;
}

.footer-links a {
    color: #aab8cc;
    font-size: 13px;

    transition: color 0.2s;
}

.footer-links a:hover {
    color: var(--white);
}

.footer-bottom {
    padding: 17px 20px;

    border-top: 1px solid #29364b;

    text-align: center;
    color: #8796ad;
    font-size: 12px;
}


/* =========================
   TABLET
========================= */

@media (max-width: 1050px) {
    .header-container {
        gap: 18px;
    }

    .navbar {
        order: 3;
        width: 100%;

        justify-content: center;
        flex-wrap: wrap;

        gap: 16px;
    }

    .account-card {
        flex-basis: calc((100% - 44px) / 3);
    }

    .filter-item {
        flex-basis: calc((100% - 18px) / 2);
    }

    .footer-container {
        gap: 30px;
    }
}


/* =========================
   TABLET NHỎ
========================= */

@media (max-width: 760px) {
    .header-container {
        padding: 15px 18px;
        gap: 15px;
    }

    .logo {
        font-size: 25px;
    }

    .header-actions {
        margin-left: auto;
    }

    .navbar {
        justify-content: flex-start;
        flex-wrap: nowrap;

        width: 100%;
        overflow-x: auto;

        padding-bottom: 5px;
    }

    .navbar a {
        font-size: 12px;
    }

    .page-banner {
        min-height: 220px;
    }

    .page-banner h1 {
        font-size: 25px;
    }

    .container {
        padding: 32px 18px 45px;
    }

    .page-heading {
        align-items: flex-start;
        flex-direction: column;
    }

    .page-heading h2 {
        font-size: 25px;
    }

    .account-list {
        gap: 15px;
    }

    .account-card {
        flex-basis: calc((100% - 15px) / 2);
    }

    .account-image {
        height: 150px;
    }

    .account-card-body {
        padding: 13px 12px 8px;
    }

    .account-card-bottom {
        padding: 12px;
    }

    .account-card-body h3 {
        font-size: 14px;
    }

    .price-box strong {
        font-size: 17px;
    }

    .footer-brand {
        flex-basis: 100%;
    }

    .footer-links {
        flex-basis: calc((100% - 30px) / 2);
    }
}


/* =========================
   ĐIỆN THOẠI
========================= */

@media (max-width: 480px) {
    .header-container {
        padding: 12px;
    }

    .logo {
        font-size: 23px;
        letter-spacing: 1px;
    }

    .btn-login,
    .btn-register {
        padding: 8px 10px;
        font-size: 11px;
    }

    .header-actions {
        gap: 7px;
    }

    .navbar {
        gap: 14px;
    }

    .page-banner {
        padding: 35px 15px;
    }

    .page-banner h1 {
        font-size: 21px;
    }

    .page-banner p:last-child {
        font-size: 13px;
    }

    .banner-label {
        font-size: 10px;
        letter-spacing: 3px;
    }

    .container {
        padding: 28px 12px 40px;
    }

    .page-heading h2 {
        font-size: 23px;
    }

    .account-count {
        padding: 10px 12px;
    }

    .search-box {
        gap: 7px;
    }

    .search-icon {
        padding-left: 5px;
        font-size: 22px;
    }

    .search-box button {
        padding: 11px 12px;
        font-size: 11px;
    }

    .search-box input {
        font-size: 12px;
    }

    .filter-section {
        padding: 17px 13px;
    }

    .filter-heading {
        align-items: flex-start;
    }

    .filter-heading h3 {
        font-size: 16px;
    }

    .reset-button {
        padding: 8px 10px;
    }

    .filter-grid {
        gap: 14px;
    }

    .filter-item {
        flex-basis: 100%;
        min-width: 0;
    }

    .account-grid {
        gap: 18px;
    }

    .account-card {
        flex-basis: 100%;
    }

    .account-image {
        height: 210px;
    }

    .account-card-body {
        padding: 17px 17px 10px;
    }

    .account-card-bottom {
        padding: 15px 17px 17px;
    }

    .account-card-body h3 {
        font-size: 16px;
    }

    .price-box strong {
        font-size: 20px;
    }

    .notice-section {
        padding: 16px 13px;
        gap: 11px;
    }

    .footer-container {
        flex-direction: column;
        gap: 30px;
        padding: 35px 20px;
    }

    .footer-brand,
    .footer-links {
        flex: 0 0 100%;
        width: 100%;
    }
}


/* =========================
   ĐIỆN THOẠI RẤT NHỎ
========================= */

@media (max-width: 360px) {
    .header-container {
        justify-content: center;
    }

    .logo {
        font-size: 21px;
    }

    .header-actions {
        margin-left: 0;
    }

    .btn-login,
    .btn-register {
        padding: 7px 8px;
        font-size: 10px;
    }

    .search-box {
        flex-wrap: wrap;
    }

    .search-box input {
        flex-basis: 60%;
    }

    .search-box button {
        flex: 1;
    }

    .page-heading h2 {
        font-size: 21px;
    }

    .account-image {
        height: 180px;
    }

    .price-box {
        align-items: flex-start;
    }
}


/* =========================
   HỖ TRỢ TRUY CẬP
========================= */

button:focus-visible,
a:focus-visible,
select:focus-visible,
input:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 3px;
}


/* =========================
   GIẢM CHUYỂN ĐỘNG
========================= */

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
/* =========================
   GIỎ HÀNG KAIDO
   ========================= */

.cart-button {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;

    width: 44px;
    height: 44px;

    font-size: 22px;
    background: #ffffff;
    color: #111827;

    border: 1px solid #e5e7eb;
    border-radius: 12px;

    cursor: pointer;
    transition: 0.25s ease;
}

.cart-button:hover {
    background: #ede9fe;
    transform: translateY(-2px);
}

.cart-count {
    position: absolute;
    top: -7px;
    right: -7px;

    min-width: 20px;
    height: 20px;
    padding: 0 5px;

    display: flex;
    align-items: center;
    justify-content: center;

    background: #7c3aed;
    color: white;

    font-size: 12px;
    font-weight: bold;

    border-radius: 50%;
}

.cart-overlay {
    position: fixed;
    inset: 0;

    display: flex;
    justify-content: flex-end;

    background: rgba(0, 0, 0, 0.45);

    opacity: 0;
    visibility: hidden;

    z-index: 9999;

    transition: opacity 0.25s ease,
                visibility 0.25s ease;
}

.cart-overlay.active {
    opacity: 1;
    visibility: visible;
}

.cart-box {
    width: 420px;
    max-width: 100%;
    height: 100%;

    display: flex;
    flex-direction: column;

    padding: 24px;
    box-sizing: border-box;

    background: #ffffff;

    transform: translateX(100%);
    transition: transform 0.3s ease;
}

.cart-overlay.active .cart-box {
    transform: translateX(0);
}

.cart-header {
    display: flex;
    align-items: center;
    justify-content: space-between;

    padding-bottom: 18px;
    border-bottom: 1px solid #e5e7eb;
}

.cart-header h2 {
    font-size: 21px;
    color: #111827;
}

.close-cart {
    width: 36px;
    height: 36px;

    border-radius: 8px;
    background: #f3f4f6;

    font-size: 18px;
}

.cart-list {
    flex: 1;
    overflow-y: auto;

    padding: 16px 0;
}

.cart-item {
    display: flex;
    align-items: center;
    gap: 12px;

    padding: 12px 0;
    border-bottom: 1px solid #e5e7eb;
}

.cart-item img {
    width: 76px;
    height: 64px;

    object-fit: cover;
    border-radius: 8px;
}

.cart-item-info {
    flex: 1;
    min-width: 0;
}

.cart-item-info h4 {
    margin-bottom: 6px;
    font-size: 14px;
    color: #111827;
}

.cart-item-info p {
    color: #7c3aed;
    font-weight: bold;
}

.remove-cart {
    padding: 7px 10px;

    color: #dc2626;
    background: #fee2e2;

    border-radius: 6px;
}

.cart-footer {
    padding-top: 16px;
    border-top: 1px solid #e5e7eb;
}

.cart-total-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;

    margin-bottom: 18px;
}

.cart-total-row strong {
    color: #7c3aed;
    font-size: 18px;
}

.checkout-button {
    width: 100%;
    padding: 14px;

    color: #ffffff;
    background: #7c3aed;

    font-weight: bold;
    border-radius: 10px;

    transition: 0.2s ease;
}

.checkout-button:hover {
    background: #6d28d9;
    transform: translateY(-2px);
}

@media (max-width: 480px) {
    .cart-box {
        width: 100%;
        padding: 18px;
    }
}