

/* ================================== */
/* 1. 기본 설정 및 공통 스타일 */
/* ================================== */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    scroll-behavior: smooth; 
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f4f7f9;
    color: #333;
    line-height: 1.6;
}

/* ================================== */
/* 2. HEADER 스타일 (홈 로고 이미지 및 홈 버튼 적용) */
/* ================================== */
header {
    background-color: #007bff; 
    color: white;
    padding: 30px 20px; 
    text-align: center;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    position: relative; /* 홈 버튼 absolute 배치를 위해 */
}

.home-link {
    text-decoration: none; 
    color: inherit; 
    display: block; 
}

.header-logo-img {
    max-width: 100px; 
    height: auto;
    display: block; 
    margin: 0 auto 10px auto; 
}

header h1 { 
    display: none; /* 이미지가 로고를 대체하므로 숨김 */
}

header p {
    font-size: 1.1em;
    opacity: 0.9;
    margin-top: 10px; 
}

/* 🎯 새로 추가된 홈 버튼 스타일 */
.home-button {
    display: inline-block;
    background-color: #28a745; /* 녹색 계열 버튼 */
    color: white;
    padding: 10px 20px;
    border-radius: 25px;
    text-decoration: none;
    font-weight: bold;
    font-size: 0.9em;
    margin-right: 20px; /* 로고와 JOSHUA 텍스트 아래에 배치 */
    transition: background-color 0.3s, transform 0.2s;
    box-shadow: 0 3px 6px rgba(0,0,0,0.15);
    position: absolute;
    top: 20px;
    left: 20px;
    margin-top: 0;

    /* 헤더의 오른쪽 상단에 고정하고 싶다면 (선택적) */
    /*
    position: absolute;
    top: 20px;
    right: 20px;
    margin-top: 0;
    */
}

.home-button:hover {
    background-color: #218838;
    transform: translateY(-2px);
}

/* 3. 메인 콘텐츠 스타일링 */
.menu-container {
    background-color: #ffffff;
    width: 90%;
    max-width: 700px;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.1);
    margin: auto;
    text-align: center;
    border: 1px solid #ddd;

}

.menu-container h3 {
    font-size: 1.5em;
    color: #483d8b;
    margin-bottom: 30px;
}

/* 4. 게임 버튼 영역 (사용자 선택) */
.game-buttons {
    display: flex;
    justify-content: space-around;
    align-items: center;
    margin-bottom: 40px;
    gap: 20px;
    padding: 20px 0;
    border-bottom: 2px dashed #e0e0e0;
}

.choice-img {
    width: 120px;
    height: 120px;
    object-fit: contain;
    cursor: pointer;
    border: 5px solid transparent;
    border-radius: 15px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.choice-img:hover {
    border-color: #ffb84d;
    transform: scale(1.1);
    box-shadow: 0 8px 20px rgba(255, 184, 77, 0.5);
}

/* 선택된 이미지를 강조하는 스타일 (JavaScript에서 클래스 추가) */
.choice-img.selected {
    border-color: #6a5acd !important; /* 보라색 테두리로 강조 */
    transform: scale(1.1); 
    box-shadow: 0 8px 20px rgba(106, 90, 205, 0.7) !important;
}

/* 5. 결과 표시 영역 */
.result-box {
    padding: 20px 0;
    text-align: center;
}

.result-box h4 {
    margin-bottom: 20px;
    font-size: 1.3em;
    color: #333;
}

/* 대결 표시 영역 (나 vs 컴퓨터) */
.matchup-display {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 30px;
    margin-bottom: 30px;
}

.player-container {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.player-container .label {
    font-weight: 600;
    color: #6a5acd;
    margin-bottom: 10px;
    font-size: 1.1em;
}

.result-img { /* 사용자 및 컴퓨터 결과 이미지 스타일 통일 */
    width: 120px;
    height: 120px;
    border: 2px solid #a9a9a9;
    border-radius: 15px;
    object-fit: contain;
    background-color: #f0f8ff;
    transition: border-color 0.5s;
}

.vs-text {
    font-size: 2.5em;
    font-weight: 900;
    color: #ff6347;
    animation: pulse 1s infinite alternate;
}

@keyframes pulse {
    from { transform: scale(1.0); }
    to { transform: scale(1.1); }
}

/* 최종 결과 메시지 */
#game-result {
    font-size: 2.5em; /* 결과창 크기를 더 키움 */
    font-weight: 900;
    margin-top: 25px;
    padding: 15px 30px;
    border-radius: 10px;
    display: inline-block;
    letter-spacing: 1px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
    transition: background-color 0.5s, color 0.5s;
    min-width: 300px; /* 결과창의 최소 너비 확보 */
}

/* 승패 결과에 따른 색상 */
.win {
    color: #ffffff;
    background-color: #3cb371; /* 승리 - 녹색 */
}

.lose {
    color: #ffffff;
    background-color: #ff6347; /* 패배 - 빨간색 */
}

.draw {
    color: #333;
    background-color: #ffb84d; /* 비김 - 주황색 */
}