/* mugunghwaGame.css */

/* 폰트 설정 */
@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+KR:wght@300;400;500;700&display=swap');

/* 전체 스타일 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Noto Sans KR', sans-serif;
}

body {
    background-color: #f9f5ff;
    color: #333;
    line-height: 1.6;
    overflow-x: hidden;
}

/* 헤더 스타일 */
header {
    background: linear-gradient(135deg, #ff6b6b, #f071c6);
    color: white;
    text-align: center;
    padding: 2.5rem 1rem;
    position: relative;
    overflow: hidden;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
}

h1 {
    font-size: 2.5rem;
    margin-bottom: 0.8rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
    position: relative;
    z-index: 2;
}

.header-subtitle {
    font-size: 1.2rem;
    opacity: 0.9;
    position: relative;
    z-index: 2;
    margin-bottom: 0.5rem;
}

.flower-icon {
    position: absolute;
    opacity: 0.2;
    width: 80px;
    height: 80px;
}

.flower-1 {
    top: 10%;
    left: 10%;
    transform: rotate(15deg);
}

.flower-2 {
    bottom: 10%;
    right: 15%;
    transform: rotate(-10deg);
}

/* 컨테이너 스타일 */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

/* 섹션 스타일 */
section {
    background-color: white;
    border-radius: 12px;
    padding: 2.5rem;
    margin-bottom: 2.5rem;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

section:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

h2 {
    color: #ff6b6b;
    margin-bottom: 1.5rem;
    font-size: 1.8rem;
    display: flex;
    align-items: center;
    border-bottom: 2px solid #f3f3f3;
    padding-bottom: 0.8rem;
}

h2 svg {
    margin-right: 10px;
}

p {
    margin-bottom: 1.2rem;
    font-size: 1.1rem;
    line-height: 1.7;
}

/* 게임 규칙 리스트 */
.rule-list {
    list-style-type: none;
    margin: 1.5rem 0;
}

.rule-item {
    display: flex;
    margin-bottom: 1.8rem;
    align-items: flex-start;
    transition: transform 0.2s ease;
}

.rule-item:hover {
    transform: translateX(5px);
}

.rule-number {
    background-color: #ff6b6b;
    color: white;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-right: 15px;
    flex-shrink: 0;
    font-weight: bold;
    box-shadow: 0 3px 6px rgba(255, 107, 107, 0.2);
}

.rule-text {
    flex: 1;
    padding-top: 5px;
}

.rule-text strong {
    color: #555;
    display: inline-block;
    margin-bottom: 0.3rem;
}

/* 게임 일러스트레이션 */
.game-illustration {
    width: 100%;
    margin: 2.5rem 0;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
    position: relative;
    height: 400px;
    background: #f4f8fc;
    transition: transform 0.3s ease;
}

.game-illustration:hover {
    transform: scale(1.02);
}

/* SVG 애니메이션 */
.gamesvg {
    width: 100%;
    height: 100%;
    overflow: visible;
}

/* 팁 박스 스타일 */
.tips-box {
    background-color: #fff8e6;
    border-left: 4px solid #ffd166;
    padding: 1.8rem;
    margin: 2.5rem 0;
    border-radius: 0 8px 8px 0;
    box-shadow: 0 4px 10px rgba(255, 209, 102, 0.1);
}

.tips-title {
    color: #e67700;
    display: flex;
    align-items: center;
    margin-bottom: 1.2rem;
    font-weight: bold;
    font-size: 1.2rem;
}

.tips-title svg {
    margin-right: 10px;
}

.tips-box ul {
    padding-left: 1.5rem;
}

.tips-box ul li {
    margin-bottom: 0.8rem;
    line-height: 1.6;
    position: relative;
}

.tips-box ul li::before {
    content: "•";
    color: #ffd166;
    font-weight: bold;
    display: inline-block;
    width: 1em;
    margin-left: -1em;
}

/* 언어 선택기 */
.language-selector {
    position: absolute;
    top: 15px;
    right: 15px;
    z-index: 100;
    display: flex;
    align-items: center;
    background-color: rgba(255, 255, 255, 0.2);
    padding: 5px 10px;
    border-radius: 20px;
}

.language-btn {
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    font-weight: bold;
    padding: 5px 10px;
    border-radius: 15px;
    transition: background-color 0.3s;
}

.language-btn.active {
    background-color: rgba(255, 255, 255, 0.3);
}

.language-btn:hover {
    background-color: rgba(255, 255, 255, 0.4);
}

/* 푸터 스타일 */
footer {
    background-color: #333;
    color: #ddd;
    text-align: center;
    padding: 2rem;
    margin-top: 3rem;
    box-shadow: 0 -3px 10px rgba(0, 0, 0, 0.1);
}

/* 반응형 디자인 */
@media (max-width: 768px) {
    h1 {
        font-size: 2rem;
    }

    .container {
        padding: 1.2rem;
    }

    section {
        padding: 1.8rem;
    }

    .game-illustration {
        height: 300px;
    }
    
    .language-selector {
        top: 10px;
        right: 10px;
    }
}

@media (max-width: 480px) {
    h1 {
        font-size: 1.8rem;
    }

    h2 {
        font-size: 1.5rem;
    }

    p {
        font-size: 1rem;
    }

    .game-illustration {
        height: 250px;
    }
    
    section {
        padding: 1.5rem;
    }
    
    .rule-item {
        flex-direction: column;
    }
    
    .rule-number {
        margin-bottom: 10px;
    }
}

/* 플레이어 스타일 (SVG용) */
.player {
    transition: transform 0.3s ease;
}

.tagger {
    fill: #ff6b6b;
}

.person {
    fill: #74c0fc;
}

.loser {
    fill: #ffa94d;
}

.caught {
    fill: #ff8787;
}

/* 애니메이션 스타일 */
@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.7; }
    100% { opacity: 1; }
}

.pulse {
    animation: pulse 2s infinite;
}

/* 무궁화 애니메이션 */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.spin {
    animation: spin 20s linear infinite;
}

/* 전환 효과 */
.transition {
    transition: all 0.5s ease;
}

/* 인터랙티브 버튼 */
.demo-button {
    background-color: #ff6b6b;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 30px;
    font-weight: bold;
    cursor: pointer;
    margin-top: 20px;
    transition: all 0.3s ease;
    display: block;
    margin: 0 auto;
    font-size: 1.1rem;
    box-shadow: 0 4px 10px rgba(255, 107, 107, 0.3);
}

.demo-button:hover {
    background-color: #ff8787;
    transform: translateY(-3px);
    box-shadow: 0 6px 15px rgba(255, 107, 107, 0.4);
}

.demo-button:active {
    transform: translateY(0);
    box-shadow: 0 2px 5px rgba(255, 107, 107, 0.3);
}

.caught-animation {
    animation: shake 0.5s ease-in-out;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); }
    20%, 40%, 60%, 80% { transform: translateX(5px); }
}

.loser-mark {
    opacity: 0;
    transition: opacity 0.5s ease;
}

.show-mark {
    opacity: 1;
}

/* 다크 모드 지원 */
@media (prefers-color-scheme: dark) {
    body {
        background-color: #1a1a2e;
        color: #e6e6e6;
    }
    
    section {
        background-color: #252541;
        box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    }
    
    h2 {
        border-bottom-color: #333355;
    }
    
    .game-illustration {
        background: #2a2a45;
    }
    
    .tips-box {
        background-color: #332b1a;
    }
}
