/* =================================================================
 * youhui.css - Trang Ưu đãi
 * Đồng bộ style với dating.css (header/back) và users.php (footer).
 * ================================================================= */

/* ===== Header ===== */
.youhui-header {
    background: linear-gradient(135deg, #a18cd1 0%, #fbc2eb 100%);
    padding: 18px 16px;
    text-align: center;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 4px 16px rgba(161, 140, 209, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
}

.youhui-header h1 {
    font-size: 17px;
    font-weight: 600;
    color: #fff;
    letter-spacing: 0.5px;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
    flex: 1;
}

/* Nút quay lại */
.youhui-back {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    transition: background 0.2s, transform 0.15s;
    z-index: 2;
}

.youhui-back:hover {
    background: rgba(255, 255, 255, 0.32);
}

.youhui-back:active {
    transform: translateY(-50%) scale(0.92);
    background: rgba(255, 255, 255, 0.4);
}

.youhui-back svg {
    width: 20px;
    height: 20px;
    display: block;
}

/* ===== Wrap ===== */
.youhui-wrap {
    padding: 16px 12px 0;
    max-width: 480px;
    margin: 0 auto;
}

/* ===== Card ===== */
.youhui-card {
    background: var(--card-color, #FF4757);
    color: #fff;
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
    display: flex;
    align-items: center;
    gap: 12px;
    transition: transform 0.12s ease, box-shadow 0.2s ease, filter 0.15s ease;
    position: relative;
    overflow: hidden;
}

.youhui-card:active {
    transform: scale(0.985);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
    filter: brightness(0.95);
}

/* Áp màu từ data-color attribute */
.youhui-card[data-color="#ff6b6b"] { --card-color: #ff6b6b; }
.youhui-card[data-color="#ffa502"] { --card-color: #ffa502; }
.youhui-card[data-color="#5f27cd"] { --card-color: #5f27cd; }
.youhui-card[data-color="#ee5a6f"] { --card-color: #ee5a6f; }
.youhui-card[data-color="#00b894"] { --card-color: #00b894; }

/* Icon emoji */
.youhui-icon {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

/* Body */
.youhui-body {
    flex: 1;
    min-width: 0;
}

.youhui-body h3 {
    font-size: 15px;
    font-weight: 700;
    margin: 0 0 4px;
    line-height: 1.3;
}

.youhui-body p {
    font-size: 12px;
    line-height: 1.5;
    margin: 0;
    opacity: 0.95;
}

.youhui-tag {
    display: inline-block;
    margin-top: 6px;
    padding: 2px 8px;
    background: rgba(255, 255, 255, 0.25);
    border-radius: 10px;
    font-size: 10px;
    font-weight: 600;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

/* Empty */
.youhui-empty {
    text-align: center;
    color: #999;
    font-size: 13px;
    padding: 24px 0;
    font-style: italic;
}

/* ===== Body padding-bottom (tránh footer che) ===== */
body {
    padding-bottom: calc(75px + env(safe-area-inset-bottom, 0));
    background: #fafafa;
}

/* ===== Responsive (đồng bộ users.php max-width 480px) ===== */
@media (min-width: 768px) {
    .youhui-wrap {
        max-width: 480px;
    }
    .youhui-header {
        max-width: 480px;
        margin: 0 auto;
        left: 50%;
        right: 50%;
    }
    .footer-nav {
        max-width: 480px;
    }
}

/* =================================================================
 * FOOTER (đồng bộ users.php - max-width 480px, grid 5 cột)
 * ================================================================= */
.footer-nav {
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 480px;
    background: #fff;
    border-top: 1px solid #eee;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.05);
    z-index: 100;
}

.footer-nav > div {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    padding: 8px 0 0;
}

.footer-nav li {
    list-style: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
}

.footer-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    text-decoration: none;
    color: #999;
    font-size: 11px;
}

.footer-link img {
    width: 25px;
    height: 25px;
    display: block;
    opacity: 0.7;
    transition: opacity 0.2s;
}

.footer-link.active img,
.footer-link:hover img {
    opacity: 1;
}

.footer-link span {
    line-height: 1;
    white-space: nowrap;
    font-size: 11px;
    color: #999;
}

.footer-link.active span {
    color: #FF4757;
    font-weight: 600;
}

.footer-nav > p {
    height: 18px;
    background: #fff;
    margin: 0;
}