/* =========================================================
 * net.css - 联机窗口样式
 *
 * 从 style.css 拆出：对应 net.js 的联机弹窗（#onlineModal）
 *   .code-box-clickable —— 可点击生成房间码区域
 *   .code-tip/.code-text —— 房间码提示与正文
 *   .join-input-group   —— 输入框 + 加入按钮横排组合
 *   .input-box          —— 房间码输入框
 *   .square-btn         —— 加入按钮（方形墨黑）
 *   .btn-cancel         —— 取消按钮（茜红色）
 *
 * 注意：.square-btn / .btn-cancel 用 !important 覆盖 .btn 基础样式，
 *       加载顺序不敏感，但仍统一排在 style.css 之后。
 * ========================================================= */

/* ==================== 联机弹窗样式 ==================== */

/* 可点击生成房间码区域 */
.code-box-clickable {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    background: var(--bg-color);
    padding: 12px 10px;
    border-radius: var(--radius-md);
    min-height: 60px;
    cursor: pointer;
    border: 2px ;

    transition: transform 0.08s ease, background 0.15s ease, border-color 0.15s ease;
}

.code-box-clickable:active {
    transform: translate(1px, 1px);
    box-shadow: 1px 1px 0px var(--shadow-color);
}

.code-tip {
    font-size: 0.72rem;
    color: var(--text-muted);
    font-weight: 600;
}

.code-text {
    font-size: 1.55rem;
    font-weight: 900;
    letter-spacing: 4px;
    color: var(--text-main);
}

/* 输入框与方形加号横排组合 */
.join-input-group {
    display: flex;
    gap: 8px;
    align-items: center;
    width: 100%;
}

.input-box {
    flex: 1;
    min-width: 0;
    height: 48px;
    font-size: 1.4rem;
    letter-spacing: 3px;
    text-align: center;
    padding: 10px;
    border: none;
    border-radius: var(--radius-md);
    background: var(--bg-color);
    color: var(--text-main);
    outline: none;
    font-weight: 900;
}

.input-box::placeholder {
    color: var(--text-muted);
    font-size: 0.92rem;
    letter-spacing: 1px;
    font-weight: normal;
}

.input-box:focus {
    box-shadow: inset 0 0 0 2px var(--shadow-color);
}

/* 加入方形按钮 */
.square-btn {
    width: 48px;
    height: 48px;
    padding: 0;
    border-radius: var(--radius-md);
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--piece-black) !important;
    color: var(--piece-white) !important;
    box-shadow: 2px 2px 0px var(--shadow-color) !important;
}

.square-btn:active {
    transform: translate(1px, 1px);
    box-shadow: 1px 1px 0px var(--shadow-color) !important;
}

/* 取消按钮（茜红色） */
.btn-cancel {
    background: var(--c-lady) !important;
    color: #FFFFFF !important;
    box-shadow: 2px 2px 0px var(--shadow-color) !important;
}

.btn-cancel:active {
    transform: translate(1px, 1px);
    box-shadow: 1px 1px 0px var(--shadow-color) !important;
}

/* 联机弹窗内通用按钮禁用态 */
#onlineModal .btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
    transform: none;
}
