* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none;
    -webkit-user-select: none; /* Vendor prefix for WebKit browsers */
    -moz-user-select: none;    /* Vendor prefix for Firefox */
    -ms-user-select: none;     /* Vendor prefix for Internet Explorer/Edge */
    user-select: none;         /* Standard property */
}

.hidden {
    display: none !important;
}

body {
    background-color: #f5f7fa;
    min-width: 345px;
    /*display: none;*/
}

body.no-scroll {
    overflow: hidden; /* Disable scrolling */
}

.icon-bak {
    display: none;
    font-size: 1.1rem;
}

.container {
    display: flex;
    flex-direction: column;
    max-width: 100%;
    margin: 0;
}

.control-container {
    width: 100%;
    background-color: white;
    position: sticky; /* Make the controls sticky */
    top: 0; /* Stick to the top of the viewport */
    height: 48px;
    display: flex;
    z-index: 1; /* Higher than the main content */
    flex-direction: column;
}

.control-padding {
    padding-left: 360px;
}

/* Style for the dropdown */
#difficulty-select {
    margin: 0; /* Margin for spacing */
    padding: 0 0.5rem; /* Padding for better touch targets */
    border: 1px solid #ccc; /* Light border */
    border-radius: 12px; /* Rounded corners */
    background-color: #ffffff; /* White background */
    font-size: 0.9rem; /* Font size */
    cursor: pointer; /* Pointer cursor on hover */
    transition: border-color 0.3s ease; /* Smooth border color change */
}

/* Change border color on focus */
#difficulty-select:focus {
    border-color: #4dd0e1; /* Change border color on focus */
    outline: none; /* Remove default outline */
}

.fake-header {
    height: 48px;
    width: 100%;
}

.control-pane {
    background-color: white;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    z-index: 1000; /* Ensure it stays above other content */
}

.controls {
    margin: 0 auto;
    padding: 8px;
    background-color: white; /* Ensure background is white for visibility */
    display: flex;
    flex-wrap: nowrap;
    gap: 0.5rem;
    justify-content: space-between;
    width: 100%;
    max-width: 430px;
    height: 48px;
}

.custom-control-pane {
    display: none;
}

.custom-control {
    height: 48px;
    font-size: 0.9rem;
    border-radius: 0 0 12px 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.controls label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #4a5568;
    font-weight: 500;
    min-width: 60px;
}

.controls input {
    padding: 0.3rem;
    border: 2px solid #e2e8f0;
    border-radius: 6px;
    outline: none;
    transition: border-color 0.2s ease;
    flex: 0 1 50px;
    font-size: 0.9rem;
    width: auto;
    max-width: 60px;
}

.controls input[type="number"]:focus {
    border-color: #3b82f6;
}

.btn-container {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.btn-text {
    font-size: 0.6rem;
    color: #4376F8;
    display: flex;
    align-items: center;
    justify-content: space-evenly;
    gap: 0.1rem;
}

.spect-num {
  transition: all 0.5s ease-out;
}

.spect-num.flip-green {
  transform: translateY(-100%) scale(2.5);
  color: #10b981;
}

.spect-num.flip-red {
  transform: translateY(-100%) scale(2.5);
  color: #ef4444;
}

button {
    background-color: #f0f4ff;
    color: #3b82f6;
    border: none;
    padding: 0.4rem 0.5rem;
    border-radius: 6px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s ease, transform 0.1s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    min-width: 40px;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

button.hover[data-tip]::after {
    content: attr(data-tip);
    position: absolute;
    z-index: 1010;
    transform: translate(0%, 150%);
    background: white;
    border-radius: 6px;
    width: fit-content;
    display: flex;
    padding: 0.2rem;
    border: 1px solid black;
    color: black;
    font-size: 0.8rem;
    font-weight: 400;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

button.tip-left.hover::after {
    transform: translate(-50%, 150%);
}

button.tip-right.hover::after {
    transform: translate(50%, 150%);
}

button.tip-top.hover::after {
    transform: translate(-50%, 50%);
}

button.tip-up.hover::after {
    transform: translate(50%, -150%);
}

button.tip-cross.hover::after {
    transform: translate(-100%, -50%);
}

button.hover {
    background-color: #e0e7ff;
    transform: translateY(-1px);
}

button:active {
    transform: scale(0.95);
}

button:disabled {
    background-color: #8B8B8B;
    color: white;
    cursor: not-allowed;
}

/* for some icon which looks smaller */
.button-image-scale {
    transform: scale(1.2);
}

.main-content {
    display: flex;
    z-index: 0;
}

.fake-left-rail {
    width: 360px;
    min-width: 360px;
}

#fake-game-header {
    display: none;
}

.game-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1; /* Allow the game section to take the remaining space */
    padding: 0.5rem 7px;
}

.game-container {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.5rem 0;
    width: 100%;
}

.player-section {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 0;
    row-gap: 1rem;
}

#player1-info {
    order: 1;
}

#player1-board {
    order: 2;
}

/* Add visual separation between players */
.player-section:first-child {
    margin-right: auto;
}

.player-section:last-child {
    margin-left: auto;
}

.player-info {
    width: 100%;
    max-width: 345px;
    padding: 6px 10px;
    background-color: white;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    text-align: center;
    box-sizing: border-box;
    border: 2px solid transparent;
}

.player-info h2 {
    color: #4a5568;
    font-size: 1.1rem;
}

.player-status {
    height: 40px;
    margin-bottom: 0.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

#player1-status,
#player2-status {
    white-space: nowrap;
}

.join-game-container {
    display: none;
}

.join-game-btn {
    font-size: 0.7rem;
    padding: 0.1rem 0.4rem;
    min-width: 40px;
    height: 24px;
}

.game-status {
    display: flex;
}

.player-info .player-action,
.player-info .progress-status,
.player-info .mines-count,
.player-info .timer {
    color: #4a5568;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.2rem;
    flex: 1;
    font-variant-numeric: tabular-nums;
}

.player-info .timer {
    justify-content: center;
}

.player-info .progress-status {
    justify-content: right;
}

.player-info.winner {
    background-color: #f0fdf4;
    border: 2px solid #10b981;
}

.player-info.winner h2 {
    color: #10b981;
}

.player-info.loser {
    background-color: #f8d7da;
    border: 2px solid #ef4444;
}

.player-info.loser h2 {
    color: #ef4444;
}

.player-alias {
    display: flex;
    gap: 0.7rem;
    align-items: center;
}

.player-alias input {
    padding: 0.3rem;
    border: 2px solid #e2e8f0;
    border-radius: 6px;
    outline: none;
    transition: border-color 0.2s ease;
    flex: 0 1 50px;
    font-size: 1rem;
    width: auto;
    max-width: 160px;
}

.player-alias input:focus {
    border-color: #3b82f6;
}

.player-name {
    position: relative;
    top: -8px;
}

#btn-player2-name {
    cursor: pointer; /* Change cursor to pointer on hover */
    transition: color 0.3s; /* Smooth transition for color change */
    white-space: nowrap;
    overflow: hidden;
    max-width: 272px;
    text-overflow: ellipsis;
}

#btn-player2-name.hover {
    color: #4376F8; /* Change color on hover */
}

#btn-player2-name.hover::after {
    content: attr(data-tip);
    position: absolute;
    z-index: 1010;
    transform: translate(0%, 25%);
    background: white;
    border-radius: 6px;
    width: fit-content;
    display: flex;
    padding: 0.2rem;
    border: 1px solid black;
    color: black;
    font-size: 0.8rem;
    font-weight: 400;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.board-container {
    background-color: white;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    overflow: auto;
    width: 345px;
    position: relative;
}

.board {
    display: table;
    border-collapse: separate;
    border-spacing: 1px;
    background-color: white;
    margin: auto;
    padding: 10px;
    border-radius: 12px;
    table-layout: fixed;
    width: 100%;
}

.row {
    display: table-row;
}

.cell {
    display: table-cell;
    width: 35px;
    height: 35px;
    text-align: center;
    vertical-align: middle;
    cursor: pointer;
    font-weight: 600;
    font-size: 1rem;
    border-radius: 6px;
    transition: all 0.1s ease-out;
    user-select: none;
}

.cell.invisible {
    background-color: #e2e8f0;
}

.revealed {
    background-color: #f8fafc;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.05);
}

.mine {
    background-color: #bbbbbb;
    color: white;
}

.hit {
    background-color: #ef4444;
    color: white;
}

.flagged {
    background-color: #fbbf24;
    color: white;
}

.flagged.tipped {
    border: 2px solid #10b981;
}

.flag-animation {
    animation: flagInsert 0.5s ease-in-out;
}

@keyframes flagInsert {
    from {
        transform: translateY(-100%) scale(0.5);
        opacity: 0;
    }
    to {
        transform: translateY(0) scale(1);
        opacity: 1;
    }
}

.label-mine {
    /*#f20707*/
    background: #ef4444;
    border-radius: 50%;
    border: 1px solid gray;
    margin: 5px;
    width: 25px;
    height: 25px;
}

.label-empty {
    background: #10b981;
    border-radius: 50%;
    border: 1px solid gray;
    margin: 5px;
    width: 25px;
    height: 25px;
}

.label-empty-shine {
    background: #10b981;
    border-radius: 50%;
    border: 1px solid gray;
    margin: 5px;
    width: 25px;
    height: 25px;
    animation: shine 0.5s;
}

/* Modern colors for numbers */
.neighbor-1 { color: #3b82f6; }  /* Blue */
.neighbor-2 { color: #10b981; }  /* Green */
.neighbor-3 { color: #ef4444; }  /* Red */
.neighbor-4 { color: #6366f1; }  /* Indigo */
.neighbor-5 { color: #7c3aed; }  /* Purple */
.neighbor-6 { color: #0ea5e9; }  /* Sky */
.neighbor-7 { color: #475569; }  /* Slate */
.neighbor-8 { color: #64748b; }  /* Gray */

.highlight-shine {
    animation: shine 0.5s ease-in-out;
}

@keyframes shine {
    0% {
        background-color: #e2e8f0;
    }
    50% {
        background-color: #93c5fd;
        transform: scale(0.95);
    }
    100% {
        background-color: #e2e8f0;
    }
}

.cell:active {
    transform: scale(0.95);
}

.revealed:active {
    background-color: #f1f5f9;
}

.mask {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.2);
    z-index: 1;
    margin-top: 48px;
}

.mask.show {
    display: block;
}

/* Add modal styles */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.2);
    z-index: 1001;
    justify-content: center;
    align-items: center;
}

.modal.show {
    display: flex;
}

.modal-content {
    background-color: white;
    margin: 1rem;
    padding: 1.5rem 2rem;
    border-radius: 12px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
    text-align: center;
    animation: modalSlideIn 0.3s ease-out;
}

.modal-content h2 {
    color: #4a5568;
    font-size: 1.5rem;
    margin: 0;
}

.modal-buttons {
    display: flex;
    justify-content: space-evenly;
    margin-top: 20px;
}

.modal-btn {
    padding: 10px 30px;
    font-size: 16px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
}

.modal-btn:hover {
    background-color: #e0e7ff;
    transform: translateY(-1px);
}

@keyframes modalSlideIn {
    from {
        transform: translateY(-20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.left-rail {
    width: 360px; /* Fixed width for the left rail */
    background-color: #f7f9fc; /* Light gray background color for a softer look */
    box-shadow: 4px 0 6px rgba(0, 0, 0, 0.1); /* Subtle shadow */
    height: 100vh; /* Full height of the viewport */
    position: fixed;
    top: 0; /* Stick to the top of the viewport */
    left: 0;
    overflow-y: auto; /* Allow scrolling if content overflows */
    transition: transform 0.3s ease; /* Smooth transition for hiding */
    transform: translateX(0); /* Show by default on larger screens */
    z-index: 999; /* Ensure it stays above other content */
}

.left-rail.show {
    transform: translateX(0); /* Show the rail */
}

.left-rail.invisible {
    transform: translateX(-105%); /* Hide the rail off-screen */
}

.game-category {
    margin: auto;
}

.category-header {
    cursor: pointer;
    font-weight: bold;
    background-color: #e7f3ff;
    padding: 1rem 0.7rem 1rem;
    border-top: 1px solid #b0bec5;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 56px;
}

.category-header.hover {
    background-color: #e0e0e0; /* Change background color on hover */
    color: #333; /* Change text color on hover */
    font-weight: bold; /* Keep text bold on hover */
}

.arrow {
    height: 20px;
    transition: transform 0.5s; /* Smooth transition for rotation */
}

.arrow.up {
    transform: rotate(180deg); /* Rotate arrow for up direction */
}

.game-list {
    list-style-type: none;
}

.game-text {
    display: flex;
    align-items: center;
    gap: 0.2rem;
}

.player-text {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 136px;
}

.player-game-status {
    font-size: 0.9rem;
    color: #666;
    display: inline-block;
}

.game-action {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.game-action button {
    font-size: 0.7rem;
    padding: 0.1rem 0.4rem;
    min-width: 40px;
    height: 28px;
}

.game-item {
    background-color: #f0f4ff; /* Light gray background for game items */
    padding: 1rem 0.7rem 1rem 1rem; /* Padding for spacing */
    cursor: pointer; /* Pointer cursor on hover */
    transition: background-color 0.3s ease; /* Smooth background color change */
    border-top: 1px solid #b0bec5; /* Light top border */
    width: 100%; /* Make the item take full width */
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 56px;
}

.game-item:hover {
    background-color: #e0e0e0; /* Slightly darker gray on hover for better visibility */
}

.game-content {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.current-game {
    background-color: #a5d6a7; /* Soft green background for current game */
    color: #1b5e20; /* Dark green text color */
    font-weight: bold; /* Make text bold for emphasis */
    cursor: default; /* Default cursor for non-clickable */
    pointer-events: none; /* Disable pointer events */
}

.game-control-pane {
    height: 72px;
    display: flex;
    justify-content: space-between;
    padding: 1rem 0.7rem; /* Padding for the control pane */
    background-color: #f0f4ff; /* Light blue background for a cohesive look */
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05) inset;
}

#tool-container {
    display: flex;
    width: 100%;
    padding: 0.5rem 0;
}

#tool-bar {
    display: flex;
    width: 345px;
    height: 48px;
    margin: auto;
    border-radius: 12px;
    align-items: center;
    justify-content: space-around;
}

.my-progress {
    display: flex;
    width: 100%;
    padding: 0.2rem 0;
}

#progress-container {
    display: flex;
    width: 100%;
    padding: 0.5rem 0;
}

#progress-bar {
    display: flex;
    width: 345px;
    height: 52px;
    gap: 1rem;
    padding: 10px;
    margin: auto;
    background: white;
    border-radius: 12px;
}

.progress-marker {
    position: absolute;
    top: -6.67px;
    width: 24px;
    height: 24px;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    border: 1px solid gray;
    background: white;
}

#game-progress {
    width: 100%;
    height: 32px;
}

.replay-cursor {
    display: none;
    position: absolute;
    top: 0;
    left: 0;
    border-radius: 50%;
    border: 1px solid gray;
    background: white;
    margin: 5px;
    width: 25px;
    height: 25px;
    opacity: 0.6; /* Make it slightly transparent */
    pointer-events: none; /* Prevent it from interfering with mouse events */
    transition: transform 0.5s ease; /* Add transition for smooth movement */
}

/* Add responsive design */
@media (max-width: 1000px) {
    .game-container {
        flex-direction: column;
        align-items: center;
    }

    .player-section {
        margin: 0 !important;
        width: 100%;
    }

    #player1-info {
        order: 2;
    }

    #player1-board {
        order: 1;
    }
}

@media (max-width: 850px) {
    .left-rail {
        transform: translateX(-105%); /* Hide off-screen by default */
    }
    .left-rail.show {
        transform: translateX(0); /* Show the rail */
    }
    .fake-left-rail {
        width: 0px;
        min-width: 0px;
    }
    .control-padding {
        padding-left: 0px;
    }
}

@media (max-width: 430px) {
    .left-rail {
        width: 100%;
    }
    .controls input {
        width: auto;
        max-width: 58px;
    }
}

@media (max-width: 420px) {
    .controls input {
        width: auto;
        max-width: 56px;
    }
}

@media (max-width: 410px) {
    .controls input {
        width: auto;
        max-width: 54px;
    }
}

@media (max-width: 400px) {
    .controls input {
        width: auto;
        max-width: 52px;
    }
}

@media (max-width: 390px) {
    .controls input {
        width: auto;
        max-width: 50px;
    }
}

@media (max-width: 375px) {
    .controls input {
        width: auto;
        max-width: 44px;
    }
}

@media (max-width: 350px) {
    .controls input {
        width: auto;
        max-width: 40px;
    }
}

/* Refresh button rotation animation */
@keyframes rotate {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

.refreshing img {
    animation: rotate 0.5s linear infinite;
}

/* Refresh overlay to block interactions during data refresh */
.refresh-overlay {
    position: absolute;
    top: 120px; /* Below game-control-pane */
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.3);
    z-index: 10;
    display: none;
    pointer-events: auto;
}

.refresh-overlay.show {
    display: block;
}

/* Login Dialog Styles */
.login-dialog-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    animation: fadeIn 0.2s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.login-dialog {
    background-color: #f5f7fa;
    border-radius: 16px;
    padding: 24px;
    width: 90%;
    max-width: 400px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    animation: slideUp 0.3s ease-out;
}

@keyframes slideUp {
    from {
        transform: translateY(20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.login-dialog-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 20px;
    text-align: center;
}

.login-input-group {
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    justify-content: space-evenly;
    gap: 12px;
}

.login-input-group label {
    min-width: 32px;
    text-align: center;
    transform: scale(1.5);
    position: relative;
    top: 0.2rem;
}

.login-input {
    flex: 1;
    padding: 12px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    font-size: 0.8rem;
    transition: border-color 0.3s ease;
    outline: none;
    -webkit-user-select: text;
    -moz-user-select: text;
    -ms-user-select: text;
    user-select: text;
}

.login-input:focus {
    border-color: #1798F3; /*#4dd0e1*/;
}

.login-code-container {
    display: flex;
    flex: 1;
    gap: 12px;
    min-width: 0; /* Prevent flex item from overflowing */
}

.login-code-input {
    flex: 1;
    min-width: 0; /* Allow input to shrink */
}

.login-send-btn {
    padding: 12px 16px;
    background-color: #1798F3; /*#4dd0e1*/;
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
    min-width: 100px;
    max-width: 140px; /* Prevent button from growing too large */
    flex-shrink: 0; /* Prevent button from shrinking */
}

.login-send-btn:hover:not(:disabled) {
    background-color: #1976D2; /*#26c6da;*/
    transform: translateY(-1px);
}

.login-send-btn:disabled {
    background-color: #b0bec5;
    cursor: not-allowed;
}

.login-message {
    padding: 8px;
    border-radius: 12px;
    margin-bottom: 16px;
    font-size: 0.9rem;
    text-align: center;
}

.login-message-success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.login-message-error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.login-button-group {
    display: flex;
    gap: 12px;
    margin-top: 20px;
}

.login-btn {
    flex: 1;
    padding: 12px 24px;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.login-btn-cancel {
    background-color: #f5f5f5;
    color: #666;
}

.login-btn-cancel:hover {
    background-color: #e0e0e0;
}

.login-btn-confirm {
    background-color: #1798F3; /*#4dd0e1*/;
    color: white;
}

.login-btn-confirm:hover {
    background-color: #1976D2; /*#26c6da;*/
    transform: translateY(-1px);
}

/* Mobile responsive adjustments */
@media (max-width: 480px) {
    .login-dialog {
        width: 95%;
        padding: 20px;
    }

    .login-dialog-title {
        font-size: 1.3rem;
    }

    .login-input {
        padding: 10px 12px;
        font-size: 0.75rem;
    }

    .login-send-btn {
        padding: 10px 12px;
        font-size: 0.85rem;
        min-width: 80px;
        max-width: 120px;
        flex-shrink: 0;
    }

    .login-btn {
        padding: 10px 20px;
        font-size: 0.95rem;
    }
}

/* Captcha board in login dialog */
.captcha-container {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 201px;
}

.captcha-instruction {
    max-width: 90px;
    font-size: 0.8rem;
    align-items: center;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* ========================================
   Patterns Section Styles (Simple)
   ======================================== */

.help-section {
    padding: 0 16px;
    display: flex;
    justify-content: center;
    width: 100%;
}

.help-container {
    max-width: 800px;
}

.help-header {
    padding: 16px 0;
    border-bottom: 1px solid #e0e0e0;
    position: sticky;
    background-color: #f5f7fa;
    top: 48px;
    z-index: 100;
}

.help-header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.help-header h2 {
    font-size: 18px;
    color: #333;
    margin-top: -16px;
}

.help-subtitle {
    margin-top: 12px;
    font-size: 14px;
    color: #666;
    line-height: 1.6;
}

.help-content {
    margin: 0 auto;
    padding: 16px 4px;
}

/* Simple table styles */
.patterns-table {
    width: auto;
    margin: 0 auto;
    border-radius: 12px;
    border-collapse: collapse;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    table-layout: fixed;
}

.patterns-table th,
.patterns-table td {
    padding: 8px 12px;
    text-align: left;
    border-bottom: 1px solid #e0e0e0;
}

.patterns-table tbody tr:last-child td {
    border-bottom: none;
}

.patterns-table th {
    background-color: #f5f5f5;
    font-weight: bold;
    border-radius: 12px;
    color: #333;
}

.patterns-table td {
    color: #555;
}

/* Pattern title and description styles */
.pattern-title {
    font-weight: bold;
    text-align: center;
    margin-bottom: 8px;
    color: #333;
}


/* Bullet points list for pattern description */
.pattern-desc-list {
    margin: 0;
    padding-left: 20px;
    list-style-type: disc;
    line-height: 1.6;
    color: #555;
}

.pattern-desc-list li {
    margin-bottom: 8px;
}

.pattern-desc-list li:last-child {
    margin-bottom: 0;
}

.pattern-game-container {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.5rem 0;
}

.pattern-tool-bar {
    display: flex;
    height: 32px;
    gap: 1.5rem;
    margin: auto;
    border-radius: 12px;
    align-items: center;
    justify-content: center;
}

@media (max-width: 480px) {
    .patterns-table {
        font-size: 14px;
    }
    
    .patterns-table th,
    .patterns-table td {
        padding: 8px;
    }

    .patterns-table td:last-child {
        padding-left: 0;
    }
}

.gameplay-block {
    margin-bottom: 24px;
}

.gameplay-block h3 {
    font-size: 16px;
    color: #333;
    margin-bottom: 8px;
}

.gameplay-list {
    margin: 0;
    padding-left: 20px;
    list-style-type: disc;
    line-height: 1.8;
    color: #555;
}

.gameplay-list li {
    margin-bottom: 4px;
}

/* Game table styles (my-games / ranking) */
.game-tabs {
    display: flex;
    gap: 12px;
    margin-top: 12px;
    flex-wrap: wrap;
}

.game-tab {
    padding: 6px 16px;
    border: 1px solid #ddd;
    border-radius: 20px;
    background: #fff;
    color: #555;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s;
}

.game-tab:hover {
    background: #f0f4ff;
    color: #4376F8;
}

.game-tab.active {
    background: #4376F8;
    color: #fff;
    border-color: #4376F8;
}

.game-table-wrapper {
    overflow-x: auto;
}

.game-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
    table-layout: fixed;
}

.game-table.my-games th:nth-child(1),
.game-table.my-games td:nth-child(1) { width: 16%; }
.game-table.my-games th:nth-child(2),
.game-table.my-games td:nth-child(2) { width: 16%; }
.game-table.my-games th:nth-child(3),
.game-table.my-games td:nth-child(3) { width: 16%; }
.game-table.my-games th:nth-child(4),
.game-table.my-games td:nth-child(4) { width: 12%; }
.game-table.my-games th:nth-child(5),
.game-table.my-games td:nth-child(5) { width: 12%; }
.game-table.my-games th:nth-child(6),
.game-table.my-games td:nth-child(6) { width: 16%; }
.game-table.my-games th:nth-child(7),
.game-table.my-games td:nth-child(7) { width: 12%; }

.game-table.ranking th:nth-child(1),
.game-table.ranking td:nth-child(1) { width: 8%; }
.game-table.ranking th:nth-child(2),
.game-table.ranking td:nth-child(2) { width: 16%; }
.game-table.ranking th:nth-child(3),
.game-table.ranking td:nth-child(3) { width: 16%; }
.game-table.ranking th:nth-child(4),
.game-table.ranking td:nth-child(4) { width: 16%; }
.game-table.ranking th:nth-child(5),
.game-table.ranking td:nth-child(5) { width: 14%; }
.game-table.ranking th:nth-child(6),
.game-table.ranking td:nth-child(6) { width: 16%; }
.game-table.ranking th:nth-child(7),
.game-table.ranking td:nth-child(7) { width: 14%; }

.game-table.multiplayer th:nth-child(1),
.game-table.multiplayer td:nth-child(1) { width: 16%; }
.game-table.multiplayer th:nth-child(2),
.game-table.multiplayer td:nth-child(2) { width: 16%; }
.game-table.multiplayer th:nth-child(3),
.game-table.multiplayer td:nth-child(3) { width: 16%; }
.game-table.multiplayer th:nth-child(4),
.game-table.multiplayer td:nth-child(4) { width: 16%; }
.game-table.multiplayer th:nth-child(5),
.game-table.multiplayer td:nth-child(5) { width: 12%; }
.game-table.multiplayer th:nth-child(6),
.game-table.multiplayer td:nth-child(6) { width: 12%; }
.game-table.multiplayer th:nth-child(7),
.game-table.multiplayer td:nth-child(7) { width: 12%; }

.game-table th {
    background: #f5f5f5;
    padding: 10px 12px;
    text-align: left;
    font-weight: 600;
    color: #333;
    border-bottom: 2px solid #e0e0e0;
    white-space: nowrap;
}

.game-table td {
    padding: 14px 12px;
    border-bottom: 1px solid #eee;
    color: #555;
}

.game-table tbody tr:hover {
    background: #e0e0e0;
}

.game-table .view-btn {
    padding: 6px 12px;
    font-size: 12px;
    background: #4376F8;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    white-space: nowrap;
}

.game-table .view-btn:hover {
    background: #1798F3;
}

.pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 16px;
}

.pagination button {
    background: #fff;
    cursor: pointer;
    color: #4376F8;
}

.pagination button:hover:not(:disabled) {
    background: #f0f4ff;
}

.pagination button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.pagination button.active {
    background: #4376F8;
    color: #fff;
    border-color: #4376F8;
}

@media (max-width: 460px) {
    .game-table {
        font-size: 12px;
    }

    .game-table th,
    .game-table td {
        padding: 8px 6px;
    }

    .game-tab {
        padding: 6px 12px;
    }
}

/* Responsive: hide columns at different breakpoints */
.game-table td,
.game-table th {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

@media (max-width: 1200px) {
    /* Hide game table priority 1 */
    .game-table.my-games .col-players { display: none; }
    .game-table.ranking .col-difficulty { display: none; }
    .game-table.multiplayer .col-date { display: none; }

    .game-table.my-games th:nth-child(1),
    .game-table.my-games td:nth-child(1) { width: 20%; }
    .game-table.my-games th:nth-child(2),
    .game-table.my-games td:nth-child(2) { width: 18%; }
    .game-table.my-games th:nth-child(3),
    .game-table.my-games td:nth-child(3) { width: 18%; }
    .game-table.my-games th:nth-child(4),
    .game-table.my-games td:nth-child(4) { width: 0%; }
    .game-table.my-games th:nth-child(5),
    .game-table.my-games td:nth-child(5) { width: 13%; }
    .game-table.my-games th:nth-child(6),
    .game-table.my-games td:nth-child(6) { width: 18%; }
    .game-table.my-games th:nth-child(7),
    .game-table.my-games td:nth-child(7) { width: 13%; }

    .game-table.ranking th:nth-child(1),
    .game-table.ranking td:nth-child(1) { width: 8%; }
    .game-table.ranking th:nth-child(2),
    .game-table.ranking td:nth-child(2) { width: 20%; }
    .game-table.ranking th:nth-child(3),
    .game-table.ranking td:nth-child(3) { width: 0%; }
    .game-table.ranking th:nth-child(4),
    .game-table.ranking td:nth-child(4) { width: 20%; }
    .game-table.ranking th:nth-child(5),
    .game-table.ranking td:nth-child(5) { width: 16%; }
    .game-table.ranking th:nth-child(6),
    .game-table.ranking td:nth-child(6) { width: 20%; }
    .game-table.ranking th:nth-child(7),
    .game-table.ranking td:nth-child(7) { width: 16%; }

    .game-table.multiplayer th:nth-child(1),
    .game-table.multiplayer td:nth-child(1) { width: 18%; }
    .game-table.multiplayer th:nth-child(2),
    .game-table.multiplayer td:nth-child(2) { width: 18%; }
    .game-table.multiplayer th:nth-child(3),
    .game-table.multiplayer td:nth-child(3) { width: 19%; }
    .game-table.multiplayer th:nth-child(4),
    .game-table.multiplayer td:nth-child(4) { width: 19%; }
    .game-table.multiplayer th:nth-child(5),
    .game-table.multiplayer td:nth-child(5) { width: 13%; }
    .game-table.multiplayer th:nth-child(6),
    .game-table.multiplayer td:nth-child(6) { width: 0%; }
    .game-table.multiplayer th:nth-child(7),
    .game-table.multiplayer td:nth-child(7) { width: 13%; }
}

@media (max-width: 1050px) {
    /* Hide game table priority 2 */
    .game-table.my-games .col-date { display: none; }
    .game-table.ranking .col-date { display: none; }
    .game-table.multiplayer .col-id { display: none; }

    .game-table.my-games th:nth-child(1),
    .game-table.my-games td:nth-child(1) { width: 26%; }
    .game-table.my-games th:nth-child(2),
    .game-table.my-games td:nth-child(2) { width: 22%; }
    .game-table.my-games th:nth-child(3),
    .game-table.my-games td:nth-child(3) { width: 20%; }
    .game-table.my-games th:nth-child(4),
    .game-table.my-games td:nth-child(4) { width: 0%; }
    .game-table.my-games th:nth-child(5),
    .game-table.my-games td:nth-child(5) { width: 16%; }
    .game-table.my-games th:nth-child(6),
    .game-table.my-games td:nth-child(6) { width: 0%; }
    .game-table.my-games th:nth-child(7),
    .game-table.my-games td:nth-child(7) { width: 16%; }

    .game-table.ranking th:nth-child(1),
    .game-table.ranking td:nth-child(1) { width: 12%; }
    .game-table.ranking th:nth-child(2),
    .game-table.ranking td:nth-child(2) { width: 24%; }
    .game-table.ranking th:nth-child(3),
    .game-table.ranking td:nth-child(3) { width: 0%; }
    .game-table.ranking th:nth-child(4),
    .game-table.ranking td:nth-child(4) { width: 24%; }
    .game-table.ranking th:nth-child(5),
    .game-table.ranking td:nth-child(5) { width: 20%; }
    .game-table.ranking th:nth-child(6),
    .game-table.ranking td:nth-child(6) { width: 0%; }
    .game-table.ranking th:nth-child(7),
    .game-table.ranking td:nth-child(7) { width: 20%; }

    .game-table.multiplayer th:nth-child(1),
    .game-table.multiplayer td:nth-child(1) { width: 0%; }
    .game-table.multiplayer th:nth-child(2),
    .game-table.multiplayer td:nth-child(2) { width: 22%; }
    .game-table.multiplayer th:nth-child(3),
    .game-table.multiplayer td:nth-child(3) { width: 23%; }
    .game-table.multiplayer th:nth-child(4),
    .game-table.multiplayer td:nth-child(4) { width: 23%; }
    .game-table.multiplayer th:nth-child(5),
    .game-table.multiplayer td:nth-child(5) { width: 16%; }
    .game-table.multiplayer th:nth-child(6),
    .game-table.multiplayer td:nth-child(6) { width: 0%; }
    .game-table.multiplayer th:nth-child(7),
    .game-table.multiplayer td:nth-child(7) { width: 16%; }
}

@media (max-width: 560px) {
    /* Hide game table priority 3 */
    .game-table.my-games .col-type { display: none; }
    .game-table.ranking .col-id { display: none; }
    .game-table.multiplayer .col-difficulty { display: none; }    

    .game-table.my-games th:nth-child(1),
    .game-table.my-games td:nth-child(1) { width: 30%; }
    .game-table.my-games th:nth-child(2),
    .game-table.my-games td:nth-child(2) { width: 30%; }
    .game-table.my-games th:nth-child(3),
    .game-table.my-games td:nth-child(3) { width: 0%; }
    .game-table.my-games th:nth-child(4),
    .game-table.my-games td:nth-child(4) { width: 0%; }
    .game-table.my-games th:nth-child(5),
    .game-table.my-games td:nth-child(5) { width: 20%; }
    .game-table.my-games th:nth-child(6),
    .game-table.my-games td:nth-child(6) { width: 0%; }
    .game-table.my-games th:nth-child(7),
    .game-table.my-games td:nth-child(7) { width: 20%; }

    .game-table.ranking th:nth-child(1),
    .game-table.ranking td:nth-child(1) { width: 18%; }
    .game-table.ranking th:nth-child(2),
    .game-table.ranking td:nth-child(2) { width: 0%; }
    .game-table.ranking th:nth-child(3),
    .game-table.ranking td:nth-child(3) { width: 0%; }
    .game-table.ranking th:nth-child(4),
    .game-table.ranking td:nth-child(4) { width: 30%; }
    .game-table.ranking th:nth-child(5),
    .game-table.ranking td:nth-child(5) { width: 26%; }
    .game-table.ranking th:nth-child(6),
    .game-table.ranking td:nth-child(6) { width: 0%; }
    .game-table.ranking th:nth-child(7),
    .game-table.ranking td:nth-child(7) { width: 26%; }

    .game-table.multiplayer th:nth-child(1),
    .game-table.multiplayer td:nth-child(1) { width: 0%; }
    .game-table.multiplayer th:nth-child(2),
    .game-table.multiplayer td:nth-child(2) { width: 0%; }
    .game-table.multiplayer th:nth-child(3),
    .game-table.multiplayer td:nth-child(3) { width: 30%; }
    .game-table.multiplayer th:nth-child(4),
    .game-table.multiplayer td:nth-child(4) { width: 30%; }
    .game-table.multiplayer th:nth-child(5),
    .game-table.multiplayer td:nth-child(5) { width: 20%; }
    .game-table.multiplayer th:nth-child(6),
    .game-table.multiplayer td:nth-child(6) { width: 0%; }
    .game-table.multiplayer th:nth-child(7),
    .game-table.multiplayer td:nth-child(7) { width: 20%; }
}

/* ===== Daily Challenge Hub ===== */
.daily-date {
    font-size: 13px;
    color: #7a8599;
    margin-bottom: 8px;
}

.daily-streak {
    font-size: 13px;
    color: #6b7280;
    margin-bottom: 8px;
}

.daily-streak b {
    color: #f59e0b;
}

.daily-info-bar {
    border-radius: 8px;
    padding: 0 4px;
    font-size: 12px;
    color: #4285f4;
    line-height: 1.5;
}

/* Difficulty Cards */
.diff-cards {
    display: flex;
    gap: 10px;
    margin-bottom: 16px;
}

.diff-card {
    flex: 1;
    background: #fff;
    border-radius: 10px;
    padding: 14px 10px;
    text-align: center;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
    border: 2px solid transparent;
    transition: border-color 0.15s;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.diff-card:hover {
    border-color: #4285f4;
}

.dc-icon {
    font-size: 24px;
    margin-bottom: 4px;
}

.dc-detail {
    display: flex;
    flex-direction: column;
    margin-bottom: 8px;
}

.dc-name {
    font-size: 14px;
    font-weight: 700;
}

.dc-meta {
    font-size: 11px;
    color: #9ca3af;
    margin-top: 1px;
}

.dc-result {
    font-size: 12px;
    font-weight: 600;
    margin-top: 4px;
}

.dc-result.na {
    color: #d1d5db;
}

.dc-btn {
    width: 100%;
    padding: 8px;
    border-radius: 6px;
    border: none;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    margin-top: auto;
}

/* Daily Ranking */
.daily-ranking {
    margin-bottom: 16px;
}

.rank-tab {
    font-size: 12px;
}

.daily-rank-table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    margin-top: 12px;
}

.daily-rank-table th {
    padding: 10px 20px;
    text-align: left;
    font-weight: 600;
    color: #9ca3af;
    border-bottom: 1px solid #e5e7eb;
}

.daily-rank-table td {
    padding: 10px 20px;
    font-size: 13px;
    border-bottom: 1px solid #f3f4f6;
}

.daily-rank-table tr:last-child td {
    border: none;
}

.daily-rank-table tr:hover td {
    background: #f8fafc;
}

.rk-rank {
    font-weight: 700;
}

.text-right {
    margin-left: 4px;
}

.rk-name {
    font-weight: 600;
}

.rk-name .me {
    font-size: 9px;
    background: #d6e9ff;
    color: #4285f4;
    padding: 1px 5px;
    border-radius: 3px;
    margin-left: 4px;
}

.rk-time {
    font-weight: 700;
}

.rk-view {
    padding: 8px 12px;
    border-radius: 4px;
    border: none;
    background: #f3f4f6;
    color: #4a5568;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
}

.rk-view:hover {
    background: #e2e8f0;
}

/* Daily Banner */
#daily-banner-container a:hover {
    opacity: 0.9;
}

.daily-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    background: linear-gradient(135deg, #1798F3, #4376F8);
    border-radius: 12px; 
    color: #fff;
    text-decoration: none;
    font-size: 12px;
}

.challenging {
    background: linear-gradient(135deg, #66bb6a, #10b981);
}

.poster-ctrl {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 16px;
    width: 330px;
}

.toggle-wrap {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 600;
    color: #4a5568;
}

.toggle {
    position: relative;
    width: 36px;
    height: 20px;
    background: #d0d7e2;
    border-radius: 10px;
    cursor: pointer;
    transition: background 0.2s;
    flex-shrink: 0;
}

.toggle.on {
    background: #4376F8;
}

.toggle.on::after {
    transform: translateX(16px);
}

.toggle::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 16px;
    height: 16px;
    background: #fff;
    border-radius: 50%;
    transition: transform 0.2s;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.close-btn {
    width: 28px;
    height: 28px;
    min-width: 0;
    border-radius: 50%;
    border: 1.5px solid #d0d7e2;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    color: #64748b;
    flex-shrink: 0;
}

/* ===== Daily Poster Cards ===== */
.poster-card {
    width: 330px;
    border-radius: 24px;
    overflow: hidden;
    position: relative;
    box-shadow: 0 20px 60px rgba(59,130,246,0.12), 0 4px 16px rgba(0,0,0,0.06);
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 20px;
}

.poster-card.failure {
    box-shadow: 0 20px 60px rgba(239,68,68,0.08), 0 4px 16px rgba(0,0,0,0.06);
    background: linear-gradient(160deg, #f8c4c4 0%, #fde2e2 30%, #fce4e4 60%, #f9d4e8 100%);
}

.poster-card.success {
    background: linear-gradient(160deg, #bddcfa 0%, #dbeafe 30%, #d4e4f7 60%, #c7d2fe 100%);
}

/* ===== Screenshot Mode ===== */
.poster-card.screenshot-mode {
    border-radius: 0 !important;
    box-shadow: none !important;
}

.screenshot-mode .poster-board {
    backdrop-filter: none !important;
    box-shadow: none !important;
}

.screenshot-mode .poster-status-icon {
    backdrop-filter: none !important;
    box-shadow: none !important;
}

.screenshot-mode .poster-link-btn {
    box-shadow: none !important;
}

.screenshot-mode .poster-qr {
    box-shadow: none !important;
}

/* Header */
.poster-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    position: relative;
    height: 28px;
    z-index: 1;
}

.poster-brand {
    display: flex;
    align-items: center;
    gap: 6px;
}

.poster-title {
    font-size: 16px;
    font-weight: 800;
    color: #1e293b;
    white-space: nowrap;
}

.poster-date-area {
    text-align: right;
}

.poster-date-label {
    font-size: 12px;
    font-weight: 700;
    color: #3b82f6;
}

.poster-date-value {
    font-size: 9px;
    color: #64748b;
    white-space: nowrap;
}

/* Board preview */
.poster-board-wrap {
    padding: 0;
}

.poster-board {
    background: rgba(255,255,255,0.55);
    backdrop-filter: blur(16px);
    border: 1px solid rgba(255,255,255,0.7);
    border-radius: 16px;
    padding: 14px;
    height: 90px;
    width: 290px;
    box-shadow: 0 4px 24px rgba(59,130,246,0.1);
}

.poster-card.failure .poster-board {
    box-shadow: 0 4px 24px rgba(239,68,68,0.08);
}

/* Status section */
.poster-status-section {
    text-align: center;
    position: relative;
    height: 102px;
    z-index: 1;
}

/* Status icon */
.poster-status-icon {
    width: 52px;
    height: 52px;
    background: rgba(34,197,94,0.15);
    backdrop-filter: blur(8px);
    border: 2px solid rgba(34,197,94,0.3);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 8px;
    box-shadow: 0 4px 16px rgba(34,197,94,0.12);
}

.poster-status-icon--fail {
    background: rgba(239,68,68,0.12);
    border-color: rgba(239,68,68,0.25);
    box-shadow: 0 4px 16px rgba(239,68,68,0.08);
}

/* Rank title & result */
.poster-rank-title {
    font-size: 18px;
    font-weight: 800;
    color: #1e293b;
    margin-bottom: 2px;
    position: relative;
    z-index: 1;
}

.poster-result-text {
    font-size: 12px;
    color: #475569;
    margin-bottom: 0;
    position: relative;
    z-index: 1;
}

/* Stats */
.poster-stats {
    display: flex;
    justify-content: center;
    gap: 8px;
    height: 62px;
    position: relative;
    z-index: 1;
}

.poster-stat {
    flex: 1;
    background: rgba(255,255,255,0.55);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.7);
    padding: 8px 8px;
    border-radius: 12px;
    text-align: center;
}

.poster-stat-value {
    font-size: 24px;
    font-weight: 800;
    color: #3b82f6;
    line-height: 1;
}

.poster-stat:nth-child(2) .poster-stat-value {
    color: #1e293b;
}

.poster-stat:nth-child(3) .poster-stat-value {
    color: #f59e0b;
}

.poster-stat-label {
    font-size: 9px;
    color: #94a3b8;
    margin-top: 8px;
}

/* Quote */
.poster-quote {
    text-align: center;
    font-size: 15px;
    font-weight: 800;
    color: #1e293b;
    position: relative;
    height: 20px;
    z-index: 1;
}

.poster-quote .high-quote {
    color: #3b82f6;
}

.poster-card.failure .poster-quote .high-quote {
    color: #ef4444;
}

/* Link button */
.poster-link-btn {
    border-radius: 24px;
    font-size: 12px;
    font-weight: 700;
    color: #fff;
    background: linear-gradient(135deg, #3b82f6, #6366f1);
    box-shadow: 0 4px 20px rgba(99, 102, 241, 0.25);
    display: flex;
    position: relative;
    z-index: 1;
    height: 38px;
    padding: 20px;
    align-items: center;
    justify-content: center;
}

.poster-link-btn-fail {
    background: linear-gradient(135deg, #ef4444, #f97316);
    box-shadow: 0 4px 20px rgba(239,68,68,0.2);
}

.poster-qr { 
    display: none;
    position: absolute;
    right: 20px;
    bottom: 20px;
    width: 56px;
    height: 56px;
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    border-radius: 6px;
    padding: 3px;
}

.show-qr .poster-qr {
    display: block;
}

/* Poster action buttons */
.poster-actions {
    display: flex;
    gap: 16px;
    margin-top: 16px;
    width: 330px;
    justify-content: space-between;
}

.pa-btn {
    flex: 1;
    padding: 10px;
    border-radius: 8px;
    border: 1.5px solid #e5e7eb;
    background: #fff;
    font-size: 12px;
    font-weight: 600;
    color: #4a5568;
    cursor: pointer;
    text-align: center;
}

.pa-btn.primary {
    background: #4376F8;
    border-color: #4376F8;
    color: #fff;
}

.pa-btn.primary:hover {
    background: #3367d6;
}

/* Cell styles for board preview */
.poster-cell {
    width: 22px;
    height: 22px;
    border-radius: 3px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: 700;
}

/* Responsive */
@media (max-width: 560px) {
    .daily-rank-table th,
    .daily-rank-table td {
        padding: 10px 10px;
    }

    .diff-cards {
        flex-direction: column;
        gap: 8px;
    }

    .diff-card {
        flex-direction: row;
        gap: 1rem;
    }

    .dc-detail {
        text-align: left;
        margin-bottom: 0;
    }

    .dc-btn {
        max-width: 100px;
        margin-left: auto;
        margin-top: 0;
    }

    .poster-content {
        height: 100%;
        width: 100%;
        margin: 0;
        background: #f5f7fa;
        border-radius: 0;
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .daily-rank-table th:nth-child(1),
    .daily-rank-table td:nth-child(1) { width: 13%; }
    .daily-rank-table th:nth-child(2),
    .daily-rank-table td:nth-child(2) { width: 38%; }
    .daily-rank-table th:nth-child(3),
    .daily-rank-table td:nth-child(3) { width: 22%; }
    .daily-rank-table th:nth-child(4),
    .daily-rank-table td:nth-child(4) { width: 27%; }
}
