/* Base Styles & Variables */
:root {
    --bg-main: #14232C; /* Darker blue/grey background */
    --bg-alt: #1A2E3B; /* Lighter blue/grey background */
    --bg-footer: #0A1924; /* Darkest background for footer */
    --bg-card: #203542; /* Card background */
    --bg-faq: #536C7C; /* FAQ background */
    
    --primary-blue: #13A5FA;
    --secondary-btn: #5A6D7C;
    
    --text-main: #FFFFFF;
    --text-muted: #A3B8C7;
    
    --font-family: 'Inter', sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-family);
    background-color: var(--bg-main);
    color: var(--text-main);
    line-height: 1.5;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    width: 100%;
    overflow-x: hidden;
}

.dashboard-body {
    flex: 1 0 auto;
    width: 100%;
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Background Utilities */
.section-bg-main {
    background-color: var(--bg-main);
}

.section-bg-alt {
    background-color: var(--bg-alt);
}

/* Typography Utilities */
.section-header {
    text-align: center;
    margin-bottom: 40px;
}

.section-header h2 {
    font-size: 1.8rem;
    margin-bottom: 15px;
    font-weight: 700;
}

.section-header p {
    color: var(--text-muted);
    font-size: 0.95rem;
    max-width: 700px;
    margin: 0 auto;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 10px 24px;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
}

.btn-primary {
    background-color: var(--primary-blue);
    color: white;
}

.btn-primary:hover {
    background-color: #0e8ad6;
}

.btn-secondary {
    background-color: var(--secondary-btn);
    color: white;
}

.btn-secondary:hover {
    background-color: #4a5a66;
}

/* Navbar */
.navbar {
    background-color: var(--bg-alt);
    padding: 15px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo img {
    height: 40px;
    border-radius: 4px;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 20px;
}

.login-link {
    font-size: 0.95rem;
    font-weight: 600;
}

.login-link:hover {
    color: var(--primary-blue);
}

/* Hero Section */
.hero {
    padding: 20px 0 60px 0;
}

.hero-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 40px;
}

.hero-content {
    flex: 1;
    max-width: 500px;
}

.hero-content h1 {
    font-size: 2.8rem;
    margin-bottom: 20px;
    font-weight: 700;
    line-height: 1.2;
}

.hero-content p {
    font-size: 1.05rem;
    color: var(--text-muted);
    margin-bottom: 35px;
    line-height: 1.6;
}

.hero-buttons {
    display: flex;
    gap: 15px;
}

.hero-image {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
}

.hero-image img {
    max-width: 100%;
    max-height: 450px;
    object-fit: contain;
    mix-blend-mode: screen;
    -webkit-mask-image: radial-gradient(circle, black 50%, transparent 75%);
    mask-image: radial-gradient(circle, black 50%, transparent 75%);
}

/* Ways of Earning */
.ways-of-earning {
    padding: 80px 0;
}

.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 50px;
}

.card {
    background-color: var(--bg-card);
    padding: 30px;
    border-radius: 8px;
    transition: transform 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
}

.card-icon {
    width: 50px;
    height: 50px;
    background-color: var(--primary-blue);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    font-size: 1.5rem;
}

.card h3 {
    font-size: 1.2rem;
    margin-bottom: 15px;
}

.card p {
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.6;
}

/* Stats Section */
.stats {
    padding: 60px 0;
}

.stats-container {
    display: flex;
    justify-content: center;
    gap: 100px;
    text-align: center;
    flex-wrap: wrap;
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.stat-image {
    width: 120px;
    height: 120px;
    margin-bottom: 20px;
    border-radius: 50%;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: var(--bg-card); /* fallback */
}

.stat-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    mix-blend-mode: screen;
    -webkit-mask-image: radial-gradient(circle, black 50%, transparent 80%);
    mask-image: radial-gradient(circle, black 50%, transparent 80%);
}

.stat-item h3 {
    font-size: 1.8rem;
    margin-bottom: 5px;
}

.stat-item p {
    color: var(--text-muted);
    font-size: 0.95rem;
}

/* FAQ Section */
.faq {
    padding: 80px 0;
}

.faq-container {
    max-width: 800px;
}

.faq-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-top: 40px;
}

.faq-item {
    background-color: var(--bg-faq);
    border-radius: 6px;
    overflow: hidden;
}

.faq-question {
    padding: 15px 20px;
    display: flex;
    align-items: center;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.faq-question:hover {
    background-color: #5e7a8c;
}

.faq-number {
    width: 28px;
    height: 28px;
    background-color: white;
    color: var(--bg-faq);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.85rem;
    margin-right: 15px;
}

.faq-question h4 {
    flex: 1;
    font-size: 1rem;
    font-weight: 600;
}

.faq-icon {
    font-size: 0.9rem;
    transition: transform 0.3s ease;
}

.faq-answer {
    padding: 0 20px;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease;
    background-color: rgba(0,0,0,0.1);
}

.faq-item.active .faq-answer {
    padding: 20px;
    max-height: 200px; /* arbitrary max height for transition */
}

.faq-item.active .faq-icon {
    transform: rotate(45deg);
}

.faq-answer p {
    font-size: 0.95rem;
    color: #e0e0e0;
}

/* Footer */
.footer {
    background-color: var(--bg-footer);
    padding: 60px 0 20px;
    margin-top: auto;
    width: 100%;
    position: relative;
    z-index: 10;
}

.footer-links-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 40px;
    margin-bottom: 50px;
}

.footer-column h4 {
    font-size: 1.1rem;
    margin-bottom: 20px;
    font-weight: 600;
}

.footer-column ul li {
    margin-bottom: 12px;
}

.footer-column ul li a {
    color: var(--text-muted);
    font-size: 0.9rem;
    transition: color 0.3s ease;
}

.footer-column ul li a:hover {
    color: var(--primary-blue);
}

.footer-bottom {
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding-top: 20px;
    color: var(--text-muted);
    font-size: 0.85rem;
}

.footer-bottom p {
    margin-bottom: 5px;
}

/* Responsive */
@media (max-width: 768px) {
    .hero-container {
        flex-direction: column;
        text-align: center;
    }

    .hero-buttons {
        justify-content: center;
    }

    .stats-container {
        gap: 40px;
    }
}
/* History Table (Global for all games) */
.table-responsive {
    overflow-x: auto;
    background-color: var(--bg-alt);
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

.bets-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 600px;
}

.bets-table th, .bets-table td {
    padding: 15px 20px;
    text-align: left;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

.bets-table th {
    color: var(--text-muted);
    font-weight: 600;
    font-size: 0.9rem;
    background-color: rgba(0,0,0,0.2);
}

.bets-table td {
    font-weight: 600;
    font-size: 0.95rem;
}

.text-green { color: #34c759; }
.text-red { color: #ff3b30; }

/* History Section */
.my-bets-section {
    background-color: var(--bg-alt);
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

.table-responsive {
    overflow-x: auto;
}


/* Custom Toast Notification */
#toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.custom-toast {
    background: #1e2024;
    color: #fff;
    padding: 15px 25px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.5);
    border-left: 4px solid #3b82f6;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 10px;
    opacity: 0;
    transform: translateX(100%);
    animation: slideInToast 0.3s forwards;
    min-width: 250px;
}

.custom-toast.success { border-left-color: #f76246; }
.custom-toast.error { border-left-color: #ef4444; }

@keyframes slideInToast {
    to { opacity: 1; transform: translateX(0); }
}

@keyframes slideOutToast {
    to { opacity: 0; transform: translateX(100%); }
}

/* Hide notification icon globally */
.notification-icon {
    display: none !important;
}

/* Clickable Bet History Rows */
#my-bets-tbody tr, #all-bets-tbody tr {
    cursor: pointer !important;
    transition: background 0.15s ease;
}
#my-bets-tbody tr:hover, #all-bets-tbody tr:hover {
    background: rgba(255, 255, 255, 0.08) !important;
}

/* Dashboard Game Grid & Tiles */
.games-grid, .game-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    max-width: 100%;
    margin: 0 auto 30px auto;
    padding: 0;
}

@media (min-width: 768px) {
    .games-grid, .game-grid {
        grid-template-columns: repeat(6, 1fr);
        gap: 15px;
        max-width: 1000px;
        padding: 0;
    }
}

.game-tile {
    border-radius: 14px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    text-align: center;
    cursor: pointer;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    aspect-ratio: 68 / 81;
    height: auto;
    text-decoration: none;
    position: relative;
    overflow: hidden;
    padding: 10px 10px 14px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.3);
}

.game-tile:hover {
    transform: translateY(-5px);
    box-shadow: 0 16px 36px rgba(0,0,0,0.45);
}

.tile-faucet   { background: url('assets/icon_faucet.png') center/cover no-repeat, linear-gradient(180deg, #51a5ff 0%, #0d6cf2 100%); }
.tile-dice     { background: url('assets/icon_dice_1786097082016.png') center/80% no-repeat, linear-gradient(180deg, #37e2c9 0%, #1595fb 100%); }
.tile-slots    { background: url('assets/icon_slots.png') center/cover no-repeat, linear-gradient(180deg, #8162d0 0%, #f6894a 100%); }
.tile-mines    { background: url('assets/icon_mines_fixed2.png') center/80% no-repeat, linear-gradient(180deg, #95a4fc 0%, #b8a4f4 100%); }
.tile-roulette { background: url('assets/icon_roulette.png') center/cover no-repeat, linear-gradient(180deg, #a7efdf 0%, #f7cce2 100%); }
.tile-limbo    { background: url('assets/icon_limbo.jpg') center/cover no-repeat; }

.game-tile span {
    color: #ffffff !important;
    text-shadow: 0 2px 4px rgba(0,0,0,0.8);
    font-weight: 800;
    z-index: 2;
    position: relative;
    line-height: 1.1;
    margin-top: auto;
    margin-bottom: 5px;
    font-size: 0.95rem;
    letter-spacing: 0.5px;
}

.progress-text {
    position: static !important;
    font-size: 0.85rem !important;
    font-weight: 700 !important;
    color: #00e701 !important;
}

/* =========================================================
   HEADER NAV LINKS (Games, Wallet, Contact)
   Injected by JS - these styles control appearance
   ========================================================= */
.dash-nav-links {
    display: flex;
    gap: 22px;
    align-items: center;
    justify-content: center;
    flex: 1;
}

.nav-link-item {
    color: #8ca0b0;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    transition: color 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 8px;
    border-radius: 4px;
}
.nav-link-item i {
    font-size: 14px;
    color: #c7a84a;
}
.nav-link-item:hover {
    color: #ffffff;
}
.nav-link-item.active {
    color: #c7a84a;
    border-bottom: 2px solid #c7a84a;
}

/* =========================================================
   MOBILE RESPONSIVE - Navbar, Games, Faucet, Footer
   ========================================================= */
@media (max-width: 768px) {

    /* Navbar */
    .dash-nav {
        padding: 8px 12px !important;
        display: flex !important;
        justify-content: space-between !important;
        align-items: center !important;
        width: 100% !important;
        max-width: 100vw !important;
        overflow: visible !important;
        box-sizing: border-box !important;
    }
    .dash-nav .logo img {
        height: 28px !important;
        max-width: 85px !important;
        object-fit: contain !important;
    }
    .dash-nav-links {
        display: none !important;
    }
    .dash-nav-right {
        display: flex !important;
        align-items: center !important;
        gap: 6px !important;
        flex-shrink: 0 !important;
    }
    .dash-balance {
        padding: 4px 8px 4px 5px !important;
        gap: 4px !important;
        font-size: 0.78rem !important;
        border-radius: 14px !important;
        max-width: 125px !important;
        overflow: hidden !important;
        white-space: nowrap !important;
    }
    .dash-balance .ltc-icon-wrapper {
        width: 18px !important;
        height: 18px !important;
        font-size: 0.7rem !important;
        flex-shrink: 0 !important;
    }
    .btn-icon {
        width: 32px !important;
        height: 32px !important;
        font-size: 0.85rem !important;
        flex-shrink: 0 !important;
        border-radius: 6px !important;
    }
    .profile-avatar {
        width: 32px !important;
        height: 32px !important;
        font-size: 0.9rem !important;
        flex-shrink: 0 !important;
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        cursor: pointer !important;
    }
    .profile-dropdown-wrapper {
        display: inline-flex !important;
        align-items: center !important;
        flex-shrink: 0 !important;
    }

    /* Dashboard Body */
    .dashboard-body {
        padding: 20px 10px !important;
        max-width: 100% !important;
    }
    .my-bets-section {
        padding: 16px 10px !important;
    }
    .table-responsive {
        width: 100% !important;
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch !important;
    }
    .games-grid, .game-grid {
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 8px !important;
        padding: 0 !important;
    }
    .game-tile {
        border-radius: 10px !important;
        padding: 6px 4px 8px !important;
    }
    .game-tile span {
        font-size: 0.75rem !important;
        margin-bottom: 2px !important;
    }

    /* Faucet Modal */
    .faucet-modal-overlay {
        padding: 15px !important;
    }
    .faucet-modal-content {
        padding: 20px 14px !important;
        width: 100% !important;
        max-width: 420px !important;
        box-sizing: border-box !important;
    }
    .faucet-header {
        font-size: 1.05rem !important;
    }
    .faucet-desc {
        font-size: 0.82rem !important;
        line-height: 1.4 !important;
        margin-bottom: 15px !important;
    }
    .faucet-table {
        width: 100% !important;
    }
    .faucet-table th, .faucet-table td {
        padding: 8px 6px !important;
        font-size: 0.8rem !important;
    }

    /* Footer */
    .footer {
        padding: 35px 15px 20px !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }
    .footer-container {
        padding: 0 !important;
        width: 100% !important;
    }
    .footer-links-grid {
        display: grid !important;
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 15px !important;
        margin-bottom: 25px !important;
        text-align: left !important;
    }
    .footer-column h4 {
        font-size: 0.9rem !important;
        margin-bottom: 10px !important;
        color: #c7a84a !important;
    }
    .footer-column ul {
        list-style: none !important;
        padding: 0 !important;
        margin: 0 !important;
    }
    .footer-column ul li {
        margin-bottom: 6px !important;
    }
    .footer-column ul li a {
        font-size: 0.78rem !important;
        color: #b0c4d8 !important;
    }
    .footer-bottom {
        text-align: center !important;
        padding-top: 15px !important;
        border-top: 1px solid rgba(255, 255, 255, 0.08) !important;
        font-size: 0.78rem !important;
    }
    #footer-ltc-price {
        font-size: 0.85rem !important;
        color: #00e701 !important;
        font-weight: 600 !important;
        margin-bottom: 6px !important;
    }
}

@media (max-width: 480px) {
    .footer-links-grid {
        grid-template-columns: 1fr 1fr !important;
        gap: 15px !important;
    }
}

