
/* =========================
   RESET
========================= */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: Tahoma, Arial, sans-serif;
}

body {
    background: #f5f7fb;
    color: #1f2937;
    line-height: 1.7;
}

.container {
    width: min(1200px, 92%);
    margin: 0 auto;
}

/* =========================
   LAYOUT
========================= */
.site-content {
    min-height: 70vh;
}

.top-gap {
    margin-top: 28px;
}

.muted-text {
    color: #64748b;
    font-size: 13px;
}

.empty-box {
    background: #f8fafc;
    border: 1px dashed #cbd5e1;
    border-radius: 16px;
    padding: 24px;
    text-align: center;
    color: #64748b;
}

/* =========================
   HEADER
========================= */
.site-header,
.modern-header {
    background: linear-gradient(135deg, #0f172a, #1e293b);
    color: #fff;
    padding: 10px 0;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.08);
    position: sticky;
    top: 0;
    z-index: 50;
}

.header-inner {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
}

.logo,
.logo-with-mark {
    width: 100%;
    display: flex;
    justify-content: flex-end;
}

.logo a,
.logo-with-mark .brand-link {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    text-decoration: none;
}

.brand-text {
    font-size: 18px;
    font-weight: 800;
    color: #ffffff;
    line-height: 1;
    white-space: nowrap;
}

.brand-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 46px;
    height: 46px;
    background: transparent;
    box-shadow: none;
    border-radius: 0;
    overflow: hidden;
    flex-shrink: 0;
}

.brand-mark img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.main-nav,
.compact-nav {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.main-nav a,
.compact-nav a {
    color: #e2e8f0;
    text-decoration: none;
    font-size: 14px;
    font-weight: 700;
    padding: 6px 10px;
    border-radius: 8px;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.main-nav a:hover,
.compact-nav a:hover {
    background: rgba(255, 255, 255, 0.10);
    color: #38bdf8;
}

.nav-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
    line-height: 20px;
    text-align: center;
    border-radius: 999px;
    background: #ef4444;
    color: #fff;
    font-size: 11px;
    font-weight: bold;
    margin-inline-start: 6px;
    padding: 0 6px;
}

/* =========================
   HERO
========================= */
.hero {
    padding: 70px 0;
    background: linear-gradient(135deg, #e2e8f0, #f8fafc);
    text-align: center;
}

.hero-centered {
    text-align: center;
}

.hero h1 {
    font-size: 36px;
    margin-bottom: 15px;
    color: #0f172a;
}

.hero p {
    font-size: 18px;
    color: #475569;
}

.center-btn {
    display: flex;
    justify-content: center;
}

/* =========================
   BUTTONS
========================= */
.btn-primary,
.btn-secondary,
.btn-secondary-inline,
.btn-small,
.btn-disabled,
.btn-lottery,
.btn-dambala,
.btn-bingo9,
.btn-bingo15,
.btn-play-now {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-primary {
    background: #0f172a;
    color: #fff;
    padding: 12px 22px;
    border-radius: 12px;
    font-size: 15px;
}

.btn-primary:hover {
    opacity: 0.92;
}

.btn-secondary {
    background: #e2e8f0;
    color: #0f172a;
    padding: 12px 22px;
    border-radius: 12px;
    font-size: 15px;
}

.btn-secondary-inline {
    background: #e2e8f0;
    color: #0f172a;
    padding: 8px 12px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: bold;
}

.btn-small {
    border-radius: 10px;
    padding: 8px 12px;
    font-size: 13px;
    font-weight: bold;
}

.btn-approve {
    background: #dcfce7;
    color: #166534;
}

.btn-reject {
    background: #fee2e2;
    color: #991b1b;
}

.btn-disabled {
    padding: 12px 18px;
    border-radius: 10px;
    background: #cbd5e1;
    color: #475569;
    font-weight: 700;
    cursor: not-allowed;
    opacity: 0.95;
}

.btn-lottery,
.btn-dambala,
.btn-bingo9,
.btn-bingo15 {
    padding: 12px 18px;
    border-radius: 10px;
    font-weight: 700;
    color: #fff !important;
}

.btn-lottery { background: #2563eb !important; }
.btn-lottery:hover { background: #1d4ed8 !important; }

.btn-dambala { background: #7c3aed !important; }
.btn-dambala:hover { background: #6d28d9 !important; }

.btn-bingo9 { background: #0891b2 !important; }
.btn-bingo9:hover { background: #0e7490 !important; }

.btn-bingo15 { background: #ea580c !important; }
.btn-bingo15:hover { background: #c2410c !important; }

.btn-play-now {
    background: linear-gradient(135deg, #22c55e, #16a34a);
    color: #fff;
    padding: 16px 30px;
    border-radius: 14px;
    font-size: 18px;
    font-weight: 800;
    box-shadow: 0 10px 25px rgba(34, 197, 94, 0.25);
    animation: pulsePlayNow 1.8s infinite;
}

.btn-play-now:hover {
    background: linear-gradient(135deg, #16a34a, #15803d);
    transform: translateY(-2px) scale(1.04);
    box-shadow: 0 14px 30px rgba(34, 197, 94, 0.35);
}

@keyframes pulsePlayNow {
    0% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.45);
    }
    50% {
        transform: scale(1.04);
        box-shadow: 0 0 0 14px rgba(34, 197, 94, 0);
    }
    100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(34, 197, 94, 0);
    }
}

/* =========================
   SECTIONS / CARDS
========================= */
.games-section,
.dashboard-section,
.auth-section {
    padding: 50px 0;
}

.games-section h2 {
    margin-bottom: 24px;
    font-size: 28px;
    color: #0f172a;
}

.games-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
}

.game-card,
.dashboard-card,
.auth-card,
.detail-box,
.wallet-box,
.filter-form,
.ticket-entry,
.message-item {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
}

.game-card,
.detail-box,
.wallet-box,
.filter-form,
.ticket-entry,
.message-item {
    padding: 20px;
}

.dashboard-card,
.auth-card {
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 10px 35px rgba(15, 23, 42, 0.08);
}

.admin-dashboard {
    border-top: 4px solid #0f172a;
}

.game-card {
    box-shadow: 0 8px 30px rgba(15, 23, 42, 0.08);
}

.game-card h3 {
    font-size: 22px;
    margin-bottom: 8px;
    color: #111827;
}

.game-card p {
    color: #6b7280;
    margin-bottom: 12px;
}

.dashboard-card h1,
.auth-card h1 {
    margin-bottom: 10px;
    color: #0f172a;
}

.dashboard-card p,
.auth-card p {
    color: #64748b;
    margin-bottom: 24px;
}

.static-page-card h1 {
    margin-bottom: 18px;
}

.static-page-card h3 {
    margin-top: 18px;
    margin-bottom: 8px;
    color: #0f172a;
}

.static-page-card p {
    line-height: 1.9;
    color: #334155;
}

/* =========================
   STATUS / BADGES
========================= */
.status,
.status-badge,
.ticket-badge,
.ticket-status-chip,
.message-badge,
.rng-loop-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    font-weight: 700;
    white-space: nowrap;
}

.status {
    background: #dcfce7;
    color: #166534;
    padding: 6px 12px;
    font-size: 13px;
}

.status-badge {
    padding: 6px 10px;
    font-size: 12px;
    font-weight: bold;
}

.status-pending {
    background: #fef3c7;
    color: #92400e;
}

.status-approved,
.status-completed,
.status-confirmed,
.status-paid,
.status-credited,
.status-distributed,
.status-calculated,
.status-active {
    background: #dcfce7;
    color: #166534;
}

.status-rejected,
.status-failed,
.status-cancelled,
.status-blocked {
    background: #fee2e2;
    color: #991b1b;
}

.status-inactive {
    background: #e2e8f0;
    color: #334155;
}

.ticket-badge {
    padding: 6px 10px;
    font-size: 12px;
}

.ticket-badge.winner,
.ticket-status-chip.status-win {
    background: #16a34a;
    color: #fff;
}

.ticket-badge.loser,
.ticket-status-chip.status-lose {
    background: #dc2626;
    color: #fff;
}

.ticket-badge.pending,
.ticket-status-chip.status-pending {
    background: #475569;
    color: #fff;
}

.ticket-status-chip {
    padding: 7px 12px;
    font-size: 12px;
    font-weight: 800;
}

.message-badge {
    min-height: 28px;
    padding: 4px 10px;
    background: #e2e8f0;
    color: #0f172a;
    font-size: 12px;
}

.message-badge.confirmation {
    background: #22c55e;
    color: #fff;
}

.message-badge.notification {
    background: #2563eb;
    color: #fff;
}

.rng-loop-badge {
    background: #0f172a;
    color: #fff;
    padding: 8px 14px;
    font-size: 12px;
}

/* =========================
   FORMS
========================= */
.form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 18px;
}

.form-group {
    margin-bottom: 18px;
}

.form-group label,
.ticket-grid-label {
    display: block;
    margin-bottom: 8px;
    color: #334155;
    font-size: 14px;
    font-weight: 700;
}

.form-group input,
.form-group select,
.form-group textarea,
.inline-status-form select,
.admin-actions-column textarea {
    width: 100%;
    border: 1px solid #cbd5e1;
    border-radius: 12px;
    padding: 12px 14px;
    font-size: 15px;
    outline: none;
    background: #fff;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: #0f172a;
}

.admin-actions-column {
    display: grid;
    gap: 8px;
    min-width: 180px;
}

.admin-actions-column textarea {
    resize: vertical;
    min-height: 58px;
    font-size: 13px;
    border-radius: 10px;
    padding: 8px 10px;
}

.inline-status-form {
    display: grid;
    gap: 8px;
    min-width: 130px;
}

.field-note {
    display: block;
    margin-top: 8px;
    color: #64748b;
    font-size: 13px;
}

/* =========================
   TABLES / GRID
========================= */
.section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.section-actions,
.action-forms,
.messages-top-actions,
.ticket-builder-toolbar,
.ticket-builder-head,
.ticket-entry-head,
.message-top,
.lottery-ticket-topbar,
.rng-showcase-header,
.draw-live-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
}

.wallet-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
    margin-bottom: 30px;
}

.wallet-balance {
    margin-top: 10px;
    font-size: 24px;
    font-weight: bold;
    color: #0f172a;
}

.sub-title {
    margin-bottom: 16px;
    color: #0f172a;
}

.table-wrap {
    overflow-x: auto;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
}

.data-table th,
.data-table td {
    border: 1px solid #e5e7eb;
    padding: 12px;
    text-align: right;
    font-size: 14px;
}

.data-table th {
    background: #f8fafc;
    color: #0f172a;
}

.details-grid {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 20px;
}

.detail-box h3 {
    margin-bottom: 16px;
    color: #0f172a;
}

.detail-box p {
    margin-bottom: 10px;
    color: #334155;
}

.compact-summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    gap: 12px;
    margin-top: 10px;
}

.admin-compact-summary-grid {
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
}

.compact-summary-card {
    background: #f8fafc;
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 12px;
    padding: 12px 14px;
    min-height: 82px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    box-shadow: 0 6px 16px rgba(15, 23, 42, 0.05);
}

.compact-summary-label {
    font-size: 13px;
    color: #64748b;
    margin-bottom: 6px;
    font-weight: 600;
}

.compact-summary-value {
    font-size: 22px;
    color: #0f172a;
    line-height: 1.2;
}

/* =========================
   DASHBOARD COLORS
========================= */
.dashboard-links {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 16px;
}

.dash-box {
    display: block;
    border-radius: 16px;
    padding: 18px;
    text-decoration: none;
    text-align: center;
    font-weight: 700;
    color: #fff;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.10);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.dash-box:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 26px rgba(15, 23, 42, 0.14);
}

.dashboard-links .dash-box:nth-child(1) { background: linear-gradient(135deg, #2563eb, #1d4ed8); }
.dashboard-links .dash-box:nth-child(2) { background: linear-gradient(135deg, #7c3aed, #6d28d9); }
.dashboard-links .dash-box:nth-child(3) { background: linear-gradient(135deg, #0891b2, #0e7490); }
.dashboard-links .dash-box:nth-child(4) { background: linear-gradient(135deg, #16a34a, #15803d); }
.dashboard-links .dash-box:nth-child(5) { background: linear-gradient(135deg, #ea580c, #c2410c); }
.dashboard-links .dash-box:nth-child(6) { background: linear-gradient(135deg, #db2777, #be185d); }
.dashboard-links .dash-box:nth-child(7) { background: linear-gradient(135deg, #4f46e5, #4338ca); }
.dashboard-links .dash-box:nth-child(8) { background: linear-gradient(135deg, #475569, #334155); }

.colorful-dashboard-links {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
    margin-top: 18px;
}

.colorful-dashboard-links .dash-box {
    padding: 20px 18px;
}

.dash-lottery { background: linear-gradient(135deg, #2563eb, #1d4ed8); }
.dash-tickets { background: linear-gradient(135deg, #7c3aed, #6d28d9); }
.dash-winnings { background: linear-gradient(135deg, #16a34a, #15803d); }
.dash-wallet { background: linear-gradient(135deg, #0891b2, #0e7490); }
.dash-deposit { background: linear-gradient(135deg, #ea580c, #c2410c); }
.dash-withdraw { background: linear-gradient(135deg, #db2777, #be185d); }
.dash-messages { background: linear-gradient(135deg, #4f46e5, #4338ca); }
.dash-profile { background: linear-gradient(135deg, #475569, #334155); }

.dash-admin-draws { background: linear-gradient(135deg, #2563eb, #1d4ed8); }
.dash-admin-archive { background: linear-gradient(135deg, #7c3aed, #6d28d9); }
.dash-admin-users { background: linear-gradient(135deg, #0891b2, #0e7490); }
.dash-admin-deposits { background: linear-gradient(135deg, #16a34a, #15803d); }
.dash-admin-withdraws { background: linear-gradient(135deg, #ea580c, #c2410c); }
.dash-admin-messages { background: linear-gradient(135deg, #db2777, #be185d); }
.dash-admin-search { background: linear-gradient(135deg, #4f46e5, #4338ca); }
.dash-admin-home { background: linear-gradient(135deg, #475569, #334155); }

/* =========================
   ALERTS / MESSAGES
========================= */
.alert {
    width: min(1200px, 92%);
    margin: 20px auto 0;
    padding: 14px 18px;
    border-radius: 12px;
    font-size: 14px;
}

.alert-success {
    background: #dcfce7;
    color: #166534;
    border: 1px solid #bbf7d0;
}

.alert-error {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

.messages-list,
.message-list {
    display: grid;
    gap: 16px;
}

.message-item.unread {
    border-right: 5px solid #0f172a;
}

.message-item.read {
    opacity: 0.9;
}

.message-box {
    background: #f1f5f9;
    padding: 10px;
    border-radius: 8px;
    margin-bottom: 10px;
}

.notification-box {
    background: #e0f2fe;
    padding: 10px;
    border-radius: 8px;
    margin-bottom: 10px;
}

.messages-page {
    overflow: hidden;
}

.messages-top-actions {
    margin: 20px 0 24px;
}

.messages-tab-btn {
    border: 1px solid rgba(15, 23, 42, 0.10);
    background: #f8fafc;
    color: #0f172a;
    border-radius: 12px;
    padding: 12px 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
}

.messages-tab-btn:hover {
    background: #eef2ff;
}

.messages-tab-btn.active {
    background: #0f172a;
    color: #ffffff;
    border-color: #0f172a;
}

.messages-tab-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 24px;
    height: 24px;
    padding: 0 8px;
    border-radius: 999px;
    margin-inline-start: 8px;
    background: rgba(255, 255, 255, 0.18);
    font-size: 12px;
}

.messages-tab-panel {
    display: none;
}

.messages-tab-panel.active {
    display: block;
}

.message-card {
    border-radius: 16px;
    padding: 18px;
    border: 1px solid rgba(15, 23, 42, 0.08);
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
}

.player-message-card,
.admin-message-card {
    background: #f8fafc;
}

.confirmation-card {
    background: #f0fdf4;
}

.notification-card {
    background: #eff6ff;
}

.message-card-head {
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
}

.message-card-head h3 {
    margin: 0 0 6px 0;
    font-size: 18px;
    color: #0f172a;
}

.message-meta-line {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    color: #64748b;
    font-size: 13px;
}

.message-player-info {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 12px;
    color: #334155;
    font-size: 14px;
}

.message-card-body {
    color: #0f172a;
    line-height: 1.9;
    font-size: 15px;
}

.message-reply-box,
.reply-box {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px dashed rgba(15, 23, 42, 0.12);
}

/* =========================
   LOTTERY MINI CARDS
========================= */
.ticket-grid-mini,
.lottery-ticket-pro-grid,
.ticket-builder-grid {
    display: grid;
    gap: 18px;
    margin-top: 20px;
}

.ticket-grid-mini {
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.lottery-ticket-pro-grid,
.ticket-builder-grid {
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
}

.ticket-card-mini,
.lottery-ticket-pro,
.ticket-builder-card {
    border-radius: 16px;
    background: #ffffff;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.ticket-card-mini,
.lottery-ticket-pro {
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(0, 0, 0, 0.06);
    padding: 16px;
}

.lottery-ticket-pro {
    position: relative;
    border-radius: 18px;
    overflow: hidden;
    padding: 18px;
    border: 1px solid rgba(15, 23, 42, 0.08);
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
}

.ticket-card-mini:hover,
.lottery-ticket-pro:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.10);
}

.ticket-card-mini.winner,
.lottery-ticket-pro.winner {
    background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
    border-color: #86efac;
}

.ticket-card-mini.loser,
.lottery-ticket-pro.loser {
    background: linear-gradient(135deg, #fff7ed 0%, #fee2e2 100%);
    border-color: #fca5a5;
}

.ticket-card-mini.pending,
.lottery-ticket-pro.pending {
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    border-color: #cbd5e1;
}

.ticket-mini-head,
.lottery-ticket-topbar,
.ticket-builder-head {
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.ticket-mini-code {
    font-weight: 700;
    font-size: 14px;
    word-break: break-word;
}

.ticket-mini-meta,
.ticket-mini-info,
.ticket-mini-prize,
.ticket-mini-footer {
    font-size: 13px;
    line-height: 1.8;
}

.ticket-mini-meta {
    margin-bottom: 12px;
    color: #334155;
}

.ticket-mini-info {
    margin-bottom: 10px;
    color: #1e293b;
}

.ticket-mini-prize {
    margin-bottom: 10px;
    padding: 10px 12px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.65);
    color: #14532d;
    font-weight: 600;
}

.ticket-mini-prize a {
    color: inherit;
    text-decoration: none;
    font-weight: 700;
}

.ticket-mini-prize a:hover {
    text-decoration: underline;
}

.ticket-mini-footer {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px dashed rgba(0, 0, 0, 0.12);
    color: #64748b;
    font-size: 12px;
}

.ticket-mini-numbers,
.lottery-number-board {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 8px;
    margin-bottom: 14px;
}

.ticket-number,
.lottery-ball {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    border-radius: 10px;
    font-weight: 700;
    font-size: 14px;
    background: #e2e8f0;
    color: #0f172a;
}

.lottery-ball {
    min-height: 40px;
    border-radius: 12px;
    border: 1px solid rgba(15, 23, 42, 0.08);
    font-weight: 800;
}

.ticket-number.matched,
.lottery-ball.matched {
    background: #22c55e;
    color: #fff;
}

.lottery-ticket-brand {
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.5px;
    color: #0f172a;
    text-transform: uppercase;
}

.lottery-ticket-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    margin-bottom: 16px;
}

.lottery-ticket-label {
    font-size: 12px;
    color: #64748b;
    margin-bottom: 4px;
}

.lottery-ticket-code {
    font-size: 16px;
    font-weight: 800;
    color: #0f172a;
    word-break: break-word;
}

.ticket-qr-placeholder {
    width: 56px;
    height: 56px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    background: repeating-linear-gradient(
        45deg,
        #0f172a,
        #0f172a 4px,
        #ffffff 4px,
        #ffffff 8px
    );
    color: #ffffff;
    font-size: 11px;
    border: 2px solid #0f172a;
}

.lottery-ticket-meta-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 16px;
}

.meta-item {
    background: rgba(255, 255, 255, 0.65);
    border-radius: 12px;
    padding: 10px 12px;
}

.meta-label {
    display: block;
    font-size: 11px;
    color: #64748b;
    margin-bottom: 4px;
}

.meta-value {
    display: block;
    font-size: 13px;
    font-weight: 700;
    color: #0f172a;
    word-break: break-word;
}

.lottery-ticket-info-row {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    font-size: 13px;
    color: #1e293b;
    margin-bottom: 14px;
}

.lottery-ticket-prize-box {
    padding: 12px 14px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.72);
    color: #14532d;
    font-weight: 700;
    margin-bottom: 14px;
}

.lottery-ticket-footer {
    padding-top: 12px;
    border-top: 1px dashed rgba(15, 23, 42, 0.15);
    font-size: 12px;
    color: #64748b;
}

.lottery-ticket-draw-title {
    font-size: 18px;
    font-weight: 800;
    color: #0f172a;
    margin-bottom: 14px;
    line-height: 1.4;
}

.lottery-ticket-code-wrap {
    display: grid;
    gap: 4px;
}

/* =========================
   LOTTERY PICKER
========================= */
.ticket-selection-summary {
    display: grid;
    gap: 8px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 12px 14px;
    margin-bottom: 14px;
    color: #334155;
    font-size: 14px;
}

.ticket-grid-block {
    margin-top: 10px;
}

.lottery-pick-grid {
    display: grid;
    gap: 8px;
}

.lottery-pick-grid.main-grid {
    grid-template-columns: repeat(7, minmax(0, 1fr));
}

.lottery-pick-grid.lucky-grid {
    grid-template-columns: repeat(10, minmax(0, 1fr));
}

.pick-cell {
    border: 1px solid #cbd5e1;
    background: #fff;
    color: #0f172a;
    border-radius: 12px;
    min-height: 42px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.15s ease;
}

.pick-cell:hover {
    background: #eff6ff;
    border-color: #60a5fa;
}

.pick-cell.main-cell.active {
    background: #2563eb;
    color: #fff;
    border-color: #1d4ed8;
}

.pick-cell.lucky-cell.active {
    background: #ea580c;
    color: #fff;
    border-color: #c2410c;
}

/* =========================
   RNG / DRAW LIVE
========================= */
.rng-showcase {
    margin-top: 18px;
}

.rng-showcase-header {
    justify-content: space-between;
    margin-bottom: 14px;
}

.rng-showcase-header h3,
.draw-live-head h3 {
    margin: 0 0 6px 0;
}

.rng-showcase-header p,
.draw-live-head p {
    margin: 0;
    color: #64748b;
}

.rng-ribbon-box {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    border-radius: 20px;
    padding: 20px;
    min-height: 120px;
    display: flex;
    align-items: center;
    overflow: hidden;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.18);
}

.rng-ribbon-track {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
    width: 100%;
}

.rng-ribbon-placeholder {
    color: #cbd5e1;
    font-size: 15px;
    font-weight: 600;
}

.rng-ball {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: 800;
    color: #fff;
    animation: rngPop 0.45s ease;
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.22);
}

.rng-ball.main {
    background: radial-gradient(circle at 30% 30%, #38bdf8, #2563eb);
}

.rng-ball.extra {
    background: radial-gradient(circle at 30% 30%, #f59e0b, #dc2626);
}

.rng-separator {
    font-size: 30px;
    font-weight: 900;
    color: #f8fafc;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 26px;
}

.rng-status-label {
    color: #e2e8f0;
    font-size: 14px;
    font-weight: 700;
    padding: 8px 12px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.08);
}

@keyframes rngPop {
    0% {
        transform: scale(0.4);
        opacity: 0;
    }
    70% {
        transform: scale(1.08);
        opacity: 1;
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.rng-toggle-group {
    margin-bottom: 18px;
}

.rng-toggle-label {
    display: inline-flex;
    align-items: center;
    gap: 14px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
}

.rng-big-checkbox {
    width: 24px;
    height: 24px;
    accent-color: #2563eb;
    cursor: pointer;
    transform: scale(1.25);
}

.draw-live-card {
    overflow: hidden;
}

.draw-live-head {
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 16px;
}

.draw-live-meta {
    text-align: left;
    font-size: 14px;
    color: #334155;
}

.draw-live-note {
    background: #eff6ff;
    color: #1e3a8a;
    padding: 12px 14px;
    border-radius: 12px;
    margin-bottom: 16px;
    font-weight: 600;
}

.draw-live-countdown {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 18px;
}

.count-box {
    background: #0f172a;
    color: #fff;
    border-radius: 14px;
    padding: 16px 10px;
    text-align: center;
}

.count-box span {
    display: block;
    font-size: 28px;
    font-weight: 800;
    line-height: 1;
    margin-bottom: 6px;
}

.count-box small {
    font-size: 12px;
    color: #cbd5e1;
}

.draw-live-status {
    margin-bottom: 16px;
    font-weight: 700;
    color: #0f172a;
}

.draw-live-balls {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 12px;
}

.draw-slot {
    min-height: 64px;
    border-radius: 50%;
    background: #e2e8f0;
    border: 2px dashed #94a3b8;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    font-weight: 800;
    color: #0f172a;
}

.draw-slot.filled {
    background: radial-gradient(circle at 30% 30%, #38bdf8, #2563eb);
    color: #fff;
    border-style: solid;
    border-color: #1d4ed8;
    animation: drawPop 0.4s ease;
}

.draw-slot.extra.filled {
    background: radial-gradient(circle at 30% 30%, #f59e0b, #dc2626);
    border-color: #b91c1c;
}

@keyframes drawPop {
    0% {
        transform: scale(0.3);
        opacity: 0;
    }
    70% {
        transform: scale(1.08);
        opacity: 1;
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

/* =========================
   FOOTER
========================= */
.site-footer {
    background: #0f172a !important;
    color: #ffffff !important;
    text-align: center;
    padding: 16px 0;
    margin-top: 40px;
}

.compact-footer {
    padding-top: 16px;
    padding-bottom: 12px;
}

.footer-top-row,
.centered-footer .footer-top-row,
.centered-footer .centered-footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.footer-brand-block {
    max-width: 600px;
    text-align: center;
}

.footer-brand-title,
.site-footer .footer-brand-title {
    margin: 0 0 4px 0;
    font-size: 20px;
    font-weight: 800;
    color: #ffffff !important;
}

.site-footer p,
.footer-brand-block p {
    margin: 0;
    font-size: 13px;
    line-height: 1.6;
    color: #cbd5f5 !important;
}

.footer-links,
.footer-links-inline {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links-inline {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 12px;
    align-items: center;
    justify-content: center;
}

.footer-links li {
    margin-bottom: 8px;
}

.footer-links a,
.footer-links-inline a,
.site-footer .footer-links-inline a {
    text-decoration: none;
    color: #ffffff !important;
    font-size: 14px;
    font-weight: 600;
    padding: 4px 6px;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.footer-links a:hover,
.footer-links-inline a:hover,
.site-footer .footer-links-inline a:hover {
    background: rgba(255, 255, 255, 0.12);
    color: #38bdf8 !important;
}

.footer-bottom,
.site-footer .footer-bottom {
    margin-top: 10px;
    text-align: center;
    color: #cbd5f5 !important;
    font-size: 13px;
}

/* =========================
   RESPONSIVE
========================= */
@media (max-width: 992px) {
    .details-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .form-grid,
    .draw-live-countdown {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .compact-summary-grid,
    .admin-compact-summary-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .draw-live-head,
    .rng-showcase-header,
    .messages-top-actions,
    .footer-top-row {
        flex-direction: column;
        align-items: flex-start;
    }

    .draw-live-balls {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .lottery-pick-grid.main-grid,
    .lottery-pick-grid.lucky-grid {
        grid-template-columns: repeat(5, minmax(0, 1fr));
    }

    .hero-buttons-grid {
        flex-direction: column;
    }

    .hero-buttons-grid a {
        width: 100%;
    }

    .brand-text {
        font-size: 16px;
    }

    .brand-mark {
        width: 40px;
        height: 40px;
    }

    .messages-tab-btn {
        width: 100%;
        justify-content: space-between;
    }
}

@media (max-width: 640px) {
    .lottery-ticket-pro-grid {
        grid-template-columns: 1fr;
    }

    .lottery-ticket-meta-grid {
        grid-template-columns: 1fr 1fr;
    }

    .rng-ball {
        width: 60px;
        height: 60px;
        font-size: 20px;
    }

    .rng-ribbon-box {
        min-height: 140px;
        padding: 18px;
    }
}





/* إجبار اسم الموقع واللوكو إلى يمين الهيدر */
.site-header .header-inner,
.modern-header .header-inner {
    align-items: stretch !important;
}

.site-header .logo,
.site-header .logo-with-mark,
.modern-header .logo,
.modern-header .logo-with-mark {
    width: 100% !important;
    display: flex !important;
    justify-content: flex-end !important;
    margin-left: auto !important;
}

.site-header .logo a,
.site-header .logo-with-mark .brand-link,
.modern-header .logo a,
.modern-header .logo-with-mark .brand-link {
    display: inline-flex !important;
    flex-direction: row-reverse !important;
    align-items: center !important;
    justify-content: flex-end !important;
    margin-left: auto !important;
    text-align: right !important;
}
/* =========================
   12. HOME + RESULTS ONLY
========================= */

.hero-centered {
    text-align: center;
}

.center-btn {
    display: flex;
    justify-content: center;
}

.btn-play-now {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    background: linear-gradient(135deg, #22c55e, #16a34a);
    color: #fff;
    padding: 16px 30px;
    border-radius: 14px;
    font-size: 18px;
    font-weight: 800;
    box-shadow: 0 10px 25px rgba(34, 197, 94, 0.25);
}

.btn-play-now:hover {
    transform: translateY(-2px);
    opacity: 0.95;
}

.btn-lottery,
.btn-dambala,
.btn-bingo9,
.btn-bingo15 {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    padding: 12px 18px;
    border-radius: 10px;
    font-weight: 700;
    color: #fff !important;
}

.btn-lottery { background: #2563eb; }
.btn-lottery:hover { background: #1d4ed8; }

.btn-dambala { background: #7c3aed; }
.btn-dambala:hover { background: #6d28d9; }

.btn-bingo9 { background: #0891b2; }
.btn-bingo9:hover { background: #0e7490; }

.btn-bingo15 { background: #ea580c; }
.btn-bingo15:hover { background: #c2410c; }

.section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.section-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
}

.detail-box {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    padding: 20px;
    box-shadow: 0 8px 25px rgba(15,23,42,0.05);
}

.home-sections-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
}

.home-section-title {
    font-size: 24px;
    font-weight: 800;
    color: #0f172a;
    margin-bottom: 14px;
}

.home-draw-highlight,
.home-draw-pending-box {
    background: linear-gradient(135deg, #ffffff 0%, #f8fbff 100%);
    border: 1px solid #dbe7f3;
    border-radius: 18px;
    padding: 22px;
}

.home-draw-pending-box {
    background: linear-gradient(135deg, #fffdf6 0%, #fff7e6 100%);
    border-color: #fde68a;
}

.home-draw-title {
    font-size: 24px;
    font-weight: 800;
    color: #0f172a;
    margin-bottom: 16px;
    line-height: 1.5;
}

.home-draw-meta {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 14px;
    margin-bottom: 18px;
}

.home-draw-meta-box {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 14px 16px;
}

.home-draw-meta-label {
    display: block;
    font-size: 13px;
    color: #64748b;
    margin-bottom: 6px;
}

.home-draw-meta-value {
    display: block;
    font-size: 18px;
    font-weight: 800;
    color: #0f172a;
}

.home-prize-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 12px;
    margin-top: 18px;
}

.home-prize-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 14px;
    text-align: center;
}

.home-prize-card strong {
    display: block;
    font-size: 14px;
    color: #0f172a;
    margin-bottom: 8px;
}

.home-prize-card span {
    font-size: 16px;
    font-weight: 800;
    color: #2563eb;
}

.home-result-preview {
    margin-top: 14px;
}

.home-result-preview-label {
    font-size: 14px;
    font-weight: 700;
    color: #92400e;
    margin-bottom: 10px;
}

.results-block-title {
    margin-bottom: 18px;
    color: #0f172a;
    font-size: 24px;
    font-weight: 800;
}

.results-grid {
    display: grid;
    gap: 18px;
}

.result-draw-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 18px;
    padding: 20px;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
}

.result-draw-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 14px;
}

.result-draw-title {
    font-size: 22px;
    font-weight: 800;
    color: #0f172a;
    margin-bottom: 8px;
}

.result-draw-meta {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    color: #64748b;
    font-size: 14px;
}

.result-status-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 14px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 800;
}

.result-status-pending {
    background: #fef3c7;
    color: #92400e;
}

.result-status-done {
    background: #dcfce7;
    color: #166534;
}

.pending-prize-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
    margin-top: 16px;
}

.pending-prize-card {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 14px;
    text-align: center;
}

.pending-prize-card strong {
    display: block;
    color: #0f172a;
    margin-bottom: 8px;
    font-size: 14px;
}

.pending-prize-card span {
    color: #2563eb;
    font-size: 16px;
    font-weight: 800;
}

.result-balls {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 14px;
}

.result-ball {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #2563eb;
    color: #fff;
    font-weight: 800;
}

.result-ball.extra {
    background: #ea580c;
}

@media (max-width: 992px) {
    .home-sections-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .section-head,
    .result-draw-head {
        align-items: flex-start;
    }
}