/* ===== NGEMS TỬ VI 12 CON GIÁP [ngems_tuvi] ===== */
:root {
    --ngems-tv-primary: #b45309;
    --ngems-tv-primary-dark: #92400e;
    --ngems-tv-dark: #1f2937;
    --ngems-tv-gold: #fde68a;
    --ngems-tv-border: #e5e7eb;
    --ngems-tv-muted: #6b7280;
    --ngems-tv-soft: #fffaf5;
}

.ngems-tuvi-page {
    padding-bottom: 40px;
}

.ngems-tuvi-wrapper {
    max-width: 1200px;
    margin: 24px auto;
}

.ngems-tv-header {
    margin-bottom: 22px;
}

.tv-eyebrow {
    display: inline-block;
    padding: 4px 14px;
    border-radius: 999px;
    background: #fef3c7;
    color: var(--ngems-tv-primary-dark);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.8px;
    margin-bottom: 8px;
}

.tv-main-title {
    margin: 0;
    font-size: clamp(1.5rem, 2.8vw, 2.1rem);
    font-weight: 800;
    color: var(--ngems-tv-dark);
    text-transform: uppercase;
}

/* 12 Con Giáp Bar */
.ngems-tv-zodiac-bar {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    margin-bottom: 18px;
}

.tv-zodiac-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 13px !important;
    margin: 0 !important;
    min-height: 0 !important;
    border-radius: 999px;
    border: 1px solid var(--ngems-tv-border);
    background: #ffffff;
    color: var(--ngems-tv-dark);
    font-size: 13px;
    font-weight: 600;
    line-height: 1.25;
    cursor: pointer;
    transition: all 0.18s ease;
}

.tv-zodiac-btn:hover {
    border-color: var(--ngems-tv-primary);
    background: var(--ngems-tv-soft);
}

.tv-zodiac-btn.is-active {
    background: linear-gradient(135deg, var(--ngems-tv-primary) 0%, var(--ngems-tv-primary-dark) 100%);
    border-color: var(--ngems-tv-primary);
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(180, 83, 9, 0.25);
}

.tv-zodiac-btn .zb-count {
    font-size: 11px;
    padding: 1px 6px;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.08);
    color: inherit;
}

.tv-zodiac-btn.is-active .zb-count {
    background: rgba(255, 255, 255, 0.22);
}

/* Filter Controls */
.ngems-tv-controls {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    padding: 14px 16px;
    margin-bottom: 24px;
    background: var(--ngems-tv-soft);
    border: 1px solid #f3e8d8;
    border-radius: 14px;
}

.tv-ctrl-search {
    flex: 1 1 240px;
}

.tv-ctrl-search input {
    width: 100%;
    height: 40px !important;
    padding: 0 14px !important;
    margin: 0 !important;
    border-radius: 10px !important;
    border: 1px solid #d1d5db !important;
    background: #ffffff !important;
    font-size: 13.5px !important;
}

.tv-ctrl-gender {
    display: inline-flex;
    gap: 4px;
    padding: 4px;
    background: #ffffff;
    border: 1px solid var(--ngems-tv-border);
    border-radius: 10px;
}

.tv-gender-btn {
    padding: 6px 14px !important;
    margin: 0 !important;
    min-height: 0 !important;
    border: none;
    border-radius: 7px;
    background: transparent;
    color: #4b5563;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.2;
    cursor: pointer;
}

.tv-gender-btn.is-active {
    background: var(--ngems-tv-dark);
    color: var(--ngems-tv-gold);
}

.tv-ctrl-sort select {
    height: 40px !important;
    width: auto !important;
    min-width: 175px;
    padding: 0 12px !important;
    margin: 0 !important;
    border-radius: 10px !important;
    border: 1px solid #d1d5db !important;
    background: #ffffff !important;
    font-size: 13.5px !important;
    font-weight: 600;
}

/* Groups */
.ngems-tv-groups {
    display: flex;
    flex-direction: column;
    gap: 26px;
}

.tv-zodiac-group[hidden] {
    display: none;
}

.tv-group-head {
    display: flex;
    align-items: center;
    gap: 10px;
    padding-bottom: 10px;
    margin-bottom: 14px;
    border-bottom: 2px solid #f3e8d8;
}

.tv-group-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: linear-gradient(135deg, #1f2937 0%, #111827 100%);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}

.tv-group-head h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
    color: var(--ngems-tv-dark);
}

.tv-group-head h3 small {
    font-weight: 500;
    color: var(--ngems-tv-muted);
    font-size: 14px;
}

.tv-group-count {
    margin-left: auto;
    font-size: 12px;
    font-weight: 600;
    color: var(--ngems-tv-primary-dark);
    background: #fef3c7;
    padding: 3px 10px;
    border-radius: 999px;
}

/* Cards */
.tv-cards-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}

.tv-card[hidden] {
    display: none;
}

.tv-card {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 16px;
    background: #ffffff;
    border: 1px solid var(--ngems-tv-border);
    border-radius: 14px;
    text-decoration: none !important;
    color: var(--ngems-tv-dark) !important;
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.04);
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.tv-card:hover {
    transform: translateY(-3px);
    border-color: #fcd34d;
    box-shadow: 0 10px 24px rgba(180, 83, 9, 0.1);
}

.tv-card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.tv-year-badge {
    font-size: 13px;
    font-weight: 800;
    color: var(--ngems-tv-primary-dark);
    background: #fef3c7;
    padding: 3px 10px;
    border-radius: 999px;
}

.tv-gender-badge {
    font-size: 11.5px;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 999px;
    background: #f1f5f9;
    color: #475569;
}

.tv-gender-badge.is-nam {
    background: #eff6ff;
    color: #1d4ed8;
}

.tv-gender-badge.is-nu {
    background: #fdf2f8;
    color: #be185d;
}

.tv-canchi {
    font-size: 12.5px;
    font-weight: 600;
    color: var(--ngems-tv-muted);
}

.tv-card-title {
    margin: 0;
    font-size: 14.5px;
    font-weight: 600;
    line-height: 1.45;
    color: var(--ngems-tv-dark);
}

.tv-card-cta {
    margin-top: auto;
    font-size: 12.5px;
    font-weight: 700;
    color: var(--ngems-tv-primary);
}

.ngems-tv-empty {
    padding: 28px 18px;
    text-align: center;
    background: #f8fafc;
    border: 1px dashed #cbd5e1;
    border-radius: 12px;
    color: var(--ngems-tv-muted);
    font-size: 14px;
}

.ngems-tuvi-seo {
    margin-top: 28px;
    line-height: 1.7;
}

@media (max-width: 960px) {
    .tv-cards-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 600px) {
    .tv-cards-grid {
        grid-template-columns: 1fr;
    }

    .ngems-tv-zodiac-bar {
        justify-content: flex-start;
        flex-wrap: nowrap;
        overflow-x: auto;
        padding-bottom: 6px;
        -webkit-overflow-scrolling: touch;
    }

    .tv-zodiac-btn {
        flex-shrink: 0;
    }

    .tv-ctrl-sort,
    .tv-ctrl-sort select {
        width: 100% !important;
    }
}

/* ===== NGEMS TỬ VI HOME COMPACT [ngems_tuvi_home] ===== */
.ngems-tuvi-home {
    max-width: 1200px;
    margin: 24px auto;
    padding: 24px;
    background: #ffffff;
    border: 1px solid var(--ngems-tv-border);
    border-radius: 18px;
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.05);
}

.tvh-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 14px;
    flex-wrap: wrap;
    margin-bottom: 18px;
}

.tvh-title {
    margin: 0;
    font-size: clamp(1.3rem, 2.4vw, 1.75rem);
    font-weight: 800;
    color: var(--ngems-tv-dark);
    text-transform: uppercase;
}

.tvh-all-link {
    padding: 7px 14px;
    border-radius: 999px;
    background: var(--ngems-tv-soft);
    border: 1px solid #fde68a;
    color: var(--ngems-tv-primary-dark) !important;
    font-size: 13px;
    font-weight: 700;
    text-decoration: none !important;
    transition: background 0.2s ease, color 0.2s ease;
}

.tvh-all-link:hover {
    background: var(--ngems-tv-primary);
    color: #ffffff !important;
}

/* Thanh 12 vòng tròn Con Giáp (Icon trên, chữ dưới) */
.tv-circle-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 18px;
}

.tv-circle-btn {
    width: 70px;
    height: 70px;
    min-height: 0 !important;
    padding: 4px !important;
    margin: 0 !important;
    border-radius: 50% !important;
    border: 2px solid var(--ngems-tv-border);
    background: #ffffff;
    color: var(--ngems-tv-dark);
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    cursor: pointer;
    flex-shrink: 0;
    transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}

.tv-circle-btn:hover {
    transform: translateY(-2px);
    border-color: var(--ngems-tv-primary);
    background: var(--ngems-tv-soft);
}

.tv-circle-btn.is-active {
    background: linear-gradient(145deg, var(--ngems-tv-primary) 0%, var(--ngems-tv-primary-dark) 100%);
    border-color: var(--ngems-tv-gold);
    color: #ffffff;
    box-shadow: 0 8px 18px rgba(180, 83, 9, 0.28);
}

.tv-circle-btn .tvc-icon {
    font-size: 22px;
    line-height: 1.1;
}

.tv-circle-btn .tvc-label {
    font-size: 11.5px;
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: 0.2px;
}

.tvh-user-hint {
    margin: 0 auto 14px;
    padding: 8px 14px;
    max-width: 520px;
    text-align: center;
    border-radius: 999px;
    background: #fffbeb;
    border: 1px solid #fde68a;
    color: #78350f;
    font-size: 13px;
    font-weight: 600;
}

.tvh-panel[hidden] {
    display: none;
}

@media (max-width: 767px) {
    .ngems-tuvi-home {
        padding: 16px 12px;
    }

    .tv-circle-bar {
        justify-content: flex-start;
        flex-wrap: nowrap;
        overflow-x: auto;
        padding: 4px 2px 8px;
        -webkit-overflow-scrolling: touch;
    }

    .tv-circle-btn {
        width: 62px;
        height: 62px;
    }

    .tv-circle-btn .tvc-icon {
        font-size: 20px;
    }

    .tv-circle-btn .tvc-label {
        font-size: 11px;
    }
}
