
:root {
    --amber: #ffb54d;
    --amber-2: #c98a2f;
    --nav-bg: rgba(0, 0, 0, .6);
}

html, body {
    height: 80%;

}

body.bg-game {
    background: url('../image/detail.png') no-repeat top center;
    background-size: cover; /* co giãn ảnh che toàn màn hình */
    background-attachment: fixed; /* ảnh cố định khi scroll */
}

.bg-wrapper {
    background: #0b0b0b url('../image/bg.jpg') no-repeat top center;
    background-size: 100% auto;
    min-height: 100vh;
}

bg-overlay {
    position: absolute;
    inset: 0;
    height: 100%;
    pointer-events: none;
    background: radial-gradient(ellipse at center, rgba(0, 0, 0, .25), rgba(0, 0, 0, .65) 55%, rgba(0, 0, 0, .85) 100%);
}

.nav-wrap {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: var(--nav-bg);
    backdrop-filter: blur(6px);
}

.navbar .navbar-brand {
    letter-spacing: .12em;
}

.navbar .nav-link {
    font-weight: 600;
    letter-spacing: .05em;
    padding: .75rem 1rem;
    color: #eaeaea;
}

.navbar .nav-link.active, .navbar .nav-link:hover {
    color: var(--amber);
}

.main-menu .nav-link {
    text-transform: uppercase;
}

.btn-auth {
    /*padding: .6rem 1.2rem;*/
    border-radius: .5rem;
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: .04em;
}

.btn-amber {
    color: #1a1a1a;
    background: linear-gradient(180deg, var(--amber), var(--amber-2));
    border: 1px solid rgba(255, 255, 255, .15);
    box-shadow: inset 0 0 10px rgba(255, 255, 255, .15), 0 0 30px rgba(255, 181, 77, .15);
}

.btn-amber:hover {
    filter: brightness(1.05);
}

.btn-outline-amber {
    color: var(--amber);
    border: 1px solid var(--amber-2);
    background: rgba(255, 181, 77, .08);
}

.btn-outline-amber:hover {
    background: rgba(255, 181, 77, .18);
    color: #ffd79c;
}

.content-shell {
    position: relative;
    z-index: 1;
    /*padding-top: 17rem;*/
    padding-bottom: 3rem;
}

.card {
    border-radius: 1rem;
    background: rgba(0, 0, 0, .45);
    border: 1px solid rgba(255, 255, 255, .08);
    color: #eaeaea;
}

.card .btn {
    border-radius: .6rem;
}

.form-control, .form-select {
    background: rgba(255, 255, 255, .06);
    color: #eaeaea;
    border-color: rgba(255, 255, 255, .15);
}

.form-control:focus, .form-select:focus {
    box-shadow: 0 0 0 .2rem rgba(255, 181, 77, .15);
    border-color: var(--amber);
}

.img-fluid, .card-img-top {
    border-radius: .75rem;
}

.footer {
    border-top: 1px solid rgba(255, 255, 255, .1);
    font-size: 0.9rem;
}

.footer img {
    filter: drop-shadow(0 0 3px rgba(0, 0, 0, .6));
}

/* Panels on home */
.home-top .panel {
    min-height: 50px;
}

.panel {
    background: rgba(0, 0, 0, .55);
    border: 1px solid rgba(255, 255, 255, .08);
    border-radius: 1rem;
    padding: 0.2rem 0.5rem;
    color: #eee;
}

.panel__title {
    font-weight: 800;
    letter-spacing: .06em;
    color: #ffb54d;
    text-transform: uppercase;
}

.panel__sub {
    color: #d9d9d9;
    opacity: .85;
}

.panel--status .progress {
    background: rgba(255, 255, 255, .12);
}

.panel--status .progress-bar {
    background: linear-gradient(180deg, #ffb54d, #c98a2f);
}

.status-dot {
    width: 10px;
    height: 10px;
    border-radius: 999px;
}

.status-dot.online {
    background: #2ecc71;
    box-shadow: 0 0 8px #2ecc71;
}

.status-dot.offline {
    background: #e74c3c;
    box-shadow: 0 0 8px #e74c3c;
}

.feature-card {
    border-radius: 1rem;
    overflow: hidden;
    background: rgba(0, 0, 0, .45);
    border: 1px solid rgba(255, 255, 255, .08);
}

.carousel-caption {
    background: linear-gradient(180deg, rgba(0, 0, 0, .35), rgba(0, 0, 0, .75));
    border-radius: .75rem;
    padding: 1rem 1.25rem;
}

.panel--announce .announce-row {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: .75rem;
    align-items: center;
    padding: .6rem .25rem;
    border-bottom: 1px dashed rgba(255, 255, 255, .1);
}

.panel--announce .announce-row:last-child {
    border-bottom: 0;
}

.panel--announce .tag {
    color: #ffb54d;
    font-weight: 700;
}

.panel--announce .title {
    color: #eaeaea;
    text-decoration: none;
}

.panel--announce .title:hover {
    color: #ffd79c;
}

.panel--announce .date {
    color: #bfbfbf;
}

/* Buttons (re-use header styles) */
.btn-amber {
    color: #1a1a1a;
    background: linear-gradient(180deg, #ffb54d, #c98a2f);
    border: 1px solid rgba(255, 255, 255, .15);
    border-radius: .6rem;
    font-weight: 800;
    text-transform: uppercase;
}

.rank-card {
    border-radius: 1rem;
    background-size: cover;
    background-position: center;
    padding: 1rem;
    color: #fff;
    position: relative;
    overflow: hidden;
    min-height: 700px;
}

.rank-card::before {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, .45);
}

.rank-card > * {
    position: relative;
    z-index: 1;
}

.rank-title {
    color: #ffb54d;
    font-weight: 800;
    text-transform: uppercase;
    margin-bottom: .5rem;
    text-shadow: 0 0 6px #000;
}

.rank-card table {
    background: transparent;
    border-radius: .5rem;
}

.rank-card th {
    font-size: .8rem;
    text-transform: uppercase;
    color: #ffb54d;
    background: transparent;
}

.rank-card td {
    font-size: .85rem;
    background: transparent;
}


.text-amber {
    color: var(--amber);
}

.auth-modal .modal-backdrop {
    opacity: .85;
}

.modal-backdrop.show {
    opacity: .85;
}

.auth-panel {
    background: #ffffff url('../image/pattern.png') repeat; /* tuỳ chọn: bỏ nếu không có pattern */
    border: 1px solid rgba(255, 255, 255, .08);
    border-radius: 1rem;
    box-shadow: 0 10px 50px rgba(0, 0, 0, .6), inset 0 -6px 0 rgba(255, 181, 77, .08);
    color: #eaeaea;
    position: relative;
    overflow: hidden;
    max-width: 500px;
    margin: 1.5rem auto;
}

.auth-close {
    position: absolute;
    top: .75rem;
    right: .75rem;
    filter: drop-shadow(0 0 4px rgba(0, 0, 0, .6));
}

.auth-header {
    padding-top: 1.5rem;
}

.auth-body {
    padding: 1.25rem 2rem 2rem;
}

.auth-input {
    background: rgba(0, 0, 0, .35);
    border: 1px solid rgba(255, 255, 255, .12);
    color: #eee;
    box-shadow: 0 0 0 .2rem transparent;
}

.auth-input:focus {
    border-color: var(--amber);
    box-shadow: 0 0 0 .2rem rgba(255, 181, 77, .18);
}

/* ============ Post Detail ============ */
.post-detail {
    padding: 2rem 0 3rem;
    margin-top: -250px; /*  */
    position: relative;
    z-index: 2;
}

.post-body.md-content {
    background: rgba(0, 0, 0, .55);
}

.post-frame {
    max-width: 980px;
    position: relative;
}

/* Hai cột viền vàng hai bên như demo */
.post-frame::before,
.post-frame::after {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    width: 6px;
    background: linear-gradient(180deg, rgba(255, 181, 77, .8), rgba(255, 181, 77, .15));
    border-radius: 6px;
    filter: drop-shadow(0 0 6px rgba(255, 181, 77, .35));
}

.post-frame::before {
    left: -24px;
}

.post-frame::after {
    right: -24px;
}

/* Header */
.post-kicker {
    font-weight: 800;
    letter-spacing: .06em;
    color: #f0f0f0;
    margin-bottom: .25rem;
    text-transform: uppercase;
}

.post-title {
    font-weight: 900;
    letter-spacing: .02em;
    margin: 0;
    color: #ffd79c;
    text-transform: uppercase;
    text-shadow: 0 2px 0 rgba(0, 0, 0, .6);
    font-size: clamp(1.5rem, 2.8vw, 2rem);
}

.post-meta {
    color: #cfcfcf;
    opacity: .85;
    margin-top: .3rem;
    font-size: .95rem;
}

.post-rule {
    height: 2px;
    border: 0;
    margin: 1rem auto 1.25rem;
    max-width: 640px;
    background: linear-gradient(90deg, transparent, rgba(255, 181, 77, .7), transparent);
}

/* Nội dung Markdown */
.md-content {
    background: rgba(0, 0, 0, .35);
    border: 1px solid rgba(255, 255, 255, .08);
    border-radius: .75rem;
    padding: 1.25rem 1.2rem;
    color: #eaeaea;
    line-height: 1.7;
}

.md-content h1, .md-content h2, .md-content h3, .md-content h4 {
    color: #ffcc80;
    font-weight: 800;
    margin-top: 1.2rem;
    text-transform: none;
    letter-spacing: .01em;
}

.md-content p {
    margin: .5rem 1rem;
}

.md-content a {
    color: #ffb54d;
    text-decoration: underline;
}

.md-content a:hover {
    color: #ffd79c;
}

.md-content ul {
    padding-left: 1.2rem;
    margin-bottom: 1rem;
}

.md-content li {
    margin: .25rem 0;
}

/* Ảnh trong bài */
.md-content img {
    display: block;
    max-width: 100%;
    height: auto;
    border-radius: .5rem;
    margin: .75rem auto 1rem;
    box-shadow: 0 8px 30px rgba(0, 0, 0, .35);
}

/* Bảng/blockquote nếu có */
.md-content table {
    width: 100%;
    border-collapse: collapse;
    margin: .75rem 0 1rem;
}

.md-content th, .md-content td {
    border: 1px solid rgba(255, 255, 255, .12);
    padding: .5rem .6rem;
    vertical-align: top;
}

.md-content blockquote {
    border-left: 4px solid rgba(255, 181, 77, .6);
    padding: .4rem .9rem;
    margin: .75rem 0;
    color: #f3f3f3;
    background: rgba(255, 181, 77, .06);
}

/* Mobile: nới padding cho dễ đọc */
@media (max-width: 576px) {
    .post-frame::before, .post-frame::after {
        display: none;
    }

    .md-content {
        padding: 1rem;
    }
}

/* ----- Post Detail (giữ các rule trước đó nếu bạn đã thêm) ----- */

/* Khối bài viết dùng nền khung */
.post-body.frame-bg {
    position: relative;
    margin: 0 auto 2rem;
    width: 100%;
    max-width: 980px;
    aspect-ratio: 1049 / 768; /* giữ tỉ lệ khung */
    background: url('../image/post-frame.png') center /  no-repeat;
    filter: drop-shadow(0 10px 30px rgba(0, 0, 0, .35));
}

/* Vùng thật đặt nội dung markdown bên trong khung */
.post-body.frame-bg .frame-inner {
    position: absolute;
    /* canh lề khớp với phần giấy vàng bên trong khung */
    left: 12%;
    right: 12%;
    top: 14%;
    bottom: 14%;
    overflow: auto; /* nếu bài dài sẽ có scrollbar trong khung */
}

/* Bỏ nền/viền cũ của md-content khi nằm trong khung */
.post-body.frame-bg .md-content {
    background: transparent;
    border: 0;
    padding: 0;
    color: #2b1e12; /* chữ đậm hơn trên nền giấy */
    line-height: 1.7;
}

/* Tinh chỉnh heading/liên kết/ảnh trong nội dung */
.post-body.frame-bg .md-content h1,
.post-body.frame-bg .md-content h2,
.post-body.frame-bg .md-content h3 {
    color: #7a3b00; /* tông nâu vàng */
    margin: .5rem 0 .25rem;
    text-transform: none;
}

.post-body.frame-bg .md-content a {
    color: #b25a00;
    text-decoration: underline;
}

.post-body.frame-bg .md-content img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: .5rem auto;
    border-radius: .25rem;
    box-shadow: 0 6px 20px rgba(0, 0, 0, .15);
}

/* Mobile: nới lề bên trong cho dễ đọc, bỏ aspect-ratio nếu cần */
@media (max-width: 576px) {
    .post-body.frame-bg {
        aspect-ratio: auto;
        background-size: cover;
        padding-top: 36vw; /* tạo phần trên của khung */
        padding-bottom: 36vw; /* phần dưới của khung */
    }

    .post-body.frame-bg .frame-inner {
        position: static;
        margin: 0 10%;
        max-height: none;
        overflow: visible;
    }

    .dl-wrap {
        padding-top: 1rem !important;
    }
}




