/* --- Global Styles & Fonts --- */
@import url('https://fonts.googleapis.com/css2?family=Kanit:wght@300;400;700&family=Luckiest+Guy&display=swap');

:root {
    --font-primary: 'Kanit', sans-serif;
    --font-display: 'Luckiest+Guy', cursive;
    --color-dark-bg: #0d121c;
    --color-dark-blue: #1a2a4b;
    --color-light-text: #e0e6f0;
    --color-gold: #ffda47;
    --color-accent-blue: #00BFFF;
    --color-success: #28a745;
}

body {
    font-family: var(--font-primary);
    background-color: var(--color-dark-bg);
    color: var(--color-light-text);
    line-height: 1.7;
    margin: 0;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    overflow-x: hidden;
}

.main-content {
    flex-grow: 1;
    width: 100%;
    padding: 20px 0;
}

/* --- Background Video --- */
.video-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: -2;
}

.video-background video {
    min-width: 100%;
    min-height: 100%;
    width: auto;
    height: auto;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    object-fit: cover;
}

.video-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(13, 18, 28, 0.8);
    z-index: -1;
}

/* --- NEW HEADER STYLES --- */
.main-header {
    width: 100%;
    background-color: var(--color-dark-blue);
    padding: 0 40px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-sizing: border-box;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 80px;
    width: 100%;
    max-width: 1600px;
    margin: 0 auto;
}

.logo {
    font-family: var(--font-display);
    color: var(--color-gold);
    font-size: 2.2em;
    text-shadow: 0 0 8px rgba(255, 218, 71, 0.8);
    text-decoration: none;
    letter-spacing: 1.5px;
}

.main-nav {
    display: flex;
    justify-content: center;
    gap: 35px;
}

.main-nav a {
    color: var(--color-light-text);
    text-decoration: none;
    font-weight: 500;
    font-size: 1.1em;
    padding: 10px 5px;
    position: relative;
    transition: color 0.3s ease;
}

.main-nav a:hover {
    color: var(--color-gold);
}

.main-nav a.active {
    color: var(--color-gold);
    font-weight: 700;
}

.main-nav a.active::after {
    content: '';
    position: absolute;
    bottom: 20px; /* Adjust position */
    left: 50%;
    transform: translateX(-50%);
    width: 70%;
    height: 4px;
    background-color: var(--color-gold);
    border-radius: 2px;
}

.header-buttons .promo-button {
    background: none;
    color: var(--color-accent-blue);
    font-size: 1.1em;
    font-weight: 700;
    padding: 10px 15px;
    box-shadow: none;
    transition: color 0.3s ease;
    text-decoration: none;
}

.header-buttons .promo-button:hover {
    color: var(--color-gold);
    transform: none;
}

/* --- GENERAL CONTENT STYLES --- */
.content-section {
    background-color: rgba(28, 42, 75, 0.6);
    border-radius: 12px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
    padding: 50px 5%;
    margin: 40px auto;
    max-width: 1400px;
    position: relative;
    z-index: 10;
    border: 1px solid rgba(255, 218, 71, 0.1);
}

h2.section-title {
    font-family: var(--font-display);
    font-size: 3em;
    color: var(--color-gold);
    text-shadow: 2px 2px 8px rgba(0,0,0,0.6);
    text-align: center;
    margin-top: 0;
    margin-bottom: 40px;
    letter-spacing: 1.5px;
    text-transform: uppercase;
}

p.text-center {
    text-align: center;
}

/* --- CARD & GRID STYLES --- */
.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    text-align: center;
}
.feature-card {
    background-color: rgba(33, 48, 84, 0.5);
    padding: 30px;
    border-radius: 10px;
}
.feature-icon {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    margin-bottom: 20px;
    background-color: var(--color-dark-blue);
}

/* --- GUIDE & ARTICLE STYLES --- */
.guide-article {
    background-color: rgba(13, 18, 28, 0.7);
    padding: 30px;
    border-radius: 10px;
    margin-bottom: 30px;
    border-left: 5px solid var(--color-gold);
}
.guide-article h3 {
    text-align: left;
    font-family: var(--font-display);
    color: var(--color-gold);
    font-size: 2em;
}
.guide-article ul {
    text-align: left;
    list-style-type: disc;
    padding-left: 20px;
}

/* --- TOP-UP PAGE STYLES --- */
.topup-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 30px;
}
.topup-card-new {
    background: var(--color-dark-blue);
    border: 1px solid var(--color-accent-blue);
    border-radius: 10px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.topup-card-new.popular {
    border-color: var(--color-gold);
    box-shadow: 0 0 25px rgba(255, 218, 71, 0.6);
    transform: translateY(-10px) scale(1.02);
}
.topup-header-new {
    font-family: var(--font-display);
    font-size: 2.2em;
    color: var(--color-gold);
    text-align: center;
    padding-bottom: 15px;
    margin-bottom: 15px;
    border-bottom: 2px solid var(--color-gold);
}
.item-list {
    list-style: none;
    padding: 0;
    margin: 0 0 20px 0;
    text-align: left;
    flex-grow: 1;
}
.item-list li {
    padding-left: 25px;
    margin-bottom: 8px;
    font-size: 1em;
    background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="%23ffda47" class="bi bi-star-fill" viewBox="0 0 16 16"><path d="M3.612 15.443c-.386.198-.824-.149-.746-.592l.83-4.73L.173 6.765c-.329-.314-.158-.888.283-.95l4.898-.696L7.538.792c.197-.39.73-.39.927 0l2.184 4.327 4.898.696c.441.062.612.636.282.95l-3.522 3.356.83 4.73c.078.443-.36.79-.746.592L8 13.187l-4.389 2.256z"/></svg>') no-repeat left center;
}
.item-list li b {
    color: var(--color-accent-blue);
}
.popular-badge {
    position: absolute;
    top: 15px;
    right: -30px;
    background: var(--color-gold);
    color: var(--color-dark-blue);
    padding: 5px 30px;
    font-weight: bold;
    transform: rotate(45deg);
    font-size: 0.9em;
}

/* --- BUTTONS --- */
.detail-button {
    display: inline-block;
    padding: 10px 25px;
    font-size: 1em;
    font-weight: bold;
    text-decoration: none;
    border-radius: 30px;
    transition: transform 0.2s ease, box-shadow 0.3s ease;
    text-transform: uppercase;
    border: none;
    cursor: pointer;
    text-align: center;
    background-color: var(--color-success);
    color: white;
    box-shadow: 0 4px 15px rgba(40, 167, 69, 0.3);
    margin-top: auto;
}
.detail-button:hover {
     background-color: #218838;
     transform: translateY(-2px);
     box-shadow: 0 6px 20px rgba(40, 167, 69, 0.5);
}

/* --- BACK TO TOP BUTTON --- */
.back-to-top-button {
    display: none;
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 100;
    border: none;
    outline: none;
    background-color: var(--color-gold);
    color: var(--color-dark-blue);
    cursor: pointer;
    padding: 15px;
    border-radius: 50%;
    font-size: 18px;
    font-weight: bold;
    box-shadow: 0 5px 15px rgba(0,0,0,0.4);
    transition: background-color 0.3s, transform 0.2s;
}
.back-to-top-button:hover {
    background-color: #ffc107;
    transform: scale(1.1);
}

/* --- FOOTER --- */
.main-footer {
    background-color: #080b10;
    color: #a0a6b0;
    text-align: center;
    padding: 25px 0;
    margin-top: auto;
    box-shadow: 0 -5px 15px rgba(0, 0, 0, 0.4);
    position: relative;
    z-index: 20;
}

/* --- RESPONSIVE --- */
@media (max-width: 1024px) {
    .header-content {
        flex-wrap: wrap;
        justify-content: center;
        height: auto;
        padding: 15px 0;
    }
    .main-nav {
        order: 3; /*
        flex-basis: 100%;
        margin-top: 15px;
        gap: 15px;
    }
    .header-buttons {
        position: absolute;
        top: 25px;
        right: 40px;
    }
}
@media (max-width: 768px) {
    .main-header { padding: 0 20px; }
    .header-buttons { display: none; } /* Hide item shop button on mobile for more space */
    .main-nav { gap: 10px; flex-wrap: wrap; }
    .main-nav a { font-size: 1em; }
    h2.section-title { font-size: 2.5em; }
}
