:root {
    --primary: #E52E2E;
    --bg: #F3F4F6;
    --white: #FFFFFF;
    --text: #111827;
    --text-muted: #6B7280;
    --border: #E5E7EB;
}
* { box-sizing: border-box; margin: 0; padding: 0; font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif; }
body { background: var(--bg); color: var(--text); line-height: 1.5; }
a { text-decoration: none; color: inherit; }

/* Header */
.header { background: var(--white); border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 100; }
.header-inner { max-width: 800px; margin: 0 auto; padding: 12px 20px; display: flex; justify-content: space-between; align-items: center; }
.brand { display: flex; align-items: center; gap: 10px; }
.brand-text { font-size: 18px; font-weight: 500; color: #374151; }
.user-icon { font-size: 24px; color: #9CA3AF; cursor: pointer; }

/* Container */
.container { max-width: 800px; margin: 20px auto; padding: 0 15px; }

/* Banner */
.game-banner { border-radius: 12px; height: 140px; position: relative; overflow: hidden; margin-bottom: 20px; display: flex; align-items: center; padding: 20px; transition: background 0.3s; }
.banner-content { color: white; }
.hot-badge { background: var(--primary); color: white; padding: 2px 8px; font-size: 11px; font-weight: 700; border-radius: 4px; text-transform: uppercase; }
.game-banner h2 { font-size: 24px; font-weight: 700; margin: 5px 0; }
.game-banner p { font-size: 13px; opacity: 0.9; }

/* Section Title */
.section-title { font-size: 16px; font-weight: 700; margin: 20px 0 12px 0; color: #1F2937; }

/* Game Grid */
.game-grid { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 10px; margin-bottom: 20px; }
.game-item { display: flex; flex-direction: column; align-items: center; justify-content: center; min-width: 85px; padding: 10px 5px; background: var(--white); border: 1px solid var(--border); border-radius: 8px; cursor: pointer; transition: 0.2s; }
.game-item.active { border-color: var(--primary); background: #FFF5F5; }
.game-item.disabled { opacity: 0.6; background: #F9FAFB; }
.game-item img { width: 40px; height: 40px; border-radius: 8px; object-fit: cover; margin-bottom: 5px; }
.game-item span { font-size: 11px; text-align: center; font-weight: 500; white-space: nowrap; }

/* Account Box */
.account-box { background: var(--white); border-radius: 12px; padding: 20px; border: 1px solid var(--border); }
.input-group { display: flex; gap: 10px; }
.input-group input { flex: 1; padding: 12px 15px; border: 1px solid #D1D5DB; border-radius: 6px; font-size: 14px; outline: none; }
.input-group input:focus { border-color: var(--primary); }
.input-group button { background: var(--primary); color: white; border: none; padding: 0 20px; border-radius: 6px; font-weight: 600; cursor: pointer; }
.social-login { display: flex; gap: 10px; margin-top: 8px; }
.soc-btn { width: 32px; height: 32px; border-radius: 50%; display: flex; align-items: center; justify-content: center; color: white; font-size: 14px; }
.soc-btn.fb { background: #1877F2; }
.soc-btn.gg { background: #DB4437; }
.soc-btn.x { background: #000000; }

/* Tabs */
.tabs { display: flex; gap: 10px; margin-bottom: 12px; }
.tab { background: transparent; border: 1px solid var(--border); padding: 6px 16px; border-radius: 20px; font-size: 14px; font-weight: 500; color: var(--text-muted); cursor: pointer; }
.tab.active { border-color: var(--primary); color: var(--primary); background: #FFF5F5; font-weight: 600; }

/* Grids */
.grid-3-col { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.grid-2-col { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
@media (max-width: 600px) {
    .grid-3-col { grid-template-columns: repeat(2, 1fr); }
}

/* Denomination Cards */
.denom-card { background: var(--white); border: 1px solid var(--border); border-radius: 8px; padding: 15px; text-align: center; cursor: pointer; transition: 0.2s; }
.denom-card:hover { border-color: #FCA5A5; }
.denom-card.active { border-color: var(--primary); background: #FFF5F5; }
.denom-card .price { font-size: 15px; font-weight: 700; color: var(--text); margin-bottom: 4px; }
.denom-card .value { font-size: 13px; color: var(--text-muted); }
.shop-item img { width: 100%; height: 80px; object-fit: contain; margin-bottom: 5px; }

/* Payment Methods */
.pay-method { background: var(--white); border: 1px solid var(--border); border-radius: 10px; padding: 15px; display: flex; align-items: flex-start; gap: 12px; cursor: pointer; transition: 0.2s; position: relative; }
.pay-method:hover { border-color: #FCA5A5; }
.pay-method.active { border-color: var(--primary); }
.pm-icon { width: 36px; height: 36px; border-radius: 8px; display: flex; align-items: center; justify-content: center; font-size: 18px; background: #F3F4F6; color: #4B5563; flex-shrink: 0; }
.pm-icon.red { background: #FEE2E2; color: var(--primary); }
.pm-icon.gray { background: #F9FAFB; color: #D1D5DB; }
.pm-title { font-size: 14px; font-weight: 600; color: var(--text); margin-bottom: 2px; }
.pm-sub { font-size: 12px; color: var(--text-muted); line-height: 1.4; }
.badge-hot { position: absolute; top: -8px; right: 10px; background: var(--primary); color: white; font-size: 10px; font-weight: 700; padding: 2px 6px; border-radius: 4px; }
.pay-method.disabled { opacity: 0.6; background: #F9FAFB; }

/* Submit Button */
.btn-submit-main { width: 100%; background: linear-gradient(90deg, #E52E2E 0%, #FF5C5C 100%); color: white; border: none; padding: 15px; border-radius: 8px; font-size: 16px; font-weight: 700; cursor: pointer; margin-top: 20px; box-shadow: 0 4px 12px rgba(229, 46, 46, 0.3); transition: 0.2s; }
.btn-submit-main:hover { opacity: 0.9; transform: translateY(-2px); }

/* Table */
.table-responsive { background: var(--white); border-radius: 12px; border: 1px solid var(--border); overflow-x: auto; }
.history-table { width: 100%; border-collapse: collapse; min-width: 500px; }
.history-table th, .history-table td { padding: 12px 15px; text-align: left; border-bottom: 1px solid var(--border); font-size: 14px; }
.history-table th { background: #F9FAFB; font-weight: 600; color: var(--text-muted); font-size: 13px; }
.status-badge { padding: 4px 10px; border-radius: 20px; font-size: 12px; font-weight: 600; }
.status-badge.pending { background: #FEF3C7; color: #92400E; }
.status-badge.success { background: #D1FAE5; color: #065F46; }

/* MODAL POPUP */
.modal-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.5); backdrop-filter: blur(3px); display: flex; align-items: center; justify-content: center; z-index: 1000; }
.modal-box { background: var(--white); padding: 25px 20px; border-radius: 12px; width: 90%; max-width: 360px; text-align: center; box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1); animation: zoomIn 0.2s ease-out; }
@keyframes zoomIn { from { transform: scale(0.9); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.modal-icon { width: 56px; height: 56px; background: #FEF3C7; color: #F59E0B; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 24px; margin: 0 auto 15px; }
.modal-box h3 { font-size: 18px; font-weight: 700; margin-bottom: 10px; color: var(--text); }
.modal-box p { font-size: 14px; color: var(--text-muted); margin-bottom: 20px; line-height: 1.5; }

/* Modal Buttons */
.btn-modal-primary { width: 100%; padding: 10px; background: #D97706; color: white; border: none; border-radius: 6px; font-weight: 600; font-size: 14px; cursor: pointer; transition: 0.2s; }
.btn-modal-primary:hover { background: #B45309; }
.btn-modal-danger { width: 100%; padding: 10px; background: #E52E2E; color: white; border: none; border-radius: 6px; font-weight: 600; font-size: 14px; cursor: pointer; transition: 0.2s; }
.btn-modal-danger:hover { background: #CC2626; }
.modal-btn-row { display: flex; gap: 10px; }
.modal-btn-row button { flex: 1; }
.btn-modal-outline { background: transparent; border: 1px solid #E52E2E; color: #E52E2E; padding: 10px; border-radius: 6px; font-weight: 600; font-size: 14px; cursor: pointer; transition: 0.2s; }
.btn-modal-outline:hover { background: #FEE2E2; }