/* ===== 宠物寄托游戏专属样式 ===== */

/* 捏脸界面 */
#face-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 95;
    background: linear-gradient(135deg, rgba(26, 26, 46, 0.96), rgba(22, 33, 62, 0.96));
    backdrop-filter: blur(12px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    overflow-y: auto;
}

.face-card {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 24px;
    padding: 30px 28px;
    width: 100%;
    max-width: 420px;
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.face-card h2 {
    font-size: 24px;
    text-align: center;
    color: #fff;
}

.face-hint {
    text-align: center;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.5);
    margin-top: -10px;
}

.face-row {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.face-row label {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.6);
}

.face-row input {
    width: 100%;
    padding: 12px 14px;
    border: 2px solid rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    background: rgba(0, 0, 0, 0.3);
    color: #fff;
    font-size: 15px;
    outline: none;
    transition: border-color 0.3s;
}

.face-row input:focus {
    border-color: #98D8C8;
}

.pet-type-row {
    display: flex;
    gap: 10px;
}

.type-btn {
    flex: 1;
    padding: 12px;
    border: 2px solid rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    background: rgba(0, 0, 0, 0.2);
    color: rgba(255, 255, 255, 0.7);
    font-size: 15px;
    cursor: pointer;
    transition: all 0.2s;
}

.type-btn.active {
    border-color: #98D8C8;
    color: #fff;
    background: rgba(152, 216, 200, 0.15);
}

.color-row {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.color-swatch {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 3px solid transparent;
    cursor: pointer;
    transition: transform 0.15s, border-color 0.15s;
}

.color-swatch:active {
    transform: scale(0.9);
}

.color-swatch.active {
    border-color: #fff;
    box-shadow: 0 0 8px rgba(255, 255, 255, 0.3);
}

.face-preview-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

#face-preview {
    border-radius: 16px;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.preview-label {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.4);
}

#summon-btn {
    width: 100%;
    padding: 14px;
    border: none;
    border-radius: 12px;
    background: linear-gradient(135deg, #98D8C8, #7bed9f);
    color: #1a1a2e;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.15s, box-shadow 0.2s;
}

#summon-btn:active {
    transform: scale(0.97);
}

#summon-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* 宠物信息栏 */
#pet-info {
    position: fixed;
    bottom: 16px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 8px 18px;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.8);
    pointer-events: none;
}

#pet-id-display {
    color: #98D8C8;
    font-weight: 600;
}

/* ===== 自由画笔花纹 ===== */
.draw-tools {
    display: flex;
    gap: 14px;
    align-items: flex-start;
}

#pattern-canvas {
    width: 256px;
    height: 256px;
    max-width: 100%;
    border-radius: 12px;
    background: rgba(0, 0, 0, 0.35);
    border: 2px solid rgba(255, 255, 255, 0.15);
    cursor: crosshair;
    touch-action: none;
    flex-shrink: 0;
}

.draw-side {
    display: flex;
    flex-direction: column;
    gap: 10px;
    flex: 1;
    min-width: 0;
}

.draw-row {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.draw-label {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.55);
    min-width: 44px;
}

.brush-color-row {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.brush-swatch {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.2);
    cursor: pointer;
    transition: transform 0.15s, border-color 0.15s;
}

.brush-swatch:active {
    transform: scale(0.9);
}

.brush-swatch.active {
    border-color: #fff;
    box-shadow: 0 0 6px rgba(255, 255, 255, 0.4);
}

#brush-size {
    flex: 1;
    min-width: 80px;
    accent-color: #98D8C8;
}

#brush-size-val {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.7);
    min-width: 22px;
    text-align: right;
}

.draw-btn-row {
    display: flex;
    gap: 8px;
}

.draw-btn-row button {
    flex: 1;
    padding: 8px;
    border: 2px solid rgba(255, 255, 255, 0.15);
    border-radius: 10px;
    background: rgba(0, 0, 0, 0.2);
    color: rgba(255, 255, 255, 0.7);
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
}

.draw-btn-row button.active {
    border-color: #ffd93d;
    color: #ffd93d;
    background: rgba(255, 217, 61, 0.12);
}

.draw-tip {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.4);
    line-height: 1.4;
    margin: 0;
}

/* ===== 分片房间切换 ===== */
#room-switch {
    position: fixed;
    top: 16px;
    right: 16px;
    z-index: 11;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 12px 14px;
    width: 200px;
    max-height: 60vh;
    overflow-y: auto;
}

.room-switch-title {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 8px;
}

#room-current-label {
    color: #98D8C8;
    font-weight: 600;
}

.room-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.room-btn {
    padding: 8px 10px;
    border: 2px solid rgba(255, 255, 255, 0.12);
    border-radius: 10px;
    background: rgba(0, 0, 0, 0.25);
    color: rgba(255, 255, 255, 0.7);
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
}

.room-btn:hover {
    border-color: rgba(255, 255, 255, 0.3);
    color: #fff;
}

.room-btn.active {
    border-color: #98D8C8;
    color: #98D8C8;
    background: rgba(152, 216, 200, 0.12);
}

.room-switch-hint {
    font-size: 10px;
    color: rgba(255, 255, 255, 0.35);
    margin-top: 8px;
    line-height: 1.4;
}

/* 操作提示栏 */
#hint-bar {
    position: fixed;
    bottom: 60px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 8px 18px;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.7);
    pointer-events: none;
    white-space: nowrap;
}

@media (max-width: 768px) {
    #hint-bar {
        bottom: 52px;
        font-size: 11px;
        padding: 6px 12px;
    }

    .face-card {
        padding: 24px 20px;
        gap: 14px;
    }

    .face-card h2 {
        font-size: 20px;
    }

    #face-preview {
        width: 130px;
        height: 130px;
    }
}
