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

:root {
    --primary-color: #e74c3c;
    --secondary-color: #ffcccb;
    --accent-color: #3498db;
    --background-color: #f8f9fa;
    --card-color: #ffffff;
    --text-color: #333;
    --light-text: #666;
    --shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

body {
    background-color: var(--background-color);
    color: var(--text-color);
    line-height: 1.6;
    padding: 20px;
    max-width: 1200px;
    margin: 0 auto;
}

header {
    text-align: center;
    margin-bottom: 40px;
    padding: 30px;
    background-color: var(--secondary-color);
    border-radius: 15px;
    box-shadow: var(--shadow);
}

h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    color: var(--primary-color);
}

.subtitle {
    font-size: 1.2rem;
    color: var(--light-text);
}

.game-container {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.section {
    background-color: var(--card-color);
    padding: 30px;
    border-radius: 15px;
    box-shadow: var(--shadow);
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.section.visible {
    opacity: 1;
    transform: translateY(0);
}

h2 {
    font-size: 1.8rem;
    margin-bottom: 20px;
    color: var(--primary-color);
    border-bottom: 2px solid #eee;
    padding-bottom: 10px;
}

.game-image-container {
    display: flex;
    justify-content: center;
    margin: 30px 0;
    text-align: center;
}

.game-image {
    max-width: 100%;
    height: auto;
    border-radius: 10px;
    box-shadow: var(--shadow);
}

.illustration {
    display: flex;
    justify-content: center;
    margin: 30px 0;
    position: relative;
}

.svg-container {
    width: 100%;
    max-width: 600px;
}

ol, ul {
    padding-left: 30px;
    margin-bottom: 20px;
}

li {
    margin-bottom: 10px;
}

.tip {
    background-color: #e8f4f8;
    padding: 15px;
    border-left: 5px solid var(--accent-color);
    border-radius: 5px;
    margin: 20px 0;
}

.notes {
    font-style: italic;
    color: var(--light-text);
    margin-top: 20px;
}

.icon {
    margin-right: 10px;
    vertical-align: middle;
}

/* 애니메이션 효과 */
@keyframes tickle {
    0% { transform: translate(0, 0); }
    25% { transform: translate(-5px, -2px); }
    50% { transform: translate(5px, 2px); }
    75% { transform: translate(-3px, -1px); }
    100% { transform: translate(0, 0); }
}

.tickle-hand {
    animation: tickle 1s ease-in-out infinite;
}

/* 버튼 스타일 */
.btn {
    display: inline-block;
    padding: 10px 20px;
    background-color: var(--primary-color);
    color: white;
    text-decoration: none;
    border-radius: 5px;
    font-weight: bold;
    transition: background-color 0.3s;
    cursor: pointer;
    margin-top: 20px;
    border: none;
}

.btn:hover {
    background-color: #c0392b;
}

/* 언어 전환 스타일 */
.lang-switch {
    position: fixed;
    top: 20px;
    right: 20px;
    background: white;
    padding: 8px 16px;
    border-radius: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    z-index: 100;
    display: flex;
    gap: 10px;
}

.lang-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-weight: bold;
    padding: 4px 8px;
    border-radius: 4px;
    transition: background-color 0.3s, color 0.3s;
    color: var(--primary-color);
}

.lang-btn.active {
    background-color: var(--primary-color);
    color: white;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

/* 로딩 애니메이션 */
.loading {
    display: flex;
    justify-content: center;
    align-items: center;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(255, 255, 255, 0.9);
    z-index: 1000;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 5px solid var(--primary-color);
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* 모바일 대응 */
@media (max-width: 768px) {
    h1 {
        font-size: 2rem;
    }

    h2 {
        font-size: 1.5rem;
    }

    .section {
        padding: 20px;
    }
    
    .lang-switch {
        top: 10px;
        right: 10px;
        padding: 5px 10px;
    }
}