
/* Themed scrollbars (dark / red / orange) */
:root {
    --scrollbar-track: #120707;   /* near-black red */
    --scrollbar-thumb: #cc4b1f;   /* orange-red fallback (Firefox) */
    --scrollbar-thumb-hover: #e97a1f;
}

/* Firefox */
html {
    scrollbar-width: thin;
    scrollbar-color: var(--scrollbar-thumb) var(--scrollbar-track);
}

body { margin: 0; padding: 0; background: #000; }

/* Custom cursors */
html, body {
    cursor: url('../../images/cursor.png') 6 2, auto;
}

a, button, [role="button"], .btn,
.nav-list a, .social-btn,
input[type="button"], input[type="submit"], input[type="reset"],
label, select, summary {
    cursor: url('../../images/activec.png') 6 2, pointer;
}

.container-1280 {
    width: 100%;
    max-width: 1280px;
    margin-left: auto;
    margin-right: auto;
}

.bg-01 { 
    width: 100%;
    min-width: 1280px;
    height: 100px;
    background-image: url('../../images/star_bg_01.png'); 
	background-repeat: no-repeat;
	background-position: center top;
	position: relative;
}
.bg-02 { 
    width: 100%;
    min-width: 1280px;
    height: 1225px;
    background-image: url('../../images/star_bg_02.png'); 
	background-repeat: no-repeat;
    background-position: center top;
    position: relative;
}
.bg-03 { 
    width: 100%;
    min-width: 1280px;
    min-height: 1200px;
    height: auto;
    background-image: url('../../images/star_bg_03.png'); 
	background-repeat: no-repeat;
	background-position: center bottom;
	position: relative;
}
.bg-04 { 
    width: 100%;
    min-width: 1280px;
    height: 673px;
    background-image: url('../../images/star_bg_04.png'); 
	background-repeat: no-repeat;
	background-position: center top;
	position: relative;
}
.bg-05 { 
    width: 100%;
    min-width: 1280px;
    height: 900px;
    background-image: url('../../images/star_bg_05.png'); 
	background-repeat: no-repeat;
	background-position: center top;
	position: relative;
}
.bg-06 { 
    width: 100%;
    min-width: 1280px;
    height: 778px;
    background-image: url('../../images/star_bg_06.png'); 
	background-repeat: no-repeat;
	background-position: center top;
	position: relative;
}

/* Nav banner in section 1 */
.nav-banner {
    position: relative;
    height: 72px; /* top bar height */
    display: flex;
    align-items: center;
    z-index: 2;
    font-family: 'Prompt', system-ui, -apple-system, Segoe UI, Roboto, 'Helvetica Neue', Arial, "Noto Sans", "Liberation Sans", sans-serif;
}

/* left flag background */
.nav-banner::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    width: 215px;
    height: 415px;
    background: url('../../images/bg_flag_nav.png') no-repeat left top / contain;
    pointer-events: none;
}

.nav-list {
    list-style: none;
    margin: 0;
    padding: 0 30px 0 240px;
    display: flex;
    gap: 95px;
    width: 100%;
    justify-content: flex-end;
    align-items: center;
    height: 100%;
    transform: translateY(15px);
}

.nav-list li {
    display: flex;
    align-items: center;
}

.nav-list a {
    color: #fff;
    text-decoration: none;
    font-weight: 800;
    font-size: 28px;
    letter-spacing: 1px;
    text-shadow: 0 2px 2px rgba(0,0,0,.6);
    line-height: 1;
}

/* Dropdown (SERVER INFO) - Modern Design */
.nav-list .has-dropdown { 
    position: relative;
    display: flex;
    align-items: center;
}

.nav-list .dropdown-trigger {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.3s ease;
    position: relative;
    white-space: nowrap;
}

.nav-list .dropdown-trigger .dropdown-arrow {
    font-size: 16px;
    transition: transform 0.3s ease;
    opacity: 0.8;
}

.nav-list .has-dropdown:hover .dropdown-arrow,
.nav-list .has-dropdown:focus-within .dropdown-arrow {
    transform: rotate(180deg);
    opacity: 1;
}

.nav-list .has-dropdown > .modern-dropdown {
    display: none;
    position: absolute;
    left: 50%;
    top: calc(100% + 8px);
    transform: translateX(-50%) translateY(-10px);
    background: linear-gradient(135deg, rgba(139, 35, 16, 0.95), rgba(173, 58, 31, 0.92));
    backdrop-filter: blur(8px);
    border: 2px solid rgba(255, 154, 77, 0.4);
    border-radius: 12px;
    min-width: 320px;
    padding: 8px 0;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.6s ease;
    /* เพิ่มการจัดตำแหน่งที่แม่นยำ */
    margin-left: 0;
    text-align: left;
}

.nav-list .has-dropdown:hover > .modern-dropdown,
.nav-list .has-dropdown:focus-within > .modern-dropdown { 
    display: block;
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

/* ลบลูกศรออก - comment out แทนการลบ
.nav-list .modern-dropdown::before {
    display: none;
}

.nav-list .modern-dropdown::after {
    display: none;
}
*/

.nav-list .dropdown-item { 
    list-style: none;
    margin: 0;
    padding: 4px 8px;
}

.nav-list .dropdown-link { 
    display: flex;
    align-items: center;
    gap: 16px;
    width: 100%;
    padding: 14px 18px;
    font-size: 16px;
    font-weight: 600;
    text-shadow: none;
    text-decoration: none;
    color: #fff;
    border-radius: 8px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.nav-list .dropdown-link::before {
    content: '';
    position: absolute;
    left: -100%;
    top: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 154, 77, 0.15), transparent);
    transition: left 0.4s ease;
}

.nav-list .dropdown-link:hover::before {
    left: 100%;
}

.nav-list .dropdown-link:hover { 
    background: linear-gradient(135deg, rgba(255, 154, 77, 0.25), rgba(255, 188, 77, 0.2));
    color: #fff3cc;
    transform: translateX(2px);
}

.nav-list .dropdown-icon {
    display: flex
;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    background: linear-gradient(135deg, rgb(58 6 6 / 40%), rgb(10 3 3 / 30%));
    border-radius: 8px;
    font-size: 17px;
    color: #ff9a06;
    transition: all 0.3s 
ease;
    border: 1px solid rgb(255 200 0 / 30%);
}

.nav-list .dropdown-link:hover .dropdown-icon {
    background: linear-gradient(135deg, rgb(44 9 9 / 60%), rgb(82 8 8 / 50%));
    color: #ffd35a;
    transform: scale(1.05);
    border-color: rgb(213 153 63 / 50%);
}

.nav-list .dropdown-content {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.nav-list .dropdown-title {
    font-size: 16px;
    font-weight: 700;
    color: #fff;
    line-height: 1.2;
    transition: color 0.3s ease;
}

.nav-list .dropdown-desc {
    font-size: 12px;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.75);
    line-height: 1.3;
    transition: color 0.3s ease;
}

.nav-list .dropdown-link:hover .dropdown-title {
    color: #fff3cc;
}

.nav-list .dropdown-link:hover .dropdown-desc {
    color: rgba(255, 243, 204, 0.9);
}

/* Animation for dropdown items */
.nav-list .dropdown-item {
    opacity: 0;
    transform: translateY(10px);
    animation: dropdown-item-fade-in 0.3s ease forwards;
}

.nav-list .dropdown-item:nth-child(1) { animation-delay: 0.1s; }
.nav-list .dropdown-item:nth-child(2) { animation-delay: 0.2s; }
.nav-list .dropdown-item:nth-child(3) { animation-delay: 0.3s; }

@keyframes dropdown-item-fade-in {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .nav-list .has-dropdown > .modern-dropdown {
        background: linear-gradient(128deg, rgb(60 9 9 / 95%), rgb(108 14 14 / 92%));
        border-color: rgb(72 27 13 / 50%);
    }
    
    .nav-list .dropdown-link:hover {
        background: linear-gradient(135deg, rgb(0 0 0 / 30%), rgb(8 5 0 / 25%));
    }
}

/* Social buttons on the flag */
.flag-social {
    position: absolute;
    left: 0;
    top: 0;
    width: 215px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0px;
    z-index: 3;
}
.social-btn:hover {
    transform: translateY(-2px) scale(1.02); filter: brightness(1.05);
}

/* =====================
   Logo + Header (Section 2)
   ===================== */

.hero-logo {
    position: relative;
    width: 100%;
}
.hero-logo img {
    display: block;
    max-width: 720px;
    width: 100%;
    height: auto;
    position: absolute;
    top: 100px;
    left: 23%;
    z-index: 1;
    transform-origin: center;
    animation: logo-float-zoom 7s ease-in-out infinite;
}

.hero-logo::after { content: none; }

@keyframes logo-float-zoom {
    0%   { transform: translate(0, 0) scale(1); }
    12.5%{ transform: translate(6px, -6px) scale(1.03); }
    25%  { transform: translate(0, -2px) scale(1.015); }
    37.5%{ transform: translate(-6px, 4px) scale(0.995); }
    50%  { transform: translate(0, 0) scale(1); }
    62.5%{ transform: translate(5px, 6px) scale(1.02); }
    75%  { transform: translate(0, 2px) scale(0.99); }
    87.5%{ transform: translate(-5px, -4px) scale(1.01); }
    100% { transform: translate(0, 0) scale(1); }
}

.bg-02 .container-1280 { position: static; height: auto; }

.bg-02 .header-cta {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    bottom: 24px;
    margin: 0;
    z-index: 2;
    width: 100%;
    max-width: 1280px;
}

/* Accessibility: respect reduced motion */
@media (prefers-reduced-motion: reduce) {
  .hero-logo img { animation: none; }
}

/* Header CTA layout under logo */
.header-cta {
    margin: 24px auto 0;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 0px;
    max-width: 100%;
}

.btn-header {
    display: block;
    width: 345px; /* image width from sample */
    max-width: 100%;
    transition: transform .2s ease, filter .2s ease;
}
.btn-header img { width: 100%; height: auto; display: block; margin-top: 170px; }
.btn-header:hover { transform: translateY(-2px) scale(1.02); filter: brightness(1.05); }

.header-info {
    position: relative;
    width: 590px;
    max-width: 100%;
    min-height: 450px;
    background: url('../../images/bg_header_info.png') no-repeat center top / contain;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 120px 28px 32px;
}

.header-info .info-content {
    color: #ffd9b3;
    font-family: 'Prompt', system-ui, -apple-system, Segoe UI, Roboto, 'Helvetica Neue', Arial, "Noto Sans", "Liberation Sans", sans-serif;
    font-size: 24px;
    line-height: 1.55;
    text-align: left;
    text-shadow: 0 2px 2px rgba(0,0,0,.6);
    max-width: 520px;
}
.header-info .info-content p { margin: 0 0 8px; }

/* =====================
   Patch Notes (Section 3)
   ===================== */

.patch-notes { padding: 30px 16px 40px; position: relative; }
.patch-header { display: flex; justify-content: center; align-items: center; margin-bottom: 28px; }
.patch-header img { display: block; width: 625px; max-width: 100%; height: auto; }

.patch-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.patch-card {
    background: rgba(12, 12, 12, 0.88);
    border: 2px solid rgb(233 233 233 / 18%);
    border-radius: 10px;
    box-shadow: 0 0 0 1px rgba(0,0,0,.6), 0 8px 18px rgba(0,0,0,.5) inset;
    overflow: hidden;
    transition: transform .18s ease, box-shadow .18s ease, filter .18s ease;
}

.patch-card:hover { transform: translateY(-2px); filter: brightness(1.03); }

.patch-card .thumb { display: block; }
.patch-card .thumb img { display: block; width: 100%; height: auto; }

/* Light sweep on hover */
.patch-card .thumb { position: relative; overflow: hidden; }
.patch-card .thumb::after {
    content: "";
    position: absolute;
    top: -20%;
    left: -160%;
    width: 30%;
    height: 140%;
    background: linear-gradient(105deg,
        rgba(255,255,255,0) 0%,
        rgba(255,255,255,0.06) 32%,
        rgba(255,255,255,0.22) 46%,
        rgba(255,255,255,0.40) 52%,
        rgba(255,255,255,0.18) 60%,
        rgba(255,255,255,0.0) 100%);
    mix-blend-mode: screen;
    filter: blur(0.5px);
    transform: skewX(50deg) translateX(0);
    opacity: 0;
    pointer-events: none;
}
.patch-card:hover .thumb::after,
.patch-card .thumb:focus-visible::after {
    animation: sweep-light .9s cubic-bezier(.22,.61,.36,1) both;
}

@keyframes sweep-light {
  0%   { transform: skewX(-20deg) translateX(0);    opacity: 0; }
  10%  { opacity: .22; }
  40%  { opacity: .34; }
  60%  { opacity: .22; }
  80%  { opacity: .10; }
  100% { transform: skewX(-20deg) translateX(900%); opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
    .patch-card .thumb::after { animation: none !important; display: none; }
}

.patch-card .card-body {
    background: linear-gradient(180deg, rgba(24,24,24,0.95) 0%, rgba(20,20,20,0.95) 100%);
    padding: 14px 14px 14px;
}
.patch-card .card-title {
    color: #f2f2f2;
    font-family: 'Prompt', system-ui, -apple-system, Segoe UI, Roboto, 'Helvetica Neue', Arial, "Noto Sans", "Liberation Sans", sans-serif;
    font-weight: 800;
    font-size: 18px;
    margin: 0 0 6px 0;
    letter-spacing: .3px;
}
.patch-card .card-desc {
    color: #b9b9b9;
    font-size: 14px;
    margin: 0 0 8px 0;
}
.patch-card .card-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.patch-card .meta-time {
    color: #8c8c8c;
    font-size: 12px;
}
.meta-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 22px;
    padding: 0 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .3px;
    color: #0a0a0a;
    border: 1px solid rgba(0,0,0,.6);
    box-shadow: 0 1px 0 rgba(255,255,255,.06) inset, 0 0 0 1px rgba(0,0,0,.4);
    text-transform: uppercase;
}
.badge-update { background: linear-gradient(180deg, #88d13a 0%, #5faa1a 100%); color: #071104; }
.badge-notice { background: linear-gradient(180deg, #3ac0ff 0%, #0087c8 100%); color: #021116; }
.badge-promotion { background: linear-gradient(180deg, #ff4ec2 0%, #c10084 100%); color: #19020e; }
.badge-activities { background: linear-gradient(180deg, #ffb341 0%, #ff8c1a 100%); color: #140a02; }
.badge-gameguide { background: linear-gradient(180deg, #ff6d91 0%, #fd3254 100%); color: #140a02; }

.patch-readmore { display: flex; justify-content: center; margin-top: 30px; }
.btn-readmore img { display: block; width: 232px; height: auto; }
.btn-readmore { display: inline-block; transition: transform .18s ease, filter .18s ease; }
.btn-readmore:hover { transform: translateY(-1px) scale(1.02); filter: brightness(1.05); }


/* =====================
   Donation (Section 4)
   ===================== */
.class-donate {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}
.class-donate .donation-content {
    width: 100%;
    max-width: 1280px;
    height: 590px;
    background: url('../../images/bg_class_donate.png') no-repeat center center / contain;
    position: relative;
    top: 48px;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    justify-content: center;
    padding-right: 165px;
    padding-left: 145px;
}
.donation-title { margin: 0 0 10px; }
.btn-explore {
    position: absolute;
    left: 30%;
    bottom: 53px;
    transform: translateX(-50%);
    color: #fff;
    font-family: 'Prompt', system-ui, -apple-system, Segoe UI, Roboto, 'Helvetica Neue', Arial, "Noto Sans", "Liberation Sans", sans-serif;
    font-weight: 800;
    font-size: 36px;
    letter-spacing: 1px;
    text-decoration: none;
    text-shadow: 0 3px 3px rgba(0,0,0,.5);
    transition: transform .18s ease, filter .18s ease;
}
.btn-explore:hover { transform: translateX(-50%) translateY(-1px) scale(1.02); filter: brightness(1.05); }
.donation-text {
    max-width: 490px;
    color: #f1e8dc;
    font-family: 'Prompt', system-ui, -apple-system, Segoe UI, Roboto, 'Helvetica Neue', Arial, "Noto Sans", "Liberation Sans", sans-serif;
    font-size: 14px;
    line-height: 2;
    text-shadow: 0 2px 2px rgba(0,0,0,.55);
    margin-top: -130px;
}
.donation-text p { margin: 0 0 12px; }
.donation-text .donation-note { color: #e8e0d2; opacity: .9; }

.btn-support {
    position: absolute;
    left: 67%;
    bottom: 40px;
    transform: translateX(-50%);
    display: inline-block;
    transition: transform .18s ease, filter .18s ease;
}
.btn-support img { display: block; width: 450px; max-width: 100%; height: auto; }
.btn-support:hover { transform: translateX(-50%) translateY(-2px) scale(1.02); filter: brightness(1.05); }
.btn-support .btn-support-text {
    position: absolute;
    left: 42%;
    top: 44%;
    transform: translate(-38%, -40%);
    color: #fff;
    font-weight: 800;
    font-size: 36px;
    letter-spacing: 2px;
    font-family: 'Prompt', system-ui, -apple-system, Segoe UI, Roboto, 'Helvetica Neue', Arial, "Noto Sans", "Liberation Sans", sans-serif;
    pointer-events: none;
}

/* =====================
     Ranking (Section 5)
     ===================== */
.ranking { padding: 0; position: relative; }
.ranking-layout {
        display: grid;
        grid-template-columns: 1fr 247px;
        gap: 10px;
        align-items: start;
}

.ranking-left {
        position: relative;
        min-height: 914px;
        background: url('../../images/bg_ranking.png') no-repeat center top / contain;
        padding: 32px 20px 32px 22px;
}

.ranking-left .tabs-body { margin-top: 0px; }

/* simple ranking list placeholder */
.rank-list { list-style: none; margin: 0; padding: 0 8px; }
.rank-row { display: grid; grid-template-columns: 40px 1fr 120px; align-items: center; gap: 8px; padding: 10px 8px; border-bottom: 1px solid rgba(255,255,255,0.08); color: #f2f2f2; font-family: 'Prompt', system-ui, -apple-system, Segoe UI, Roboto, 'Helvetica Neue', Arial, 'Noto Sans', 'Liberation Sans', sans-serif; }
.rank-row .pos { font-weight: 800; color: #ffb341; }
.rank-row .name { opacity: .95; }
.rank-row .score { text-align: right; color: #ffd9b3; }

/* PVP ladder card grid (sample-like) */
.pvp-grid { 
    display: grid; 
    grid-template-columns: repeat(3, 1fr); 
    gap: 14px; 
    padding: 0 4px; 
}

@media (max-width: 1100px) {
    .pvp-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 740px) {
    .pvp-grid { grid-template-columns: 1fr; }
}

.pvp-card { 
    display: grid; 
    grid-template-columns: 95px 1fr; 
    align-items: center; 
    gap: 10px; 
    background: rgba(12, 12, 12, 0.88); 
    border: 2px solid rgba(255,255,255,0.08); 
    border-radius: 14px; 
    padding: 14px 16px 0px 14px; 
    min-height: 144px; 
    position: relative; 
    box-shadow: 0 0 0 1px rgba(0,0,0,.6), inset 0 10px 22px rgba(0,0,0,.42);
    margin-bottom: 17px;
}

.pvp-card .char .rank-badge {
    position: absolute;
    left: -6px;
    top: -15px;
    height: 30px; min-width: 56px; padding: 0 12px;
    display: inline-flex; align-items: center; justify-content: center;
    background: linear-gradient(180deg, #c8162a 0%, #8a0f1d 100%);
    color: #fff; font-weight: 800; letter-spacing: .2px; font-size: 14px;
    border-radius: 16px; border: 1px solid rgba(255,255,255,.18);
    box-shadow: 0 1px 0 rgba(255,255,255,.06) inset, 0 2px 6px rgba(0,0,0,.5);
}

.pvp-card .char { position: relative; display: flex; align-items: center; justify-content: flex-start; height: 100%; }
.pvp-card .char img { width: 42px; height: auto; image-rendering: -webkit-optimize-contrast; filter: drop-shadow(0 2px 6px rgba(0,0,0,.6)); margin-left: 2px; }

.pvp-card .info { display: flex; flex-direction: column; gap: 6px; }
.pvp-card .name { color: #ffc72e; text-decoration: none; font-weight: 800; font-size: 20px; text-shadow: 0 2px 2px rgba(0,0,0,.55); }
.pvp-card .name:hover { text-decoration: underline; }
.pvp-card .guild { color: #f0f0f0; opacity: .9; font-size: 14px; }
.pvp-card .stats { display: flex; align-items: center; gap: 18px; margin-top: 6px; font-size: 14px; }
.pvp-card .stats .kills { color: #f0f0f0; }
.pvp-card .stats .deaths { color: #ff6d91; }
.pvp-card:hover { transform: translateY(-1px); filter: brightness(1.02); transition: transform .18s ease, filter .18s ease; }

.ranking-right { display: flex; flex-direction: column; align-items: center; gap: 0px; margin-top: 0px; position: relative; }
.ranking-banner { position: absolute; top: -8px }
.ranking-banner img { display: block; width: 247px; max-width: 100%; height: auto; }
.ranking-buttons { display: flex; flex-direction: column; align-items: center; gap: 0px; margin-top: 310px; }
.rank-btn { position: relative; }
.rank-btn img { display: block; width: 247px; max-width: 100%; height: auto; transition: transform .18s ease, filter .18s ease; }
.rank-btn:hover img { transform: translateY(-2px) scale(1.02); filter: brightness(1.05); }
.rank-btn.active img { filter: brightness(1.4) saturate(1.6); transform: translateY(-4px); }

/* utility: hide heading used for a11y */
.visually-hidden { position: absolute!important; height: 1px; width: 1px; overflow: hidden; clip: rect(1px, 1px, 1px, 1px); white-space: nowrap; }

/* =====================
     Join Now (Section 6)
     ===================== */
.join-now { position: relative; padding: 60px 16px; text-align: center; }
.join-banner img { display: block; margin: 0 auto; width: 900px; max-width: 100%; height: auto; }
.join-text {
    margin: 18px auto 50px;
    color: #2b2b2b;
    font-family: 'Prompt', system-ui, -apple-system, Segoe UI, Roboto, 'Helvetica Neue', Arial, 'Noto Sans', 'Liberation Sans', sans-serif;
    font-size: 28px;
    font-weight: 800;
    letter-spacing: .4px;
    text-transform: uppercase;
}
.join-actions { display: flex; justify-content: center; align-items: center; gap: 18px; }
.join-btn img { display: block; height: auto; }
.join-btn.login img { width: 255px; }
.join-btn.register img { width: 320px; }
.join-btn { transition: transform .18s ease, filter .18s ease; display: inline-block; }
.join-btn:hover { transform: translateY(-2px) scale(1.02); filter: brightness(1.05); }

/* =====================
     Preloader (global)
     ===================== */
#preloader {
    position: fixed; inset: 0; z-index: 9999;
    display: flex; align-items: center; justify-content: center;
    background: radial-gradient(ellipse at center, rgba(10,10,10,.98) 0%, rgba(0,0,0,.98) 60%);
    transition: opacity .35s ease, visibility .35s ease;
}
#preloader.hidden { opacity: 0; visibility: hidden; }
.preloader-box { display: flex; flex-direction: column; align-items: center; gap: 18px; }
.preloader-logo { width: 180px; max-width: 40vw; height: auto; filter: drop-shadow(0 6px 16px rgba(228,59,44,.35)); }
.preloader-ring { width: 72px; height: 72px; border-radius: 50%; border: 3px solid rgba(255,255,255,.12); border-top-color: #ff8c1a; border-right-color: #e43b2c; animation: preloader-spin 1s linear infinite; }
@keyframes preloader-spin { to { transform: rotate(360deg); } }

/* WebKit (Chrome, Edge, Safari) */
::-webkit-scrollbar {
    width: 12px;
    height: 12px; /* horizontal scrollbar height */
}
::-webkit-scrollbar-track {
    background-color: var(--scrollbar-track);
}
::-webkit-scrollbar-thumb {
    background-image: linear-gradient(180deg, #7a0f0f 0%, #ff8c1a 100%);
    border-radius: 10px;
    border: 2px solid var(--scrollbar-track); /* creates inset gap */
}
::-webkit-scrollbar-thumb:hover {
    background-image: linear-gradient(180deg, #a31616 0%, #ffad33 100%);
}

/* Themed text selection (black / red / orange) */
:root {
    --selection-bg: #ff8c1a;   /* vibrant orange */
    --selection-text: #0a0a0a; /* near-black for readable selected text */
}

/* Standard selection */
::selection {
    background: var(--selection-bg);
    color: var(--selection-text);
    text-shadow: none;
}

/* Firefox */
::-moz-selection {
    background: var(--selection-bg);
    color: var(--selection-text);
    text-shadow: none;
}

/* Form controls */
input::selection,
textarea::selection {
    background: var(--selection-bg);
    color: var(--selection-text);
}

/* =====================
     Footer
     ===================== */
.footer-inner {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: 0px;
    padding: 20px 10px;
}
.footer-left { line-height: 1.8; padding-top: 40px; }
.footer-line { margin: 0; font-size: 14px; color: #f0f0f0; }
.footer-brand { color: #ffd34d; font-weight: 800; }
.footer-link { color: #ffd34d; text-decoration: none; }
.footer-link:hover { text-decoration: underline; }
