/* General Styles */
#captcha_jofuncaptcha,
.jofuncaptcha {
    max-width: 250px;
    padding: 10px;
    background: linear-gradient(145deg, #ffffff, #e6e6ff);
    border-radius: 10px;
    box-shadow: 0 6px 10px rgba(0, 0, 0, 0.1);
    text-align: center;
}

#captcha_jofuncaptcha p,
.jofuncaptcha p {
    font-size: 1rem;
    color: #333;
    margin-bottom: 15px;
}

/* Board Styles */
.board {
    display: grid;
    grid-template-columns: repeat(3, 50px);
    gap: 6px;
    justify-content: center;
    margin: 15px auto;
}

.cell {
    width: 50px;
    height: 50px;
    background-color: #fff;
    border: 1.5px solid #ddd;
    border-radius: 8px;
    font-size: 1.5rem;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 3px 5px rgba(0, 0, 0, 0.1);
}

.cell:hover {
    background-color: #f0faff;
    transform: scale(1.05);
}

.cell.focused {
    outline: 2px solid #007bff;
    box-shadow: 0 0 8px rgba(0, 123, 255, 0.5);
}

.cell-content {
    text-align: center;
    vertical-align: middle;
}

.cell-content.X {
    color: #28a745; /* Green for X */
}

.cell-content.O {
    color: #dc3545; /* Red for O */
}

/* Message Container Styles */
.message-container {
    display: none;
    opacity: 0;
    transform: translateY(-10px);
    text-align: center;
    margin-top: 15px;
    padding: 12px;
    background: linear-gradient(145deg, #ffffff, #fff3cd);
    border-radius: 8px;
    box-shadow: 0 3px 5px rgba(0, 0, 0, 0.1);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.message-container.show {
    opacity: 1;
    transform: translateY(0);
}

.message-icon {
    font-size: 2rem;
    margin-bottom: 8px;
}

.message-text {
    font-size: 1rem;
    font-weight: inherit;
    color: #333;
}

/* Fallback Error Message */
.error-message {
    color: #dc3545;
    font-weight: bold;
    margin-top: 15px;
    text-align: center;
}

/* ---- 2.0.0 additions (no visual change) ---- */

/* Cells are now <button>s: reset native button styling so they look
   exactly like the original <div> cells. */
.jofuncaptcha button.cell {
    -webkit-appearance: none;
    appearance: none;
    margin: 0;
    padding: 0;
    font-family: inherit;
    line-height: normal;
    color: inherit;
}

.jofuncaptcha button.cell:focus {
    outline: none;
}

.jofuncaptcha button.cell:focus-visible {
    outline: 2px solid #007bff;
    box-shadow: 0 0 8px rgba(0, 123, 255, 0.5);
}

.jofuncaptcha button.cell[aria-disabled="true"] {
    cursor: default;
}

.jofuncaptcha button.cell[aria-disabled="true"]:hover {
    background-color: #fff;
    transform: none;
}

/* Subtle "computer is thinking" state */
.jofuncaptcha.is-thinking .board {
    opacity: 0.75;
    transition: opacity 0.2s ease;
}

.jofuncaptcha.is-thinking button.cell {
    cursor: progress;
}

.jofuncaptcha .visually-hidden {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}
