/* ================================================
   오목 게임 전체 스타일 (UI 복구 및 최적화)
   ================================================ */

.omog-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    margin: 40px auto;
    max-width: 1000px;
    padding: 20px;
}

.game-info {
    display: flex;
    justify-content: space-between;
    width: 100%;
    max-width: 600px;
    background: #3C3744;
    padding: 15px 25px;
    border-radius: 15px;
    color: white;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    align-items: center;
}

.player-status {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    position: relative;
}

.stone-preview {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: 2px solid rgba(255,255,255,0.4);
    cursor: pointer;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}

/* 스킨 선택 드롭다운 */
.skin-dropdown {
    display: none;
    position: absolute;
    top: 45px;
    left: 0;
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
    padding: 15px;
    z-index: 200;
    width: 250px;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
}

.skin-dropdown.active { display: grid; }

.skin-item {
    width: 45px; height: 45px; border-radius: 8px; cursor: pointer; border: 2px solid #eee;
    background-size: contain; background-repeat: no-repeat; background-position: center;
}

/* 턴 표시기 */
.turn-indicator {
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 14px;
    background: rgba(255,255,255,0.1);
}

.active-turn {
    background: #FBFFF1;
    color: #3C3744;
    animation: turnPulse 1.5s infinite;
}

@keyframes turnPulse { 0%, 100% { opacity: 0.8; } 50% { opacity: 1; } }

/* 바둑판 컨테이너 */
.board-container {
    position: relative;
    background: #DEB887;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3), inset 0 0 100px rgba(0,0,0,0.1);
    border: 5px solid #8B4513;
}

#omogBoard {
    display: grid;
    grid-template-columns: repeat(19, 30px);
    grid-template-rows: repeat(19, 30px);
    cursor: pointer;
    position: relative;
    background-image: linear-gradient(#444 1px, transparent 1px), linear-gradient(90deg, #444 1px, transparent 1px);
    background-size: 30px 30px;
    background-position: 15px 15px;
    background-repeat: repeat;
    border: 1px solid #444;
}

.cell {
    width: 30px; height: 30px; position: relative !important;
    display: flex; align-items: center; justify-content: center;
}

.stone {
    position: absolute !important; width: 28px; height: 28px; border-radius: 50%; z-index: 3;
    box-shadow: 2px 3px 5px rgba(0,0,0,0.4); top: 50% !important; left: 50% !important;
    transform: translate(-50%, -50%) !important; background-size: contain; background-repeat: no-repeat; background-position: center;
    pointer-events: none;
}

.stone-ghost { opacity: 0.4; z-index: 2; display: none; }
.cell:hover .stone-ghost { display: block; }

/* 마지막 수 표시 */
.last-stone {
    box-shadow: 0 0 0 3px #FF0000, 2px 3px 5px rgba(0,0,0,0.4) !important;
    animation: lastStonePulse 1s infinite;
}

@keyframes lastStonePulse {
    0% { box-shadow: 0 0 0 2px #FF0000, 2px 3px 5px rgba(0,0,0,0.4); }
    50% { box-shadow: 0 0 0 5px #FF0000, 2px 3px 5px rgba(0,0,0,0.4); }
    100% { box-shadow: 0 0 0 2px #FF0000, 2px 3px 5px rgba(0,0,0,0.4); }
}

/* 오목 시작 버튼 (복구) */
.btn-start-large {
    background-color: #3C3744;
    color: white;
    border: none;
    padding: 18px 50px;
    border-radius: 8px;
    font-size: 1.3rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.btn-start-large:hover { background-color: #4A4453; transform: translateY(-2px); }

/* 게임 컨트롤 */
.game-controls { display: flex; align-items: center; gap: 15px; margin-top: 10px; }
.btn-omog { padding: 12px 30px; border-radius: 25px; border: none; font-weight: 700; cursor: pointer; background: #3C3744; color: white; transition: all 0.2s; }
.btn-omog.active { background: #FF6B6B; }

/* 화점 */
.cell.dot::after { content: ''; width: 6px; height: 6px; background: #444; border-radius: 50%; position: absolute; }

/* ================================================
   6.1인치 스마트폰 최적화
   ================================================ */

@media (max-width: 768px) {
    .omog-wrapper { padding: 10px; margin: 20px auto; }
    .game-info { padding: 10px; border-radius: 10px; }
    .player-status span { font-size: 11px; max-width: 50px; overflow: hidden; }
    #turnTimer { font-size: 16px !important; min-width: 45px !important; }
    .turn-indicator { font-size: 11px; padding: 3px 10px; }

    #omogBoard {
        grid-template-columns: repeat(19, 4.8vw);
        grid-template-rows: repeat(19, 4.8vw);
        background-size: 4.8vw 4.8vw;
        background-position: 2.4vw 2.4vw;
    }
    .cell { width: 4.8vw !important; height: 4.8vw !important; }
    .stone { width: 4.4vw !important; height: 4.4vw !important; }
    .btn-start-large { padding: 15px 40px; font-size: 1.1rem; }
    .game-controls { flex-direction: column; width: 100%; }
    .btn-omog { width: 100%; }

    /* 모바일 호버 효과 제거 */
    .stone-preview:hover { transform: none !important; border-color: rgba(255,255,255,0.4) !important; }
    .skin-item:hover { border-color: #eee !important; background-color: transparent !important; }
    .btn-omog:hover { transform: none !important; box-shadow: none !important; }
}
