:root {
    --bg-color: #0b132b;
    --bg-gradient: linear-gradient(135deg, #0b132b 0%, #1c2541 100%);
    --card-bg: rgba(28, 37, 65, 0.6);
    --card-border: rgba(58, 80, 107, 0.5);
    --text-primary: #ffffff;
    --text-secondary: #9fafca;
    --accent-blue: #3a506b;
    --highlight-blue: #5bc0be;
    --gold: #ffd700;
    --silver: #c0c0c0;
    --bronze: #cd7f32;
    --btn-primary: linear-gradient(90deg, #1e3a8a, #3b82f6);
    --btn-secondary: rgba(58, 80, 107, 0.8);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Kanit', sans-serif;
}

body {
    background: var(--bg-gradient);
    color: var(--text-primary);
    min-height: 100vh;
    padding: 2rem 1rem;
    overflow-x: hidden;
    position: relative;
}

body::before {
    content: '';
    position: absolute;
    top: -20%;
    left: -10%;
    width: 50vw;
    height: 50vw;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.15) 0%, rgba(0, 0, 0, 0) 70%);
    z-index: -1;
    border-radius: 50%;
}

/* Language Switcher */
.lang-switch {
    position: absolute;
    top: 1rem;
    right: 1.5rem;
    display: flex;
    gap: 0.5rem;
    background: rgba(28, 37, 65, 0.8);
    padding: 0.3rem;
    border-radius: 20px;
    border: 1px solid var(--card-border);
    z-index: 100;
}

.lang-btn {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    padding: 0.4rem 0.8rem;
    border-radius: 15px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.lang-btn:hover {
    color: var(--text-primary);
}

.lang-btn.active {
    background: var(--highlight-blue);
    color: #000;
    box-shadow: 0 0 10px rgba(91, 192, 190, 0.4);
}

body::after {
    content: '';
    position: absolute;
    bottom: -20%;
    right: -10%;
    width: 60vw;
    height: 60vw;
    background: radial-gradient(circle, rgba(91, 192, 190, 0.1) 0%, rgba(0, 0, 0, 0) 70%);
    z-index: -1;
    border-radius: 50%;
}

.container {
    max-width: 1000px;
    margin: 0 auto;
}

header {
    text-align: center;
    margin-bottom: 4rem;
}

.glow-text {
    font-size: 3rem;
    font-weight: 700;
    background: linear-gradient(to right, #60a5fa, #ffffff, #60a5fa);
    -webkit-background-clip: text;
    background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 0 30px rgba(96, 165, 250, 0.3);
    margin-bottom: 0.5rem;
}

.subtitle {
    font-size: 1.2rem;
    color: var(--text-secondary);
    font-weight: 300;
}

.glass {
    background: rgba(28, 37, 65, 0.4);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
}

/* Podium Styles */
.podium-container {
    display: flex;
    justify-content: center;
    align-items: flex-end;
    gap: 1.5rem;
    margin-bottom: 5rem;
    min-height: 400px;
}

.podium-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 280px;
    transition: transform 0.3s ease;
    position: relative;
    /* Add this for absolute child positioning */
}

.podium-item:hover {
    transform: translateY(-10px);
}

.card {
    width: 100%;
    padding: 2rem 1.5rem;
    text-align: center;
    margin-bottom: 1rem;
    position: relative;
    border-top: 4px solid var(--accent-blue);
}

.card.winner {
    border-top: 4px solid var(--gold);
    transform: scale(1.05);
    z-index: 2;
    box-shadow: 0 0 40px rgba(255, 215, 0, 0.15);
    animation: golden-glow 2s infinite alternate;
}

@keyframes golden-glow {
    from {
        box-shadow: 0 0 20px rgba(255, 215, 0, 0.2), 0 0 40px rgba(255, 215, 0, 0.1);
    }

    to {
        box-shadow: 0 0 40px rgba(255, 215, 0, 0.6), 0 0 80px rgba(255, 215, 0, 0.4);
    }
}

/* Sparkling Border for Promotions */
.sparkle-card {
    position: relative;
    background: #1c2541;
    border-radius: 12px;
    padding: 1rem 2rem;
    margin-bottom: 1rem;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    overflow: hidden;
    border: 1px solid rgba(255, 215, 0, 0.3);
    transition: transform 0.3s ease;
}

.sparkle-card:hover {
    transform: scale(1.02);
}

.sparkle-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: conic-gradient(transparent,
            rgba(255, 215, 0, 0.1),
            rgba(255, 215, 0, 0.8),
            rgba(255, 215, 0, 0.1),
            transparent 30%);
    animation: rotate-sparkle 4s linear infinite;
    z-index: 1;
}

.sparkle-card::after {
    content: '';
    position: absolute;
    inset: 2px;
    background: #111827;
    border-radius: 10px;
    z-index: 2;
}

.sparkle-content {
    position: relative;
    z-index: 3;
    display: flex;
    align-items: center;
    gap: 15px;
    width: 100%;
    justify-content: center;
}

@keyframes rotate-sparkle {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

.rank-2 .card {
    border-top: 4px solid var(--silver);
}

.rank-3 .card {
    border-top: 4px solid var(--bronze);
}

.rank-badge {
    position: absolute;
    top: -20px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--accent-blue);
    padding: 0.5rem 1.5rem;
    border-radius: 20px;
    font-weight: 600;
    font-size: 1.1rem;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    white-space: nowrap;
}

.rank-badge.gold {
    background: linear-gradient(135deg, #ffd700, #b8860b);
    color: #000;
}

.rank-badge.silver {
    background: linear-gradient(135deg, #e0e0e0, #9e9e9e);
    color: #000;
}

.rank-badge.bronze {
    background: linear-gradient(135deg, #cd7f32, #8b4513);
    color: #fff;
}

.prize {
    font-size: 1.8rem;
    font-weight: 700;
    margin: 1.5rem 0;
    color: var(--text-primary);
}

.prize.highlight {
    font-size: 2.2rem;
    color: var(--gold);
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.3);
}

.player-info {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 12px;
    padding: 1rem;
}

.info-group {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.8rem;
    font-size: 1.4rem;
}

.info-group:last-child {
    margin-bottom: 0;
}

.info-group label {
    color: var(--text-secondary);
    font-weight: 500;
}

.pedestal {
    width: 80%;
    border-top-left-radius: 8px;
    border-top-right-radius: 8px;
    background: linear-gradient(to bottom, #1e293b, #0f172a);
    border: 1px solid var(--card-border);
    border-bottom: none;
}

.rank-1 .pedestal {
    height: 60px;
    border-top: 2px solid var(--gold);
}

.rank-2 .pedestal {
    height: 40px;
    border-top: 2px solid var(--silver);
}

.rank-3 .pedestal {
    height: 20px;
    border-top: 2px solid var(--bronze);
}

/* Sparkle Promotions Container */
.promo-list-sparkle {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    max-width: 800px;
    margin: 0 auto;
}

/* Player Data Spans */
.player-data {
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.05);
    min-width: 60px;
    text-align: center;
    display: inline-block;
    font-size: 1.4rem;
    font-weight: 700;
}

.loading-spinner {
    display: inline-block;
    width: 15px;
    height: 15px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Actions */
.actions {
    text-align: center;
    margin: 2rem 0;
}

.top-actions {
    text-align: left;
    margin-bottom: 2rem;
}

.btn {
    display: inline-block;
    padding: 1rem 2.5rem;
    border-radius: 30px;
    font-size: 1.1rem;
    font-weight: 600;
    text-decoration: none;
    color: white;
    transition: all 0.3s;
    border: none;
    cursor: pointer;
}

.btn-primary {
    background: var(--btn-primary);
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.4);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(59, 130, 246, 0.6);
}

.btn-secondary {
    background: var(--btn-secondary);
    border: 1px solid var(--card-border);
}

.btn-secondary:hover {
    background: rgba(58, 80, 107, 1);
    transform: translateX(-5px);
}

.arrow {
    display: inline-block;
    transition: transform 0.3s;
}

.btn-primary:hover .arrow {
    transform: translateX(5px);
}

/* Page 2 Styles */
.lists-container {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.rank-group {
    padding: 2rem;
    overflow: hidden;
}

.group-header {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--card-border);
}

.group-header h2 {
    font-size: 1.8rem;
    color: var(--text-primary);
    margin: 0;
}

.group-prize {
    background: rgba(91, 192, 190, 0.1);
    color: var(--highlight-blue);
    padding: 0.5rem 1.2rem;
    border-radius: 20px;
    font-weight: 500;
    border: 1px solid rgba(91, 192, 190, 0.3);
}

.table-responsive {
    overflow-x: auto;
}

.ranking-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 500px;
}

.ranking-table th,
.ranking-table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.ranking-table th {
    color: var(--text-secondary);
    font-weight: 500;
    text-transform: uppercase;
    font-size: 1rem;
    letter-spacing: 1px;
}

.ranking-table tbody tr {
    transition: background 0.2s;
}

.ranking-table tbody tr:hover {
    background: rgba(255, 255, 255, 0.03);
}

.ranking-table td:nth-child(1) {
    font-weight: 600;
    color: var(--highlight-blue);
    width: 15%;
    font-size: 1.1rem;
}

.ranking-table td:nth-child(2),
.ranking-table td:nth-child(3) {
    width: 30%;
}

.ranking-table td:nth-child(4) {
    width: 25%;
    color: var(--gold);
    font-weight: 500;
}

/* Admin Contact Link */
.admin-contact-container {
    text-align: center;
    margin-top: 2rem;
}

.admin-contact-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.8rem 1.5rem;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50px;
    color: var(--white);
    text-decoration: none;
    font-size: 1rem;
    font-weight: 500;
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
}

.admin-contact-link:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    border-color: var(--highlight-blue);
}

.admin-contact-link .icon {
    font-size: 1.2rem;
}

/* End of CSS */

.admin-note {
    text-align: center;
    color: var(--text-secondary);
    margin-top: 4rem;
    font-size: 0.9rem;
    opacity: 0.7;
}

@media (max-width: 900px) {
    .new-header {
        margin-left: 0;
        margin-right: 0;
        width: 100%;
    }

    .top-bar {
        flex-direction: column;
        gap: 0.8rem;
        padding: 0.8rem;
    }

    .top-bar .left-section {
        justify-content: center;
        width: 100%;
        margin-bottom: 0.2rem;
    }

    .top-bar .right-section {
        justify-content: center;
        flex-wrap: wrap;
        width: 100%;
        gap: 0.5rem;
    }

    .btn-play,
    .btn-register {
        padding: 0.5rem 0.6rem;
        font-size: 0.8rem;
        flex: 1 1 auto;
        justify-content: center;
        text-align: center;
    }

    .lang-switch-inline {
        order: -1;
        /* Language switch at the top of buttons */
        width: 100%;
        justify-content: center;
        margin-bottom: 0.2rem;
    }

    header {
        margin-bottom: 2rem;
    }

    .glow-text {
        font-size: 1.8rem;
    }

    .subtitle {
        font-size: 1rem;
    }

    .podium-container {
        flex-direction: column;
        align-items: center;
        gap: 1.5rem;
        margin-bottom: 3rem;
    }

    .podium-item {
        width: 100%;
        max-width: 320px;
        opacity: 0;
        transform: translateY(20px);
        animation: cardEntry 0.6s ease forwards;
    }

    .rank-1 {
        order: -1;
    }

    .pedestal {
        display: none;
    }

    .podium-item:nth-child(1) {
        animation-delay: 0.2s;
    }

    .podium-item:nth-child(2) {
        animation-delay: 0.4s;
    }

    .podium-item:nth-child(3) {
        animation-delay: 0.6s;
    }

    @keyframes cardEntry {
        to {
            opacity: 1;
            transform: translateY(0);
        }
    }
}

/* --- Search Input Styles --- */
.search-container {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 2rem auto;
    max-width: 400px;
    position: relative;
    z-index: 10;
}

.search-input {
    width: 100%;
    padding: 1rem 1.5rem;
    padding-right: 3rem;
    border-radius: 30px;
    border: 1px solid rgba(91, 192, 190, 0.4);
    background: rgba(28, 37, 65, 0.6);
    color: var(--text-primary);
    font-size: 1.1rem;
    outline: none;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.search-input:focus {
    border-color: var(--highlight-blue);
    box-shadow: 0 0 20px rgba(91, 192, 190, 0.3);
    background: rgba(28, 37, 65, 0.8);
}

.search-input::placeholder {
    color: var(--text-secondary);
    opacity: 0.7;
}

.search-btn {
    position: absolute;
    right: 5px;
    top: 50%;
    transform: translateY(-50%);
    background: var(--highlight-blue);
    border: none;
    border-radius: 50%;
    width: 45px;
    height: 45px;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 0 10px rgba(91, 192, 190, 0.4);
}

.search-btn:hover {
    background: #4ab0ae;
    transform: translateY(-50%) scale(1.05);
}

.search-result-container {
    max-width: 400px;
    margin: -1rem auto 3rem auto;
    background: var(--card-bg);
    border: 1px solid var(--highlight-blue);
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3), 0 0 20px rgba(91, 192, 190, 0.2);
    backdrop-filter: blur(15px);
    animation: fadeIn 0.3s ease-out;
    position: relative;
    z-index: 9;
}

.search-result-container.hidden {
    display: none;
}

.result-item {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.result-rank {
    font-size: 1.2rem;
    color: var(--highlight-blue);
    font-weight: 600;
}

.result-details {
    display: flex;
    justify-content: space-between;
    font-size: 1.1rem;
}

.result-prize {
    color: var(--gold);
    font-weight: 700;
    font-size: 1.2rem;
    margin-top: 0.5rem;
    text-align: right;
}

/* --- Promotions Section --- */
.promo-container {
    margin: 4rem auto;
    max-width: 800px;
}

.promo-box {
    padding: 3rem 2rem;
    text-align: center;
    border: 1px solid rgba(255, 215, 0, 0.3);
    position: relative;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.promo-box::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 215, 0, 0.1) 0%, transparent 60%);
    animation: rotateBg 15s linear infinite;
    z-index: 0;
}

@keyframes rotateBg {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

.promo-title {
    position: relative;
    z-index: 1;
    font-size: 2.2rem;
    margin-bottom: 2rem;
}

.glow-text-small {
    background: linear-gradient(to right, #ffd700, #fff, #ffd700);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 0 20px rgba(255, 215, 0, 0.4);
    font-weight: 700;
}

.promo-list {
    list-style: none;
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
    margin-bottom: 2rem;
    font-size: 1.3rem;
}

.promo-list li {
    padding: 1rem;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    transition: transform 0.3s;
    color: var(--gold);
}

.promo-list li:hover {
    transform: scale(1.02);
    background: rgba(255, 215, 0, 0.05);
    border-color: rgba(255, 215, 0, 0.2);
}

.highlight-text {
    color: var(--gold);
    font-weight: 700;
    font-size: 1.5rem;
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.3);
}

.promo-gold-title {
    background: linear-gradient(to right, #f59e0b, #ffffff, #f59e0b);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 0 25px rgba(245, 158, 11, 0.5);
    font-weight: 700;
}

.promo-note {
    position: relative;
    z-index: 1;
    color: rgba(255, 255, 255, 0.8);
    font-style: italic;
    font-size: 1.1rem;
    margin-top: 1rem;
}

/* --- Call to Action Container --- */
.cta-container {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 2rem;
    margin: 3rem 0;
}

.register-btn {
    background: linear-gradient(90deg, #d97706, #f59e0b);
    box-shadow: 0 4px 15px rgba(245, 158, 11, 0.3);
    border-radius: 50px;
    border: none;
}

.register-btn:hover {
    background: linear-gradient(90deg, #b45309, #d97706);
    box-shadow: 0 8px 25px rgba(245, 158, 11, 0.5);
    transform: translateY(-3px);
}

/* --- New Menu Layout --- */
.new-header {
    width: 100%;
    margin-bottom: 2rem;
}

.top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: rgba(0, 0, 0, 0.6);
    padding: 0.8rem 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
}

.top-bar .left-section,
.top-bar .right-section,
.top-bar .center-section {
    display: flex;
    align-items: center;
}

.top-bar .left-section {
    flex: 1;
}

.top-bar .center-section {
    flex: 1;
    justify-content: center;
}

.top-bar .right-section {
    flex: 2;
    justify-content: flex-end;
    gap: 0.8rem;
}

.top-logo {
    color: #fff;
    font-size: 1.8rem;
    font-weight: 700;
    margin: 0;
    background: linear-gradient(to right, #ffd700, #fff);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.3);
}

.search-btn-top {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    color: #fff;
    padding: 0.5rem 0.8rem;
    cursor: pointer;
    transition: all 0.3s;
}

.search-btn-top:hover {
    background: rgba(255, 255, 255, 0.1);
}

.btn-play {
    background: linear-gradient(180deg, #f59e0b, #d97706);
    color: #fff;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
    border: none;
    padding: 0.5rem 0.8rem;
    font-size: 0.95rem;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    transition: all 0.3s;
}

.btn-green {
    background: linear-gradient(180deg, #10b981, #059669);
    border: 1px solid #059669;
}

.btn-blue {
    background: linear-gradient(180deg, #3b82f6, #2563eb);
    border: 1px solid #2563eb;
}

.top-logo-img {
    height: 50px;
    width: auto;
    display: block;
    margin-top: 5px;
}

.btn-play:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(245, 158, 11, 0.4);
    color: #fff;
}

.btn-register {
    background: rgba(0, 0, 0, 0.5);
    color: #f59e0b;
    border: 1px solid #f59e0b;
    padding: 0.5rem 0.8rem;
    font-size: 0.95rem;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    white-space: nowrap;
    transition: all 0.3s;
}

.btn-register:hover {
    background: rgba(245, 158, 11, 0.1);
}

.lang-switch-inline {
    display: flex;
    gap: 0.3rem;
    background: rgba(28, 37, 65, 0.8);
    padding: 0.2rem;
    border-radius: 20px;
    border: 1px solid var(--card-border);
}

.bottom-bar {
    background-color: rgba(0, 0, 0, 0.4);
    padding: 0 1rem;
    border-bottom: 2px solid #f59e0b;
    backdrop-filter: blur(10px);
}

.nav-menu-left {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    gap: 1.5rem;
    overflow-x: auto;
    scrollbar-width: none;
}

.nav-menu-left::-webkit-scrollbar {
    display: none;
}

.nav-item {
    color: #bbb;
    text-decoration: none;
    padding: 1rem 0.5rem;
    font-size: 1.05rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    white-space: nowrap;
    border-bottom: 3px solid transparent;
    transition: all 0.3s;
}

.nav-item:hover {
    color: #fff;
}

.nav-item.active {
    color: #f59e0b;
    border-bottom: 3px solid #f59e0b;
    text-shadow: 0 0 10px rgba(245, 158, 11, 0.3);
}

/* Hide old header and floating logo for cleaner top area */
.app-header {
    display: none !important;
}

.floating-logo {
    display: none !important;
}

@media (max-width: 600px) {
    .top-logo {
        font-size: 1.2rem;
    }

    .btn-play,
    .btn-register {
        padding: 0.4rem 0.8rem;
        font-size: 0.85rem;
    }

    .top-bar {
        padding: 0.5rem;
    }

    .top-bar .right-section {
        gap: 0.4rem;
    }

    .search-btn-top {
        display: none;
    }

    /* optional: hide search icon on very small screens to save space */
}

/* --- Sidebar Styles --- */
.sidebar {
    position: fixed;
    top: 0;
    right: -500px;
    width: 450px;
    max-width: 100vw;
    height: 100vh;
    background: var(--bg-color);
    box-shadow: -10px 0 30px rgba(0, 0, 0, 0.5);
    z-index: 1000;
    transition: right 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: flex;
    flex-direction: column;
    border-left: 1px solid var(--card-border);
}

.sidebar.open {
    right: 0;
}

.sidebar::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(28, 37, 65, 0.95) 0%, rgba(11, 19, 43, 0.98) 100%);
    z-index: -1;
}

.sidebar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 2rem;
    border-bottom: 1px solid var(--card-border);
}

.sidebar-header h2 {
    color: var(--text-primary);
    font-size: 1.8rem;
    margin: 0;
    background: linear-gradient(to right, var(--gold), #fff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.close-btn {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 2.5rem;
    cursor: pointer;
    line-height: 1;
    transition: color 0.3s;
    outline: none;
}

.close-btn:hover {
    color: #ef4444;
}

.sidebar-content {
    padding: 2rem;
    overflow-y: auto;
    flex-grow: 1;
}

.sidebar-desc {
    color: var(--text-secondary);
    margin-bottom: 2rem;
    font-size: 1.1rem;
    line-height: 1.5;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
    font-weight: 500;
}

.form-input {
    width: 100%;
    padding: 1rem;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--card-border);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 1rem;
    transition: all 0.3s;
}

.form-input:focus {
    outline: none;
    border-color: var(--highlight-blue);
    box-shadow: 0 0 10px rgba(91, 192, 190, 0.2);
}

.w-100 {
    width: 100%;
    background: #00B900;
    /* Line Green */
    box-shadow: 0 4px 15px rgba(0, 185, 0, 0.3);
    border: none;
}

.w-100:hover {
    background: #009900;
    box-shadow: 0 8px 25px rgba(0, 185, 0, 0.5);
    transform: translateY(-3px);
}

/* Overlay */
.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    z-index: 999;
    opacity: 1;
    transition: opacity 0.3s ease;
}

.overlay.hidden {
    display: none;
    opacity: 0;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 500px) {
    .sidebar {
        width: 100vw;
        right: -100vw;
    }
}


/* --- App Header & Hamburger --- */
.app-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
    margin-bottom: 1rem;
}

.hamburger-btn {
    background: transparent;
    border: none;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    justify-content: space-around;
    width: 2rem;
    height: 2rem;
    z-index: 101;
}

.hamburger-btn span {
    display: block;
    width: 2rem;
    height: 0.25rem;
    background: var(--text-primary);
    border-radius: 10px;
    transition: all 0.3s linear;
    position: relative;
    transform-origin: 1px;
}

.hamburger-btn:hover span {
    background: var(--highlight-blue);
}

.lang-switch-inline {
    display: flex;
    gap: 0.5rem;
    background: rgba(28, 37, 65, 0.8);
    padding: 0.3rem;
    border-radius: 20px;
    border: 1px solid var(--card-border);
}

/* Override old absolute positioning */
.lang-switch {
    display: none;
}

/* --- Search Area Refined --- */
.search-container {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 2rem auto;
    max-width: 500px;
    position: relative;
    z-index: 10;
}

.search-input {
    width: 100%;
    padding: 1.2rem 1.5rem 1.2rem 3.5rem;
    border-radius: 40px;
    border: 1px solid rgba(91, 192, 190, 0.5);
    background: rgba(11, 19, 43, 0.7);
    color: var(--text-primary);
    font-size: 1.2rem;
    outline: none;
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    transition: all 0.3s ease;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
}

.search-input:focus {
    border-color: var(--highlight-blue);
    box-shadow: 0 0 25px rgba(91, 192, 190, 0.4);
    background: rgba(11, 19, 43, 0.9);
}

.search-icon {
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.3rem;
    opacity: 0.7;
    pointer-events: none;
}

/* Main Sidebar Nav */
.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 2rem;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.5rem;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 1.2rem;
    border-radius: 12px;
    transition: all 0.3s;
    background: rgba(255, 255, 255, 0.02);
}

.nav-link:hover {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-primary);
    transform: translateX(5px);
}

.nav-link.active {
    background: linear-gradient(90deg, rgba(59, 130, 246, 0.2), transparent);
    color: var(--highlight-blue);
    border-left: 4px solid var(--highlight-blue);
}

.nav-link.highlight-nav {
    background: linear-gradient(90deg, rgba(255, 215, 0, 0.15), transparent);
    color: var(--gold);
    border-left: 4px solid var(--gold);
    animation: neonPulse 2s infinite alternate;
}

.nav-link.highlight-nav:hover {
    background: linear-gradient(90deg, rgba(255, 215, 0, 0.3), transparent);
    color: #fff;
}

.divider {
    height: 1px;
    background: var(--card-border);
    margin: 2rem 0;
}

/* Page 3 Activities Styles */
.activities-grid {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    gap: 2rem;
    margin-top: 3rem;
    padding-bottom: 2rem;
    scroll-snap-type: x mandatory;
    scrollbar-width: thin;
    scrollbar-color: var(--gold) rgba(255, 255, 255, 0.1);
}

.activities-grid::-webkit-scrollbar {
    height: 8px;
}

.activities-grid::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}

.activities-grid::-webkit-scrollbar-thumb {
    background: var(--gold);
    border-radius: 4px;
}

.activity-card {
    flex: 0 0 320px;
    max-width: 350px;
    scroll-snap-align: start;
    padding: 2.5rem 2rem;
    border-radius: 20px;
    text-align: center;
    position: relative;
    overflow: hidden;
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.activity-card:hover {
    transform: translateY(-15px) scale(1.02);
}

.card-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
    display: inline-block;
}

.lotto-card {
    background: linear-gradient(135deg, rgba(220, 38, 38, 0.2) 0%, rgba(153, 27, 27, 0.6) 100%);
    border-color: rgba(239, 68, 68, 0.5);
    box-shadow: 0 10px 40px rgba(220, 38, 38, 0.2);
}

.lotto-card:hover {
    box-shadow: 0 15px 50px rgba(220, 38, 38, 0.4);
    border-color: rgba(239, 68, 68, 0.8);
}

.referral-card {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.2) 0%, rgba(4, 120, 87, 0.6) 100%);
    border-color: rgba(52, 211, 153, 0.5);
    box-shadow: 0 10px 40px rgba(16, 185, 129, 0.2);
}

.referral-card:hover {
    box-shadow: 0 15px 50px rgba(16, 185, 129, 0.4);
    border-color: rgba(52, 211, 153, 0.8);
}

.bonus-card {
    background: linear-gradient(135deg, rgba(217, 119, 6, 0.2) 0%, rgba(180, 83, 9, 0.6) 100%);
    border-color: rgba(251, 191, 36, 0.5);
    box-shadow: 0 10px 40px rgba(217, 119, 6, 0.2);
}

.bonus-card:hover {
    box-shadow: 0 15px 50px rgba(217, 119, 6, 0.4);
    border-color: rgba(251, 191, 36, 0.8);
}

.activity-title {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: #fff;
}

.activity-desc {
    font-size: 1.15rem;
    color: rgba(255, 255, 255, 0.85);
    line-height: 1.6;
}

.highlight-gold {
    color: var(--gold);
    font-weight: 700;
    font-size: 1.3rem;
}

@keyframes neonPulse {
    from {
        box-shadow: inset 0 0 10px rgba(255, 215, 0, 0.1);
    }

    to {
        box-shadow: inset 0 0 20px rgba(255, 215, 0, 0.3);
    }
}


/* --- Floating AJA Logo --- */
.floating-logo {
    position: absolute;
    top: 15px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 2.2rem;
    font-weight: 800;
    color: #fff;
    z-index: 1000;
    letter-spacing: 3px;
    font-family: 'Kanit', sans-serif;
    pointer-events: none;
    text-transform: uppercase;
    white-space: nowrap;
}

/* --- Footer LINE Contact --- */
.footer-contact {
    margin-top: 3rem;
    margin-bottom: 2rem;
    padding: 1.2rem;
    text-align: center;
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.15) 0%, rgba(4, 120, 87, 0.4) 100%);
    border: 1px solid rgba(16, 185, 129, 0.6);
    border-radius: 15px;
    color: #10b981;
    font-size: 1.2rem;
    font-weight: 600;
    backdrop-filter: blur(10px);
    box-shadow: 0 0 20px rgba(16, 185, 129, 0.2);
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    animation: pulseGreen 2s infinite;
    text-decoration: none;
    transition: all 0.3s;
}

.footer-contact:hover {
    box-shadow: 0 0 30px rgba(16, 185, 129, 0.5);
    color: #fff;
    border-color: #10b981;
    transform: translateY(-3px);
}

.footer-contact .line-icon {
    display: flex;
    justify-content: center;
    align-items: center;
    color: #00B900;
    background: #fff;
    border-radius: 50%;
    padding: 2px;
}

@keyframes pulseGreen {

    0%,
    100% {
        box-shadow: 0 0 15px rgba(16, 185, 129, 0.2);
    }

    50% {
        box-shadow: 0 0 25px rgba(16, 185, 129, 0.5);
    }
}

/* --- Fancy Sidebar Navigation --- */
.fancy-nav {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    padding-top: 0.5rem;
}

.nav-category {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.5);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: -0.2rem;
    padding-left: 0.5rem;
    font-weight: 600;
}

.nav-link-fancy {
    display: flex;
    align-items: center;
    gap: 1.2rem;
    padding: 0.8rem 1rem;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 16px;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.05);
    text-decoration: none;
    color: #fff;
}

.nav-link-fancy:hover,
.nav-link-fancy.active {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
    border-color: rgba(255, 255, 255, 0.15);
}

.nav-link-fancy.active {
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.1) 0%, rgba(255, 140, 0, 0.1) 100%);
    border-color: rgba(255, 215, 0, 0.4);
}

.nav-link-fancy:active {
    transform: scale(0.96);
}

.nav-icon-box {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.4rem;
    box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.4);
    flex-shrink: 0;
}

.nav-text-box {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.nav-text-box .main-text {
    font-size: 1.1rem;
    font-weight: 600;
}

.nav-text-box .sub-text {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.5);
    margin-top: 3px;
}

.nav-link-fancy.active .sub-text,
.nav-link-fancy:hover .sub-text {
    color: rgba(255, 255, 255, 0.9);
}

/* --- New Added Styles --- */

/* Sticky Header */
.new-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    width: calc(100% + 2rem);
    /* Compensate for container p-1 */
    margin-left: -1rem;
    margin-right: -1rem;
    background: rgba(11, 19, 43, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--card-border);
    padding: 0.5rem 0;
}

/* Adjusted Promo Box */
.promo-gold-title {
    color: var(--gold);
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    text-shadow: none;
    /* No glow */
}

.highlight-text-glow {
    color: var(--gold);
    font-weight: 700;
    font-size: 1.3rem;
    /* remove text shadow glow */
}

/* Mobile Bottom Navigation */
.mobile-bottom-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: #1a1c23;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.5);
    z-index: 2000;
    justify-content: space-around;
    align-items: center;
    padding: 10px 0 5px 0;
    border-top: 2px solid var(--gold);
}

@media (max-width: 768px) {
    .mobile-bottom-nav {
        display: flex;
    }

    .new-header .bottom-bar {
        display: none;
        /* Hide top bottom-bar on mobile if we have bottom nav */
    }

    body {
        padding-bottom: 80px;
        /* Space for bottom nav */
    }
}

.bottom-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    color: #888;
    text-decoration: none;
    font-size: 0.75rem;
    transition: all 0.3s;
    position: relative;
    width: 20%;
}

.bottom-nav-item .icon {
    font-size: 1.3rem;
    margin-bottom: 4px;
    filter: grayscale(100%);
    opacity: 0.6;
}

.bottom-nav-item.active,
.bottom-nav-item:hover {
    color: var(--gold);
}

.bottom-nav-item.active .icon,
.bottom-nav-item:hover .icon {
    filter: none;
    opacity: 1;
}

.center-btn {
    position: relative;
}

.center-btn-inner {
    position: absolute;
    top: -35px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #1f2937, #111827);
    border: 3px solid var(--gold);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 -5px 15px rgba(255, 215, 0, 0.3);
    z-index: 10;
}

.center-btn-inner .icon {
    font-size: 1.8rem;
    margin-bottom: 0;
    filter: none;
    opacity: 1;
}

.center-btn .nav-text {
    margin-top: 25px;
}

/* Custom Registration Modal */
.form-group-custom label {
    display: block;
    margin-bottom: 0.5rem;
    color: #ccc;
    font-size: 0.95rem;
}

.form-group-custom input:focus,
.form-group-custom select:focus {
    outline: none;
    border-color: #f59e0b !important;
    box-shadow: 0 0 8px rgba(245, 158, 11, 0.5);
}

/* Activity Slider */
.activity-slider-container {
    width: 100%;
    margin: 2rem 0;
    overflow: hidden;
    position: relative;
}

.activity-slider {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    gap: 1rem;
    padding-bottom: 1rem;
    scrollbar-width: thin;
    scrollbar-color: var(--gold) rgba(255, 255, 255, 0.1);
}

.activity-slider::-webkit-scrollbar {
    height: 8px;
}

.activity-slider::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}

.activity-slider::-webkit-scrollbar-thumb {
    background: var(--gold);
    border-radius: 4px;
}

.slider-img {
    flex: 0 0 calc(25% - 0.75rem);
    max-width: calc(25% - 0.75rem);
    scroll-snap-align: start;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
    object-fit: cover;
    width: 100%;
}

@media (max-width: 1024px) {
    .slider-img {
        flex: 0 0 calc(33.333% - 0.66rem);
        max-width: calc(33.333% - 0.66rem);
    }
}

@media (max-width: 768px) {
    .slider-img {
        flex: 0 0 calc(50% - 0.5rem);
        max-width: calc(50% - 0.5rem);
    }
}

@media (max-width: 480px) {
    .slider-img {
        flex: 0 0 calc(80% - 1rem);
        max-width: calc(80% - 1rem);
    }
}

/* Modal Overlay */
.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.75);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 0.3s ease;
}

.overlay.hidden {
    opacity: 0;
    pointer-events: none;
}

.modal {
    position: relative;
    width: 90%;
    max-width: 500px;
    animation: popIn 0.3s ease-out;
}

@keyframes popIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

.close-btn {
    position: absolute;
    top: 15px;
    right: 20px;
    background: none;
    border: none;
    color: #fff;
    font-size: 1.5rem;
    cursor: pointer;
    line-height: 1;
}