/* Home page styles - Gen Z Edition */

/* Hero section with banner */
.hero-wrapper {
    display: flex;
    gap: 20px;
    margin-bottom: 30px;
    margin-top: 30px;
}

.hero-banner {
    flex: 1;
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    position: relative;
    height: 350px;
}

.hero-banner__img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-sidebar {
    width: 350px;
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-md);
}

.hero-sidebar__header {
    background: #000;
    color: white;
    padding: 12px 15px;
    display: flex;
    align-items: center;
    gap: 8px;
    justify-content: center;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 1.6rem;
}

.hero-sidebar__content {
    padding: 20px;
    text-align: center;
}

.hero-sidebar__empty {
    padding: 30px 0;
    color: #888;
    font-size: 1.5rem;
}

.hero-sidebar__btn {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
    border-radius: var(--border-radius-pill);
    border: none;
    padding: 12px 20px;
    font-size: 1.5rem;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.3);
    transition: var(--transition);
    margin-top: 10px;
    width: 100%;
}

.hero-sidebar__btn:hover {
    transform: translateY(-3px);
    color: #fff;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.4);
}

/* Menu Transaction */
.menu {
    margin-bottom: 60px;
}

.menu__header {
    text-align: center;
    margin-bottom: 25px;
    position: relative;
}

.menu__header__title {
    display: inline-block;
    font-size: 2.2rem;
    font-weight: 700;
    position: relative;
    padding-bottom: 12px;
    color: var(--primary-color);
    text-transform: uppercase;
}

.menu__header__title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: linear-gradient(to right, var(--primary-color), var(--primary-dark));
    border-radius: var(--border-radius-pill);
}

/* Transaction List */
/* ============================= */
/*  NOBLE CLASSIC TRANSACTION UI */
/* ============================= */

.transaction__list {
    display: grid;
    grid-template-columns: repeat(4, minmax(220px, 1fr));
    gap: 18px;

    /* nền quý tộc */
    background: radial-gradient(120% 120% at 30% 10%,
            rgba(255, 248, 230, .95) 0%,
            rgba(255, 255, 255, .92) 40%,
            rgba(245, 246, 255, .90) 100%);
    border-radius: var(--border-radius-lg);
    padding: 22px;

    /* khung + shadow sang */
    border: 1px solid rgba(190, 150, 70, .25);
    box-shadow:
        0 18px 40px rgba(10, 14, 30, .10),
        inset 0 1px 0 rgba(255, 255, 255, .65);
}

/* Card */
.transaction__item {
    /* palette hover 3 màu (vàng + xanh hoàng gia + đỏ ruby) */
    --g1: rgba(220, 175, 80, .95);
    --g2: rgba(40, 60, 155, .92);
    --g3: rgba(165, 45, 75, .92);

    position: relative;
    overflow: hidden;
    z-index: 1;

    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;

    padding: 26px 20px;
    border-radius: var(--border-radius-lg);

    /* nền trắng/kem cổ điển */
    background: linear-gradient(180deg,
            rgba(255, 255, 255, .98),
            rgba(255, 252, 244, .96));

    /* viền vàng tinh tế */
    border: 1px solid rgba(200, 155, 75, .28);

    /* shadow sang */
    box-shadow:
        0 14px 32px rgba(12, 16, 35, .10),
        inset 0 1px 0 rgba(255, 255, 255, .85);

    transition: transform .32s ease, box-shadow .32s ease, border-color .32s ease, filter .32s ease;
    transform: translateZ(0);
}

/* lớp gradient 3 màu khi hover (nền chuyển) */
.transaction__item::before {
    content: "";
    position: absolute;
    inset: -2px;
    border-radius: inherit;

    background: linear-gradient(135deg, var(--g1), var(--g2), var(--g3), var(--g1));
    background-size: 220% 220%;
    opacity: 0;
    z-index: -2;

    transition: opacity .35s ease;
    filter: saturate(1.05);
}

/* lớp “kính” bên trong để nhìn vẫn sang, không chói */
.transaction__item::after {
    content: "";
    position: absolute;
    inset: 2px;
    border-radius: inherit;
    z-index: -1;

    background: radial-gradient(120% 140% at 30% 15%,
            rgba(255, 255, 255, .22), transparent 45%),
        linear-gradient(180deg,
            rgba(255, 255, 255, .22), rgba(0, 0, 0, .06));
    opacity: 0;
    transition: opacity .35s ease;
}

/* shine quét (vệt sáng chạy) */
.transaction__item .shine {
    position: absolute;
    inset: -60%;
    z-index: 0;
    pointer-events: none;
    opacity: 0;
    background: linear-gradient(120deg,
            transparent 40%,
            rgba(255, 255, 255, .55) 50%,
            transparent 60%);
    transform: translateX(-65%) rotate(10deg);
}

/* Hover: nhấc card + glow */
.transaction__item:hover {
    transform: translateY(-10px);
    border-color: rgba(225, 190, 105, .55);
    filter: saturate(1.12);

    box-shadow:
        0 24px 60px rgba(12, 16, 35, .18),
        0 0 0 6px rgba(220, 175, 80, .10),
        0 0 32px rgba(40, 60, 155, .18),
        inset 0 1px 0 rgba(255, 255, 255, .85);
}

/* bật nền gradient + lớp kính */
.transaction__item:hover::before {
    opacity: 1;
}

.transaction__item:hover::after {
    opacity: 1;
}

/* chạy shine */
.transaction__item:hover .shine {
    opacity: .9;
    animation: nobleShine .95s ease forwards;
}

/* Icon */
.transaction__icon {
    width: 74px;
    height: 74px;
    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: var(--border-radius-circle);
    overflow: hidden;

    /* nền quý tộc */
    background: radial-gradient(circle at 30% 30%,
            rgba(255, 255, 255, .95), rgba(245, 235, 210, .92));
    border: 1px solid rgba(200, 155, 75, .30);

    box-shadow:
        0 10px 22px rgba(12, 16, 35, .10),
        inset 0 1px 0 rgba(255, 255, 255, .75);

    transition: transform .32s ease, box-shadow .32s ease, background .32s ease, border-color .32s ease;
}

/* icon nhấc lên + glow */
.transaction__item:hover .transaction__icon {
    transform: translateY(-3px) scale(1.03);
    background: rgba(255, 255, 255, .18);
    border-color: rgba(255, 230, 160, .55);
    box-shadow:
        0 14px 30px rgba(12, 16, 35, .18),
        0 0 18px rgba(220, 175, 80, .22);
}

.transaction__img {
    width: 56px;
    height: 56px;
    object-fit: contain;
    filter: drop-shadow(0 10px 12px rgba(0, 0, 0, .12));
    transition: transform .32s ease, filter .32s ease;
}

.transaction__item:hover .transaction__img {
    transform: scale(1.06);
    filter: drop-shadow(0 16px 18px rgba(0, 0, 0, .18));
}

/* Text */
.text__transaction__item {
    font-weight: 800;
    font-size: 1.18rem;
    letter-spacing: .6px;
    text-transform: uppercase;

    /* kiểu chữ “quý tộc” hơn */
    font-family: ui-serif, Georgia, "Times New Roman", serif;
    color: rgba(80, 70, 45, .95);

    transition: color .32s ease, transform .32s ease, letter-spacing .32s ease;
}

.transaction__item:hover .text__transaction__item {
    /* chữ vàng champagne */
    color: rgba(255, 245, 220, .95);
    text-shadow:
        0 2px 10px rgba(0, 0, 0, .18),
        0 0 18px rgba(220, 175, 80, .22);
    transform: translateY(1px);
    letter-spacing: .8px;
}

/* Float nhẹ toàn card cho “động” nhưng sang */
.transaction__item {
    animation: nobleFloat 3.8s ease-in-out infinite;
}

.transaction__item:nth-child(2) {
    animation-delay: .18s;
}

.transaction__item:nth-child(3) {
    animation-delay: .36s;
}

.transaction__item:nth-child(4) {
    animation-delay: .54s;
}

/* Animation */
@keyframes nobleFloat {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-4px);
    }
}

@keyframes nobleShine {
    0% {
        transform: translateX(-65%) rotate(10deg);
    }

    100% {
        transform: translateX(65%) rotate(10deg);
    }
}

/* Responsive */
@media (max-width: 1200px) {
    .transaction__list {
        grid-template-columns: repeat(2, minmax(220px, 1fr));
    }
}

@media (max-width: 520px) {
    .transaction__list {
        grid-template-columns: 1fr;
    }
}

/* Tôn trọng người dùng giảm chuyển động */
@media (prefers-reduced-motion: reduce) {
    .transaction__item {
        animation: none !important;
    }

    .transaction__item,
    .transaction__icon,
    .transaction__img,
    .text__transaction__item {
        transition: none !important;
    }
}
/* Category List */
.category__list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
    gap: 25px;
}

.category__item {
    display: flex;
    flex-direction: column;
    background-color: white;
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
    height: 100%;
    position: relative;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.category__item:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
    border-color: rgba(0, 0, 0, 0.1);
}

.category__img {
    width: 100%;
    height: 170px;
    object-fit: cover;
}

/* .category__title {
    font-size: 1.7rem;
    font-weight: 700;
    margin: 15px 15px 10px;
    color: var(--primary-color);
    text-align: center;
    text-transform: uppercase;
} */

.category__desc {
    margin: 0 15px 5px;
    color: var(--text-light);
    font-size: 1.3rem;
    text-align: center;
}

.category__stats {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    margin: 15px;
    min-height: 50px;
    align-items: center;
}


.category__action:hover {
    transform: translateY(-3px);

}

/* Media Queries */
@media screen and (max-width: 992px) {
    .hero-wrapper {
        flex-direction: column;
    }
    
    .hero-sidebar {
        width: 100%;
    }
    
    .transaction__list {
        grid-template-columns: repeat(2, 1fr);
    }
}

.hero-banner a {
    background: linear-gradient(135deg, var(--second-light), var(--second-color));
    color: white;
    border-radius: 30px;
    font-size: 1.6rem;
    font-weight: 600;
    box-shadow: 0 5px 15px rgba(244, 115, 185, 0.3);
    transition: all 0.3s ease;
    text-decoration: none;
    margin-top: 15px;
}

.hero-banner a:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(244, 115, 185, 0.4);
    background: linear-gradient(135deg, var(--second-color), var(--second-dark));
}

@media screen and (max-width: 576px) {
    .transaction__list {
        grid-template-columns: 1fr;
    }
    
    .menu__header__title {
        font-size: 2rem;
    }
    

    
    .badge {
        font-size: 1.2rem;
        padding: 4px 10px;
    }
}

/* Recent Transactions */
.recent-transactions {
    background-color: white;
    border-radius: var(--border-radius-lg);
    padding: 15px;
    box-shadow: var(--shadow-md);
    margin-bottom: 50px;
}

.recent-transactions__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    padding-bottom: 10px;
    margin-bottom: 15px;
}

.recent-transactions__title {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    gap: 8px;
}

.recent-transactions__marquee {
    overflow: hidden;
    position: relative;
    height: 30px;
}

.recent-transactions__list {
    display: flex;
    align-items: center;
    position: absolute;
    animation: marquee 30s linear infinite;
    white-space: nowrap;
}

.recent-transactions__item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0 20px;
    font-size: 1.4rem;
}

.recent-transactions__username {
    font-weight: 600;
    color: var(--primary-color);
}

.recent-transactions__time {
    color: var(--text-light);
    font-size: 1.3rem;
}

.recent-transactions__amount {
    font-weight: 700;
    color: var(--accent-color);
}

@keyframes marquee {
    0% {
        transform: translateX(100%);
    }
    100% {
        transform: translateX(-100%);
    }
}

/* Tăng margin dưới cho thông báo và giao dịch gần đây */

.special-menu {
    margin-top: 20px;
}

.special-notice__btn {
    background: var(--primary-color);
    color: white;
    padding: 12px 30px;
    border-radius: var(--border-radius-pill);
    font-weight: 700;
    font-size: 1.6rem;
    display: inline-block;
    transition: var(--transition);
    box-shadow: 0 4px 10px rgba(14, 62, 218, 0.4);
}

.special-notice__btn:hover {
    background: var(--primary-dark);
    transform: translateY(-3px);
    box-shadow: 0 6px 15px rgba(14, 62, 218, 0.5);
    color: white;
}

.hero-sidebar__list {
    margin-bottom: 20px;
}

.hero-sidebar__item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.hero-sidebar__item:last-child {
    border-bottom: none;
}

.hero-sidebar__user {
    display: flex;
    align-items: center;
    gap: 12px;
}

.hero-sidebar__avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}

.hero-sidebar__name {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--text-color);
    max-width: 150px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.hero-sidebar__amount {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
}

/* Badge Top 1-2-3 */
.hero-sidebar__rank {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    font-weight: 700;
    font-size: 1.4rem;
    color: white;
    background-color: #777;
    position: relative;
    overflow: hidden;
    border: 2px solid transparent;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);

}

.hero-sidebar__rank::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 50%;
    background-color: rgba(255, 255, 255, 0.3);
    border-radius: 50% 50% 0 0;
}

.hero-sidebar__rank--gold {
    background: linear-gradient(135deg, #FFD700, #FFA500);
    box-shadow: 0 2px 5px rgba(255, 215, 0, 0.5);
    border-color: #FFD700;
}

.hero-sidebar__rank--silver {
    background: linear-gradient(135deg, #E0E0E0, #A9A9A9);
    box-shadow: 0 2px 5px rgba(192, 192, 192, 0.5);
    border-color: #C0C0C0;
}

.hero-sidebar__rank--bronze {
    background: linear-gradient(135deg, #CD7F32, #A0522D);
    box-shadow: 0 2px 5px rgba(205, 127, 50, 0.5);
    border-color: #CD7F32;
}

/* Welcome Modal Styles */
.welcome-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    animation: fadeIn 0.4s ease-out;
    overflow: auto;
}

.welcome-modal {
    width: 90%;
    max-width: 600px;
    background: linear-gradient(145deg, #ffffff, #f5f8ff);
    border-radius: 20px;
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.2), 
                0 0 30px rgba(14, 62, 218, 0.2),
                inset 0 1px 1px rgba(255, 255, 255, 0.9);
    position: relative;
    overflow: hidden;
    transform: translateY(0);
    animation: modalSlideIn 0.5s ease-out;
}

.welcome-modal::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 8px;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-light));
}

.welcome-modal__header {
    position: relative;
    padding: 20px 30px;
    text-align: center;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.welcome-modal__title {
    font-size: 2.4rem;
    font-weight: 800;
    color: var(--primary-color);
    margin: 0;
    text-transform: uppercase;
    text-shadow: 0 1px 1px rgba(255, 255, 255, 0.9);
    letter-spacing: 0.5px;
}

.welcome-modal__close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    font-size: 2.6rem;
    color: var(--text-light);
    cursor: pointer;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s;
}

.welcome-modal__close:hover {
    background-color: rgba(0, 0, 0, 0.05);
    color: var(--primary-color);
    transform: rotate(90deg);
}

.welcome-modal__body {
    padding: 25px 30px;
    font-size: 1.6rem;
    line-height: 1.6;
    color: var(--text-color);
}

.welcome-modal__body p {
    margin-bottom: 15px;
}

.welcome-modal__body p:first-child {
    font-size: 1.8rem;
    font-weight: 600;
    color: var(--primary-dark);
}

.welcome-modal__icon {
    display: block;
    width: 35%;
    height: 20%;
    margin: 0 auto 20px;
}

.welcome-modal__feature-list {
    background: rgba(255, 255, 255, 0.7);
    border-radius: 12px;
    padding: 20px;
    margin: 20px 0;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.05);
}

.welcome-modal__feature-item {
    display: flex;
    align-items: center;
    margin-bottom: 12px;
    padding-bottom: 12px;
    border-bottom: 1px dashed #e0e6f5;
}

.welcome-modal__feature-item:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.welcome-modal__feature-icon {
    width: 38px;
    height: 38px;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    border-radius: 50%;
    margin-right: 15px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.6rem;
    box-shadow: 0 3px 6px rgba(14, 62, 218, 0.2);
}

.welcome-modal__feature-text {
    flex: 1;
    font-weight: 500;
}

.welcome-modal__footer {
    padding: 20px 30px;
    background: rgba(245, 247, 255, 0.6);
    text-align: center;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
}

.welcome-modal__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 28px;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
    font-weight: 700;
    font-size: 1.6rem;
    text-transform: uppercase;
    border: none;
    border-radius: 100px;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 5px 15px rgba(14, 62, 218, 0.3);
}

.welcome-modal__btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(14, 62, 218, 0.4);
}

.welcome-modal__btn i {
    margin-right: 8px;
    font-size: 1.8rem;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes modalSlideIn {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Mobile Responsive */
@media (max-width: 576px) {
    .welcome-modal {
        width: 95%;
        max-height: 90vh;
        overflow-y: auto;
    }
    
    .welcome-modal__header {
        padding: 15px 20px;
    }
    
    .welcome-modal__title {
        font-size: 2rem;
    }
    
    .welcome-modal__body {
        padding: 20px;
    }
    
    .welcome-modal__footer {
        padding: 15px 20px;
    }
    
    .welcome-modal__btn {
        width: 100%;
    }
}
