/* =====================================================================
   GoPet AI - Giao diện Tết (đỏ + vàng, nền phố đêm, bao lì xì rơi)
   File này nạp SAU Bulma để ghi đè phần nhìn, không đổi cấu trúc HTML.
   ===================================================================== */
:root {
    --tet-red: #a8102a;
    --tet-red-deep: #6d0a1b;
    --tet-red-soft: #d3192f;
    --tet-gold: #ffd76a;
    --tet-gold-deep: #d99b1f;
    --tet-cream: #fff4d6;
    --tet-ink: #ffeccf;
    --tet-panel: rgba(46, 10, 18, .86);
    --tet-panel-soft: rgba(60, 14, 22, .72);
    --tet-line: rgba(255, 215, 106, .28);
    --tet-shadow: 0 18px 44px rgba(0, 0, 0, .5);
}

html {
    background: #12040c;
    scroll-behavior: smooth;
}

body {
    min-height: 100vh;
    color: var(--tet-ink);
    font-family: "Questrial", "Segoe UI", Inter, system-ui, sans-serif;
    background:
        radial-gradient(1200px 620px at 50% -12%, rgba(255, 122, 60, .20), transparent 62%),
        linear-gradient(180deg, rgba(10, 2, 8, .40) 0%, rgba(10, 2, 8, .66) 42%, rgba(8, 2, 6, .84) 100%),
        url("/Upload/Images/tet-bg.svg") center top / cover no-repeat fixed,
        #12040c;
}

/* lớp hiệu ứng rơi (bao lì xì/hoa mai) phủ lên trên, không chặn click */
#tetFall {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1500;
    opacity: .95;
}

/* (E24) header chứa modal Đăng nhập/Đăng ký -> phải nằm TRÊN nội dung.
   Nếu để chung z-index:1 với .container (đứng sau trong DOM) thì nội dung ĐÈ LÊN form. */
header {
    position: relative;
    z-index: 2000;
}

.container, footer {
    position: relative;
    z-index: 1;
}

/* ---------------- navbar ---------------- */
.navbar {
    background: linear-gradient(180deg, rgba(24, 5, 12, .94), rgba(70, 8, 20, .88));
    border-bottom: 1px solid var(--tet-line);
    box-shadow: 0 10px 30px rgba(0, 0, 0, .45);
    backdrop-filter: blur(10px);
}

    .navbar::after {
        content: "";
        position: absolute;
        left: 0;
        right: 0;
        bottom: -3px;
        height: 3px;
        background: linear-gradient(90deg, transparent, var(--tet-gold), #fff3c4, var(--tet-gold), transparent);
        opacity: .75;
    }

.navbar-item img {
    max-height: 52px;
}

.navbar-item, .navbar-link {
    color: var(--tet-cream) !important;
    font-size: 15px;
}

    .navbar-item:hover, .navbar-link:hover {
        background: rgba(255, 215, 106, .10) !important;
        color: #fff7db !important;
    }

.navbar-dropdown, .navbar-menu.is-active {
    background: rgba(30, 6, 14, .97) !important;
    border: 1px solid var(--tet-line);
}

.navbar-dropdown .navbar-item {
    color: var(--tet-cream) !important;
}

/* ---------------- chữ, liên kết ---------------- */
a {
    color: var(--tet-gold);
}

    a:hover {
        color: #fff2bd;
    }

.title, .subtitle, h1, h2, h3, h4, h5, h6, .modal-card-title {
    color: var(--tet-cream) !important;
    font-weight: 700;
}

.title.is-5, .modal-card-title {
    background: linear-gradient(90deg, #fff5cf, #ffd76a 45%, #e5a72b);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent !important;
}

strong {
    color: #fff2bd;
}

/* ---------------- khối nội dung (box/card/modal) ---------------- */
.box, .card, .modal-card, .message {
    background: var(--tet-panel) !important;
    border: 1px solid var(--tet-line);
    border-radius: 16px;
    box-shadow: var(--tet-shadow), inset 0 1px 0 rgba(255, 255, 255, .07);
    backdrop-filter: blur(8px);
    transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}

    .box:hover, .card:hover {
        transform: translateY(-2px);
        border-color: rgba(255, 215, 106, .55);
        box-shadow: 0 24px 52px rgba(0, 0, 0, .55), inset 0 1px 0 rgba(255, 255, 255, .1);
    }

.modal-background {
    background: rgba(8, 2, 6, .78);
}

.modal-card-head, .modal-card-foot {
    background: linear-gradient(180deg, rgba(120, 12, 30, .92), rgba(60, 8, 18, .92)) !important;
    border-color: var(--tet-line) !important;
}

/* ---------------- nút ---------------- */
.button {
    border-radius: 999px;
    font-weight: 700;
    letter-spacing: .3px;
    border: 1px solid rgba(255, 215, 106, .38);
    transition: transform .18s ease, box-shadow .22s ease, filter .22s ease;
}

    .button:hover {
        transform: translateY(-1px);
        filter: brightness(1.08);
        box-shadow: 0 10px 24px rgba(255, 160, 60, .28);
    }

.button.is-link, .button.is-primary, .button.is-danger, .button.is-success, .button.is-warning, .button.is-info {
    background: linear-gradient(180deg, var(--tet-red-soft), var(--tet-red-deep)) !important;
    color: #fff6d8 !important;
    border-color: rgba(255, 215, 106, .55) !important;
    text-shadow: 0 1px 0 rgba(0, 0, 0, .35);
}

.button.is-light, .button.is-white {
    background: linear-gradient(180deg, rgba(255, 243, 200, .96), rgba(255, 215, 106, .9)) !important;
    color: #5a0d1b !important;
    border-color: rgba(255, 255, 255, .5) !important;
}

.button.is-link.is-light, .button.is-primary.is-light, .button.is-danger.is-light,
.button.is-success.is-light, .button.is-warning.is-light {
    background: rgba(255, 215, 106, .12) !important;
    color: var(--tet-gold) !important;
}

/* ---------------- ô nhập ---------------- */
.input, .textarea, .select select, select.select {
    background: rgba(12, 3, 8, .72) !important;
    border-color: rgba(255, 215, 106, .32) !important;
    color: var(--tet-cream) !important;
    border-radius: 10px;
}

    .input::placeholder, .textarea::placeholder {
        color: rgba(255, 236, 207, .45);
    }

    .input:focus, .textarea:focus, .select select:focus {
        border-color: var(--tet-gold) !important;
        box-shadow: 0 0 0 3px rgba(255, 215, 106, .18) !important;
    }

.label {
    color: var(--tet-cream) !important;
}

/* ---------------- diễn đàn ---------------- */
a.post {
    display: block;
    padding: 14px 16px;
    border-radius: 12px;
    border: 1px solid transparent;
    text-decoration: none;
    transition: background .2s ease, border-color .2s ease, transform .2s ease;
}

    a.post:hover {
        background: rgba(255, 215, 106, .07);
        border-color: rgba(255, 215, 106, .28);
        transform: translateX(2px);
    }

    a.post h4 {
        color: var(--tet-cream);
        margin-bottom: 6px;
    }

    a.post .image img {
        border-radius: 50%;
        border: 1px solid var(--tet-line);
        background: rgba(255, 215, 106, .10);
    }

.pagination-link, .pagination-next, .pagination-previous {
    background: rgba(46, 10, 18, .85) !important;
    border-color: var(--tet-line) !important;
    color: var(--tet-cream) !important;
    border-radius: 10px;
}

    .pagination-link.is-current {
        background: linear-gradient(180deg, var(--tet-red-soft), var(--tet-red-deep)) !important;
        border-color: var(--tet-gold) !important;
        color: #fff3c4 !important;
    }

/* ---------------- bảng (quản trị) ---------------- */
.table {
    background: transparent !important;
    color: var(--tet-ink) !important;
}

    .table th {
        background: rgba(120, 12, 30, .55) !important;
        color: #ffe9b8 !important;
        border-color: rgba(255, 215, 106, .22) !important;
    }

    .table td, .table tr {
        border-color: rgba(255, 215, 106, .14) !important;
        background: transparent !important;
        color: var(--tet-ink) !important;
    }

    .table.is-striped tbody tr:nth-child(even) {
        background: rgba(255, 215, 106, .05) !important;
    }

.tag {
    border-radius: 999px;
    border: 1px solid rgba(255, 215, 106, .28);
    background: rgba(255, 215, 106, .10);
    color: var(--tet-cream);
}

hr {
    background: linear-gradient(90deg, transparent, var(--tet-line), transparent) !important;
    height: 1px;
}

footer {
    color: rgba(255, 236, 207, .8);
    padding: 10px 0 26px;
}

    footer a {
        color: var(--tet-gold);
    }

/* ---------------- trang trí: câu đối hai bên ---------------- */
.tet-couplets {
    position: fixed;
    top: 96px;
    bottom: 40px;
    width: 46px;
    z-index: 2;
    pointer-events: none;
    /* (W5) gợi ý trình duyệt tối ưu cho hiệu ứng parallax ở tet.js */
    will-change: transform, opacity;
    backface-visibility: hidden;
    display: flex;
    align-items: flex-start;
    justify-content: center;
}

    .tet-couplets.left {
        left: max(6px, calc(50vw - 660px));
    }

    .tet-couplets.right {
        right: max(6px, calc(50vw - 660px));
    }

    .tet-couplets span {
        writing-mode: vertical-rl;
        text-orientation: upright;
        letter-spacing: 6px;
        font-size: 15px;
        font-weight: 700;
        color: #3d0a12;
        padding: 16px 8px;
        border-radius: 8px;
        background: linear-gradient(180deg, #ffe9a8, #ffd056 55%, #e0a52c);
        box-shadow: 0 10px 26px rgba(0, 0, 0, .45), inset 0 0 0 2px rgba(120, 20, 10, .35);
        border: 2px solid #b3122b;
    }

@media (max-width: 1320px) {
    .tet-couplets {
        display: none;
    }
}

/* ---------------- hero trang chủ ---------------- */
.tet-hero {
    position: relative;
    margin: 6px 0 18px;
    padding: 26px 26px 24px;
    border-radius: 20px;
    overflow: hidden;
    border: 1px solid rgba(255, 215, 106, .42);
    background:
        radial-gradient(600px 220px at 12% 0%, rgba(255, 190, 90, .28), transparent 65%),
        linear-gradient(135deg, rgba(120, 10, 26, .92), rgba(48, 6, 14, .92));
    box-shadow: var(--tet-shadow), inset 0 1px 0 rgba(255, 255, 255, .08);
}

    .tet-hero::after {
        content: "";
        position: absolute;
        inset: 0;
        background: url("/Upload/Images/tet-bg.svg") center 42% / cover no-repeat;
        opacity: .28;
        mask-image: linear-gradient(90deg, transparent 42%, #000 100%);
        -webkit-mask-image: linear-gradient(90deg, transparent 42%, #000 100%);
        pointer-events: none;
    }

    .tet-hero > * {
        position: relative;
        z-index: 1;
    }

.tet-hero-title {
    font-size: clamp(24px, 3.6vw, 40px);
    line-height: 1.15;
    margin: 0 0 8px;
    background: linear-gradient(92deg, #fff8dd, #ffd76a 40%, #ffb03a 70%, #ffe9a8);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    text-shadow: 0 6px 24px rgba(255, 150, 60, .25);
    font-weight: 700;
}

.tet-hero-sub {
    color: rgba(255, 236, 207, .92);
    max-width: 62ch;
    font-size: 15px;
}

.tet-hero-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 16px;
}

    .tet-hero-badges a {
        display: inline-flex;
        align-items: center;
        gap: 8px;
        padding: 9px 18px;
        border-radius: 999px;
        font-weight: 700;
        text-decoration: none;
        color: #5a0d1b;
        background: linear-gradient(180deg, #fff3c9, #ffd056 60%, #e0a52c);
        border: 1px solid rgba(255, 255, 255, .5);
        box-shadow: 0 8px 20px rgba(255, 170, 60, .28);
        transition: transform .18s ease, box-shadow .22s ease;
    }

        .tet-hero-badges a:hover {
            transform: translateY(-2px);
            box-shadow: 0 14px 28px rgba(255, 170, 60, .38);
        }

    .tet-hero-badges a.ghost {
        background: rgba(255, 215, 106, .12);
        color: #ffe9b8;
        border-color: rgba(255, 215, 106, .45);
        box-shadow: none;
    }

/* ---------------- thông báo ---------------- */
.message-header {
    background: linear-gradient(180deg, var(--tet-red-soft), var(--tet-red-deep)) !important;
    color: #fff3c9 !important;
}

.message-body {
    border-color: var(--tet-line) !important;
    color: var(--tet-ink) !important;
}

/* ---------------- cuộn ---------------- */
::-webkit-scrollbar {
    width: 11px;
    height: 11px;
}

::-webkit-scrollbar-track {
    background: rgba(10, 2, 8, .7);
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, var(--tet-red-soft), var(--tet-red-deep));
    border-radius: 999px;
    border: 2px solid rgba(10, 2, 8, .7);
}

    ::-webkit-scrollbar-thumb:hover {
        background: linear-gradient(180deg, var(--tet-gold), var(--tet-gold-deep));
    }

/* ---------------- tôn trọng giảm chuyển động ---------------- */
@media (prefers-reduced-motion: reduce) {
    .box:hover, .card:hover, .button:hover, a.post:hover {
        transform: none;
    }
}

/* ---------------- màn hình nhỏ ---------------- */
@media (max-width: 768px) {
    .grid {
        grid-template-columns: 1fr !important;
    }

    .tet-hero {
        padding: 20px 18px;
        border-radius: 16px;
    }

    .navbar-item img {
        max-height: 44px;
    }
}
