/* 捕鱼 Fishing — the full-screen table (resources/views/design/casino/fishing.blade.php). Brand: #0b1220 / #1b2638 plates, green #10b981. */
:root { color-scheme: dark; }
* { box-sizing: border-box; }
html, body.fx-body { margin: 0; height: 100%; background: #0b1220; overflow: hidden; overscroll-behavior: none; }
body.fx-body { font: 500 14px/1.35 Inter, system-ui, -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif; color: #ecfdf5; -webkit-tap-highlight-color: transparent; user-select: none; -webkit-user-select: none; }

.fx { position: fixed; inset: 0; }
.fx-canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; cursor: crosshair; }

/* —— top bar —— */
.fx-top { position: absolute; top: max(8px, env(safe-area-inset-top)); left: max(8px, env(safe-area-inset-left)); right: max(8px, env(safe-area-inset-right)); display: flex; align-items: center; gap: 8px; pointer-events: none; }
.fx-top > * { pointer-events: auto; }
.fx-title { display: flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 12px; background: rgba(11, 18, 32, .78); border: 1px solid rgba(52, 211, 153, .25); }
.fx-title b { font-size: 16px; font-weight: 800; letter-spacing: .02em; }
.fx-badge { font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 999px; background: #fde68a; color: #422006; }
.fx-bal { display: flex; flex-direction: column; padding: 4px 14px; border-radius: 12px; background: rgba(11, 18, 32, .78); border: 1px solid rgba(52, 211, 153, .25); min-width: 120px; }
.fx-bal small { font-size: 11px; color: #a7f3d0; }
.fx-bal b { font: 800 18px/1.15 "JetBrains Mono", ui-monospace, monospace; color: #fff; }
.fx-bal i { font-style: normal; font-size: 11px; color: #a7f3d0; }
.fx-net { display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; border-radius: 999px; background: rgba(11, 18, 32, .78); font: 600 12px/1 "JetBrains Mono", ui-monospace, monospace; color: #e2e8f0; }
.fx-net i { width: 9px; height: 9px; border-radius: 50%; background: #94a3b8; box-shadow: 0 0 0 3px rgba(148, 163, 184, .2); }
.fx-net[data-state="good"] i { background: #34d399; box-shadow: 0 0 0 3px rgba(52, 211, 153, .25); }
.fx-net[data-state="slow"] i { background: #fbbf24; box-shadow: 0 0 0 3px rgba(251, 191, 36, .25); }
.fx-net[data-state="bad"] i { background: #f87171; box-shadow: 0 0 0 3px rgba(248, 113, 113, .25); }
.fx-top__tools { margin-left: auto; display: flex; gap: 6px; }

.fx-btn { appearance: none; border: 1px solid rgba(52, 211, 153, .35); background: rgba(11, 18, 32, .82); color: #ecfdf5; font: 700 13px/1 inherit; font-family: inherit; padding: 9px 12px; border-radius: 10px; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 6px; text-decoration: none; min-height: 36px; }
.fx-btn:hover { background: #1b2638; }
.fx-btn:focus-visible, .fx-round:focus-visible, .fx-toggle:focus-visible { outline: 2px solid #34d399; outline-offset: 2px; }
.fx-btn svg { width: 18px; height: 18px; }
.fx-btn--icon { padding: 8px; width: 38px; }
.fx-btn--primary { background: #10b981; color: #052e1f; border-color: #10b981; }
.fx-btn--primary:hover { background: #34d399; }
.fx-btn--wide { width: 100%; margin-top: 12px; }

/* —— the bet, left of the cannon (the cannon itself is on the canvas, bottom centre) —— */
.fx-dock { position: absolute; left: 50%; bottom: max(8px, env(safe-area-inset-bottom)); transform: translateX(calc(-100% - min(9vw, 110px))); }
.fx-level { display: flex; align-items: center; gap: 6px; padding: 4px; border-radius: 999px; background: rgba(11, 18, 32, .85); border: 1px solid rgba(52, 211, 153, .35); }
.fx-round { width: 42px; height: 42px; border-radius: 50%; border: 2px solid #34d399; background: #1b2638; color: #ecfdf5; font: 800 22px/1 inherit; font-family: inherit; cursor: pointer; }
.fx-round:disabled { opacity: .45; cursor: default; }
.fx-stake { display: flex; flex-direction: column; align-items: center; min-width: 70px; }
.fx-stake small { font-size: 10px; color: #a7f3d0; }
.fx-stake b { font: 800 16px/1.1 "JetBrains Mono", ui-monospace, monospace; color: #fde68a; }

.fx-side { position: absolute; right: max(10px, env(safe-area-inset-right)); bottom: max(10px, env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 8px; }
.fx-toggle { width: 64px; height: 64px; border-radius: 18px; border: 2px solid rgba(52, 211, 153, .45); background: rgba(11, 18, 32, .85); color: #ecfdf5; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; font: 800 12px/1 inherit; font-family: inherit; cursor: pointer; }
.fx-toggle svg { width: 24px; height: 24px; }
.fx-toggle[aria-pressed="true"] { background: #10b981; color: #052e1f; border-color: #6ee7b7; box-shadow: 0 0 18px rgba(16, 185, 129, .55); }

.fx-toast { position: absolute; left: 50%; top: 22%; transform: translateX(-50%); margin: 0; padding: 10px 16px; border-radius: 12px; background: rgba(11, 18, 32, .92); border: 1px solid #34d399; font-weight: 700; color: #ecfdf5; max-width: 80vw; text-align: center; }

/* —— overlays —— */
.fx-overlay { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(11, 18, 32, .55); }
.fx-overlay[hidden] { display: none; }
.fx-overlay__card { display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 20px 28px; border-radius: 16px; background: #1b2638; border: 1px solid rgba(52, 211, 153, .35); }
.fx-overlay__card p { margin: 0; font-weight: 700; font-size: 15px; }
.fx-spinner { width: 30px; height: 30px; border-radius: 50%; border: 3px solid rgba(52, 211, 153, .25); border-top-color: #34d399; animation: fx-spin .9s linear infinite; }
@keyframes fx-spin { to { transform: rotate(360deg); } }

.fx-panel { position: absolute; inset: 0; display: flex; justify-content: flex-end; background: rgba(11, 18, 32, .5); }
.fx-panel[hidden] { display: none; }
.fx-panel__card { position: relative; width: min(460px, 92vw); height: 100%; overflow: auto; background: #111a2b; border-left: 1px solid rgba(52, 211, 153, .3); padding: 18px 18px 24px; padding-right: max(18px, env(safe-area-inset-right)); }
.fx-panel__close { position: sticky; top: 0; float: right; }
.fx-panel__body { clear: both; padding-top: 4px; color: #e2e8f0; }
.fx-rules { margin: 0 0 14px; padding-left: 18px; display: grid; gap: 8px; line-height: 1.45; }
.fx-pay { width: 100%; border-collapse: collapse; font-size: 13px; }
.fx-pay td { padding: 4px 6px; border-bottom: 1px solid rgba(148, 163, 184, .15); vertical-align: middle; }
.fx-pay td:nth-child(3), .fx-pay td:nth-child(4) { text-align: right; font-family: "JetBrains Mono", ui-monospace, monospace; white-space: nowrap; }
.fx-pay b { color: #fde68a; }
.fx-pay canvas { width: 72px; height: 36px; display: block; }
.fx-rtp { margin: 12px 0 0; color: #a7f3d0; font-weight: 700; }
.fx-tag { display: inline-block; padding: 1px 7px; border-radius: 999px; background: #1e293b; color: #cbd5e1; font-size: 11px; font-weight: 700; }
.fx-tag--gold { background: #fde68a; color: #422006; }
.fx-hist { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.fx-hist li { display: grid; grid-template-columns: 52px 1fr auto auto; gap: 8px; align-items: center; padding: 6px 8px; border-radius: 8px; background: #16213a; font-size: 13px; }
.fx-hist__n { color: #94a3b8; font-family: "JetBrains Mono", ui-monospace, monospace; font-size: 12px; }
.fx-hist__fish i { font-style: normal; color: #fde68a; font-weight: 700; }
.fx-hist__bet { color: #cbd5e1; font-family: "JetBrains Mono", ui-monospace, monospace; }
.fx-hist__nonce { grid-column: 2 / -1; color: #94a3b8; font-size: 11px; font-family: "JetBrains Mono", ui-monospace, monospace; }
.fx-win { color: #6ee7b7; font-family: "JetBrains Mono", ui-monospace, monospace; }
.fx-empty { color: #cbd5e1; }
.fx-verify { margin: 10px 0 0; padding-left: 18px; display: grid; gap: 6px; font-size: 12px; font-family: "JetBrains Mono", ui-monospace, monospace; color: #e2e8f0; }
.fx-verify .fx-ok::marker { color: #34d399; }
.fx-verify .fx-bad { color: #fca5a5; }

/* —— portrait phones: turn the phone —— */
.fx-rotate { display: none; }
@media (orientation: portrait) and (max-width: 820px) {
    .fx-rotate { position: absolute; inset: 0; z-index: 10; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; padding: 24px; text-align: center; background: #0b1220; }
    .fx-rotate svg { width: 84px; height: 84px; animation: fx-turn 2.4s ease-in-out infinite; }
    .fx-rotate b { font-size: 20px; }
    .fx-rotate p { margin: 0; color: #cbd5e1; max-width: 280px; }
}
@keyframes fx-turn { 0%, 30% { transform: rotate(0); } 60%, 100% { transform: rotate(-90deg); } }

/* Short landscape phones: smaller chrome. */
@media (max-height: 460px) {
    .fx-title b { font-size: 14px; }
    .fx-title { padding: 5px 9px; }
    .fx-bal { min-width: 96px; padding: 3px 10px; }
    .fx-bal b { font-size: 15px; }
    .fx-btn { padding: 7px 9px; min-height: 32px; font-size: 12px; }
    .fx-btn--icon { width: 34px; }
    .fx-toggle { width: 54px; height: 54px; border-radius: 15px; font-size: 11px; }
    .fx-round { width: 36px; height: 36px; font-size: 19px; }
    .fx-stake b { font-size: 14px; }
}
@media (max-width: 700px) {
    .fx-badge { display: none; }
}

/* Feel prototype fx (30.11): the balance plate pops green when caught coins land in it. */
.fx-bal.is-win { animation: fx-bal-win .55s ease-out; }
@keyframes fx-bal-win {
    0% { transform: scale(1); box-shadow: 0 0 0 rgba(52, 211, 153, 0); }
    30% { transform: scale(1.12); border-color: #fde047; box-shadow: 0 0 22px rgba(253, 224, 71, .6); }
    100% { transform: scale(1); box-shadow: 0 0 0 rgba(52, 211, 153, 0); }
}
.fx-bal.is-win b { animation: fx-bal-win-text .55s ease-out; }
@keyframes fx-bal-win-text { 30% { color: #fde047; } }
