
/* ==========================================================================
       1. 주기율표 레이아웃 및 폰트 세팅 (PC 해상도 기준 기본형)
       ========================================================================== */
.pt-container {
    max-width: 760px;
    margin: 10px auto;
    text-align: center;
    font-family: 'Malgun Gothic', -apple-system, sans-serif;
    box-sizing: border-box;
}

.pt-table-wrapper {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin: 0 auto;
}

.pt-table {
    border-collapse: separate;
    border-spacing: 4px;
    margin: 0 auto;
}

    .pt-table td {
        width: 44px;
        height: 48px;
        border: 1px solid #495057; /* 💡 더 진한 테두리로 격자 경계 명확화 */
        border-radius: 4px;
        text-align: center;
        position: relative;
        background: #ffffff; /* 💡 완벽한 흰색 배경으로 고대비 연출 */
        vertical-align: middle;
        box-sizing: border-box;
    }

        .pt-table td.empty-space {
            border: none;
            background: transparent;
            cursor: default;
        }

/* 💡 원소 셀 내부 텍스트 배치 디자인 (진하게 보정) */
.el-no {
    position: absolute;
    top: 2px;
    left: 3px;
    font-size: 9px;
    color: #212529; /* 💡 원소 번호를 선명한 검은색 계열로 변경 */
    font-weight: 800;
    line-height: 1;
}

.el-sym {
    font-size: 15px;
    font-weight: 900; /* 💡 글자 두께 최고 단계로 강화 */
    color: #000000; /* 💡 완전한 블랙으로 시인성 사수 */
    line-height: 1.1;
    display: block;
}

.el-name {
    font-size: 10px;
    color: #212529; /* 💡 한글 이름 흑색화 */
    font-weight: 700;
    display: block;
    transform: scale(0.9);
    margin-top: 1px;
}

/* 상태별 셀 배경색 (시인성 극대화) */
.pt-cell-fixed {
    background-color: #f1f3f5; /* 💡 고정칸 배경을 밝은 회색으로 주어 대비 극대화 */
    color: #212529;
}

.pt-cell-quiz {
    background-color: #ffffff;
    border: 2px dashed #1c7ed6; /* 💡 더 진한 블루 점선으로 퀴즈칸 강조 */
    cursor: pointer;
    transition: background 0.2s;
}

    .pt-cell-quiz:hover {
        background-color: #e7f5ff;
    }

    .pt-cell-quiz.matched {
        background-color: #ebfbee !important; /* 💡 정답 배경을 산뜻하고 밝은 초록으로 튜닝 */
        border: 2px solid #2b8a3e; /* 💡 정답 테두리 진한 초록 고정 */
    }

        .pt-cell-quiz.matched .el-sym {
            color: #2b8a3e; /* 💡 맞춘 기호도 초록색 강조 */
        }

        .pt-cell-quiz.matched .el-name {
            color: #2b8a3e;
            font-weight: 800;
        }

/* 하단 원소 기호 드래그 패드 (눈에 확 띄는 네이비 박스) */
.pt-palette {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin: 15px 0;
    flex-wrap: wrap;
}

.pt-drag-item {
    padding: 8px 12px;
    background: #1a252f;
    color: #ffffff;
    border-radius: 4px;
    font-size: 15px;
    font-weight: 900; /* 💡 하단 카드 글자 굵게 보정 */
    cursor: grab;
    user-select: none;
    transition: background 0.2s, transform 0.2s;
    text-align: center;
    min-width: 32px;
    box-shadow: 0 3px 6px rgba(0,0,0,0.15);
}

    .pt-drag-item:hover {
        background: #0b1117;
        transform: translateY(-2px);
    }

/* ==========================================================================
       2. 모던 네이비 타이머 가로형 패키지 디자인
       ========================================================================== */
.time {
    margin: 10px auto 12px auto !important;
    padding: 12px 10px;
    background: #f4f7fa;
    border: 1px solid #c1d1e0;
    border-radius: 8px;
    max-width: 760px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-sizing: border-box;
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.02);
}

.btn_maru2 {
    padding: 6px 10px;
    background: #1a252f;
    color: #ffffff;
    border: none;
    border-radius: 5px;
    font-weight: 800;
    font-size: 11px;
    letter-spacing: -0.5px;
    pointer-events: none;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

#counter {
    font-size: 26px !important;
    font-weight: 900;
    color: #466495 !important;
    font-family: 'Courier New', Courier, monospace;
    margin: 0 10px !important;
    display: inline-block;
    line-height: 1;
    min-width: 40px;
    text-align: right;
}

    #counter::after {
        content: "초";
        font-size: 13px;
        font-weight: 700;
        color: #495057;
        margin-left: 2px;
    }

.btn_maru {
    padding: 7px 12px;
    background: #466495;
    color: #ffffff;
    border: 1px solid #466495;
    border-radius: 5px;
    cursor: pointer;
    font-weight: bold;
    font-size: 11px;
    letter-spacing: -0.3px;
    transition: all 0.15s ease;
    box-shadow: 0 2px 4px rgba(70, 100, 149, 0.15);
}

    .btn_maru:hover {
        background: #344d75;
        border-color: #344d75;
    }

.pt-msg-box {
    min-height: 24px;
    font-size: 15px;
    font-weight: 900; /* 💡 메시지 알림 서체 강화 */
    margin: 6px 0;
    line-height: 24px;
    text-align: center;
}

    .pt-msg-box.success {
        color: #2b8a3e;
    }

    .pt-msg-box.error {
        color: #e03131;
    }

/* ==========================================================================
       3. 🚨 모바일 터치 및 화면 고정 완전 잠금 (스크롤/꿀렁거림 방지 핵심)
       ========================================================================== */
.pt-drag-item, .pt-cell-quiz {
    touch-action: none !important;
    -webkit-user-select: none !important;
    user-select: none !important;
    -webkit-touch-callout: none !important;
}

html.game-dragging, body.game-dragging {
    overflow: hidden !important;
    position: fixed !important;
    width: 100% !important;
    height: 100% !important;
    overscroll-behavior: none !important;
}

.btn_maru, .btn_maru2, .pt-drag-item {
    touch-action: manipulation !important;
    -webkit-tap-highlight-color: transparent !important;
}

    .btn_maru:active, .pt-drag-item:active {
        transform: scale(0.96);
        transition: transform 0.05s ease;
    }

/* ==========================================================================
       4. ⚡ 모바일 화면 (600px 이하) 스마트폰 가독성 집중 압축 구조
       ========================================================================== */
@media (max-width: 600px) {
    .pt-container {
        margin: 5px auto;
    }

    .pt-table td {
        width: 30px; /* 💡 모바일 가독성을 위해 너비를 최소 30px로 소폭 상향 조정 */
        height: 36px;
        border-spacing: 2px;
        border-color: #212529; /* 💡 모바일 좁은 화면에서 선 분별을 위해 더 어둡게 처리 */
    }

    .el-no {
        font-size: 7px; /* 💡 눈에 더 잘 띄도록 모바일 번호 크기 상향 */
        top: 1px;
        left: 2px;
        font-weight: 900;
    }

    .el-sym {
        font-size: 11px; /* 💡 모바일 기호 크기 가독성 하한선 확보 */
        font-weight: 900;
    }

    .el-name {
        font-size: 8px; /* 💡 국문 원소명 모바일 식별력 확보 */
        font-weight: 800;
        transform: scale(0.85);
        margin-top: 0px;
    }

    .pt-drag-item {
        padding: 7px 10px;
        font-size: 13px;
        min-width: 26px;
        font-weight: 900;
    }

        .pt-drag-item:hover {
            transform: none;
        }

    .time {
        margin: 5px auto 10px auto !important;
        padding: 8px 10px;
        border-radius: 6px;
    }

    #counter {
        font-size: 22px !important;
        margin: 0 6px !important;
        min-width: 32px;
    }

        #counter::after {
            font-size: 11px;
        }

    .btn_maru2 {
        padding: 5px 8px;
        font-size: 10px;
    }

    .btn_maru {
        padding: 6px 10px;
        font-size: 10px;
    }
}


