* { box-sizing: border-box; }

body {
    background: #0a0a0a;
    color: #f2c94c;
    font-family: Arial, Helvetica, sans-serif;
    margin: 0;
    padding: 0;
}

.app-shell {
    max-width: 480px;
    margin: 0 auto;
    min-height: 100vh;
    background: #0a0a0a;
    position: relative;
    overflow: hidden;
}

.app-shell::before {
    content: "";
    position: absolute;
    top: 240px;
    left: 50%;
    width: 85%;
    max-width: 420px;
    aspect-ratio: 1 / 1;
    background-image: url('logo.webp');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    transform: translateX(-50%);
    opacity: 0.14;
    z-index: 0;
    pointer-events: none;
}

.app-header, .app-content {
    position: relative;
    z-index: 1;
}

.app-header {
    padding: 16px;
    border-bottom: 1px solid #333;
}

.header-top {
    display: flex;
    align-items: center;
}

.header-brand {
    flex: 1;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.title-logo {
    height: 64px;
    width: 64px;
    border-radius: 50%;
    flex-shrink: 0;
}

.app-header h1 {
    font-size: 20px;
    margin: 0;
    text-align: center;
    color: #f2c94c;
}

.back-link, .back-link-spacer {
    width: 20px;
    flex-shrink: 0;
}

.back-link {
    color: #f2c94c;
    text-decoration: none;
    font-size: 20px;
}

.account-bar {
    width: 100%;
    display: flex;
    justify-content: center;
    gap: 10px;
    font-size: 13px;
    color: #ccc;
}

.account-balance {
    color: #f2c94c;
    font-weight: 600;
}

.header-nav {
    width: 100%;
    display: flex;
    gap: 6px;
    margin-top: 12px;
    background: #161616;
    border-radius: 10px;
    padding: 4px;
}

.header-nav a {
    flex: 1;
    text-align: center;
    color: #999;
    text-decoration: none;
    font-size: 12px;
    font-weight: 600;
    padding: 9px 4px;
    border-radius: 8px;
    white-space: nowrap;
}

.header-nav a.active {
    background: linear-gradient(180deg, #f7d774, #c9971f);
    color: #1a1200;
}

.app-content {
    padding: 16px;
}

label {
    display: block;
    margin-top: 14px;
    margin-bottom: 4px;
    color: #f2c94c;
}

select, input[type=text], input[type=number], input[type=date] {
    width: 100%;
    padding: 10px;
    border-radius: 6px;
    border: none;
    background: #fff;
    color: #111;
    font-size: 15px;
}

.field-row {
    display: flex;
    gap: 12px;
}

.field-row > div {
    flex: 1;
    min-width: 0;
}

.checkbox-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid #222;
}

.checkbox-row input {
    width: 22px;
    height: 22px;
}

.btn {
    display: inline-block;
    background: linear-gradient(180deg, #f7d774, #c9971f);
    color: #1a1200;
    border: none;
    border-radius: 20px;
    padding: 12px 28px;
    font-weight: bold;
    font-size: 15px;
    cursor: pointer;
    text-decoration: none;
}

.btn-row {
    display: flex;
    justify-content: flex-end;
    margin-top: 24px;
}

.error {
    color: #ff6b6b;
    margin-top: 10px;
}

.success {
    color: #6bff89;
    margin-top: 10px;
}

table.grid {
    width: 100%;
    border-collapse: collapse;
    margin-top: 12px;
    font-size: 13px;
    table-layout: fixed;
}

table.grid th, table.grid td {
    border: 1px solid #333;
    padding: 4px;
    text-align: center;
    overflow: hidden;
}

table.grid .amount-col {
    width: 11%;
}

table.grid th {
    color: #f2c94c;
    font-weight: normal;
}

table.grid input {
    width: 100%;
    padding: 6px 2px;
    text-align: center;
}

table.prize-table {
    margin-bottom: 14px;
}

table.prize-table th, table.prize-table td {
    border-color: #ddd;
}

table.prize-table th {
    background: linear-gradient(#f2c94c, #b8860b);
    color: #fff;
    font-weight: bold;
    padding: 10px 4px;
    border-color: #b8860b;
}

table.prize-table td {
    background: #fff;
    color: #000;
    padding: 10px 4px;
}

.total-row {
    text-align: right;
    font-size: 18px;
    margin-top: 14px;
    color: #f2c94c;
}

table.betlist {
    width: 100%;
    border-collapse: collapse;
    margin-top: 12px;
    font-size: 13px;
    color: #eee;
}

table.betlist th, table.betlist td {
    border: 1px solid #333;
    padding: 6px;
}

.receipt-box {
    background: #111;
    border: 1px solid #f2c94c;
    border-radius: 6px;
    padding: 12px;
    margin-top: 12px;
    white-space: pre-wrap;
    color: #eee;
    font-size: 13px;
}

.confirm-box {
    background: #111;
    border: 1px solid #f2c94c;
    border-radius: 6px;
    padding: 12px;
    margin-top: 12px;
}

.confirm-meta {
    color: #eee;
    font-size: 14px;
    margin-bottom: 8px;
}

.bet-row {
    display: flex;
    gap: 8px;
    align-items: stretch;
}

.bet-receipt {
    flex: 1;
    margin-top: 0;
    min-width: 0;
}

.bet-actions {
    display: flex;
    flex-direction: column;
    gap: 6px;
    justify-content: center;
    flex-shrink: 0;
}

.bet-actions .btn {
    white-space: nowrap;
}

.center {
    text-align: center;
}

.right {
    text-align: right;
}

.payout-summary {
    background: #161616;
    border-radius: 10px;
    padding: 4px 16px;
    margin-top: 16px;
}

.payout-summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid #262626;
}

.payout-summary-row:last-child {
    border-bottom: none;
}

.payout-summary-value {
    background: #e8e8e8;
    color: #111;
    padding: 8px 20px;
    border-radius: 6px;
    font-size: 15px;
}

.payout-summary-value.win {
    color: #1a7a1a;
    font-weight: bold;
}

.payout-group {
    padding: 0;
    overflow: hidden;
}

.payout-group-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px;
    border-bottom: 1px solid #333;
}

.payout-game-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    flex-shrink: 0;
}

.payout-game-name {
    flex: 1;
    color: #f2c94c;
    font-weight: bold;
}

.payout-game-total {
    color: #6bff89;
    font-weight: bold;
}

.payout-line {
    padding: 10px 12px;
    border-bottom: 1px solid #222;
}

.payout-line:last-child {
    border-bottom: none;
}

.payout-empty {
    text-align: center;
    color: #fff;
    font-size: 17px;
    padding: 22px 0;
}

.payout-section-title {
    text-align: center;
    color: #f7d774;
    font-weight: bold;
    margin-top: 12px;
    padding-bottom: 10px;
    border-bottom: 1px solid #f2c94c;
}

.payout-jp-game {
    color: #f2c94c;
    font-size: 12px;
    font-weight: normal;
}

.payout-jp-amount {
    color: #6bff89;
    font-weight: bold;
}

.payout-number {
    color: #fff;
    font-size: 16px;
    font-weight: bold;
}

.payout-detail {
    color: #ccc;
    font-size: 13px;
    margin-top: 2px;
}

.jackpot-banner {
    background: linear-gradient(135deg, #3a2a00, #1a1200);
    border: 1px solid #f2c94c;
    border-radius: 10px;
    padding: 14px 16px;
    margin-bottom: 16px;
    text-align: center;
}

.jackpot-label {
    color: #f2c94c;
    font-size: 13px;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.jackpot-amount {
    color: #fff;
    font-size: 26px;
    font-weight: bold;
    margin-top: 4px;
    text-shadow: 0 0 8px rgba(242, 201, 76, 0.6);
}

.launch-error {
    display: flex;
    justify-content: center;
    margin-top: 60px;
    padding: 0 16px;
}

.launch-error-card {
    background: #111;
    border: 1px solid #f2c94c;
    border-radius: 10px;
    padding: 32px 24px;
    max-width: 320px;
    text-align: center;
}

.launch-error-icon {
    width: 56px;
    height: 56px;
    margin: 0 auto 16px;
    border-radius: 50%;
    background: linear-gradient(180deg, #f7d774, #c9971f);
    color: #1a1200;
    font-size: 28px;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
}

.launch-error-card p {
    color: #ccc;
    font-size: 15px;
    line-height: 1.5;
    margin: 0;
}
