body {
    font-family: 'Inter', 'Segoe UI', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 100vh;
    box-sizing: border-box;
    color: #e2e8f0;
    background-color: #090e14;
    background-image:
        radial-gradient(circle at 16% 12%, rgba(30, 144, 255, 0.14), transparent 42%),
        radial-gradient(circle at 84% 16%, rgba(46, 213, 115, 0.11), transparent 40%),
        radial-gradient(circle at 50% 92%, rgba(165, 94, 234, 0.1), transparent 48%),
        linear-gradient(180deg, #0b1118 0%, #070b10 100%);
    background-attachment: fixed;
    margin: 0;
    padding: 20px 16px 28px;
}

h1 {
    margin: 0 0 14px 0;
    font-size: 2.6rem;
    font-weight: 800;
    letter-spacing: 3px;
    background: linear-gradient(90deg, #ff6b81, #ffa502, #2ed573, #38bdf8, #a55eea, #ff6b81);
    background-size: 200% auto;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    filter: drop-shadow(0 4px 16px rgba(56, 189, 248, 0.28));
    animation: titleGradientShift 12s linear infinite;
}

@keyframes titleGradientShift {
    0% {
        background-position: 0% center;
    }
    100% {
        background-position: 200% center;
    }
}

.top-status-row {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
    margin: 0 0 8px 0;
    max-width: 100%;
}

.invite-friend-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 9px 16px;
    font-family: inherit;
    font-size: 0.88rem;
    font-weight: 700;
    letter-spacing: 0.3px;
    color: #ffffff;
    background: linear-gradient(135deg, #1e90ff 0%, #2ed573 100%);
    border: none;
    border-radius: 999px;
    box-shadow: 0 4px 14px rgba(30, 144, 255, 0.3);
    cursor: pointer;
    white-space: nowrap;
    transition: transform 0.15s ease, box-shadow 0.2s ease, filter 0.2s ease, background 0.2s ease;
}

.invite-friend-button:hover {
    filter: brightness(1.08);
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(46, 213, 115, 0.35);
}

.invite-friend-button:active {
    transform: translateY(0);
}

.invite-friend-button:focus-visible {
    outline: 2px solid #38bdf8;
    outline-offset: 2px;
}

.invite-friend-button.copied {
    background: linear-gradient(135deg, #2ed573 0%, #10ac84 100%);
    box-shadow: 0 4px 16px rgba(46, 213, 115, 0.45);
}

.invite-friend-icon {
    flex-shrink: 0;
}

.invite-icon-check,
.invite-friend-button.copied .invite-icon-share {
    display: none;
}

.invite-friend-button.copied .invite-icon-check {
    display: inline-block;
}

#player-status {
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin: 0;
    padding: 7px 14px;
    font-size: 0.92rem;
    color: #cbd5e1;
    background: linear-gradient(135deg, rgba(20, 29, 40, 0.88) 0%, rgba(14, 21, 29, 0.92) 100%);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(112, 161, 255, 0.25);
    border-radius: 999px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.42), inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

#player-status.hidden {
    display: none;
}

#connected-player-name {
    color: #ffffff;
    letter-spacing: 0.3px;
}

.player-color-badge {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background-color: #34495e;
    border: 2.5px solid #34495e;
    box-shadow: 0 0 10px var(--player-color1, rgba(46, 213, 115, 0.4)), inset 0 0 4px rgba(255, 255, 255, 0.35);
    flex-shrink: 0;
}

.cell-inventory {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    margin-left: 2px;
    padding: 4px 11px;
    background-color: rgba(11, 17, 24, 0.88);
    border: 1px solid rgba(75, 101, 132, 0.55);
    border-radius: 999px;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.55);
    transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.cell-inventory.hidden {
    display: none;
}

.cell-inventory.cell-inventory-empty {
    border-color: rgba(255, 107, 107, 0.75);
    box-shadow: 0 0 10px rgba(255, 107, 107, 0.2), inset 0 1px 3px rgba(0, 0, 0, 0.55);
}

.cell-slot {
    position: relative;
    width: 14px;
    height: 14px;
    border-radius: 3.5px;
    box-sizing: border-box;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1),
                background-color 0.2s ease,
                border-color 0.2s ease,
                box-shadow 0.25s ease,
                opacity 0.2s ease;
}

.cell-slot::after {
    content: '';
    border-radius: 50%;
    transition: width 0.2s ease, height 0.2s ease, background-color 0.2s ease, opacity 0.2s ease;
}

.cell-slot.available {
    background-color: var(--player-color1, #2ed573);
    box-shadow: 0 0 8px var(--player-color1, rgba(46, 213, 115, 0.65)), inset 0 0 0 1px rgba(255, 255, 255, 0.25);
    transform: scale(1);
}

.cell-slot.available::after {
    width: 5px;
    height: 5px;
    background-color: var(--player-color2, #ffffff);
}

.cell-slot.spent {
    background-color: #1c2732;
    border: 1px solid #3b4b59;
    transform: scale(0.84);
    opacity: 0.65;
}

.cell-slot.spent::after {
    width: 3px;
    height: 3px;
    background-color: rgba(255, 255, 255, 0.15);
}

.cell-inventory-count {
    font-size: 0.82rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    color: #f8fafc;
    letter-spacing: 0.3px;
}

.cell-inventory.cell-inventory-empty .cell-inventory-count {
    color: #ff6b6b;
}

.genevolucia-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 11px;
    font-size: 0.8rem;
    color: #cbd5e1;
    background-color: rgba(11, 17, 24, 0.88);
    border: 1px solid rgba(75, 101, 132, 0.55);
    border-radius: 999px;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.55);
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
    transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.genevolucia-badge.hidden {
    display: none;
}

.genevolucia-badge strong {
    color: #ffffff;
}

.genevolucia-badge.active {
    border-color: #ffa502;
    box-shadow: 0 0 12px rgba(255, 165, 2, 0.4), inset 0 1px 3px rgba(0, 0, 0, 0.55);
}

.genevolucia-badge.active strong {
    color: #ffa502;
}

.disconnect-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    padding: 0;
    border: 1px solid transparent;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.04);
    color: #94a3b8;
    font-size: 1.1rem;
    line-height: 1;
    cursor: pointer;
    transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.disconnect-button:hover {
    background-color: rgba(255, 71, 87, 0.18);
    border-color: rgba(255, 107, 129, 0.4);
    color: #ff6b81;
}

#connection-panel {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 10;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 22px 26px 18px;
    background: linear-gradient(160deg, rgba(18, 26, 36, 0.94) 0%, rgba(12, 18, 26, 0.96) 100%);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(112, 161, 255, 0.28);
    border-radius: 14px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.65), 0 0 32px rgba(30, 144, 255, 0.14), inset 0 1px 0 rgba(255, 255, 255, 0.08);
    overflow: hidden;
    cursor: default;
}

#connection-panel::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #ff4757, #ffa502, #2ed573, #1e90ff, #a55eea);
}

#connection-panel.hidden {
    display: none;
}

.connection-controls {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    min-width: 256px;
}

.connection-controls label {
    font-size: 0.82rem;
    font-weight: 600;
    letter-spacing: 0.4px;
    color: #94a3b8;
}

#player-name-input,
#player-password-input {
    width: 100%;
    box-sizing: border-box;
    padding: 9px 12px;
    font-size: 0.98rem;
    color: #f8fafc;
    background-color: rgba(9, 14, 20, 0.85);
    border: 1.5px solid rgba(75, 101, 132, 0.65);
    border-radius: 8px;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

#player-name-input::placeholder,
#player-password-input::placeholder {
    color: #475569;
}

#player-name-input:focus,
#player-password-input:focus {
    border-color: #38bdf8;
    background-color: rgba(12, 19, 28, 0.98);
    box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.2);
}

#connect-button {
    width: 100%;
    box-sizing: border-box;
    margin-top: 6px;
    padding: 10px 16px;
    font-size: 0.98rem;
    font-weight: 700;
    letter-spacing: 0.4px;
    color: #ffffff;
    background: linear-gradient(135deg, #1e90ff 0%, #2ed573 100%);
    border: none;
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(30, 144, 255, 0.35);
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

#connect-button:hover {
    filter: brightness(1.08);
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(46, 213, 115, 0.35);
}

#connect-button:active {
    transform: translateY(0);
}

#connect-button:disabled {
    opacity: 0.65;
    cursor: wait;
    filter: none;
    transform: none;
}

.error-message {
    min-height: 1.1em;
    max-width: 260px;
    text-align: center;
    font-size: 0.84rem;
    line-height: 1.35;
    color: #ff6b81;
}

.game-workspace {
    display: flex;
    align-items: stretch;
    justify-content: center;
    gap: 16px;
    max-width: 100%;
}

#canvas-container {
    position: relative;
    width: 800px;
    height: 500px;
    flex-shrink: 0;
    border: 2px solid #2b4257;
    border-radius: 8px;
    overflow: hidden;
    background-color: #0d151d;
    box-shadow:
        0 16px 40px rgba(0, 0, 0, 0.65),
        0 0 28px var(--canvas-glow1, rgba(30, 144, 255, 0.12)),
        0 0 44px var(--canvas-glow2, rgba(46, 213, 115, 0.06));
    transition: border-color 0.35s ease, box-shadow 0.35s ease;
    cursor: crosshair;
}

#canvas-container.genevolucia-active {
    cursor: not-allowed;
}

#canvas-container.placement-warning-active {
    cursor: not-allowed;
}

#canvas-container.placement-warning-active canvas {
    pointer-events: none;
}

#canvas-container canvas {
    display: block;
}

.genevolucia-overlay {
    position: absolute;
    inset: 0;
    z-index: 6;
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(circle at center, rgba(14, 22, 31, 0.35) 0%, rgba(9, 14, 20, 0.68) 100%);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
    pointer-events: none;
}

.genevolucia-overlay.hidden {
    display: none;
}

.genevolucia-overlay-card {
    padding: 18px 30px;
    text-align: center;
    background: linear-gradient(160deg, rgba(22, 31, 41, 0.94) 0%, rgba(14, 20, 28, 0.96) 100%);
    border: 1.5px solid rgba(255, 165, 2, 0.85);
    border-radius: 12px;
    box-shadow: 0 14px 36px rgba(0, 0, 0, 0.65), 0 0 24px rgba(255, 165, 2, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.08);
    animation: genevoluciaPulse 1.2s ease-in-out infinite;
}

.genevolucia-overlay-title {
    font-size: 1.38rem;
    font-weight: 800;
    letter-spacing: 0.6px;
    color: #ffa502;
    text-shadow: 0 0 12px rgba(255, 165, 2, 0.35);
    margin-bottom: 4px;
}

.genevolucia-overlay-subtitle {
    font-size: 0.9rem;
    color: #e2e8f0;
}

@keyframes genevoluciaPulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 14px 36px rgba(0, 0, 0, 0.65), 0 0 16px rgba(255, 165, 2, 0.3);
    }
    50% {
        transform: scale(1.02);
        box-shadow: 0 14px 36px rgba(0, 0, 0, 0.65), 0 0 28px rgba(255, 165, 2, 0.55);
    }
}

.genevolucia-summary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    min-height: 30px;
    box-sizing: border-box;
    margin: 0 0 10px 0;
    padding: 5px 14px;
    font-size: 0.8rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    color: #f8fafc;
    background: linear-gradient(160deg, rgba(16, 24, 34, 0.94) 0%, rgba(11, 17, 24, 0.96) 100%);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(112, 161, 255, 0.42);
    border-radius: 999px;
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.55), 0 0 14px rgba(56, 189, 248, 0.18);
    pointer-events: none;
    white-space: nowrap;
    transition: opacity 0.22s ease, transform 0.22s ease;
    animation: genevoluciaSummaryIn 0.24s ease-out both;
}

.genevolucia-summary.hidden {
    visibility: hidden;
    opacity: 0;
    transform: translateY(-4px);
    animation: none;
}

.genevolucia-summary-title {
    color: #cbd5e1;
    font-weight: 700;
}

.genevolucia-summary-birth {
    color: #2ed573;
}

.genevolucia-summary-birth.zero,
.genevolucia-summary-death.zero {
    color: #94a3b8;
}

.genevolucia-summary-death {
    color: #ff6b81;
}

.genevolucia-summary-sep {
    color: #64748b;
}

@keyframes genevoluciaSummaryIn {
    from {
        opacity: 0;
        transform: translateY(-4px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.cell-tooltip {
    position: absolute;
    z-index: 5;
    padding: 4px 10px;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.2px;
    color: #ffffff;
    background-color: rgba(13, 20, 28, 0.92);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(112, 161, 255, 0.4);
    border-radius: 6px;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.5), 0 0 10px rgba(56, 189, 248, 0.16);
    pointer-events: none;
    white-space: nowrap;
}

.cell-tooltip.hidden {
    display: none;
}

.cell-tooltip-owner {
    font-size: 0.8rem;
    font-weight: 700;
    color: #ffffff;
    line-height: 1.25;
}

.cell-tooltip-stats {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 2px;
    font-size: 0.71rem;
    font-weight: 600;
    color: #cbd5e1;
    font-variant-numeric: tabular-nums;
}

.cell-tooltip-stat-birth {
    color: #2ed573;
}

.cell-tooltip-stat-death {
    color: #ffa502;
}

.cell-tooltip-status {
    margin-top: 2px;
    font-size: 0.69rem;
    font-weight: 700;
    color: #ff6b81;
    line-height: 1.2;
}

.placement-warning {
    position: absolute;
    z-index: 5;
    max-width: 280px;
    padding: 10px 14px;
    color: #f8fafc;
    background: linear-gradient(160deg, rgba(22, 28, 36, 0.96) 0%, rgba(14, 19, 26, 0.98) 100%);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1.5px solid rgba(255, 107, 107, 0.85);
    border-radius: 10px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.55), 0 0 14px rgba(255, 107, 107, 0.28);
    cursor: default;
    line-height: 1.35;
}

.placement-warning.hidden {
    display: none;
}

.placement-warning-title {
    font-size: 0.84rem;
    font-weight: 700;
    color: #ff6b81;
    margin-bottom: 3px;
}

.placement-warning-text {
    font-size: 0.78rem;
    color: #cbd5e1;
}

.placement-warning-close {
    display: inline-block;
    margin-top: 9px;
    padding: 5px 13px;
    font-size: 0.78rem;
    font-weight: 700;
    color: #ffffff;
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5253 100%);
    border: none;
    border-radius: 6px;
    box-shadow: 0 2px 8px rgba(238, 82, 83, 0.35);
    cursor: pointer;
    transition: filter 0.15s ease, transform 0.15s ease;
}

.placement-warning-close:hover {
    filter: brightness(1.08);
    transform: translateY(-1px);
}

.removal-warning.core-warning {
    border-color: rgba(255, 71, 87, 0.95);
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.65), 0 0 18px rgba(255, 71, 87, 0.42);
}

.removal-warning-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 9px;
}

.removal-warning-actions .placement-warning-close {
    margin-top: 0;
}

.removal-warning-cancel {
    display: inline-block;
    padding: 5px 13px;
    font-size: 0.78rem;
    font-weight: 700;
    color: #cbd5e1;
    background: rgba(30, 41, 54, 0.9);
    border: 1px solid rgba(100, 116, 139, 0.55);
    border-radius: 6px;
    cursor: pointer;
    transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}

.removal-warning-cancel:hover {
    background: rgba(51, 65, 85, 0.95);
    border-color: rgba(148, 163, 184, 0.75);
    color: #ffffff;
    transform: translateY(-1px);
}

.top10-panel {
    position: relative;
    width: 280px;
    height: 504px;
    flex-shrink: 0;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    background: linear-gradient(180deg, rgba(20, 29, 40, 0.9) 0%, rgba(13, 20, 28, 0.94) 100%);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 2px solid #2b4257;
    border-radius: 10px;
    box-shadow: 0 16px 38px rgba(0, 0, 0, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.06);
    color: #e2e8f0;
    overflow: hidden;
}

.top10-panel::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #ffd32a, #ffa502, #ff4757, #a55eea, #1e90ff, #2ed573);
}

.top10-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 12px 13px 9px;
    border-bottom: 1px solid rgba(75, 101, 132, 0.35);
    background: rgba(11, 17, 24, 0.65);
}

.top10-title-group {
    display: flex;
    align-items: center;
    gap: 9px;
    min-width: 0;
}

.top10-icon {
    position: relative;
    width: 24px;
    height: 24px;
    border-radius: 6px;
    background: linear-gradient(135deg, rgba(255, 211, 42, 0.22), rgba(255, 165, 2, 0.1));
    border: 1px solid rgba(255, 211, 42, 0.45);
    box-shadow: 0 2px 8px rgba(255, 165, 2, 0.24);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.top10-icon::after {
    content: '';
    width: 13px;
    height: 10px;
    background: linear-gradient(180deg, #ffeaa7 0%, #ffd32a 45%, #ffa502 100%);
    clip-path: polygon(0% 25%, 24% 62%, 50% 6%, 76% 62%, 100% 25%, 88% 100%, 12% 100%);
}

.top10-headings {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.top10-header h2 {
    margin: 0;
    font-size: 0.98rem;
    font-weight: 800;
    letter-spacing: 0.7px;
    color: #ffffff;
    line-height: 1.1;
}

.top10-subtitle {
    font-size: 0.69rem;
    font-weight: 600;
    color: #95a5a6;
    margin-top: 2px;
}

.top10-status-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 3px 8px;
    font-size: 0.69rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    color: #b2bec3;
    background-color: rgba(47, 59, 70, 0.65);
    border: 1px solid #34495e;
    border-radius: 999px;
    white-space: nowrap;
    flex-shrink: 0;
    transition: color 0.2s ease, border-color 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease;
}

.top10-status-badge.active {
    color: #ffa502;
    background-color: rgba(255, 165, 2, 0.14);
    border-color: rgba(255, 165, 2, 0.55);
    box-shadow: 0 0 8px rgba(255, 165, 2, 0.25);
}

.top10-status-badge.evaluated {
    color: #70a1ff;
    background-color: rgba(30, 144, 255, 0.14);
    border-color: rgba(112, 161, 255, 0.4);
}

.top10-content {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
    padding: 8px 10px;
}

.top10-empty-state {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 16px 14px;
    border: 1px dashed rgba(75, 101, 132, 0.55);
    border-radius: 8px;
    background: radial-gradient(circle at center, rgba(47, 59, 70, 0.32) 0%, rgba(24, 32, 38, 0.25) 100%);
}

.top10-empty-state.hidden {
    display: none;
}

.top10-empty-graphic {
    position: relative;
    width: 64px;
    height: 44px;
    margin-bottom: 12px;
}

.top10-empty-cell {
    position: absolute;
    width: 20px;
    height: 20px;
    border-radius: 4px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.35), inset 0 0 0 1px rgba(255, 255, 255, 0.22);
    animation: top10CellFloat 3s ease-in-out infinite;
}

.top10-empty-cell::after {
    content: '';
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.top10-empty-cell.cell-a {
    left: 22px;
    top: 2px;
    background-color: #ffa502;
    animation-delay: 0s;
}

.top10-empty-cell.cell-a::after {
    background-color: #fff3c4;
}

.top10-empty-cell.cell-b {
    left: 6px;
    top: 20px;
    background-color: #2ed573;
    animation-delay: 0.4s;
}

.top10-empty-cell.cell-b::after {
    background-color: #dff9fb;
}

.top10-empty-cell.cell-c {
    right: 6px;
    top: 20px;
    background-color: #1e90ff;
    animation-delay: 0.8s;
}

.top10-empty-cell.cell-c::after {
    background-color: #e056fd;
}

@keyframes top10CellFloat {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-3px);
    }
}

.top10-empty-title {
    font-size: 0.88rem;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 5px;
}

.top10-empty-text {
    margin: 0;
    font-size: 0.76rem;
    line-height: 1.45;
    color: #95a5a6;
}

.top10-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 5px;
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(75, 101, 132, 0.55) transparent;
}

.top10-list::-webkit-scrollbar {
    width: 5px;
}

.top10-list::-webkit-scrollbar-thumb {
    background-color: rgba(75, 101, 132, 0.55);
    border-radius: 999px;
}

.top10-list.hidden {
    display: none;
}

.top10-row {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 8px;
    border-radius: 7px;
    background-color: rgba(30, 41, 54, 0.55);
    border: 1px solid rgba(59, 82, 107, 0.45);
    transition: transform 0.18s ease, border-color 0.18s ease, background-color 0.18s ease, box-shadow 0.18s ease;
    animation: top10RowIn 0.28s ease-out both;
}

.top10-row:hover {
    transform: translateX(2px);
    background-color: rgba(41, 56, 74, 0.72);
    border-color: rgba(112, 161, 255, 0.5);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.28);
}

.top10-row.rank-1 {
    background: linear-gradient(90deg, rgba(255, 211, 42, 0.14) 0%, rgba(47, 59, 70, 0.45) 75%);
    border-color: rgba(255, 211, 42, 0.45);
}

.top10-row.rank-2 {
    background: linear-gradient(90deg, rgba(223, 230, 233, 0.11) 0%, rgba(47, 59, 70, 0.45) 75%);
    border-color: rgba(178, 190, 195, 0.38);
}

.top10-row.rank-3 {
    background: linear-gradient(90deg, rgba(230, 126, 34, 0.12) 0%, rgba(47, 59, 70, 0.45) 75%);
    border-color: rgba(230, 126, 34, 0.38);
}

.top10-row.is-current-player {
    box-shadow: inset 0 0 0 1px rgba(112, 161, 255, 0.6), 0 2px 10px rgba(30, 144, 255, 0.18);
    border-color: rgba(112, 161, 255, 0.7);
}

@keyframes top10RowIn {
    from {
        opacity: 0;
        transform: translateY(4px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.top10-rank {
    width: 21px;
    height: 21px;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.72rem;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
    color: #b2bec3;
    background-color: #26323a;
    border: 1px solid #3b4b59;
    flex-shrink: 0;
}

.top10-rank.rank-1 {
    color: #1e272e;
    background: linear-gradient(135deg, #ffeaa7 0%, #ffd32a 45%, #ffa502 100%);
    border-color: #ffeaa7;
    box-shadow: 0 2px 8px rgba(255, 165, 2, 0.4);
}

.top10-rank.rank-2 {
    color: #1e272e;
    background: linear-gradient(135deg, #ffffff 0%, #dfe6e9 50%, #a4b0be 100%);
    border-color: #f5f6fa;
    box-shadow: 0 2px 6px rgba(223, 230, 233, 0.28);
}

.top10-rank.rank-3 {
    color: #fff8f0;
    background: linear-gradient(135deg, #f39c12 0%, #e67e22 50%, #d35400 100%);
    border-color: #f8c291;
    box-shadow: 0 2px 6px rgba(230, 126, 34, 0.35);
}

.top10-cell-preview {
    position: relative;
    width: 15px;
    height: 15px;
    border-radius: 3.5px;
    background-color: var(--entry-color1, #2ed573);
    box-shadow: 0 0 8px var(--entry-color1, rgba(46, 213, 115, 0.35)), inset 0 0 0 1px rgba(255, 255, 255, 0.25);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.top10-cell-preview::after {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background-color: var(--entry-color2, #ffffff);
}

.top10-player-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.top10-player-line {
    display: flex;
    align-items: center;
    gap: 5px;
    min-width: 0;
}

.top10-player-name {
    font-size: 0.8rem;
    font-weight: 700;
    color: #f5f6fa;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.top10-you-badge {
    padding: 0 4px;
    font-size: 0.61rem;
    font-weight: 800;
    letter-spacing: 0.4px;
    color: #ffffff;
    background: linear-gradient(135deg, #1e90ff, #5352ed);
    border-radius: 4px;
    line-height: 1.35;
    flex-shrink: 0;
}

.top10-bar-track {
    width: 100%;
    height: 4px;
    border-radius: 999px;
    background-color: rgba(18, 24, 30, 0.85);
    overflow: hidden;
}

.top10-bar-fill {
    height: 100%;
    width: var(--bar-width, 0%);
    border-radius: 999px;
    background: linear-gradient(90deg, var(--entry-color1, #2ed573), var(--entry-color2, #70a1ff));
    transition: width 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

.top10-cell-count {
    display: flex;
    align-items: baseline;
    gap: 3px;
    padding: 2px 7px;
    border-radius: 999px;
    background-color: rgba(24, 32, 38, 0.85);
    border: 1px solid rgba(52, 73, 94, 0.9);
    flex-shrink: 0;
}

.top10-count-value {
    font-size: 0.8rem;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
    color: #ffffff;
}

.top10-count-unit {
    font-size: 0.64rem;
    font-weight: 600;
    color: #95a5a6;
}

.top10-footer {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 8px 13px;
    font-size: 0.72rem;
    font-weight: 600;
    color: #94a3b8;
    border-top: 1px solid rgba(75, 101, 132, 0.35);
    background: rgba(11, 17, 24, 0.65);
}

.top10-footer-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background-color: #2ed573;
    box-shadow: 0 0 8px rgba(46, 213, 115, 0.75);
    flex-shrink: 0;
}

.forum-bar {
    position: relative;
    width: 1100px;
    max-width: 100%;
    box-sizing: border-box;
    margin-top: 14px;
    padding: 12px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    background: linear-gradient(180deg, rgba(20, 29, 40, 0.9) 0%, rgba(13, 20, 28, 0.94) 100%);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 2px solid #2b4257;
    border-radius: 10px;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.06);
    color: #e2e8f0;
    overflow: hidden;
}

.forum-bar::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #1e90ff, #38bdf8, #2ed573);
}

.forum-bar-info {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.forum-bar-icon {
    width: 34px;
    height: 34px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: #38bdf8;
    background: linear-gradient(135deg, rgba(30, 144, 255, 0.2), rgba(46, 213, 115, 0.14));
    border: 1px solid rgba(56, 189, 248, 0.4);
    box-shadow: 0 2px 10px rgba(30, 144, 255, 0.2);
}

.forum-bar-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.forum-bar-title {
    font-size: 0.96rem;
    font-weight: 800;
    color: #ffffff;
    letter-spacing: 0.3px;
}

.forum-bar-subtitle {
    font-size: 0.8rem;
    color: #94a3b8;
    line-height: 1.35;
}

.forum-link-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 9px 16px;
    font-size: 0.88rem;
    font-weight: 700;
    letter-spacing: 0.3px;
    color: #ffffff;
    text-decoration: none;
    white-space: nowrap;
    flex-shrink: 0;
    background: linear-gradient(135deg, #1e90ff 0%, #2ed573 100%);
    border-radius: 8px;
    box-shadow: 0 4px 14px rgba(30, 144, 255, 0.3);
    transition: transform 0.15s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

.forum-link-button:hover {
    filter: brightness(1.08);
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(46, 213, 115, 0.35);
}

.forum-link-button:active {
    transform: translateY(0);
}

.forum-link-button:focus-visible {
    outline: 2px solid #38bdf8;
    outline-offset: 2px;
}

.how-to-play {
    position: relative;
    width: 1100px;
    max-width: 100%;
    box-sizing: border-box;
    margin-top: 14px;
    padding: 20px 22px 22px;
    background: linear-gradient(180deg, rgba(20, 29, 40, 0.9) 0%, rgba(13, 20, 28, 0.94) 100%);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 2px solid #2b4257;
    border-radius: 10px;
    box-shadow: 0 16px 38px rgba(0, 0, 0, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.06);
    color: #e2e8f0;
    overflow: hidden;
}

.how-to-play::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #ff4757, #ffa502, #2ed573, #1e90ff, #a55eea);
}

.how-to-play-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(75, 101, 132, 0.35);
}

.how-to-play-title-group {
    display: flex;
    align-items: center;
    gap: 10px;
}

.how-to-play-icon {
    position: relative;
    width: 18px;
    height: 18px;
    border-radius: 4px;
    background-color: #2ed573;
    box-shadow: 0 0 10px rgba(46, 213, 115, 0.5), inset 0 0 0 1px rgba(255, 255, 255, 0.25);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.how-to-play-icon::after {
    content: '';
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: #ffffff;
}

.how-to-play-header h2 {
    margin: 0;
    font-size: 1.15rem;
    font-weight: 800;
    letter-spacing: 0.4px;
    color: #ffffff;
}

.how-to-play-subtitle {
    padding: 3px 10px;
    font-size: 0.76rem;
    font-weight: 600;
    color: #94a3b8;
    background-color: rgba(11, 17, 24, 0.72);
    border: 1px solid rgba(75, 101, 132, 0.55);
    border-radius: 999px;
}

.how-to-play-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-bottom: 14px;
}

.guide-card {
    padding: 13px 14px;
    background-color: rgba(30, 41, 54, 0.5);
    border: 1px solid rgba(59, 82, 107, 0.55);
    border-radius: 8px;
    transition: transform 0.2s ease, border-color 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease;
}

.guide-card:hover {
    transform: translateY(-2px);
    border-color: rgba(112, 161, 255, 0.55);
    background-color: rgba(36, 50, 66, 0.68);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.35);
}

.guide-card-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.guide-step-badge {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: linear-gradient(135deg, #1e90ff, #a55eea);
    color: #ffffff;
    font-size: 0.78rem;
    font-weight: 800;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 2px 6px rgba(30, 144, 255, 0.3);
}

.guide-card-header h3 {
    margin: 0;
    font-size: 0.94rem;
    font-weight: 700;
    color: #ffffff;
}

.guide-card p {
    margin: 0;
    font-size: 0.83rem;
    line-height: 1.5;
    color: #cfd8dc;
}

.guide-card strong {
    color: #ffffff;
}

.guide-evolution-box {
    padding: 14px;
    background-color: rgba(11, 17, 24, 0.72);
    border: 1px solid rgba(59, 82, 107, 0.55);
    border-radius: 8px;
}

.guide-evolution-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 10px;
    flex-wrap: wrap;
}

.guide-evolution-label {
    font-size: 0.86rem;
    font-weight: 700;
    color: #ffa502;
    letter-spacing: 0.2px;
}

.guide-evolution-note {
    font-size: 0.76rem;
    color: #94a3b8;
}

.guide-outcomes {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

.guide-outcome {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
    padding: 10px 12px;
    background-color: rgba(20, 29, 40, 0.9);
    border: 1px solid rgba(59, 82, 107, 0.55);
    border-left-width: 3px;
    border-radius: 6px;
    transition: border-color 0.2s ease, background-color 0.2s ease;
}

.guide-outcome:hover {
    background-color: rgba(26, 37, 50, 0.95);
    border-color: rgba(112, 161, 255, 0.45);
}

.outcome-badge {
    display: inline-block;
    padding: 2px 8px;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.3px;
    border-radius: 999px;
}

.outcome-content {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.outcome-content strong {
    font-size: 0.84rem;
    color: #ffffff;
}

.outcome-content span {
    font-size: 0.78rem;
    line-height: 1.4;
    color: #b2bec3;
}

.guide-outcome.outcome-birth {
    border-left-color: #2ed573;
}

.guide-outcome.outcome-birth .outcome-badge {
    color: #2ed573;
    background-color: rgba(46, 213, 115, 0.14);
    border: 1px solid rgba(46, 213, 115, 0.35);
}

.guide-outcome.outcome-suffocate {
    border-left-color: #ffa502;
}

.guide-outcome.outcome-suffocate .outcome-badge {
    color: #ffa502;
    background-color: rgba(255, 165, 2, 0.14);
    border: 1px solid rgba(255, 165, 2, 0.35);
}

.guide-outcome.outcome-overrun {
    border-left-color: #ff4757;
}

.guide-outcome.outcome-overrun .outcome-badge {
    color: #ff6b81;
    background-color: rgba(255, 71, 87, 0.14);
    border: 1px solid rgba(255, 71, 87, 0.35);
}

@media (max-width: 1120px) {
    .game-workspace {
        flex-direction: column;
        align-items: center;
    }

    .top10-panel {
        width: 804px;
        max-width: 100%;
        height: auto;
        min-height: 220px;
    }

    .forum-bar,
    .how-to-play {
        width: 804px;
    }
}

@media (max-width: 820px) {
    .forum-bar {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }

    .forum-link-button {
        width: 100%;
        box-sizing: border-box;
    }

    .how-to-play-grid,
    .guide-outcomes {
        grid-template-columns: 1fr;
    }

    .how-to-play-header {
        flex-direction: column;
        align-items: flex-start;
    }
}
