:root {
    --primary-color: #8B0000;
    --secondary-color: #333;
    --background-color: #f5f5f5;
    --accent-color: #5D4037;
    --text-color: #222;
    --section-color: #fff;
    --shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    --hover-shadow: 0 8px 16px rgba(0, 0, 0, 0.3);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Noto Sans KR', 'Malgun Gothic', sans-serif;
}

body {
    background-color: var(--background-color);
    color: var(--text-color);
    line-height: 1.6;
    padding: 0;
    margin: 0;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

header {
    background-color: var(--primary-color);
    color: white;
    padding: 30px 0;
    text-align: center;
    margin-bottom: 30px;
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow);
}

header h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

header p.subtitle {
    font-size: 1.2rem;
    max-width: 800px;
    margin: 0 auto 15px;
}

.language-toggle {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.4);
    padding: 8px 15px;
    border-radius: 20px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 10;
}

.language-toggle:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

.header-icons {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    opacity: 0.1;
    z-index: 0;
}

.section {
    background-color: var(--section-color);
    border-radius: 10px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: var(--shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.section:hover {
    transform: translateY(-5px);
    box-shadow: var(--hover-shadow);
}

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

.materials {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin: 20px 0;
}

.material {
    flex: 1;
    min-width: 200px;
    text-align: center;
    padding: 20px;
    background-color: rgba(255, 255, 255, 0.7);
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.material:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    background-color: rgba(255, 255, 255, 0.9);
}

.material-icon {
    font-size: 2.5rem;
    margin-bottom: 15px;
    color: var(--accent-color);
    transition: transform 0.3s ease;
}

.material:hover .material-icon {
    transform: scale(1.2);
}

.material-name {
    font-weight: bold;
    margin-bottom: 8px;
    color: var(--secondary-color);
    font-size: 1.1rem;
}

.steps {
    counter-reset: step-counter;
    margin: 20px 0;
}

.step {
    display: flex;
    margin-bottom: 30px;
    position: relative;
    padding-left: 40px;
    transition: transform 0.2s ease;
}

.step:hover {
    transform: translateX(5px);
}

.step:before {
    counter-increment: step-counter;
    content: counter(step-counter);
    position: absolute;
    left: 0;
    width: 30px;
    height: 30px;
    background-color: var(--primary-color);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    transition: transform 0.2s ease;
}

.step:hover:before {
    transform: scale(1.1);
}

.step-content {
    flex: 1;
}

.step-title {
    font-weight: bold;
    font-size: 1.2rem;
    margin-bottom: 10px;
    color: var(--accent-color);
}

.game-visual {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 30px 0;
}

.game-image {
    width: 100%;
    max-width: 600px;
    margin: 20px auto;
    display: block;
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease;
}

.game-image:hover {
    transform: scale(1.02);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.3);
}

.svg-container {
    width: 100%;
    max-width: 600px;
    margin-bottom: 20px;
    filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.2));
}

svg {
    width: 100%;
    height: auto;
}

.tips {
    background-color: #FFF3E0;
    border-left: 4px solid #FF9800;
    padding: 15px;
    margin: 20px 0;
    border-radius: 4px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.tips:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 10px rgba(255, 152, 0, 0.2);
    background-color: #FFE0B2;
}

.tips h3 {
    color: #E65100;
    margin-bottom: 10px;
    font-size: 1.2rem;
}

.tips ul {
    padding-left: 20px;
}

.tips li {
    margin-bottom: 8px;
    transition: transform 0.2s ease;
}

.tips li:hover {
    transform: translateX(3px);
}

footer {
    background-color: var(--secondary-color);
    color: white;
    text-align: center;
    padding: 20px 0;
    margin-top: 40px;
}

.button {
    display: inline-block;
    background-color: var(--primary-color);
    color: white;
    padding: 10px 20px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: bold;
    margin-top: 20px;
    transition: all 0.3s ease;
}

.button:hover {
    background-color: #6B0000;
    transform: translateY(-3px);
    box-shadow: 0 4px 8px rgba(139, 0, 0, 0.3);
}

.recommend-button {
    display: inline-block;
    background-color: #FF5722;
    color: white;
    padding: 8px 15px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: bold;
    margin-top: 10px;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.recommend-button:hover {
    background-color: #E64A19;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(255, 87, 34, 0.3);
}

/* Animation keyframes */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes bounceIn {
    0% {
        transform: scale(0.3);
        opacity: 0;
    }
    50% {
        transform: scale(1.05);
        opacity: 0.9;
    }
    70% {
        transform: scale(0.9);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.fade-in {
    animation: fadeIn 1s ease-out forwards;
    opacity: 0;
}

.bounce-in {
    animation: bounceIn 0.8s ease-out forwards;
    opacity: 0;
}

.delay-1 { animation-delay: 0.2s; }
.delay-2 { animation-delay: 0.4s; }
.delay-3 { animation-delay: 0.6s; }
.delay-4 { animation-delay: 0.8s; }

/* Mobile optimization */
@media (max-width: 768px) {
    header h1 {
        font-size: 2rem;
    }
    
    header p.subtitle {
        font-size: 1.1rem;
    }
    
    .language-toggle {
        top: 15px;
        right: 15px;
        padding: 6px 12px;
        font-size: 0.8rem;
    }

    .section {
        padding: 20px;
    }

    .materials {
        flex-direction: column;
    }

    .material {
        min-width: 100%;
    }

    .step {
        padding-left: 30px;
    }

    .step:before {
        width: 25px;
        height: 25px;
        font-size: 0.9rem;
    }
    
    h2 {
        font-size: 1.6rem;
    }
}

@media (max-width: 480px) {
    header h1 {
        font-size: 1.8rem;
    }
    
    header p.subtitle {
        font-size: 1rem;
    }
    
    .section {
        padding: 15px;
    }
    
    h2 {
        font-size: 1.4rem;
    }
    
    .material-icon {
        font-size: 2rem;
    }
    
    .material-name {
        font-size: 1rem;
    }
    
    .step-title {
        font-size: 1.1rem;
    }
    
    .tips h3 {
        font-size: 1.1rem;
    }
}