/* 오목 게임 CSS */

.omok-body {
    margin: 0;
    padding: 0;
    background: #2C3E50;
    font-family: 'Noto Sans KR', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    color: #fff;
    min-height: 100vh;
}

/* 오목 헤더 */
.omok-header {
    background: linear-gradient(135deg, #8B4513 0%, #A0522D 100%);
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
    padding: 12px 20px;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.omok-header-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.omok-header h1 {
    margin: 0;
    font-size: 24px;
    font-weight: 700;
    color: #fff;
    flex: 1;
    text-align: center;
}

.btn-back {
    color: white;
    text-decoration: none;
    font-size: 18px;
    font-weight: 600;
    padding: 8px 12px;
    border-radius: 8px;
    transition: background 0.2s;
}

.btn-back:hover {
    background: rgba(255, 255, 255, 0.1);
}

.game-info {
    font-size: 16px;
    font-weight: 600;
    color: #FFD700;
}

/* 오목 컨테이너 */
.omok-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    display: flex;
    gap: 20px;
    align-items: flex-start;
}

/* 게임 보드 컨테이너 */
.omok-board-container {
    flex: 1;
    position: relative;
    background: #34495E;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    min-height: 500px;
    display: flex;
    align-items: center;
    justify-content: center;
}

#omokBoard {
    display: block;
    background: #DEB887;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
    cursor: pointer;
}

/* 게임 오버레이 */
.game-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    border-radius: 12px;
}

.game-overlay.hidden {
    display: none !important;
}

.hidden {
    display: none !important;
    visibility: hidden !important;
}

.overlay-content {
    background: linear-gradient(135deg, #2C3E50 0%, #34495E 100%);
    border-radius: 16px;
    padding: 40px;
    text-align: center;
    box-shadow: 0 10px 40px rgba(0,0,0,0.5);
    max-width: 400px;
    width: 90%;
}

.overlay-content h2 {
    margin: 0 0 16px 0;
    font-size: 32px;
    color: #fff;
}

.overlay-content p {
    margin: 0 0 24px 0;
    font-size: 16px;
    color: #ddd;
}

.player-name-input {
    margin: 20px 0;
    text-align: left;
}

.player-name-input label {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
    color: #ddd;
}

.player-name-input input {
    width: 100%;
    padding: 12px;
    border: 2px solid #555;
    border-radius: 8px;
    background: #1a1a1a;
    color: #fff;
    font-size: 16px;
    font-family: 'Noto Sans KR', sans-serif;
    box-sizing: border-box;
}

/* 게임 모드 선택 */
.game-mode-select {
    display: flex;
    gap: 12px;
    margin: 20px 0;
}

.mode-btn {
    flex: 1;
    padding: 12px;
    background: rgba(255,255,255,0.1);
    color: #ddd;
    border: 2px solid #555;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Noto Sans KR', sans-serif;
}

.mode-btn:hover {
    background: rgba(255,255,255,0.2);
    border-color: #4CAF50;
}

.mode-btn.active {
    background: linear-gradient(135deg, #4CAF50 0%, #45a049 100%);
    border-color: #4CAF50;
    color: #fff;
}

.btn-start,
.btn-restart {
    padding: 14px 32px;
    background: linear-gradient(135deg, #4CAF50 0%, #45a049 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 18px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Noto Sans KR', sans-serif;
    margin-top: 16px;
}

.btn-start:hover,
.btn-restart:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(76, 175, 80, 0.4);
}

.btn-start:active,
.btn-restart:active {
    transform: translateY(0);
}

.game-actions {
    display: flex;
    gap: 12px;
    margin-top: 24px;
}

.btn-home {
    flex: 1;
    padding: 14px 32px;
    background: rgba(255,255,255,0.1);
    color: white;
    border: 2px solid #555;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    text-decoration: none;
    text-align: center;
    transition: all 0.3s ease;
    font-family: 'Noto Sans KR', sans-serif;
}

.btn-home:hover {
    background: rgba(255,255,255,0.2);
    border-color: #4CAF50;
}

/* 사이드바 */
.omok-sidebar {
    width: 280px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* 정보 패널 */
.info-panel,
.players-panel,
.history-panel {
    background: linear-gradient(135deg, #34495E 0%, #2C3E50 100%);
    border-radius: 12px;
    padding: 16px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

.info-panel h3,
.players-panel h3,
.history-panel h3 {
    margin: 0 0 12px 0;
    font-size: 18px;
    font-weight: 700;
    color: #fff;
    border-bottom: 2px solid #4CAF50;
    padding-bottom: 8px;
}

.info-item {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.info-item:last-child {
    border-bottom: none;
}

.info-item span {
    color: #ddd;
    font-size: 14px;
}

.info-item strong {
    color: #4CAF50;
    font-size: 16px;
}

.info-item strong.black-turn {
    color: #000;
    background: #fff;
    padding: 2px 8px;
    border-radius: 4px;
}

.info-item strong.white-turn {
    color: #333;
    background: #fff;
    padding: 2px 8px;
    border-radius: 4px;
}

/* 플레이어 패널 */
.player-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    margin-bottom: 8px;
    background: rgba(0,0,0,0.2);
    border-radius: 8px;
}

.player-item.black-player {
    border-left: 4px solid #000;
}

.player-item.white-player {
    border-left: 4px solid #fff;
}

.stone-preview {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    flex-shrink: 0;
}

.black-stone {
    background: radial-gradient(circle at 30% 30%, #666, #000);
    box-shadow: inset -2px -2px 4px rgba(0,0,0,0.5);
}

.white-stone {
    background: radial-gradient(circle at 30% 30%, #fff, #ddd);
    box-shadow: inset -2px -2px 4px rgba(0,0,0,0.2);
    border: 1px solid #999;
}

.player-item span {
    font-size: 14px;
    color: #ddd;
    font-weight: 500;
}

/* 기록 패널 */
.move-history {
    max-height: 300px;
    overflow-y: auto;
    background: rgba(0,0,0,0.2);
    border-radius: 8px;
    padding: 8px;
}

.move-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px;
    margin-bottom: 4px;
    background: rgba(255,255,255,0.05);
    border-radius: 4px;
    font-size: 12px;
}

.move-number {
    color: #999;
    font-weight: 600;
    min-width: 24px;
}

.move-stone {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    flex-shrink: 0;
}

.move-position {
    color: #ddd;
    font-family: monospace;
}

/* 반응형 디자인 */
@media (max-width: 1024px) {
    .omok-container {
        flex-direction: column;
    }
    
    .omok-sidebar {
        width: 100%;
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 16px;
    }
    
    .history-panel {
        grid-column: 1 / -1;
    }
}

@media (max-width: 768px) {
    .omok-header h1 {
        font-size: 18px;
    }
    
    .omok-container {
        padding: 12px;
    }
    
    .omok-board-container {
        padding: 12px;
        min-height: 400px;
    }
    
    .omok-sidebar {
        grid-template-columns: 1fr;
    }
    
    .overlay-content {
        padding: 24px;
    }
    
    .overlay-content h2 {
        font-size: 24px;
    }
}

/* 스크롤바 스타일 */
.move-history::-webkit-scrollbar {
    width: 6px;
}

.move-history::-webkit-scrollbar-track {
    background: rgba(0,0,0,0.2);
    border-radius: 3px;
}

.move-history::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.3);
    border-radius: 3px;
}

.move-history::-webkit-scrollbar-thumb:hover {
    background: rgba(255,255,255,0.5);
}

