/* ═══════════════════════════════════════
           index.html redesign
        ═══════════════════════════════════════ */

        /* Remove default body flex gap under nav so hero goes edge-to-edge */
        body { display: flex; flex-direction: column; min-height: 100vh; }

        /* ── HERO ─────────────────────────────── */
        .hero-banner {
            position: relative;
            width: 100%;
            min-height: 88vh;
            display: flex;
            align-items: center;
            justify-content: center;
            overflow: hidden;
        }

        /* Hero uses the body's fixed bg.jpg — no duplicate needed */
        /* Fade-to-base at bottom so content flows cleanly */
        .hero-banner__overlay {
            position: absolute; inset: 0;
            background:
                linear-gradient(to bottom,
                    rgba(17,17,27,0.0)  0%,
                    rgba(17,17,27,0.0)  30%,
                    rgba(17,17,27,0.6)  70%,
                    var(--base)         100%);
        }

        /* Center content */
        .hero-banner__content {
            position: relative; z-index: 2;
            display: flex; flex-direction: column;
            align-items: center; gap: 0;
            padding-bottom: 6rem; /* space for CTA overlap */
            margin-top: -6rem; /* shift everything upward */
        }

        .hero-banner__logo {
            width: min(420px, 72vw);
            filter: drop-shadow(0 0 40px rgba(203,166,247,0.45))
                    drop-shadow(0 8px 24px rgba(0,0,0,0.7));
            animation: logo-float 4s ease-in-out infinite;
        }
        @keyframes logo-float {
            0%, 100% { transform: translateY(0); }
            50%       { transform: translateY(-10px); }
        }

        .hero-banner__tagline {
            font-size: 0.85rem; font-weight: 700; text-transform: uppercase;
            letter-spacing: 0.25em; color: rgba(205,214,244,0.6);
            margin-top: 1.5rem;
            animation: fade-in-up 1s 0.3s both;
        }
        @keyframes fade-in-up {
            from { opacity: 0; transform: translateY(12px); }
            to   { opacity: 1; transform: translateY(0); }
        }

        /* ── CTA STRIP (overlaps hero bottom) ── */
        .hero-cta {
            position: relative; z-index: 5;
            margin-top: -4.5rem;
            display: flex;
            justify-content: center;
            gap: 1rem;
            flex-wrap: wrap;
            padding: 0 1.5rem;
            animation: fade-in-up 0.9s 0.5s both;
        }

        .hero-cta-btn {
            display: flex; align-items: center; gap: 14px;
            text-decoration: none;
            padding: 18px 28px;
            border-radius: 16px;
            min-width: 200px;
            box-shadow: 0 8px 32px rgba(0,0,0,0.55);
            transition: transform 0.25s, box-shadow 0.25s, filter 0.25s;
            position: relative; overflow: hidden;
            border: 1px solid rgba(255,255,255,0.08);
        }
        .hero-cta-btn::after {
            content: '';
            position: absolute; inset: 0;
            background: linear-gradient(105deg, transparent 40%, rgba(255,255,255,0.1) 50%, transparent 60%);
            transform: translateX(-100%); transition: transform 0.5s;
        }
        .hero-cta-btn:hover::after { transform: translateX(100%); }
        .hero-cta-btn:hover {
            transform: translateY(-4px);
            filter: brightness(1.08);
        }

        .hero-cta-btn--dl {
            background: linear-gradient(135deg, #40a02b 0%, #179299 100%);
            box-shadow: 0 8px 32px rgba(64,160,43,0.4);
        }
        .hero-cta-btn--dl:hover  { box-shadow: 0 14px 40px rgba(64,160,43,0.55); }

        .hero-cta-btn--topup {
            background: linear-gradient(135deg, #1e66f5 0%, #7287fd 100%);
            box-shadow: 0 8px 32px rgba(30,102,245,0.4);
        }
        .hero-cta-btn--topup:hover { box-shadow: 0 14px 40px rgba(30,102,245,0.55); }

        .hero-cta-btn--reg {
            background: linear-gradient(135deg, #8839ef 0%, #e64553 100%);
            box-shadow: 0 8px 32px rgba(136,57,239,0.4);
        }
        .hero-cta-btn--reg:hover { box-shadow: 0 14px 40px rgba(136,57,239,0.55); }

        .hero-cta-btn__icon {
            width: 44px; height: 44px; flex-shrink: 0;
            background: rgba(0,0,0,0.2); border-radius: 12px;
            display: flex; align-items: center; justify-content: center;
        }
        .hero-cta-btn__icon svg { width: 22px; height: 22px; stroke: #fff; stroke-width: 2; }

        .hero-cta-btn__text { display: flex; flex-direction: column; }
        .hero-cta-btn__title {
            font-size: 1.15rem; font-weight: 900; color: #fff;
            text-transform: uppercase; letter-spacing: 0.04em; line-height: 1.1;
        }
        .hero-cta-btn__sub {
            font-size: 0.72rem; color: rgba(255,255,255,0.7);
            font-weight: 600; margin-top: 2px;
        }
        .hero-cta-btn--vshop {
            background: linear-gradient(135deg, #E0AF68 0%, #C88D3D 100%);
            box-shadow: 0 8px 32px rgba(232, 201, 106, 0.3);
        }
        .hero-cta-btn--vshop:hover { box-shadow: 0 14px 40px rgba(232, 201, 106, 0.45); }

        /* ── PAGE BODY ── */
        .home-body-wrap {
            background: var(--base);
            position: relative;
            z-index: 4;
            /* soft top edge so it doesn't hard-cut */
            box-shadow: 0 -40px 60px 20px var(--base);
        }
        .home-body {
            flex: 1;
            max-width: 1200px;
            margin: 0 auto;
            width: 100%;
            padding: 4rem 1.5rem 5rem;
            display: flex;
            flex-direction: column;
            gap: 4rem;
        }

        /* ── Section headings ── */
        .section-head {
            display: flex; align-items: center; gap: 1rem;
            margin-bottom: 1.75rem;
        }
        .section-head h2 {
            font-size: 0.7rem; font-weight: 800; text-transform: uppercase;
            letter-spacing: 0.15em; color: var(--mauve); white-space: nowrap;
        }
        .section-head::after {
            content: ''; flex: 1; height: 1px;
            background: linear-gradient(90deg, var(--surface0), transparent);
        }

        /* ── NEWS GRID ── */
        .news-grid {
            display: grid;
            grid-template-columns: repeat(3, 1fr);
            gap: 1.25rem;
        }

        .news-card-thumb {
            background: var(--glass-bg);
            backdrop-filter: var(--glass-blur);
            -webkit-backdrop-filter: var(--glass-blur);
            border: 1px solid var(--glass-border);
            border-radius: 16px;
            overflow: hidden;
            text-decoration: none;
            display: flex; flex-direction: column;
            transition: transform 0.25s, border-color 0.25s, box-shadow 0.25s;
            box-shadow: 0 4px 20px rgba(0,0,0,0.25);
        }
        .news-card-thumb:hover {
            transform: translateY(-5px);
            border-color: rgba(203,166,247,0.3);
            box-shadow: 0 14px 40px rgba(0,0,0,0.4);
        }

        /* Thumbnail area */
        .news-thumb {
            width: 100%; aspect-ratio: 16/9;
            position: relative; overflow: hidden;
            flex-shrink: 0;
        }
        .news-thumb img {
            width: 100%; height: 100%;
            object-fit: cover;
            transition: transform 0.45s ease;
        }
        .news-card-thumb:hover .news-thumb img { transform: scale(1.06); }

        /* Gradient placeholder when no image */
        .news-thumb--placeholder {
            display: flex; align-items: center; justify-content: center;
        }
        .news-thumb--placeholder span {
            font-size: 2rem; opacity: 0.4;
        }

        /* Tag gradient backgrounds */
        .news-thumb--update       { background: linear-gradient(135deg, #1e3a5f, #1e66f5 120%); }
        .news-thumb--maintenance  { background: linear-gradient(135deg, #3d2e0a, #df8e1d 120%); }
        .news-thumb--event        { background: linear-gradient(135deg, #1a3d2b, #40a02b 120%); }
        .news-thumb--announcement { background: linear-gradient(135deg, #2d1e4f, #8839ef 120%); }
        .news-thumb--hotfix       { background: linear-gradient(135deg, #3d1a1f, #e64553 120%); }
        .news-thumb--default      { background: linear-gradient(135deg, #1e2a3f, #1e66f5 120%); }

        /* Decorative icon inside placeholder */
        .news-thumb--placeholder::before {
            content: '';
            position: absolute; inset: 0;
            background: url('/assets/logo.png') center/60px no-repeat;
            opacity: 0.07;
        }

        .news-card-body {
            padding: 1.1rem 1.25rem 1.4rem;
            display: flex; flex-direction: column; gap: 0.45rem;
            flex: 1;
        }

        .news-card-tag {
            display: inline-block; font-size: 0.62rem; font-weight: 800;
            text-transform: uppercase; letter-spacing: 0.1em;
            padding: 3px 10px; border-radius: 20px;
            align-self: flex-start;
        }
        .news-tag-update       { background: rgba(137,180,250,0.12); color: var(--blue);   border: 1px solid rgba(137,180,250,0.25); }
        .news-tag-maintenance  { background: rgba(249,226,175,0.10); color: var(--yellow); border: 1px solid rgba(249,226,175,0.25); }
        .news-tag-event        { background: rgba(166,227,161,0.12); color: var(--green);  border: 1px solid rgba(166,227,161,0.25); }
        .news-tag-announcement { background: rgba(203,166,247,0.12); color: var(--mauve);  border: 1px solid rgba(203,166,247,0.25); }
        .news-tag-hotfix       { background: rgba(243,139,168,0.10); color: var(--red);    border: 1px solid rgba(243,139,168,0.25); }
        .news-tag-default      { background: rgba(137,180,250,0.12); color: var(--blue);   border: 1px solid rgba(137,180,250,0.25); }

        .news-card-title {
            font-size: 0.95rem; font-weight: 800; color: var(--text);
            line-height: 1.35;
        }
        .news-card-excerpt {
            font-size: 0.78rem; color: var(--subtext0); line-height: 1.55;
            display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
            overflow: hidden; flex: 1;
        }
        .news-card-date {
            font-size: 0.68rem; color: var(--surface1); font-weight: 600;
            margin-top: 0.3rem;
        }

        .news-all-btn {
            display: inline-flex; align-items: center; justify-content: center; gap: 7px;
            margin-top: 1.5rem; padding: 11px 28px;
            background: rgba(203,166,247,0.08);
            border: 1px solid rgba(203,166,247,0.2);
            border-radius: 12px; color: var(--mauve); text-decoration: none;
            font-size: 0.8rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em;
            align-self: center;
            transition: background 0.2s, border-color 0.2s, transform 0.2s;
        }
        .news-all-btn:hover {
            background: rgba(203,166,247,0.14); border-color: rgba(203,166,247,0.4);
            transform: translateY(-2px);
        }

        /* ── BOTTOM WIDGETS (ranking + donators) ── */
        .widgets-grid {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 1.25rem;
        }

        .widget-card {
            background: var(--glass-bg);
            backdrop-filter: var(--glass-blur);
            -webkit-backdrop-filter: var(--glass-blur);
            border: 1px solid var(--glass-border);
            border-radius: 16px;
            overflow: hidden;
        }

        .widget-card-header {
            padding: 1rem 1.25rem 0.85rem;
            border-bottom: 1px solid rgba(205,214,244,0.06);
            display: flex; align-items: center; justify-content: space-between;
        }
        .widget-card-header h3 {
            font-size: 0.72rem; font-weight: 800; text-transform: uppercase;
            letter-spacing: 0.12em; color: var(--mauve);
        }
        .widget-card-header a {
            font-size: 0.68rem; font-weight: 700; color: var(--subtext0);
            text-decoration: none; text-transform: uppercase; letter-spacing: 0.06em;
            transition: color 0.2s;
        }
        .widget-card-header a:hover { color: var(--blue); }

        .widget-table {
            width: 100%; border-collapse: collapse; font-size: 0.82rem;
        }
        .widget-table th {
            padding: 8px 14px; text-align: left;
            font-size: 0.65rem; font-weight: 800; text-transform: uppercase;
            letter-spacing: 0.08em; color: var(--subtext0);
            background: rgba(17,17,27,0.4);
            border-bottom: 1px solid rgba(205,214,244,0.05);
        }
        .widget-table td {
            padding: 10px 14px; color: var(--text);
            border-bottom: 1px solid rgba(205,214,244,0.04);
        }
        .widget-table tr:last-child td { border-bottom: none; }
        .widget-table tbody tr:hover { background: rgba(137,180,250,0.04); }

        .rank-gold   { color: var(--yellow) !important; font-weight: 700; }
        .rank-silver { color: #b8bfc8 !important; font-weight: 700; }
        .rank-bronze { color: #c87c3e !important; font-weight: 700; }
        .td-mode     { color: var(--mauve); font-weight: 700; font-size: 0.75rem; }
        .td-song     { font-weight: 600; }
        .td-lv       { color: var(--blue); font-weight: 700; }

        /* ── RESPONSIVE ── */
        @media (max-width: 900px) {
            .news-grid    { grid-template-columns: repeat(2, 1fr); }
            .widgets-grid { grid-template-columns: 1fr; }
        }
        @media (max-width: 600px) {
            .news-grid       { grid-template-columns: 1fr; }
            .hero-cta        { flex-direction: column; align-items: stretch; padding: 0 1rem; }
            .hero-cta-btn    { min-width: unset; }
            .hero-banner     { min-height: 75vh; }
            .hero-banner__logo { width: 80vw; }
        }
