/* =====================================================================
   DBWULIN DESIGN SYSTEM  v2  ·  "Crimson Arena Pro"
   ---------------------------------------------------------------------
   Dung chung cho  /landing  ·  /home  ·  /forum
   Nen TRANG · VIEN DO · phong cach GAME nhung tiet che, chuyen nghiep.
   File nay chi khai bao TOKEN + COMPONENT trung tinh (tien to .dbw-),
   khong ghi de style cu cua tung app (viec do nam o theme tung app).
   ===================================================================== */
@import url('https://fonts.googleapis.com/css2?family=Be+Vietnam+Pro:wght@400;500;600;700;800&family=Oswald:wght@500;600;700&display=swap');

:root {
    /* --- mau --- */
    --dbw-red:        #c8102e;
    --dbw-red-600:    #a80d26;
    --dbw-red-700:    #8b0a1f;
    --dbw-red-900:    #4a0410;
    --dbw-red-400:    #e8334f;
    --dbw-red-100:    #ffe4e8;
    --dbw-red-50:     #fff5f6;
    --dbw-red-line:   rgba(200, 16, 46, .32);
    --dbw-red-glow:   rgba(200, 16, 46, .22);

    --dbw-gold:       #d4a24c;
    --dbw-gold-600:   #b8862f;
    --dbw-gold-100:   #fbf1dc;

    --dbw-green:      #16a34a;
    --dbw-blue:       #2563eb;

    --dbw-ink:        #15181d;
    --dbw-ink-2:      #3b4252;
    --dbw-ink-3:      #6b7280;
    --dbw-ink-4:      #9aa3b2;

    --dbw-white:      #ffffff;
    --dbw-bg:         #f6f7f9;
    --dbw-bg-2:       #eef0f3;
    --dbw-line:       #e5e7eb;
    --dbw-line-2:     #d7dbe2;

    /* --- chu --- */
    --dbw-font:       "Be Vietnam Pro", "Inter", "Segoe UI", system-ui, -apple-system, Roboto,
                      "Noto Sans", "PingFang SC", "Microsoft YaHei", sans-serif;
    --dbw-display:    "Oswald", "Bebas Neue", "Arial Narrow", "Segoe UI", Impact, sans-serif;

    /* --- hinh khoi --- */
    --dbw-radius:     10px;
    --dbw-radius-sm:  6px;
    --dbw-radius-lg:  14px;
    --dbw-shadow-sm:  0 1px 2px rgba(21, 24, 29, .05), 0 2px 8px rgba(21, 24, 29, .05);
    --dbw-shadow:     0 6px 20px rgba(21, 24, 29, .08);
    --dbw-shadow-lg:  0 18px 44px rgba(21, 24, 29, .14);
    --dbw-shadow-red: 0 8px 22px rgba(200, 16, 46, .25);

    --dbw-grad-red:   linear-gradient(180deg, #e8334f 0%, #c8102e 55%, #a80d26 100%);
    --dbw-grad-red-h: linear-gradient(90deg, #8b0a1f 0%, #c8102e 50%, #8b0a1f 100%);
    --dbw-grad-dark:  linear-gradient(135deg, #2a0a10 0%, #4a0410 60%, #6e0818 100%);
    --dbw-grad-gold:  linear-gradient(180deg, #e9c173 0%, #d4a24c 55%, #b8862f 100%);

    --dbw-clip:       polygon(10px 0, 100% 0, calc(100% - 10px) 100%, 0 100%);
    --dbw-clip-sm:    polygon(6px 0, 100% 0, calc(100% - 6px) 100%, 0 100%);

    --dbw-container:  1200px;
    --dbw-ease:       cubic-bezier(.2, .7, .2, 1);
}

/* =========================================================
   TYPOGRAPHY helpers
   ========================================================= */
.dbw-display { font-family: var(--dbw-display); letter-spacing: .04em; text-transform: uppercase; font-weight: 600; }
.dbw-kicker {
    display: inline-flex; align-items: center; gap: 8px;
    font-family: var(--dbw-display); font-size: 12px; letter-spacing: .22em; text-transform: uppercase;
    color: var(--dbw-red); font-weight: 600;
}
.dbw-kicker::before { content: ""; width: 22px; height: 2px; background: var(--dbw-red); }
.dbw-muted { color: var(--dbw-ink-3); }
.dbw-red { color: var(--dbw-red); }

/* tieu de khoi: thanh do ben trai + duoi gach mo */
.dbw-section-title {
    position: relative; display: flex; align-items: center; gap: 12px; margin: 0;
    font-family: var(--dbw-display); font-size: 20px; letter-spacing: .06em; text-transform: uppercase;
    color: var(--dbw-ink); font-weight: 600; line-height: 1.1;
}
.dbw-section-title::before { content: ""; width: 4px; height: 22px; background: var(--dbw-red); border-radius: 2px; flex: 0 0 auto; }
.dbw-section-title small { font-family: var(--dbw-font); font-size: 13px; letter-spacing: 0; text-transform: none; color: var(--dbw-ink-3); font-weight: 500; }

/* =========================================================
   BUTTONS
   ========================================================= */
.dbw-btn {
    --_h: 40px;
    position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    height: var(--_h); padding: 0 20px; border-radius: var(--dbw-radius-sm);
    font-family: var(--dbw-font); font-size: 14px; font-weight: 700; letter-spacing: .01em; line-height: 1;
    text-decoration: none; cursor: pointer; white-space: nowrap; user-select: none;
    border: 1px solid transparent; transition: transform .15s var(--dbw-ease), box-shadow .2s, filter .2s, background .2s, color .2s;
}
.dbw-btn:active { transform: translateY(1px); }
.dbw-btn:focus-visible { outline: 3px solid var(--dbw-red-glow); outline-offset: 2px; }
.dbw-btn--sm { --_h: 32px; padding: 0 14px; font-size: 13px; }
.dbw-btn--lg { --_h: 48px; padding: 0 28px; font-size: 15px; }
.dbw-btn--block { width: 100%; }

.dbw-btn--primary {
    background: var(--dbw-grad-red); color: #fff !important; border-color: var(--dbw-red-600);
    box-shadow: inset 0 1px 0 rgba(255,255,255,.28), var(--dbw-shadow-red);
    text-shadow: 0 1px 1px rgba(0,0,0,.18);
}
.dbw-btn--primary:hover { filter: brightness(1.06); box-shadow: inset 0 1px 0 rgba(255,255,255,.3), 0 10px 26px rgba(200,16,46,.32); }

.dbw-btn--outline { background: #fff; color: var(--dbw-red) !important; border-color: var(--dbw-red); }
.dbw-btn--outline:hover { background: var(--dbw-red-50); }

.dbw-btn--ghost { background: transparent; color: var(--dbw-ink-2) !important; border-color: var(--dbw-line-2); }
.dbw-btn--ghost:hover { border-color: var(--dbw-red); color: var(--dbw-red) !important; background: var(--dbw-red-50); }

.dbw-btn--dark { background: var(--dbw-ink); color: #fff !important; border-color: var(--dbw-ink); }
.dbw-btn--dark:hover { background: #262b33; }

.dbw-btn--gold { background: var(--dbw-grad-gold); color: #3a2a10 !important; border-color: var(--dbw-gold-600); box-shadow: inset 0 1px 0 rgba(255,255,255,.4), 0 6px 16px rgba(212,162,76,.3); }

.dbw-btn--white { background: #fff; color: var(--dbw-red) !important; border-color: #fff; box-shadow: 0 8px 22px rgba(0,0,0,.18); }
.dbw-btn--white:hover { background: var(--dbw-red-50); }

/* kieu "game": goc vat */
.dbw-btn--clip { border-radius: 0; clip-path: var(--dbw-clip); border: 0; }
/* anh sang quet qua khi hover */
.dbw-btn--shine { overflow: hidden; }
.dbw-btn--shine::after {
    content: ""; position: absolute; top: -40%; bottom: -40%; left: -30%; width: 30%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,.35), transparent);
    transform: skewX(-20deg); transition: left .55s var(--dbw-ease);
}
.dbw-btn--shine:hover::after { left: 120%; }

/* =========================================================
   CARD / PANEL
   ========================================================= */
.dbw-card {
    position: relative; background: #fff; border: 1px solid var(--dbw-red-line); border-radius: var(--dbw-radius);
    box-shadow: var(--dbw-shadow-sm); color: var(--dbw-ink);
}
.dbw-card--plain { border-color: var(--dbw-line); }
.dbw-card--hover { transition: transform .18s var(--dbw-ease), box-shadow .2s, border-color .2s; }
.dbw-card--hover:hover { transform: translateY(-3px); border-color: var(--dbw-red); box-shadow: var(--dbw-shadow); }
.dbw-card--accent { border-top: 3px solid var(--dbw-red); }
.dbw-card__head {
    display: flex; align-items: center; gap: 10px; min-height: 48px; padding: 0 16px;
    border-bottom: 1px solid var(--dbw-line); border-radius: var(--dbw-radius) var(--dbw-radius) 0 0; background: #fff;
}
.dbw-card__head--red { background: var(--dbw-grad-red-h); color: #fff; border-bottom: 0; }
.dbw-card__head--red .dbw-card__title { color: #fff; }
.dbw-card__head--red .dbw-card__title::before { background: #fff; }
.dbw-card__head--red .dbw-card__more { color: #fff; }
.dbw-card__head--soft { background: var(--dbw-red-50); border-bottom-color: var(--dbw-red-line); }
.dbw-card__title {
    display: flex; align-items: center; gap: 10px; margin: 0;
    font-family: var(--dbw-display); font-size: 16px; letter-spacing: .06em; text-transform: uppercase; font-weight: 600; color: var(--dbw-ink); line-height: 1;
}
.dbw-card__title::before { content: ""; width: 3px; height: 16px; background: var(--dbw-red); border-radius: 2px; }
.dbw-card__sub { font-size: 12px; color: var(--dbw-ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dbw-card__head--red .dbw-card__sub { color: rgba(255,255,255,.85); }
.dbw-card__more { margin-left: auto; font-size: 12px; font-weight: 700; color: var(--dbw-red); text-decoration: none; white-space: nowrap; display: inline-flex; align-items: center; gap: 4px; }
.dbw-card__more:hover { text-decoration: underline; }
.dbw-card__body { padding: 16px; }
.dbw-card__foot { padding: 10px 16px; border-top: 1px solid var(--dbw-line); background: var(--dbw-bg); border-radius: 0 0 var(--dbw-radius) var(--dbw-radius); }

/* goc HUD (trang tri game) - them class .dbw-hud vao the */
.dbw-hud::before, .dbw-hud::after {
    content: ""; position: absolute; width: 14px; height: 14px; border: 2px solid var(--dbw-red); pointer-events: none; z-index: 2;
}
.dbw-hud::before { top: -1px; left: -1px; border-right: 0; border-bottom: 0; border-top-left-radius: var(--dbw-radius); }
.dbw-hud::after  { right: -1px; bottom: -1px; border-left: 0; border-top: 0; border-bottom-right-radius: var(--dbw-radius); }

/* =========================================================
   BADGE / TAG / CHIP
   ========================================================= */
.dbw-tag {
    display: inline-flex; align-items: center; height: 20px; padding: 0 8px; flex: 0 0 auto;
    font-size: 11px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; color: #fff; background: var(--dbw-red);
    clip-path: var(--dbw-clip-sm); white-space: nowrap; max-width: 140px; overflow: hidden; text-overflow: ellipsis;
}
.dbw-tag--dark { background: var(--dbw-red-900); }
.dbw-tag--gold { background: var(--dbw-gold-600); }
.dbw-tag--ink  { background: var(--dbw-ink); }
.dbw-tag--soft { background: var(--dbw-red-100); color: var(--dbw-red); }
.dbw-tag--outline { background: #fff; color: var(--dbw-red); box-shadow: inset 0 0 0 1px var(--dbw-red); }
.dbw-tag--green { background: var(--dbw-green); }
.dbw-tag--blue  { background: var(--dbw-blue); }

.dbw-badge {
    display: inline-flex; align-items: center; gap: 4px; height: 22px; padding: 0 9px; border-radius: 999px;
    font-size: 11px; font-weight: 700; background: var(--dbw-red-50); color: var(--dbw-red); border: 1px solid var(--dbw-red-line);
}
.dbw-badge--vip { background: var(--dbw-grad-red); color: #fff; border-color: var(--dbw-red-600); letter-spacing: .06em; }
.dbw-badge--gold { background: var(--dbw-grad-gold); color: #3a2a10; border-color: var(--dbw-gold-600); }

.dbw-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--dbw-green); box-shadow: 0 0 0 3px rgba(22,163,74,.18); }
.dbw-dot--pulse { animation: dbwPulse 1.6s infinite; }
.dbw-dot--red { background: var(--dbw-red); box-shadow: 0 0 0 3px var(--dbw-red-glow); }
@keyframes dbwPulse { 0%,100% { opacity: 1 } 50% { opacity: .4 } }

/* =========================================================
   STAT / NUMBERS
   ========================================================= */
.dbw-stat { display: flex; flex-direction: column; gap: 2px; }
.dbw-stat__num { font-family: var(--dbw-display); font-size: 26px; font-weight: 600; color: var(--dbw-ink); line-height: 1; }
.dbw-stat__lbl { font-size: 12px; color: var(--dbw-ink-3); }
.dbw-stat--red .dbw-stat__num { color: var(--dbw-red); }

/* =========================================================
   AVATAR
   ========================================================= */
.dbw-avatar { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; display: block; background: var(--dbw-bg-2); border: 2px solid #fff; box-shadow: 0 0 0 2px var(--dbw-red); }
.dbw-avatar--lg { width: 72px; height: 72px; }
.dbw-avatar--xl { width: 104px; height: 104px; border-width: 3px; }
.dbw-avatar--sm { width: 32px; height: 32px; box-shadow: 0 0 0 1px var(--dbw-red-line); }

/* =========================================================
   FORM
   ========================================================= */
.dbw-input {
    width: 100%; height: 42px; padding: 0 14px; border: 1px solid var(--dbw-line-2); border-radius: var(--dbw-radius-sm);
    background: #fff; color: var(--dbw-ink); font: 500 14px/1 var(--dbw-font); outline: none; transition: border-color .15s, box-shadow .15s;
}
.dbw-input:focus { border-color: var(--dbw-red); box-shadow: 0 0 0 3px var(--dbw-red-glow); }
.dbw-input::placeholder { color: var(--dbw-ink-4); }
.dbw-search { position: relative; display: flex; align-items: center; }
.dbw-search .dbw-input { padding-right: 44px; }
.dbw-search__btn { position: absolute; right: 4px; top: 4px; bottom: 4px; width: 36px; border: 0; border-radius: 5px; background: var(--dbw-grad-red); color: #fff; cursor: pointer; display: flex; align-items: center; justify-content: center; }

/* =========================================================
   LIST ROWS (thread / board)
   ========================================================= */
.dbw-row {
    display: flex; align-items: center; gap: 14px; padding: 12px 16px; border-bottom: 1px solid var(--dbw-line);
    color: var(--dbw-ink); text-decoration: none; transition: background .15s;
}
.dbw-row:last-child { border-bottom: 0; }
.dbw-row:hover { background: var(--dbw-red-50); }
.dbw-row__main { flex: 1 1 auto; min-width: 0; }
.dbw-row__title { font-size: 14px; font-weight: 600; line-height: 1.4; display: flex; align-items: center; gap: 8px; min-width: 0; }
.dbw-row__title .txt { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dbw-row:hover .dbw-row__title .txt { color: var(--dbw-red); }
.dbw-row__meta { margin-top: 3px; font-size: 12px; color: var(--dbw-ink-3); display: flex; gap: 12px; flex-wrap: wrap; }
.dbw-row__meta b { color: var(--dbw-ink-2); font-weight: 600; }
.dbw-row__side { flex: 0 0 auto; text-align: right; font-size: 12px; color: var(--dbw-ink-3); white-space: nowrap; }
.dbw-row__icon {
    width: 40px; height: 40px; flex: 0 0 auto; border-radius: var(--dbw-radius-sm); display: flex; align-items: center; justify-content: center;
    background: var(--dbw-red-50); border: 1px solid var(--dbw-red-line); color: var(--dbw-red); font-size: 18px;
}

/* =========================================================
   TABS
   ========================================================= */
.dbw-tabs { display: flex; gap: 2px; border-bottom: 2px solid var(--dbw-line); }
.dbw-tab {
    position: relative; padding: 10px 16px; margin-bottom: -2px; font-size: 14px; font-weight: 600; color: var(--dbw-ink-3);
    border-bottom: 2px solid transparent; cursor: pointer; background: none; border-top: 0; border-left: 0; border-right: 0; font-family: inherit;
}
.dbw-tab:hover { color: var(--dbw-red); }
.dbw-tab.is-active { color: var(--dbw-red); border-bottom-color: var(--dbw-red); }

/* =========================================================
   MISC
   ========================================================= */
.dbw-divider { height: 1px; background: var(--dbw-line); margin: 16px 0; }
.dbw-divider--red { background: linear-gradient(90deg, transparent, var(--dbw-red) 20%, var(--dbw-red) 80%, transparent); opacity: .5; }
.dbw-empty { padding: 32px 16px; text-align: center; color: var(--dbw-ink-3); font-size: 13px; }
.dbw-empty::before { content: "—"; display: block; font-size: 22px; color: var(--dbw-red-line); margin-bottom: 4px; }
.dbw-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.dbw-grid { display: grid; gap: 16px; }
.dbw-grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.dbw-grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.dbw-grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 900px) { .dbw-grid--3, .dbw-grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .dbw-grid--2, .dbw-grid--3, .dbw-grid--4 { grid-template-columns: 1fr; } }

/* nen luoi game mo (dat len body/section) */
.dbw-bg-grid {
    background-color: var(--dbw-bg);
    background-image:
        radial-gradient(900px 360px at 50% -60px, rgba(200,16,46,.08), transparent 70%),
        linear-gradient(rgba(21,24,29,.035) 1px, transparent 1px),
        linear-gradient(90deg, rgba(21,24,29,.035) 1px, transparent 1px);
    background-size: auto, 40px 40px, 40px 40px;
    background-repeat: no-repeat, repeat, repeat;
}
/* soc cheo mo cho nen do */
.dbw-stripes { background-image: repeating-linear-gradient(135deg, rgba(255,255,255,.06) 0 12px, transparent 12px 24px); }

/* thanh scrollbar nhe */
.dbw-scroll::-webkit-scrollbar { width: 6px; height: 6px; }
.dbw-scroll::-webkit-scrollbar-thumb { background: var(--dbw-red-line); border-radius: 6px; }
.dbw-scroll::-webkit-scrollbar-track { background: transparent; }

/* hieu ung xuat hien */
@keyframes dbwFadeUp { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.dbw-fade-up { animation: dbwFadeUp .5s var(--dbw-ease) both; }
@media (prefers-reduced-motion: reduce) { .dbw-fade-up { animation: none; } .dbw-btn--shine::after { display: none; } }
