/* --- Xcash - Modern Green/Dark Theme --- */
:root {
    --primary-green: #2dd4bf;
    --dark-green: #0d9488;
    --light-green: #99f6e4;
    --dark-bg: #111827;
    --card-bg: #1f2937;
    --card-bg-light: #374151;
    --text-white: #ffffff;
    --text-gray: #d1d5db;
    --gold-accent: #fbbf24;
    --font-heading: 'Kanit', sans-serif;
    --font-body: 'Sarabun', sans-serif;
}

body {
    background: linear-gradient(135deg, var(--dark-bg) 0%, #111827 100%);
    font-family: var(--font-body);
    color: var(--text-gray);
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    color: var(--text-white);
}

/* --- Layout --- */
.container-main {
    padding-bottom: 100px; /* Space for bottom nav on mobile */
}

/* --- Header --- */
.navbar-custom {
    background: var(--dark-card);
    border-bottom: 1px solid var(--primary-green);
    box-shadow: 0 4px 30px rgba(45, 212, 191, 0.1);
}
.navbar-brand {
    font-weight: bold;
    font-size: 1.5rem;
    color: var(--primary-green) !important;
}

/* --- Balance / Stat Card --- */
.stat-card {
    background: rgba(55, 65, 81, 0.9);
    border-radius: 20px;
    padding: 2rem;
    text-align: center;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(45, 212, 191, 0.2);
}
.stat-amount {
    font-size: 2.5rem;
    font-weight: bold;
    color: var(--gold-accent);
    margin: 0.5rem 0;
    text-shadow: 0 0 20px rgba(251, 191, 36, 0.5);
}

/* --- Feature Grid --- */
.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 1rem;
}
.feature-btn {
    background: transparent;
    border: 1px solid var(--primary-green);
    border-radius: 15px;
    padding: 1.5rem 1rem;
    text-align: center;
    color: var(--text-white);
    text-decoration: none;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 120px;
}
.feature-btn:hover {
    background: var(--primary-green);
    color: var(--dark-bg);
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(45, 212, 191, 0.3);
}
.feature-btn i { font-size: 2rem; margin-bottom: 0.5rem; }
.feature-btn span { font-size: 0.9rem; font-weight: 500; }

/* --- Content Section --- */
.content-section {
background: var(--card-bg);
border-radius: 20px;
padding: 2rem;
margin-top: 2rem;
}
.content-section .table {
color: var(--text-gray);
margin-bottom: 0; 
}
.content-section .table thead th {
color: var(--primary-green);
border-bottom: 2px solid var(--primary-green);
}
.content-section .table tbody td {
border-bottom: 1px solid var(--card-bg-light);
}
.content-section .table tbody tr:last-child td {
border-bottom: none;
}
.content-section .table .fw-bold.text-success { / สไตล์สำหรับเลขเด่น */
color: var(--gold-accent) !important;
text-shadow: 0 0 5px rgba(251, 191, 36, 0.5);
}

/* สไตล์เพิ่มเติมสำหรับเน้นข้อความ */
.emphasize {
color: var(--primary-green);
font-weight: bold;
}

.section-title {
    color: var(--primary-green);
    font-size: 1.8rem;
    font-weight: bold;
    text-align: center;
    margin-bottom: 2rem;
}

/* --- Article Card --- */
.article-card {
    background: var(--card-bg-light);
    border-radius: 15px;
    padding: 1.5rem;
    margin-bottom: 1rem;
    border-left: 4px solid var(--primary-green);
    transition: all 0.3s ease;
    cursor: pointer;
}
.article-card:hover {
    background: var(--card-bg);
    transform: translateX(5px);
    box-shadow: 0 8px 25px rgba(45, 212, 191, 0.1);
}
.article-card h5 { color: var(--primary-green); margin-bottom: 0.5rem; font-weight: 600; }
.article-card p { color: var(--text-gray); font-size: 0.9rem; line-height: 1.6; }

/* --- Bottom Navigation (Mobile Only) --- */
.bottom-nav {
    background: rgba(31, 41, 55, 0.8);
    backdrop-filter: blur(10px);
    padding: 0.5rem 0;
    border-top: 1px solid rgba(45, 212, 191, 0.2);
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 1030;
}
.bottom-nav .nav-item {
    text-align: center;
    color: var(--text-gray);
    text-decoration: none;
    transition: all 0.3s ease;
}
.bottom-nav .nav-item:hover, .bottom-nav .nav-item.active {
    color: var(--primary-green);
}
.bottom-nav .nav-item i { font-size: 1.5rem; }
.bottom-nav .nav-item span { font-size: 0.7rem; display: block; }


/* --- Desktop Layout Adjustments --- */
@media (min-width: 992px) {
    .container-main {
        max-width: 1200px;
        margin: 0 auto;
        padding-bottom: 2rem; 
    }
    .bottom-nav {
        display: none; 
    }
    .desktop-sidebar {
        position: sticky;
        top: 2rem;
    }
}

/* --- Page Header Bar --- */
.page-header {
    background-color: var(--card-bg);
    padding: 1rem 0;
    border-bottom: 1px solid var(--dark-border);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}
.page-header .page-title {
    font-size: 1.5rem;
    color: var(--text-white);
    margin: 0;
}

/* --- News Section (New Design) --- */
.category-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    overflow-x: auto; 
    padding-bottom: 1rem;
    -ms-overflow-style: none;  
    scrollbar-width: none;  
}
.category-tabs::-webkit-scrollbar {
    display: none; 
}
.category-tab {
    background: transparent;
    color: var(--primary-green);
    border: 1px solid var(--primary-green);
    border-radius: 20px;
    padding: 0.5rem 1.2rem;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}
.category-tab.active, .category-tab:hover {
    background: var(--primary-green);
    color: var(--dark-bg);
    font-weight: bold;
}

.article-card-list-item {
background: rgba(31, 41, 55, 0.6);
border-radius: 15px; 
margin-bottom: 1rem;
border-left: 4px solid transparent;
transition: all 0.3s ease;
cursor: pointer;
backdrop-filter: blur(10px);
border: 1px solid rgba(45, 212, 191, 0.1); 
}

.article-card-list-item:hover {
background: rgba(45, 55, 72, 0.7);
border-left-color: var(--primary-green);
transform: translateX(5px);
}

.article-card-list-item .card-body {
padding: 1.5rem;
color: var(--text-white);
}

.article-card-list-item h5 {
    color: var(--primary-green);
    margin-bottom: 0.5rem;
    font-weight: 600;
}
.article-card-list-item p {
    color: var(--text-gray);
    font-size: 0.9rem;
    line-height: 1.6;
    margin-bottom: 1rem;
}
.article-meta {
    font-size: 0.8rem;
    color: #9ca3af;
}

.load-more-btn {
    background: linear-gradient(135deg, var(--gold-accent), #f59e0b);
    border: none;
    border-radius: 25px;
    padding: 0.75rem 2rem;
    color: var(--dark-bg);
    font-weight: bold;
    margin: 2rem auto 0 auto;
    display: block;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(251, 191, 36, 0.2);
}
.load-more-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(251, 191, 36, 0.3);
}

.loading-spinner {
    display: none;
    text-align: center;
    color: var(--primary-green);
    margin: 2rem 0;
}

/* --- Prize Highlight Cards --- */
.prize-highlight-card {
    background: var(--card-bg-light);
    border: 1px solid var(--dark-border);
    border-radius: 20px;
    padding: 1.5rem;
    height: 100%;
    display: flex;
    flex-direction: column;
    text-align: center;
    box-shadow: 0 8px 30px rgba(0,0,0,0.3);
    position: relative;
    overflow: hidden;
}

/* Glowing effect for the 1st prize card */
.prize-highlight-card.first-prize::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: conic-gradient(
        transparent,
        rgba(45, 212, 191, 0.2),
        transparent 30%
    );
    animation: rotate 6s linear infinite;
}

@keyframes rotate {
    100% {
        transform: rotate(360deg);
    }
}

.prize-highlight-card .card-content {
    background: var(--card-bg-light); /* Make content opaque to hide animation behind */
    position: relative;
    z-index: 1;
    border-radius: 18px; /* Slightly smaller radius */
    padding: 1rem;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
}


.prize-highlight-header {
    font-family: var(--font-heading);
    color: var(--primary-green);
    font-size: 1.5rem;
    font-weight: 700;
}

.prize-highlight-number {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1;
    margin: 0.5rem 0;
}

.prize-highlight-number.prize-1 {
    font-size: clamp(4rem, 12vw, 5.5rem); /* Responsive font size */
    color: var(--gold-accent);
    text-shadow: 0 0 20px rgba(251, 191, 36, 0.5);
}

.prize-highlight-number.prize-2 {
    font-size: clamp(3.5rem, 10vw, 5rem);
    color: var(--text-white);
}

.prize-highlight-footer {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

/* --- New Prize Card Design --- */
.prize-card {
    background: var(--card-bg-light);
    border-radius: 20px;
    padding: 2rem;
    height: 100%;
    text-align: center;
    border: 1px solid var(--dark-border);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}
.prize-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.4);
    border-color: var(--primary-green);
}
.prize-card-header {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    color: var(--primary-green);
    margin-bottom: 1rem;
}
.prize-card-number {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1;
}
.prize-card-number.prize-1 {
    font-size: clamp(4rem, 10vw, 5rem);
    color: var(--gold-accent);
    text-shadow: 0 0 20px rgba(251, 191, 36, 0.5);
}
.prize-card-number.prize-2 {
    font-size: clamp(3.5rem, 8vw, 4.5rem);
    color: var(--text-white);
}
.prize-card-footer {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-top: 1rem;
}

