/* ============================================
   dating.css - Trang Hội trường (đơn giản)
   Style: gradient cards xếp dọc, icon tròn
   ============================================ */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

html, body {
    width: 100%;
    min-height: 100vh;
    background: #f0f2f5;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', Roboto, sans-serif;
    color: #fff;
    font-size: 14px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    padding-bottom: env(safe-area-inset-bottom, 0);
}

/* ===== Header ===== */
.dating-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;
    position: relative;
}

.dating-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 */
.dating-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);
    transition: background 0.2s, transform 0.15s;
    z-index: 2;
}

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

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

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

/* ===== List ===== */
.dating-list {
    padding: 14px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* ===== Row (game card) ===== */
.dating-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    border-radius: 12px;
    text-decoration: none;
    color: #fff;
    /* Mỗi card 1 màu duy nhất - gradient đậm → nhạt cùng tông */
    background: var(--row-color, #888);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transition: transform 0.12s ease, box-shadow 0.2s ease, filter 0.15s ease;
    position: relative;
    overflow: hidden;
}

.dating-row:hover {
    filter: brightness(1.05);
}

.dating-row:active {
    transform: scale(0.985);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12);
    filter: brightness(0.95);
}

/* Icon tròn */
.row-icon {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
    z-index: 1;
}

.row-icon img {
    width: 34px;
    height: 34px;
    object-fit: contain;
    display: block;
}

/* Info (name + desc) */
.row-info {
    flex: 1;
    min-width: 0;
    z-index: 1;
}

.row-name {
    font-size: 15px;
    font-weight: 600;
    color: #fff;
    line-height: 1.3;
    margin-bottom: 2px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.15);
}

.row-desc {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.85);
    line-height: 1.3;
    text-shadow: 0 1px 1px rgba(0, 0, 0, 0.1);
}

/* Arrow ↓ */
.row-arrow {
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1;
    opacity: 0.9;
}

.row-arrow svg {
    width: 18px;
    height: 18px;
    color: #fff;
}

/* ===== Animate on load ===== */
@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.dating-row {
    animation: slideUp 0.35s ease-out backwards;
}

.dating-list .dating-row:nth-child(1)  { animation-delay: 0.04s; }
.dating-list .dating-row:nth-child(2)  { animation-delay: 0.08s; }
.dating-list .dating-row:nth-child(3)  { animation-delay: 0.12s; }
.dating-list .dating-row:nth-child(4)  { animation-delay: 0.16s; }
.dating-list .dating-row:nth-child(5)  { animation-delay: 0.20s; }
.dating-list .dating-row:nth-child(6)  { animation-delay: 0.24s; }
.dating-list .dating-row:nth-child(7)  { animation-delay: 0.28s; }
.dating-list .dating-row:nth-child(8)  { animation-delay: 0.32s; }
.dating-list .dating-row:nth-child(9)  { animation-delay: 0.36s; }

/* ===== Responsive ===== */
@media (min-width: 768px) {
    .dating-list {
        max-width: 480px;
        margin: 0 auto;
    }
    .dating-header {
        max-width: 480px;
        margin: 0 auto;
    }
    .footer-nav {
        max-width: 480px;
        margin: 0 auto;
    }
}

/* ===== Footer (đồng bộ users.php) ===== */
.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;
}

/* Thêm padding-bottom cho body để footer không che list */
body {
    padding-bottom: calc(75px + env(safe-area-inset-bottom, 0));
}