/* Entropy Garden — arcade, cards of chaos, pong overlays */

/* --- ARCADE MINIGAME --- */
#arcade-game-container {
    border: 2px solid var(--cyan);
    padding: 20px 24px;
    background: #050505;
    box-shadow: inset 0 0 20px rgba(0, 255, 255, 0.1);
    text-align: center;
    border-radius: var(--radius-lg);
    box-sizing: border-box;
    width: 100%;
    max-width: 100%;
    overflow: hidden;
}

#arcade-screen {
    min-height: 120px;
    height: auto;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: stretch;
    margin-bottom: 20px;
    padding: 16px 20px;
    background: rgba(0, 20, 20, 0.8);
    border: 1px solid var(--cyan);
    border-radius: var(--radius-md);
    box-sizing: border-box;
    width: 100%;
    min-width: 0;
    overflow: hidden;
}

#sequence-display {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
    width: 100%;
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
    padding: 14px 18px;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-padding-inline: 18px;
    -webkit-overflow-scrolling: touch;
}

#sequence-display .matrix-grid,
#sequence-display .color-square {
    flex: 0 0 auto;
    margin: 2px 4px;
}

#sequence-display .matrix-grid {
    border-radius: var(--radius-sm);
    overflow: hidden;
}

/* The Color Blocks */
.color-square {
    width: 35px;
    height: 35px;
    border: 2px solid #fff;
    box-shadow: 0 0 10px currentColor; /* Makes the glow match the background color */
    border-radius: var(--radius-sm);
}

/* Specific Colors */
.square-red { background: #ff0055; color: #ff0055; }

.square-blue { background: #0055ff; color: #0055ff; }

.square-green { background: #00ff00; color: #00ff00; }

.square-yellow { background: #ffff00; color: #ffff00; }

.square-cyan { background: #00ffff; color: #00ffff; }

.square-magenta { background: #ff00ff; color: #ff00ff; }

/* The Mystery Block */
.square-hidden { 
    background: transparent; 
    border: 2px solid #fff; 
    color: #fff; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    font-weight: bold; 
    animation: crtFlicker 2s infinite;
}

#arcade-message {
    color: var(--cyan);
    font-family: var(--main-font);
    font-size: 0.9rem;
    letter-spacing: 1px;
    text-align: center;
}

/* Answer choices — horizontal row matching sequence-display spacing */
#arcade-controls,
.arcade-answers-row {
    display: flex !important;
    flex-direction: row;
    flex-wrap: nowrap;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
    width: 100%;
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
    padding: 16px 18px;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-padding-inline: 18px;
    -webkit-overflow-scrolling: touch;
}

#arcade-controls .matrix-grid,
.arcade-answers-row .matrix-grid {
    flex: 0 0 auto;
    border-radius: var(--radius-sm);
    overflow: hidden;
}

.matrix-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(3, 1fr);
    width: 40px;
    height: 40px;
    border: 1px solid #333;
    gap: 1px;
    background: #000;
    border-radius: var(--radius-sm);
    overflow: hidden;
}

.matrix-cell {
    width: 100%;
    height: 100%;
    background: transparent; /* "0" is black */
}

/* Answer boxes — clip cells to rounded corners; glow via drop-shadow (not box-shadow) */
.interactive-square.matrix-grid {
    cursor: pointer;
    transition: transform 0.2s, filter 0.2s;
    border-radius: var(--radius-sm);
    overflow: hidden;
}

.interactive-square.matrix-grid:hover {
    transform: scale(1.1);
    filter: drop-shadow(0 0 10px var(--cyan));
}

/* The clickable choice squares */
.interactive-square {
    cursor: pointer;
    transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275), filter 0.2s;
}

.interactive-square:hover {
    transform: scale(1.2);
    filter: brightness(1.5); /* Makes the neon pop even more when hovered */
}

.interactive-square:active {
    transform: scale(0.9); /* Satisfying click squish */
}

.arcade-btn {
    border-radius: var(--radius-sm);
}

.arcade-btn:hover {
    background: var(--cyan);
    color: #000;
    box-shadow: 0 0 15px var(--cyan);
}

#arcade-score {
    color: var(--cyan);
    font-family: var(--main-font);
    font-size: 1.2rem;
    text-shadow: 0 0 5px var(--cyan);
}

/* --- CARDS OF CHAOS --- */
#modal-cards.modal.wide {
    width: min(880px, 98vw);
}

#modal-cards .modal-content {
    max-height: min(96vh, 980px);
    overflow-y: auto;
}

#modal-cards .coc-modal-scroll {
    max-height: none;
    overflow: visible;
    overflow-y: visible;
}

#modal-cards #coc-rules-body {
    max-height: min(58vh, 520px);
    overflow-y: auto;
}

#cards-game-container {
    display: flex;
    justify-content: center;
    width: 100%;
}

.coc-modal-scroll {
    padding-right: 4px;
    display: flex;
    justify-content: center;
}

.coc-layout {
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: min(100%, 580px);
    margin: 0 auto;
}

.coc-tab-row {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 12px;
    width: 100%;
}

.coc-tabs {
    grid-column: 2;
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: center;
}

.coc-player-pick-wrap {
    grid-column: 3;
    justify-self: end;
    display: flex;
    align-items: center;
}

.coc-tab {
    font-family: var(--main-font);
    font-size: 0.85rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 8px 14px;
    border-radius: var(--radius-sm);
    border: 1px solid rgba(0, 255, 0, 0.35);
    background: rgba(0, 0, 0, 0.45);
    color: var(--neon-green);
    cursor: pointer;
}

.coc-tab.is-active {
    background: rgba(0, 255, 0, 0.15);
    box-shadow: 0 0 10px rgba(0, 255, 0, 0.25);
}

.coc-header {
    display: flex;
    flex-direction: column;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 6px 16px;
    text-align: center;
}

.coc-status {
    margin: 0;
    font-family: var(--main-font);
    color: var(--cyan);
    letter-spacing: 0.06em;
}

.coc-totals {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 16px;
    font-size: 0.9rem;
    color: #ccc;
    justify-content: center;
}

.coc-totals strong {
    color: var(--neon-green);
}

.coc-layout--players-3 {
    width: min(100%, 600px);
}

.coc-layout--players-4 {
    width: min(100%, 720px);
}

.coc-layout--players-3 .coc-space-hint-slot,
.coc-layout--players-4 .coc-space-hint-slot {
    display: none;
}

.coc-table {
    display: flex;
    justify-content: center;
    padding: 8px 0 12px;
}

.coc-table-surface {
    position: relative;
    width: 100%;
    --coc-card-w: 48px;
    --coc-card-h: 66px;
    --coc-card-gap: 6px;
    --coc-shape-size: 26px;
    border: 1px solid rgba(0, 255, 0, 0.22);
    border-radius: 12px;
    background:
        radial-gradient(ellipse at center, rgba(0, 40, 0, 0.35) 0%, rgba(0, 0, 0, 0.55) 70%),
        rgba(0, 0, 0, 0.4);
    box-shadow: inset 0 0 40px rgba(0, 255, 0, 0.06);
}

.coc-seat {
    display: flex;
    justify-content: center;
    align-items: center;
    min-width: 0;
}

.coc-seat-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    max-width: 100%;
}

.coc-seat-label {
    font-size: 0.72rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: rgba(0, 255, 0, 0.65);
    white-space: nowrap;
    transform: none;
}

.coc-seat-score {
    color: var(--neon-green);
    font-weight: 700;
    margin-left: 0.4em;
    letter-spacing: 0.04em;
}

.coc-hand-wrap {
    display: flex;
    justify-content: center;
    align-items: center;
}

.coc-hand {
    display: flex;
    flex-wrap: nowrap;
    justify-content: center;
    gap: var(--coc-card-gap, 6px);
    max-width: 100%;
}

.coc-hand--vertical {
    flex-direction: column;
    flex-wrap: nowrap;
}

.coc-table-center {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    z-index: 1;
    position: relative;
}

/* 2 players — square table */
.coc-table--players-2 .coc-table-surface {
    display: grid;
    grid-template-columns: 1fr;
    grid-template-rows: auto 1fr auto;
    grid-template-areas:
        "north"
        "center"
        "south";
    gap: 14px;
    width: min(100%, 360px);
    aspect-ratio: 1;
    padding: 18px 16px;
}

.coc-table--players-2 .coc-seat[data-seat="north"] { grid-area: north; }

.coc-table--players-2 .coc-seat[data-seat="south"] { grid-area: south; }

.coc-table--players-2 .coc-table-center { grid-area: center; align-self: center; justify-self: center; }

.coc-table--players-2 .coc-seat:not([data-seat="north"]):not([data-seat="south"]) {
    display: none !important;
}

/* 3 players — square table, CPUs on opposite sides */
.coc-table--players-3 .coc-table-surface {
    display: grid;
    grid-template-columns: minmax(56px, 1fr) auto minmax(56px, 1fr);
    grid-template-rows: 1fr auto;
    grid-template-areas:
        "west center east"
        "south south south";
    gap: 14px;
    width: min(100%, 560px);
    aspect-ratio: 1;
    padding: 18px 16px;
}

.coc-table--players-3 .coc-seat[data-seat="west"] { grid-area: west; align-self: center; }

.coc-table--players-3 .coc-seat[data-seat="east"] { grid-area: east; align-self: center; }

.coc-table--players-3 .coc-seat[data-seat="south"] { grid-area: south; }

.coc-table--players-3 .coc-table-center { grid-area: center; align-self: center; justify-self: center; }

.coc-table--players-3 .coc-seat:not([data-seat="south"]):not([data-seat="west"]):not([data-seat="east"]) {
    display: none !important;
}

/* 4 players — rectangular table */
.coc-table--players-4 .coc-table-surface {
    display: grid;
    grid-template-columns: minmax(56px, 1fr) auto minmax(56px, 1fr);
    grid-template-rows: auto 1fr auto;
    grid-template-areas:
        "north north north"
        "west center east"
        "south south south";
    gap: 12px 10px;
    width: min(100%, 640px);
    min-height: 320px;
    padding: 16px 12px;
}

.coc-table--players-4 .coc-seat[data-seat="north"] { grid-area: north; }

.coc-table--players-4 .coc-seat[data-seat="west"] { grid-area: west; align-self: center; }

.coc-table--players-4 .coc-seat[data-seat="east"] { grid-area: east; align-self: center; }

.coc-table--players-4 .coc-seat[data-seat="south"] { grid-area: south; }

.coc-table--players-4 .coc-table-center { grid-area: center; align-self: center; justify-self: center; }

.coc-table--players-4 .coc-seat:not([data-seat="north"]):not([data-seat="south"]):not([data-seat="west"]):not([data-seat="east"]) {
    display: none !important;
}

.coc-deck-pile {
    min-width: var(--coc-card-w, 52px);
    min-height: var(--coc-card-h, 72px);
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px dashed rgba(0, 255, 0, 0.35);
    border-radius: var(--radius-sm);
    font-family: var(--main-font);
    color: var(--neon-green);
    background: rgba(0, 0, 0, 0.35);
}

.coc-card.is-swap-target {
    border-color: var(--cyan);
    box-shadow: 0 0 16px rgba(0, 255, 255, 0.45);
    transform: translateY(-2px);
}

.coc-card.is-swap-out {
    opacity: 0.35;
    transform: translateY(8px) scale(0.92);
    filter: grayscale(0.6);
    transition: transform 0.45s ease, opacity 0.45s ease, filter 0.45s ease;
}

.coc-card.is-swap-in {
    animation: cocSwapIn 0.48s cubic-bezier(0.22, 1, 0.36, 1);
}

.coc-dice-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    z-index: 13;
    width: min(92%, 340px);
    pointer-events: none;
    transform: translate(-50%, -50%);
    opacity: 0;
}

.coc-dice-overlay.is-visible {
    animation: cocDiceOverlayIn 420ms cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.coc-dice-card {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 14px 16px;
    border-radius: 8px;
    border: 2px solid rgba(0, 255, 255, 0.45);
    background: linear-gradient(155deg, rgba(8, 24, 8, 0.97), rgba(0, 0, 0, 0.94));
    box-shadow:
        0 10px 28px rgba(0, 0, 0, 0.55),
        0 0 24px rgba(0, 255, 0, 0.16);
}

.coc-dice-head {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 6px 12px;
    font-family: var(--main-font);
    letter-spacing: 0.06em;
}

.coc-dice-side {
    color: var(--cyan);
    font-size: 0.82rem;
    text-transform: uppercase;
}

.coc-dice-hand {
    color: var(--neon-green);
    font-size: 0.82rem;
    text-align: right;
}

.coc-dice-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
}

.coc-dice {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    min-width: 56px;
}

.coc-die-body {
    position: relative;
    width: 54px;
    height: 54px;
    border-radius: 10px;
    border: 2px solid color-mix(in srgb, var(--die-accent) 70%, white 10%);
    background: linear-gradient(145deg, rgba(0, 0, 0, 0.85), rgba(20, 20, 20, 0.95));
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: inset 0 0 12px rgba(0, 0, 0, 0.55);
}

.coc-die-body .coc-shape {
    position: absolute;
    bottom: 4px;
    right: 4px;
    width: 14px;
    height: 14px;
    opacity: 0.55;
}

.coc-die-body .coc-shape-icosa-corner {
    opacity: 0.9;
}

.coc-die-value {
    font-family: var(--main-font);
    font-size: 1.35rem;
    color: var(--die-accent, var(--neon-green));
    text-shadow: 0 0 8px color-mix(in srgb, var(--die-accent) 50%, transparent);
}

.coc-die-art {
    width: 34px;
    height: 34px;
    object-fit: contain;
    pointer-events: none;
}

.coc-die-art.coc-hex-wedge-art {
    display: flex;
    align-items: center;
    justify-content: center;
}

.coc-die-art.coc-hex-wedge-art .coc-hex-wedge-art {
    width: 100%;
    height: 100%;
}

.coc-die-art.coc-sierpinski-art {
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.coc-die-art.coc-sierpinski-art .coc-sierpinski-art {
    width: 100%;
    height: 100%;
}

.coc-die-art.coc-cube-art {
    transform: rotate(30deg);
}

.coc-die-tag {
    font-size: 0.62rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba(200, 200, 200, 0.75);
}

.coc-die.is-spinning .coc-die-body {
    animation: cocDieSpin 0.58s linear infinite;
}

.coc-die.is-revealed .coc-die-body {
    animation: cocDieLand 0.42s cubic-bezier(0.22, 1, 0.36, 1);
}

.coc-die.is-kept .coc-die-body {
    border-color: var(--neon-green);
    box-shadow: 0 0 14px rgba(0, 255, 0, 0.35);
}

.coc-die.is-dropped .coc-die-body {
    opacity: 0.38;
    filter: grayscale(0.85);
    transform: scale(0.92);
}

.coc-die.is-wild .coc-die-tag {
    color: var(--cyan);
}

.coc-die-mod {
    position: absolute;
    top: -5px;
    right: -6px;
    z-index: 2;
    min-width: 18px;
    padding: 1px 4px;
    border-radius: 4px;
    font-family: var(--main-font);
    font-size: 0.58rem;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: 0.04em;
    text-align: center;
    pointer-events: none;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.45);
    animation: cocModPop 0.38s cubic-bezier(0.22, 1, 0.36, 1);
}

.coc-die-mod-buff {
    color: #0f2;
    background: rgba(0, 40, 0, 0.92);
    border: 1px solid rgba(0, 255, 0, 0.55);
}

.coc-die-mod-half,
.coc-die-mod-low {
    color: #ffe066;
    background: rgba(40, 32, 0, 0.92);
    border: 1px solid rgba(255, 224, 102, 0.5);
}

.coc-die-mod-wild-zero {
    color: #ff5566;
    background: rgba(48, 0, 0, 0.94);
    border: 1px solid rgba(255, 68, 85, 0.65);
    font-size: 0.64rem;
}

.coc-die-mod-wild-double {
    color: #5dff8a;
    background: rgba(0, 48, 16, 0.94);
    border: 1px solid rgba(93, 255, 138, 0.65);
    font-size: 0.64rem;
}

.coc-dice-result {
    margin: 12px 0 0;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 8px 10px;
    text-align: center;
    font-size: 0.78rem;
    color: #bbb;
    letter-spacing: 0.04em;
}

.coc-score-total {
    font-family: var(--main-font);
    font-size: 1.45rem;
    font-weight: 700;
    color: var(--neon-green);
    text-shadow: 0 0 12px rgba(0, 255, 0, 0.35);
}

.coc-score-total.is-zero {
    color: #ff5566;
    text-shadow: 0 0 12px rgba(255, 68, 85, 0.45);
}

.coc-score-total.is-boost {
    color: #5dff8a;
    text-shadow: 0 0 14px rgba(93, 255, 138, 0.4);
}

.coc-score-tag {
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.coc-score-tag.is-fail {
    color: #ff8899;
    background: rgba(80, 0, 0, 0.55);
    border: 1px solid rgba(255, 68, 85, 0.45);
}

.coc-score-tag.is-boost {
    color: #5dff8a;
    background: rgba(0, 60, 20, 0.55);
    border: 1px solid rgba(93, 255, 138, 0.45);
}

.coc-score-detail {
    flex-basis: 100%;
    font-size: 0.68rem;
    color: #888;
}

.coc-card {
    position: relative;
    width: var(--coc-card-w, 52px);
    height: var(--coc-card-h, 72px);
    padding: 0;
    border-radius: 6px;
    border: 2px solid rgba(255, 255, 255, 0.15);
    background: linear-gradient(145deg, #1a1a1a, #0d0d0d);
    color: #eee;
    cursor: default;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}

.coc-card-corner {
    position: absolute;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    pointer-events: none;
}

.coc-card-corner-tl {
    top: 5px;
    left: 6px;
}

.coc-card-corner-br {
    bottom: 5px;
    right: 6px;
    transform: rotate(180deg);
}

.coc-card-center {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}

.coc-card-center .coc-shape {
    width: var(--coc-shape-size, 28px);
    height: var(--coc-shape-size, 28px);
}

.coc-card-center .coc-shape-icosahedron {
    width: calc(var(--coc-shape-size, 28px) + 2px);
    height: calc(var(--coc-shape-size, 28px) + 2px);
}

.coc-card-corner .coc-rank {
    font-size: 0.72rem;
}

.coc-card-corner .coc-rank.is-wide {
    font-size: 0.58rem;
    letter-spacing: -0.04em;
}

.coc-card.is-selectable {
    cursor: pointer;
    border-color: rgba(0, 255, 0, 0.35);
}

.coc-card-hint {
    position: absolute;
    left: 50%;
    bottom: calc(100% + 7px);
    transform: translateX(-50%);
    padding: 4px 8px;
    border-radius: 4px;
    background: rgba(0, 0, 0, 0.88);
    border: 1px solid rgba(0, 255, 0, 0.35);
    font-family: var(--main-font);
    font-size: 0.62rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: rgba(200, 255, 200, 0.9);
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.15s ease;
    z-index: 4;
}

.coc-card.is-selectable:hover .coc-card-hint,
.coc-card.is-selectable:focus-visible .coc-card-hint,
.coc-card.is-selected .coc-card-hint {
    opacity: 1;
}

.coc-card.is-selectable:hover {
    border-color: var(--neon-green);
    box-shadow: 0 0 12px rgba(0, 255, 0, 0.25);
}

.coc-card.is-selected {
    border-color: var(--cyan);
    box-shadow: 0 0 14px rgba(0, 255, 255, 0.35);
    transform: translateY(-4px);
}

.coc-card.is-back {
    background: repeating-linear-gradient(
        45deg,
        #111,
        #111 6px,
        #1f1f1f 6px,
        #1f1f1f 12px
    );
}

.coc-card-back {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    font-size: 1.4rem;
    color: var(--neon-green);
    opacity: 0.7;
}

.coc-shape {
    width: 22px;
    height: 22px;
}

.coc-rank {
    font-family: var(--main-font);
    font-size: 1rem;
    line-height: 1;
    color: var(--coc-accent, var(--neon-green));
}

.coc-special {
    position: absolute;
    inset: 18px 8px 8px;
    pointer-events: none;
}

.coc-card.has-special-face .coc-shape {
    opacity: 0.28;
    transform: scale(0.72);
}

.coc-card.has-special-face .coc-rank {
    display: none;
}

.coc-special-art {
    position: absolute;
    left: 50%;
    top: 56%;
    width: 40px;
    height: 40px;
    transform: translate(-50%, -50%);
    pointer-events: none;
    filter: drop-shadow(0 0 5px rgba(0, 0, 0, 0.55));
    display: flex;
    align-items: center;
    justify-content: center;
}

.coc-special-art.coc-hex-wedge-art .coc-hex-wedge-art,
.coc-special-art.coc-sierpinski-art .coc-sierpinski-art {
    width: 100%;
    height: 100%;
}

.coc-special-art.coc-sierpinski-art {
    width: 36px;
    height: 36px;
    overflow: hidden;
}

.coc-cube {
    background: linear-gradient(135deg, #fff 50%, #111 50%);
    clip-path: polygon(30% 0%, 70% 0%, 100% 35%, 70% 100%, 30% 100%, 0% 35%);
    opacity: 0.85;
}

.coc-sierpinski {
    background:
        linear-gradient(135deg, transparent 50%, var(--neon-green) 50%) top left / 50% 50% no-repeat,
        linear-gradient(225deg, transparent 50%, var(--neon-green) 50%) top right / 50% 50% no-repeat,
        linear-gradient(315deg, transparent 50%, var(--neon-green) 50%) bottom right / 50% 50% no-repeat,
        linear-gradient(45deg, transparent 50%, var(--neon-green) 50%) bottom left / 50% 50% no-repeat;
    opacity: 0.75;
}

.coc-seat--active-swap .coc-seat-label {
    color: var(--cyan);
}

.coc-seat--active-swap .coc-hand-wrap {
    filter: drop-shadow(0 0 10px rgba(0, 255, 255, 0.3));
}

.coc-deck-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.coc-deck-cluster {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.coc-touch-primary-slot {
    flex-shrink: 0;
}

.coc-touch-primary-slot--corner {
    position: absolute;
    bottom: 12px;
    right: 12px;
    z-index: 5;
}

.coc-touch-primary-btn {
    font-size: 0.72rem;
    padding: 7px 10px;
    letter-spacing: 0.06em;
    white-space: nowrap;
}

.coc-space-hint-slot {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 28px;
}

.coc-south-prompt-slot {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 32px;
    width: 100%;
    flex-shrink: 0;
}

.coc-space-hint {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    opacity: 0;
    pointer-events: none;
}

.coc-space-hint--bottom {
    margin: 4px 0 0;
}

.coc-space-hint--seat {
    margin: 0;
}

.coc-space-hint.is-visible {
    animation: cocSpaceHintIn 520ms ease-out forwards;
}

.coc-space-key {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 3.4em;
    padding: 5px 12px;
    border-radius: 5px;
    border: 1px solid rgba(0, 255, 255, 0.45);
    background: rgba(0, 0, 0, 0.65);
    font-family: var(--main-font);
    font-size: 0.62rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--cyan);
    box-shadow: 0 2px 0 rgba(0, 255, 255, 0.25);
}

.coc-space-label {
    font-family: var(--main-font);
    font-size: 0.72rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba(200, 255, 200, 0.85);
}

.coc-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
}

.coc-btn-primary {
    border-color: var(--cyan);
    color: var(--cyan);
}

.coc-log {
    font-size: 0.78rem;
    color: #aaa;
}

.coc-log-panel {
    max-height: min(52vh, 480px);
    margin-top: 4px;
}

.coc-log p {
    margin: 0 0 4px;
}

.coc-player-pick {
    display: flex;
    flex-wrap: nowrap;
    gap: 6px;
    align-items: center;
}

.coc-player-btn {
    border: 1px solid rgba(0, 255, 0, 0.35);
    background: rgba(0, 0, 0, 0.45);
    color: rgba(200, 255, 200, 0.85);
    font-family: var(--main-font);
    font-size: 0.72rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 8px 12px;
    border-radius: var(--radius-sm);
    cursor: pointer;
}

.coc-player-btn.is-active {
    border-color: var(--cyan);
    color: var(--cyan);
    background: rgba(0, 255, 255, 0.1);
    box-shadow: 0 0 10px rgba(0, 255, 255, 0.2);
}

.coc-announce {
    position: absolute;
    top: 50%;
    left: 50%;
    z-index: 12;
    pointer-events: none;
    transform: translate(-50%, -55%);
}

.coc-announce.is-in {
    animation: cocAnnounceDropIn 680ms cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.coc-announce.is-hold {
    opacity: 1;
    transform: translate(-50%, -50%);
}

.coc-announce.is-out {
    animation: cocAnnounceFadeOut 520ms ease-in forwards;
}

.coc-announce-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-width: 148px;
    padding: 18px 22px;
    border-radius: 8px;
    border: 2px solid rgba(0, 255, 255, 0.45);
    background: linear-gradient(155deg, rgba(8, 24, 8, 0.96), rgba(0, 0, 0, 0.92));
    box-shadow:
        0 10px 28px rgba(0, 0, 0, 0.55),
        0 0 24px rgba(0, 255, 0, 0.18);
    text-align: center;
}

.coc-announce-title {
    font-family: var(--main-font);
    font-size: 1rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--cyan);
}

.coc-announce-sub {
    font-family: var(--main-font);
    font-size: 0.78rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: rgba(0, 255, 0, 0.75);
}

.coc-rules-block h3 {
    margin: 0 0 8px;
    font-size: 0.95rem;
    color: var(--neon-green);
    font-family: var(--main-font);
}

.coc-rules-block p {
    margin: 0 0 16px;
    line-height: 1.55;
    font-size: 0.88rem;
    color: #ccc;
}

body.corrupted .coc-tab.is-active,
body.corrupted .coc-status,
body.corrupted .coc-totals strong {
    color: var(--alert-red);
}

body.corrupted .coc-tab {
    border-color: rgba(255, 0, 85, 0.35);
    color: var(--alert-red);
}
