/* 1. 기본 스타일 (Reset & Typography & Layout) */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Malgun Gothic', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: #e6e6fa; /* 연한 라벤더 배경색 */
    color: #333;
    line-height: 1.6;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 100vh;
    padding: 30px 0;
}

/* 2. 헤더 스타일링 */
header {
    background-color: #ffffff;
    width: 90%;
    max-width: 700px; /* 최대 너비 확장 */
    padding: 25px 30px;
    margin-bottom: 30px;
    border-radius: 15px; /* 모서리를 더 둥글게 */
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.1); /* 그림자 강화 */
    text-align: center;
}

header h2 {
    color: #6a5acd; /* 보라색 계열 제목 */
    font-size: 2em;
    margin-bottom: 5px;
    letter-spacing: -0.5px;
}

header p {
    color: #9370db; /* 연한 보라색 부제목 */
    font-size: 1.1em;
    font-style: italic;
    margin-bottom: 15px;
}

.home-button {
    display: inline-block;
    text-decoration: none;
    background-color: #3cb371; /* 미디엄 씨 그린 색상 */
    color: white;
    padding: 10px 25px;
    border-radius: 25px; /* 알약 모양 버튼 */
    font-weight: bold;
    transition: background-color 0.3s ease, transform 0.2s ease;
    border: none;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.home-button:hover {
    background-color: #2e8b57;
    transform: translateY(-3px);
}

/* 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-bottom: 30px;
    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);
    
}
/* 선택된 이미지를 강조하는 스타일 */
.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;
}

#user-choice { /* 사용자 선택 텍스트 영역 */
    font-size: 1.5em;
    font-weight: bold;
    min-width: 120px;
    height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #f0f8ff; /* 앨리스 블루 배경 */
    border: 2px solid #a9a9a9;
    border-radius: 15px;
    transition: background-color 0.5s;
}

.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; /* VS 텍스트 강조 */
    font-weight: 900;
    color: #ff6347; /* 토마토 색상 */
    animation: pulse 1s infinite alternate; /* VS 텍스트 애니메이션 */
}

@keyframes pulse {
    from { transform: scale(1.0); }
    to { transform: scale(1.1); }
}

/* 최종 결과 메시지 */
#game-result {
    font-size: 2em;
    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;
}

/* 승패 결과에 따른 색상 (더 밝고 눈에 띄게) */
.win {
    color: #ffffff;
    background-color: #3cb371; /* 승리 - 녹색 */
}

.lose {
    color: #ffffff;
    background-color: #ff6347; /* 패배 - 빨간색 */
}

.draw {
    color: #333;
    background-color: #ffb84d; /* 비김 - 주황색 */
}