        :root {
            --bg-dark: #0f172a;
            --bg-card: #1e293b;
            --bg-card-hover: #334155;
            --text-main: #f8fafc;
            --text-muted: #94a3b8;
            --accent-gold: #fbbf24;
            --accent-green: #22c55e;
            --accent-red: #ef4444;
            --accent-blue: #3b82f6;
            --border-color: #334155;
        }

        * { box-sizing: border-box; margin: 0; padding: 0; }
        body { 
            font-family: 'Prompt', sans-serif; 
            background-color: var(--bg-dark); 
            color: var(--text-main); 
            line-height: 1.6;
        }
        
        .container { max-width: 1200px; margin: 0 auto; padding: 20px; }
        
        /* Header */
        .header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; padding-bottom: 15px; border-bottom: 1px solid var(--border-color); }
        .header h1 { font-size: 24px; color: var(--accent-gold); }
        .user-info { display: flex; align-items: center; gap: 15px; }
        .btn-logout { background: var(--accent-red); color: #fff; text-decoration: none; padding: 8px 15px; border-radius: 5px; font-size: 14px; }
        .btn-login { background: var(--accent-blue); color: #fff; text-decoration: none; padding: 8px 15px; border-radius: 5px; font-size: 14px; }

        /* Dashboard Grid */
        .dashboard-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-bottom: 30px; }
        @media (max-width: 768px) { .dashboard-grid { grid-template-columns: 1fr; } }
        
        .card { background: var(--bg-card); border-radius: 10px; padding: 20px; box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1); border: 1px solid var(--border-color); margin-bottom: 20px;}
        .card-title { font-size: 18px; color: var(--accent-gold); margin-bottom: 15px; display: flex; align-items: center; gap: 8px; border-bottom: 1px solid var(--border-color); padding-bottom: 10px;}
        
/* Rules & Prizes Lists */
.info-list { list-style: none; }
.info-list li { margin-bottom: 8px; font-size: 14px; display: flex; align-items: start; gap: 8px; }
.info-list li::before { content: '•'; color: var(--accent-blue); }
.highlight-text { color: var(--accent-gold); font-weight: 600; }
.a-box { background: rgba(239, 68, 68, 0.1); border-left: 4px solid var(--accent-red); padding: 10px; margin-top: 15px; font-size: 14px; }
.b-box { background: rgba(34, 197, 94, 0.1); border-left: 4px solid #22c55e; padding: 10px; margin-top: 15px; font-size: 14px; }

        .quota-status { text-align: center; background: rgba(59, 130, 246, 0.1); border: 1px solid var(--accent-blue); padding: 15px; border-radius: 8px; margin-bottom: 20px; }
        
        /* สไตล์สำหรับตารางทายผล */
        .pred-table { width: 100%; border-collapse: collapse; text-align: center; font-size: 14px; margin-bottom: 20px; background: #fff; color: #333; }
        .pred-table th, .pred-table td { border: 1px solid #d1d5db; padding: 10px 5px; vertical-align: middle; }
        .pred-table .league-header { background-color: #92400e; color: #fff; font-weight: bold; text-align: left; padding: 10px 15px; font-size: 15px; border: none; }
        .pred-table .league-header td { border: none; padding: 8px 15px; }
        .pred-table .col-header { background-color: #f97316; color: #fff; font-weight: bold; border: 1px solid #c2410c; }
        .pred-table .col-header th { border: 1px solid #ea580c; padding: 8px; }
        .pred-table tr.match-row { background-color: #fff7ed; }
        .pred-table tr.match-row:nth-child(even) { background-color: #ffedd5; }
        .pred-table tr.match-row:hover { background-color: #fed7aa; }
        
        .txt-red { color: #dc2626; text-decoration: underline; font-weight: bold; }
        .txt-normal { color: #1f2937; font-weight: 500; }
        
        .radio-container { display: flex; align-items: center; gap: 8px; cursor: pointer; width: 100%; height: 100%; }
        .radio-container input[type="radio"] { cursor: pointer; transform: scale(1.2); }
        
        .btn-action { padding: 6px 15px; cursor: pointer; border: none; border-radius: 4px; font-weight: 600; font-family: inherit; font-size: 13px; }
        .btn-login-table { background: #9ca3af; color: white; }
        .btn-login-table:hover { background: #6b7280; }
        .btn-submit-table { background: #3b82f6; color: white; }
        .btn-submit-table:hover { background: #2563eb; }

        .tded-link-table { display: inline-block; padding: 4px 10px; font-size: 12px; font-weight: 500; background: rgba(251, 191, 36, 0.2); color: #b45309; border: 1px solid #d97706; border-radius: 12px; text-decoration: none; transition: all 0.2s; white-space: nowrap; }
        .tded-link-table:hover { background: #d97706; color: #fff; }
        .stats-link-table { display: inline-block; padding: 4px 10px; font-size: 12px; font-weight: 500; background: rgba(59, 130, 246, 0.15); color: #1d4ed8; border: 1px solid #2563eb; border-radius: 12px; text-decoration: none; transition: all 0.2s; white-space: nowrap; }
        .stats-link-table:hover { background: #2563eb; color: #fff; }

        .card-header-flex { display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid var(--border-color); padding-bottom: 10px; margin-bottom: 15px; }
        .card-header-flex .card-title { border-bottom: none; margin-bottom: 0; padding-bottom: 0; }
        .search-input { padding: 8px 12px; border-radius: 5px; border: 1px solid var(--border-color); background: var(--bg-dark); color: var(--text-main); outline: none; font-family: inherit; font-size: 14px; width: 250px; }
        .search-input:focus { border-color: var(--accent-blue); }

        .day-toggle { display: flex; gap: 10px; margin-bottom: 20px; flex-wrap: wrap; }
        .day-toggle a { padding: 8px 20px; border-radius: 20px; text-decoration: none; font-size: 14px; font-weight: 600; border: 1px solid var(--accent-blue); color: var(--accent-blue); transition: all 0.3s; background: transparent; }
        .day-toggle a.active { background: var(--accent-blue); color: #fff; box-shadow: 0 0 10px rgba(59, 130, 246, 0.3); }
        .day-toggle a:hover:not(.active) { background: rgba(59, 130, 246, 0.1); }
        
        .table-responsive { overflow-x: auto; margin-top: 15px; }
        .leaderboard-table { width: 100%; border-collapse: collapse; min-width: 900px; text-align: center; font-size: 14px; }
        .leaderboard-table th { background-color: #b91c1c; color: #fff; padding: 12px; font-weight: 500; border: 1px solid #7f1d1d; }
        .leaderboard-table td { padding: 12px; border: 1px solid var(--border-color); background: var(--bg-card); color: var(--text-main); }
        .leaderboard-table tr:nth-child(even) td { background: #1a2235; }
        .leaderboard-table tr:hover td { background: var(--bg-card-hover); }
        .rank-1 { color: #fbbf24; font-size: 16px;}
        .rank-2 { color: #176feb; }
        .rank-3 { color: #b505a1; }
        
        .form-history { display: flex; gap: 3px; justify-content: center; align-items: center; }
        .badge-form { width: 18px; height: 18px; display: inline-flex; align-items: center; justify-content: center; font-size: 10px;  color: white; border-radius: 2px; }
        .badge-w { background-color: #22c55e; }
        .badge-d { background-color: #94a3b8; }
        .badge-l { background-color: #ef4444; }
        .badge-none { background-color: #334155; color: #64748b; }
        
        tr.row-me td { background: rgba(249, 115, 22, 0.25) !important; border-top: 1px solid #ea580c !important; border-bottom: 1px solid #ea580c !important; color: #fff; }
        tr.row-me td:first-child { border-left: 1px solid #ea580c !important; }
        tr.row-me td:last-child { border-right: 1px solid #ea580c !important; }
        
        .msg-success { background: rgba(34, 197, 94, 0.2); color: #4ade80; padding: 10px; border-radius: 5px; text-align: center; margin-bottom: 15px; border: 1px solid #22c55e;}
        .msg-error { background: rgba(239, 68, 68, 0.2); color: #f87171; padding: 10px; border-radius: 5px; text-align: center; margin-bottom: 15px; border: 1px solid #ef4444;}

        /* --- สไตล์สำหรับแถว Leaderboard ที่คลิกได้ --- */
        .clickable-row { cursor: pointer; transition: background 0.2s; }
        .clickable-row:hover { background-color: var(--bg-card-hover) !important; }
        .details-row { display: none; background-color: #0f172a; }
        .details-content { padding: 15px; border: 1px dashed var(--accent-blue); border-radius: 8px; margin: 10px; text-align: left; }
        .pred-tag { display: inline-block; padding: 8px 12px; background: rgba(59, 130, 246, 0.1); border: 1px solid var(--accent-blue); border-radius: 6px; margin: 5px; font-size: 13px; }

.card-header-flex{
    display:flex;
    align-items:center;
    gap:15px;
    flex-wrap:nowrap;
}

.card-title{
    margin:0;
    white-space:nowrap;
}

.day-toggle{
    display:flex;
    gap:8px;
    white-space:nowrap;
}

.search-input{
    margin-left:auto;
    width:240px;
}