@font-face {
    font-family: 'CookieRun-Regular';
    src: url('https://fastly.jsdelivr.net/gh/projectnoonnu/noonfonts_2001@1.1/CookieRun-Regular.woff') format('woff');
    font-weight: normal;
    font-style: normal;
}

/* 기본 스타일 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'CookieRun-Regular';
}

body {
    background-color: #f9f7ff;
    color: #333;
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
}

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

/* 헤더 스타일 */
.header {
    text-align: center;
    margin-bottom: 30px;
    position: relative;
}

.rainbow-border {
    height: 6px;
    background: linear-gradient(90deg, 
        #ff0000, #ff7f00, #ffff00, #00ff00, 
        #0000ff, #4b0082, #8b00ff);
    border-radius: 3px;
    margin-bottom: 20px;
}

.title {
    font-size: 2.5rem;
    color: #6a5acd;
    margin-bottom: 10px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.subtitle {
    font-size: 1.2rem;
    color: #666;
	background: #fff;
    padding: 10px;
    border-radius: 10px;
    border: 3px dotted #3537ce;
}

/* 게임 카드 스타일 */
.games-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}

.game-card {
    background-color: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s, box-shadow 0.3s;
}

.game-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
}

.game-image {
    height: 180px;
    position: relative;
    overflow: hidden;
}

.puzzle-img {
    background: linear-gradient(135deg, #6a5acd, #9370db);
}

.memory-img {
    background: linear-gradient(135deg, #20b2aa, #5f9ea0);
}

.draw-img {
    background: linear-gradient(135deg, #ff7f50, #ff6347);
}

.quiz-img {
    background: linear-gradient(135deg, #ffa500, #ff8c00);
}

.wordsearch-img {
    background: linear-gradient(135deg, #9c27b0, #ba68c8);
}

.math-img {
    background: linear-gradient(135deg, #4CAF50, #8BC34A);
}
.pattern-img {
    background: linear-gradient(45deg, #21ba6b, #FFEB3B);
}

.stars {
    position: absolute;
    top: 10px;
    left: 10px;
    color: #fff;
    text-shadow: 0 0 3px rgba(0, 0, 0, 0.3);
}

.difficulty {
    position: absolute;
    bottom: 10px;
    right: 10px;
    background-color: rgba(255, 255, 255, 0.2);
    padding: 5px 10px;
    border-radius: 15px;
    color: white;
    font-size: 0.8rem;
    backdrop-filter: blur(5px);
}

.difficulty.puzzle {
    background-color: rgba(106, 90, 205, 0.3);
}

.difficulty.memory {
    background-color: rgba(32, 178, 170, 0.3);
}

.difficulty.draw {
    background-color: rgba(255, 127, 80, 0.3);
}

.difficulty.quiz {
    background-color: rgba(255, 165, 0, 0.3);
}

.difficulty.wordsearch {
    background-color: rgba(156, 39, 176, 0.3);
}

.difficulty.math {
    background-color: rgba(76, 175, 80, 0.3);
}

.game-info {
    padding: 20px;
}

.game-title {
    font-size: 1.5rem;
    margin-bottom: 15px;
    
    align-items: center;
}

.game-title .icon {
    margin-right: 10px;
    font-size: 1.8rem;
}

.game-title.puzzle {
    color: #6a5acd;
}

.game-title.memory {
    color: #20b2aa;
}

.game-title.draw {
    color: #ff7f50;
}

.game-title.quiz {
    color: #ffa500;
}

.game-title.wordsearch {
    color: #9c27b0;
}

.game-title.math {
    color: #4CAF50;
}
.game-title.pattern  {
    color: #0a713c;
}

.difficulty.pattern {
color: #fff;
}

.game-description {
    color: #666;
    font-size: 0.95rem;
    line-height: 1.5;
    margin-bottom: 20px;
}

.play-button {
    display: inline-block;
    padding: 10px 20px;
    border-radius: 30px;
    color: white;
    font-weight: bold;
    text-decoration: none;
    transition: all 0.3s;
}

.play-button.puzzle {
    background-color: #6a5acd;
}

.play-button.memory {
    background-color: #20b2aa;
}

.play-button.draw {
    background-color: #ff7f50;
}

.play-button.quiz {
    background-color: #ffa500;
}

.play-button.wordsearch {
    background-color: #9c27b0;
}

.play-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2);
}

.play-button.puzzle:hover {
    background-color: #5949b9;
}

.play-button.memory:hover {
    background-color: #1c9e97;
}

.play-button.draw:hover {
    background-color: #ff6a3c;
}

.play-button.quiz:hover {
    background-color: #ff9500;
}

.play-button.wordsearch:hover {
    background-color: #7b1fa2;
}

.play-button.math {
    background-color: #4CAF50;
}

.play-button.math:hover {
    background-color: #388E3C;
}

.play-button.pattern {
    background-color: #0a713c;
}

.play-button.pattern:hover {
    background-color: #5949b9;
}

/* 푸터 스타일 */
.footer {
    text-align: center;
    padding: 20px 0;
    color: #888;
    font-size: 0.9rem;
}

/* 스플래시 화면 */
.splash-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #6a5acd;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.5s ease-out;
}

.splash-icon {
    font-size: 4rem;
    margin-bottom: 20px;
    animation: bounce 2s infinite;
}

.splash-title {
    color: white;
    font-size: 2.5rem;
    margin-bottom: 10px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.splash-subtitle {
    color: #e0e0ff;
    font-size: 1.2rem;
    margin-bottom: 30px;
}

.loading-bar {
    width: 200px;
    height: 10px;
    background-color: rgba(255, 255, 255, 0.2);
    border-radius: 5px;
    overflow: hidden;
}

.loading-progress {
    height: 100%;
    width: 0%;
    background-color: white;
    border-radius: 5px;
    transition: width 3s cubic-bezier(0.1, 0.5, 0.5, 1);
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-20px);
    }
    60% {
        transform: translateY(-10px);
    }
}

/* 장식 요소 */
.floating-element {
    position: fixed;
    z-index: -1;
    animation: float 15s ease-in-out infinite alternate;
    opacity: 0.1;
}

.floating-star {
    top: 10%;
    left: 5%;
    width: 60px;
    height: 60px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%236a5acd'%3E%3Cpath d='M12 2l3.09 6.26L22 9.27l-5 4.87 1.18 6.88L12 17.77l-6.18 3.25L7 14.14 2 9.27l6.91-1.01L12 2z'/%3E%3C/svg%3E") no-repeat center/contain;
}

.floating-ball {
    top: 70%;
    right: 10%;
    width: 80px;
    height: 80px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23ff7f50'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3C/svg%3E") no-repeat center/contain;
}

.floating-block {
    top: 40%;
    left: 10%;
    width: 70px;
    height: 70px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%2320b2aa'%3E%3Crect x='2' y='2' width='20' height='20' rx='2'/%3E%3C/svg%3E") no-repeat center/contain;
}

.floating-puzzle {
    top: 20%;
    right: 15%;
    width: 70px;
    height: 70px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23ffa500'%3E%3Cpath d='M4 11h4c0.6 0 1-0.4 1-1V6c0-0.6-0.4-1-1-1H4C3.4 5 3 5.4 3 6v4C3 10.6 3.4 11 4 11zM20 5h-4c-0.6 0-1 0.4-1 1v4c0 0.6 0.4 1 1 1h4c0.6 0 1-0.4 1-1V6C21 5.4 20.6 5 20 5zM4 21h4c0.6 0 1-0.4 1-1v-4c0-0.6-0.4-1-1-1H4c-0.6 0-1 0.4-1 1v4C3 20.6 3.4 21 4 21zM20 15h-4c-0.6 0-1 0.4-1 1v4c0 0.6 0.4 1 1 1h4c0.6 0 1-0.4 1-1v-4C21 15.4 20.6 15 20 15z'/%3E%3C/svg%3E") no-repeat center/contain;
}

.floating-wordsearch {
    top: 35%;
    right: 20%;
    width: 70px;
    height: 70px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%239c27b0'%3E%3Cpath d='M5 3h14c1.1 0 2 .9 2 2v14c0 1.1-.9 2-2 2H5c-1.1 0-2-.9-2-2V5c0-1.1.9-2 2-2m5.5 10H9v4h1.5v-1.5h2V17H14v-4h-1.5v1h-2v-1m0-1.5h2v-1h-2V10M10 5.5v2h4v-2h-4z'/%3E%3C/svg%3E") no-repeat center/contain;
}

/* 수학 게임 떠다니는 요소 */
.floating-math {
    top: 55%;
    left: 15%;
    width: 65px;
    height: 65px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%234CAF50'%3E%3Cpath d='M19 3H5C3.9 3 3 3.9 3 5v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-4 8c0 .55-.45 1-1 1h-2v2c0 .55-.45 1-1 1s-1-.45-1-1v-2H8c-.55 0-1-.45-1-1s.45-1 1-1h2V8c0-.55.45-1 1-1s1 .45 1 1v2h2c.55 0 1 .45 1 1z'/%3E%3C/svg%3E") no-repeat center/contain;
}

@keyframes float {
    0% {
        transform: translate(0, 0) rotate(0deg);
    }
    50% {
        transform: translate(20px, 20px) rotate(5deg);
    }
    100% {
        transform: translate(-20px, -15px) rotate(-5deg);
    }
}

.falling-element {
    position: fixed;
    z-index: -1;
    top: -50px;
    animation: fall linear infinite;
    opacity: 0.15;
}

.confetti-1 {
    left: 10%;
    width: 15px;
    height: 15px;
    background-color: #6a5acd;
    transform: rotate(45deg);
    animation-duration: 15s;
}

.confetti-2 {
    left: 25%;
    width: 12px;
    height: 12px;
    background-color: #ff7f50;
    border-radius: 50%;
    animation-duration: 13s;
    animation-delay: 2s;
}

.confetti-3 {
    left: 40%;
    width: 14px;
    height: 14px;
    background-color: #20b2aa;
    transform: rotate(30deg);
    animation-duration: 16s;
    animation-delay: 1s;
}

.confetti-4 {
    left: 60%;
    width: 10px;
    height: 10px;
    background-color: #ffa500;
    border-radius: 50%;
    animation-duration: 14s;
    animation-delay: 3s;
}

.confetti-5 {
    left: 80%;
    width: 16px;
    height: 16px;
    background-color: #9c27b0;
    transform: rotate(15deg);
    animation-duration: 12s;
    animation-delay: 1.5s;
}

.confetti-6 {
    left: 90%;
    width: 13px;
    height: 13px;
    background-color: #9370db;
    border-radius: 50%;
    animation-duration: 18s;
    animation-delay: 2.5s;
}

@keyframes fall {
    0% {
        transform: translateY(-50px) rotate(0deg);
    }
    100% {
        transform: translateY(100vh) rotate(360deg);
    }
}

/* 반응형 디자인 */
@media (max-width: 768px) {
    .games-container {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: 20px;
    }
    
    .game-image {
        height: 150px;
    }
    
    .game-title {
        font-size: 1.3rem;
    }
    
    .game-title .icon {
        font-size: 1.5rem;
    }
    
    .game-description {
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .title {
        font-size: 29px;
    }
    
    .subtitle {
        font-size: 1rem;
    }
    
    .games-container {
       
    }
    
    .splash-title {
        font-size: 2rem;
    }
    
    .splash-subtitle {
        font-size: 1rem;
    }
}