/* ============================================================
   NROLORD - Mystical Dark Mode / Beerus-inspired Theme
   Gợi ý 3: xanh đen + surface lạnh + tím neon CTA
   Loaded after style.css so legacy colors are normalized here.
   ============================================================ */
:root {
    --theme-bg: #1c1f26;
    --theme-bg-deep: #10141b;
    --theme-surface: #242a35;
    --theme-surface-2: #2c3340;
    --theme-surface-soft: #313948;
    --theme-accent: #9b59b6;
    --theme-accent-strong: #b06ed0;
    --theme-accent-dark: #7d3c98;
    --theme-accent-alt: #8e44ad;
    --theme-text: #f7f3fb;
    --theme-text-soft: #e2d9ea;
    --theme-muted: #b8a9c5;
    --theme-line: rgba(155, 89, 182, .48);
    --theme-line-soft: rgba(155, 89, 182, .20);
    --theme-shadow: rgba(0, 0, 0, .42);
    --theme-glow: rgba(155, 89, 182, .28);
}

html, body { color: var(--theme-text); }
body {
    background-color: var(--theme-bg) !important;
    background-image:
        linear-gradient(rgba(28,31,38,.88), rgba(16,20,27,.94)),
        url(../images/background.png) !important;
    background-size: cover !important;
    background-attachment: fixed !important;
    background-position: center center !important;
}

/* 60% main background */
.wrapper-site,
body > .container,
.container[style*="background: #007E70"],
.container[style*="background:#007E70"] {
    background: linear-gradient(180deg, rgba(28,31,38,.98), rgba(16,20,27,.99)) !important;
    border: 1px solid rgba(155,89,182,.34) !important;
    border-radius: 16px !important;
    box-shadow: 0 16px 44px var(--theme-shadow), inset 0 1px 0 rgba(255,255,255,.06) !important;
}

/* 30% content / secondary surface */
.ibox-content,
.header-site,
.footer-site,
.modal-header,
.intro,
.white-bg,
.forum-post-info,
.media-body > .media,
.ibox-title,
.card,
.list-group-item,
.dropdown-menu {
    background: linear-gradient(180deg, rgba(36,42,53,.98), rgba(28,33,43,.99)) !important;
    color: var(--theme-text) !important;
    border-color: var(--theme-line-soft) !important;
}

.ibox-content {
    border: 1px solid rgba(155,89,182,.27) !important;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.035), 0 8px 22px rgba(0,0,0,.12) !important;
}
.header-site, .footer-site, .intro { border: 1px solid rgba(155,89,182,.24) !important; }

/* Typography */
a { color: #c785e3; }
a:hover, a:focus { color: #e1b7f2; }
h1,h2,h3,h4,h5,h6,.forum-title,.forum-item-title { color: var(--theme-text); }
.text-muted,.forum-desc,.forum-item small,.forum-item .forum-sub-title,.author-info { color: var(--theme-muted) !important; }
.ibox-content .text-black,
.ibox-content span[style*="color:black"],
.ibox-content span[style*="color: black"],
.header-site .text-black,
.footer-site,.intro,.partner { color: var(--theme-text-soft) !important; }

/* 10% accent - all main CTA buttons */
.btn-download,
.btn-action,
.top-btn,
.btn-primary,
.btn-info,
.btn-success,
.btn-dark {
    position: relative;
    overflow: hidden;
    color: #ffffff !important;
    background: linear-gradient(180deg, var(--theme-accent-strong) 0%, var(--theme-accent) 52%, var(--theme-accent-alt) 100%) !important;
    border: 1px solid #c58adb !important;
    border-bottom: 3px solid #6b2f82 !important;
    border-radius: 10px !important;
    box-shadow: 0 5px 12px rgba(0,0,0,.22), inset 0 1px 0 rgba(255,255,255,.30), 0 0 0 1px rgba(155,89,182,.10) !important;
    text-shadow: 0 1px 2px rgba(35,10,50,.70) !important;
    transition: transform .18s ease, box-shadow .18s ease, filter .18s ease !important;
}
.btn-download::before,.btn-action::before,.top-btn::before {
    content:""; position:absolute; inset:0;
    background: linear-gradient(110deg, transparent 10%, rgba(255,255,255,.16) 45%, transparent 62%);
    pointer-events:none;
}
.btn-download:hover,.btn-download:focus,
.btn-action:hover,.btn-action:focus,
.top-btn:hover,.top-btn:focus,
.btn-primary:hover,.btn-primary:focus,
.btn-info:hover,.btn-info:focus,
.btn-success:hover,.btn-success:focus,
.btn-dark:hover,.btn-dark:focus {
    color:#fff !important;
    background: linear-gradient(180deg, #c98ae3 0%, #a963c5 50%, #8e44ad 100%) !important;
    border-color:#d7a2ea !important;
    transform: translateY(-2px);
    box-shadow:0 8px 18px rgba(0,0,0,.27), 0 0 18px var(--theme-glow), inset 0 1px 0 rgba(255,255,255,.34) !important;
}
.btn-download:active,.btn-action:active,.top-btn:active,
.btn-primary:active,.btn-info:active,.btn-success:active,.btn-dark:active { transform: translateY(1px); }

/* Keep warning/danger semantics where needed */
.btn-warning {
    color:#211428 !important;
    background: linear-gradient(180deg,#d7a2ea,#a963c5) !important;
    border-color:#7d3c98 !important;
    text-shadow:none !important;
}
.btn-danger { box-shadow: 0 4px 10px rgba(0,0,0,.18) !important; }

/* Inputs */
.form-control,.custom-select,input,textarea,select {
    background-color:#171b22 !important;
    color:var(--theme-text) !important;
    border-color:rgba(155,89,182,.34) !important;
}
.form-control::placeholder,input::placeholder,textarea::placeholder { color:#9f94aa !important; }
.form-control:focus,.custom-select:focus,input:focus,textarea:focus,select:focus {
    border-color:var(--theme-accent) !important;
    box-shadow:0 0 0 .2rem rgba(155,89,182,.16) !important;
}

/* Download modals */
#download_pc .modal-content,#download_apk .modal-content {
    background:#242a35 !important;
    border:2px solid rgba(155,89,182,.65) !important;
    box-shadow:0 18px 45px rgba(0,0,0,.42) !important;
}
#download_pc .modal-header,#download_apk .modal-header {
    background:linear-gradient(180deg,#313948,#242a35) !important;
    color:var(--theme-text) !important;
    border-bottom:1px solid rgba(155,89,182,.30) !important;
}
#download_pc .modal-header h4,#download_apk .modal-header h4 { color:#d49be8 !important; }
#download_pc .modal-body,#download_apk .modal-body { background:#171b22 !important; }
#download_pc .modal-body a,#download_apk .modal-body a {
    background:linear-gradient(180deg,#b06ed0,#8e44ad) !important;
    color:#fff !important;
    border:1px solid #c58adb !important;
    box-shadow:0 5px 14px rgba(0,0,0,.20) !important;
}
#download_pc .modal-body a:hover,#download_apk .modal-body a:hover { background:linear-gradient(180deg,#c98ae3,#934db1) !important; }

/* Normalize legacy orange/cream inline modal colors */
.modal-content[style*="#fff1dc"], .modal-body[style*="#fff1dc"] { background:#242a35 !important; color:var(--theme-text) !important; }
.modal-header[style*="#df8f3f"] { background:linear-gradient(180deg,#313948,#242a35) !important; color:var(--theme-text) !important; }
.modal-body a[style*="#d9842f"] { background:linear-gradient(180deg,#b06ed0,#8e44ad) !important; border-color:#c58adb !important; }

/* Cards / forum */
.forum-item { border-bottom-color:rgba(155,89,182,.15) !important; }
.forum-icon .fa,.forum-item.active .fa,.forum-item.active a.forum-item-title { color:var(--theme-accent-strong) !important; }

/* Giftcodes */
.giftcode-shell { background:linear-gradient(180deg,#242a35,#171b22) !important; border:1px solid rgba(155,89,182,.42) !important; box-shadow:0 12px 30px rgba(0,0,0,.18) !important; }
.giftcode-card { background:#242a35 !important; border:1px solid rgba(155,89,182,.45) !important; box-shadow:0 8px 22px rgba(0,0,0,.18) !important; }
.giftcode-head { background:linear-gradient(90deg,#313948,#2c3340,#242a35) !important; border-bottom:1px solid rgba(155,89,182,.38) !important; }
.giftcode-code { color:#d49be8 !important; text-shadow:0 1px 2px rgba(0,0,0,.35); }
.giftcode-chip { background:#171b22 !important; border:1px solid rgba(155,89,182,.50) !important; color:#dcb4ec !important; }
.giftcode-item { background:linear-gradient(180deg,#292f3b,#1d222b) !important; border:1px solid rgba(155,89,182,.34) !important; }
.giftcode-item:hover { border-color:var(--theme-accent) !important; box-shadow:0 5px 16px rgba(0,0,0,.18),0 0 12px rgba(46,204,113,.12) !important; }
.giftcode-item-icon,.giftcode-item-fallback { background:#171b22 !important; border-color:var(--theme-accent) !important; }
.giftcode-item-fallback,.giftcode-item-meta { color:#c785e3 !important; }
.giftcode-item-name { color:var(--theme-text) !important; }
.giftcode-item-desc { color:var(--theme-muted) !important; }

/* Tables */
.table { color:var(--theme-text) !important; }
.table thead th,.table th,.table td { border-color:rgba(155,89,182,.17) !important; }
.table-striped tbody tr:nth-of-type(odd) { background-color:rgba(255,255,255,.025) !important; }

/* Alerts / notice system */
.alert-info { color:#f5edfa !important; background:#2c3340 !important; border-color:rgba(155,89,182,.30) !important; }
.notice-home-panel {
    margin:18px 0 8px; padding:14px 18px 16px;
    background:linear-gradient(180deg,#242a35 0%,#171b22 100%) !important;
    border:1px solid rgba(155,89,182,.42) !important;
    border-radius:15px;
    box-shadow:0 8px 22px rgba(0,0,0,.17), inset 0 1px 0 rgba(255,255,255,.035);
}
.notice-home-heading { margin:0 0 10px; padding:0 2px 9px; color:#d49be8 !important; font-size:19px; letter-spacing:.15px; border-bottom:1px solid rgba(155,89,182,.17); }
.alert-warning,.notice-alert { color:var(--theme-text) !important; background:linear-gradient(180deg,#2c3340,#242a35) !important; border:1px solid rgba(46,204,113,.32) !important; }
.alert-warning a,.notice-alert a { color:#d49be8 !important; }
.alert-warning a:hover,.notice-alert a:hover { color:#ead0f5 !important; }
.notice-home-panel > .alert-info,.notice-page-shell .alert-info {
    margin:0; padding:8px 18px; color:#faf5fd !important;
    background:linear-gradient(90deg,#313948,#2c3340) !important;
    border:1px solid rgba(46,204,113,.25) !important;
    border-left:3px solid var(--theme-accent) !important;
    border-radius:999px !important;
}
.notice-feed .alert-warning,.notice-feed .notice-alert { border-radius:12px !important; }
.notice-title,.notice-title a { color:var(--theme-text) !important; }
.notice-title a:hover { color:#d49be8 !important; }
.notice-title-icon,.notice-author,.post-author-highlight { color:#c06fdf !important; }
.notice-meta,.post-author-meta,.comment-head,.notice-summary { color:var(--theme-muted) !important; }
.notice-avatar,.post-author-avatar,.comment-avatar { border-color:var(--theme-accent) !important; background:#171b22 !important; box-shadow:0 0 0 2px rgba(155,89,182,.10); }
.author-chip { color:#dcb4ec !important; background:#171b22 !important; border-color:rgba(155,89,182,.42) !important; }
.comment-item,.notice-summary-box { color:var(--theme-text-soft) !important; background:rgba(24,27,35,.78) !important; border-color:rgba(155,89,182,.16) !important; }

/* Footer / inline cream remnants */
.footer-site[style*="#FDF8DA"],
.ibox-content[style*="#fdf8da"],
.ibox-content[style*="#FDF8DA"] { background:linear-gradient(180deg,#242a35,#1c212b) !important; color:var(--theme-text) !important; }

/* Scrollbar */
::-webkit-scrollbar { width:10px; height:10px; }
::-webkit-scrollbar-track { background:#171b22; }
::-webkit-scrollbar-thumb { background:#6f3a83; border:2px solid #171b22; border-radius:10px; }
::-webkit-scrollbar-thumb:hover { background:#9b59b6; }

/* Mobile spacing / hierarchy */
@media (max-width:767px) {
    .btn-download,.btn-action { margin:6px 4px !important; }
    .giftcode-shell { padding:10px !important; }
    .notice-home-panel { margin-top:12px; padding:12px; border-radius:12px; }
    .notice-home-panel > .alert-info,.notice-page-shell .alert-info { border-radius:10px !important; padding:9px 12px; }
}

/* Forum / destructive actions -------------------------------------------------
   Override the legacy striped .btn rule so delete buttons use the current theme. */
.btn-danger,
button.btn-danger,
a.btn-danger {
    position: relative;
    overflow: hidden;
    height: auto !important;
    min-height: 36px;
    padding: .375rem .8rem !important;
    line-height: 1.45 !important;
    color: #fff !important;
    background: linear-gradient(180deg,#e36a78 0%,#c84455 52%,#9e2d3d 100%) !important;
    border: 1px solid #ef8792 !important;
    border-bottom: 3px solid #711e2a !important;
    border-radius: 10px !important;
    box-shadow: 0 5px 12px rgba(0,0,0,.24), inset 0 1px 0 rgba(255,255,255,.22) !important;
    text-shadow: 0 1px 2px rgba(70,8,18,.8) !important;
    font-weight: 700;
    transition: transform .18s ease, box-shadow .18s ease, filter .18s ease !important;
}
.btn-danger.btn-sm {
    min-height: 32px;
    padding: .25rem .65rem !important;
    font-size: .875rem;
}
.btn-danger:hover,
.btn-danger:focus {
    color: #fff !important;
    background: linear-gradient(180deg,#ef7c89 0%,#d65262 52%,#ad3445 100%) !important;
    border-color: #f3a1aa !important;
    border-bottom-color: #7b2230 !important;
    transform: translateY(-1px);
    box-shadow: 0 7px 16px rgba(0,0,0,.28), 0 0 14px rgba(214,82,98,.18), inset 0 1px 0 rgba(255,255,255,.25) !important;
}
.btn-danger:active {
    transform: translateY(1px);
    border-bottom-width: 2px !important;
}

/* Forum answered status */
.notice-title.forum-title-row,
.forum-topic-heading {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}
.notice-title.forum-title-row > a {
    min-width: 0;
}
.forum-admin-answered {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    flex: 0 0 auto;
    padding: 3px 9px;
    border-radius: 999px;
    color: #bdf5d0 !important;
    background: rgba(46,204,113,.12);
    border: 1px solid rgba(46,204,113,.45);
    box-shadow: inset 0 1px 0 rgba(255,255,255,.06);
    font-size: 11px;
    line-height: 1.35;
    font-weight: 800;
    white-space: nowrap;
    text-transform: uppercase;
    letter-spacing: .2px;
}
.forum-admin-answered .fa {
    color: #46dc83;
    font-size: 12px;
}
.forum-topic-heading h3 {
    min-width: 0;
    word-break: break-word;
}
@media (max-width: 575.98px) {
    .notice-title.forum-title-row,
    .forum-topic-heading {
        align-items: flex-start;
    }
    .forum-admin-answered {
        font-size: 10px;
        padding: 3px 8px;
    }
}

/* Home launcher component groups ---------------------------------------------
   Keep downloads, account actions and community links visually separated. */
.home-launch-panel {
    margin-top: 5px;
    padding: 10px 18px 20px !important;
}
.home-age-note {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 28px;
    padding: 2px 6px 8px;
    color: var(--theme-text-soft);
    font-size: 12px;
    line-height: 1.35;
}
.home-age-note img { flex: 0 0 auto; }
.home-game-logo {
    padding: 16px 8px 24px;
    text-align: center;
}
.home-game-logo img {
    display: block;
    width: auto;
    max-width: min(300px, 85vw);
    max-height: 190px;
    margin: 0 auto;
    object-fit: contain;
}
.home-component-layout {
    display: grid;
    gap: 15px;
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
}
.home-secondary-grid {
    display: grid;
    grid-template-columns: minmax(250px, .82fr) minmax(0, 1.38fr);
    gap: 15px;
    align-items: stretch;
}
.home-action-cluster {
    position: relative;
    overflow: hidden;
    padding: 16px;
    border: 1px solid rgba(155,89,182,.34);
    border-radius: 15px;
    background:
        radial-gradient(circle at 100% 0%, rgba(176,110,208,.11), transparent 34%),
        linear-gradient(180deg, rgba(44,51,64,.82), rgba(27,32,42,.94));
    box-shadow: inset 0 1px 0 rgba(255,255,255,.045), 0 8px 20px rgba(0,0,0,.14);
}
.home-cluster-download {
    border-color: rgba(176,110,208,.42);
}
.home-cluster-header {
    display: flex;
    align-items: center;
    gap: 11px;
    margin-bottom: 14px;
    text-align: left;
}
.home-cluster-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 38px;
    width: 38px;
    height: 38px;
    border: 1px solid rgba(197,138,219,.50);
    border-radius: 11px;
    color: #e7c2f5;
    background: rgba(155,89,182,.13);
    box-shadow: inset 0 1px 0 rgba(255,255,255,.06);
    font-size: 16px;
}
.home-cluster-heading {
    min-width: 0;
}
.home-cluster-heading h3 {
    margin: 0 0 2px;
    color: #f5e9fa;
    font-size: 16px;
    font-weight: 800;
    letter-spacing: .15px;
}
.home-cluster-heading p {
    margin: 0;
    color: var(--theme-muted);
    font-size: 11.5px;
    line-height: 1.4;
}
.home-cluster-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 9px;
}
.home-cluster-btn {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: auto !important;
    min-width: 112px;
    min-height: 44px;
    margin: 0 !important;
    padding: 9px 13px !important;
    white-space: nowrap;
    font-size: 13px;
    font-weight: 700;
}
.home-download-actions .home-cluster-btn {
    flex: 0 1 132px;
    min-width: 120px;
}
.home-account-actions .home-cluster-btn {
    flex: 1 1 128px;
    min-width: 120px;
}
.home-community-actions .home-cluster-btn {
    flex: 1 1 118px;
    min-width: 108px;
}
.home-admin-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 12px;
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px solid rgba(155,89,182,.18);
    font-size: 11.5px;
}
.home-admin-label {
    color: #d8b0e9;
    font-weight: 800;
}
.home-admin-link {
    color: var(--theme-text-soft);
    text-decoration: none;
}
.home-admin-link:hover,
.home-admin-link:focus {
    color: #e1b7f2;
    text-decoration: none;
}

@media (max-width: 767px) {
    .home-launch-panel { padding: 8px 10px 14px !important; }
    .home-game-logo { padding: 12px 6px 18px; }
    .home-component-layout { gap: 11px; }
    .home-secondary-grid {
        grid-template-columns: 1fr;
        gap: 11px;
    }
    .home-action-cluster { padding: 13px; border-radius: 13px; }
    .home-cluster-header { margin-bottom: 11px; }
    .home-cluster-btn { margin: 0 !important; }
    .home-download-actions .home-cluster-btn,
    .home-account-actions .home-cluster-btn,
    .home-community-actions .home-cluster-btn {
        flex: 1 1 calc(50% - 9px);
        min-width: 0;
    }
}

@media (max-width: 390px) {
    .home-age-note { align-items: flex-start; font-size: 10.5px; }
    .home-cluster-heading h3 { font-size: 15px; }
    .home-cluster-heading p { font-size: 10.5px; }
    .home-cluster-btn { min-height: 42px; font-size: 12px; padding: 8px 9px !important; }
}

/* Notice detail / structured content dark theme */
.notice-detail-card {
    background: linear-gradient(180deg,#2c3340,#242a35) !important;
    border-color: rgba(46,204,113,.32) !important;
}
.notice-detail-toolbar { border-bottom: 1px solid rgba(155,89,182,.14); padding-bottom: 16px; }
.notice-detail-author-row { border-bottom-color: rgba(155,89,182,.16) !important; }
.post-detail-title,
.notice-content-rendered .notice-content-title,
.notice-content-rendered .notice-content-section { color: var(--theme-text) !important; }
.notice-content-rendered { color: var(--theme-text-soft) !important; }
.notice-content-rendered .notice-number-list > li::before { background: linear-gradient(135deg,#7f4aa0,#c06fdf) !important; }
.notice-content-rendered .notice-bullet-list > li::before { background:#c06fdf !important; box-shadow:0 0 0 4px rgba(192,111,223,.13) !important; }
.notice-content-rendered .notice-content-note {
    color: #f1e6f7 !important;
    background: rgba(24,27,35,.78) !important;
    border-color: rgba(155,89,182,.23) !important;
}
.notice-content-rendered .notice-content-note::before { color:#d49be8 !important; }
.notice-content-rendered .notice-content-divider { border-top-color: rgba(155,89,182,.22) !important; }


/* Patch 44: dark theme overrides for balanced notice content */
.notice-content-rendered .notice-content-title {
    border-bottom-color: rgba(155,89,182,.16) !important;
}
.notice-content-rendered .notice-content-section {
    color: #f4e9fa !important;
    border-bottom-color: rgba(155,89,182,.14) !important;
}
.notice-content-rendered .notice-number-list > li::before {
    color: #d49be8 !important;
    background: transparent !important;
    box-shadow: none !important;
}
.notice-content-rendered .notice-bullet-list > li::before {
    background: #c06fdf !important;
    box-shadow: 0 0 0 3px rgba(192,111,223,.12) !important;
}
.notice-content-rendered .notice-content-note {
    color: #ece3f2 !important;
    background: rgba(155,89,182,.07) !important;
    border-color: rgba(155,89,182,.18) !important;
    border-left-color: rgba(212,155,232,.72) !important;
}
