/* 파닉스 페이지 스타일 */
.phonics-page {
    background-color: #f9f9ff;
    font-family: 'Arial', sans-serif;
    color: #333;
    overflow-x: hidden;
}

.top-gradient {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 200px;
    background: linear-gradient(135deg, #A88BEB 0%, #6C63FF 100%);
    z-index: -1;
    border-bottom-left-radius: 40% 20%;
    border-bottom-right-radius: 40% 20%;
}

/* 헤더 스타일 */
header {
    padding: 20px 0;
}

.header-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    position: relative;
}

.back-btn {
    width: 40px;
    height: 40px;
    background-color: rgba(255, 255, 255, 0.4);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 15px;
    transition: all 0.3s ease;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
    border: none;
    text-decoration: none;
}

.back-btn:hover {
    background-color: rgba(255, 255, 255, 0.6);
    transform: scale(1.05);
}

.back-btn img {
    width: 20px;
    height: 20px;
}

.phonics-title {
    color: white;
    font-size: 28px;
    text-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    margin: 0;
    text-align: center;
    flex-grow: 1;
    animation: fadeIn 1s ease;
}

.character {
    position: relative;
    width: 80px;
    height: 80px;
}

.phonics-character-img {
    max-width: 100%;
    position: absolute;
    bottom: -20px;
    right: 0;
    animation: float 4s ease-in-out infinite;
}

/* 메인 콘텐츠 스타일 */
main {
    padding: 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.phonics-container {
    margin-top: 20px;
}

/* 파닉스 메뉴 그리드 */
.phonics-menu {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.phonics-menu-item {
    background: white;
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
    overflow: hidden;
    position: relative;
}

.phonics-menu-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.12);
}

.phonics-menu-item:before {
    content: '';
    position: absolute;
    width: 150px;
    height: 150px;
    border-radius: 50%;
    background: rgba(168, 139, 235, 0.1);
    top: -75px;
    right: -75px;
    z-index: 0;
}

.phonics-icon {
    width: 70px;
    height: 70px;
    margin: 0 auto 15px;
    background: linear-gradient(135deg, #A88BEB 0%, #6C63FF 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    box-shadow: 0 5px 15px rgba(108, 99, 255, 0.3);
}

.phonics-icon img {
    width: 40px;
    height: 40px;
    object-fit: contain;
    filter: brightness(0) invert(1);
}

.phonics-menu-item h2 {
    color: #333;
    font-size: 20px;
    margin: 15px 0 10px;
    position: relative;
    z-index: 1;
}

.phonics-menu-item p {
    color: #666;
    font-size: 14px;
    margin: 0;
    position: relative;
    z-index: 1;
}

/* 알파벳 샘플 스타일 */
.alphabet-samples {
    background: white;
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
    margin-bottom: 40px;
}

.alphabet-samples h3 {
    text-align: center;
    margin-bottom: 20px;
    color: #333;
    font-size: 22px;
}

.alphabet-sample-container {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 20px;
}

.alphabet-sample {
    text-align: center;
    animation: fadeIn 0.5s ease;
}

.alphabet-circle {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #A88BEB 0%, #6C63FF 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 10px;
    font-size: 28px;
    font-weight: bold;
    color: white;
    text-shadow: 0 2px 3px rgba(0, 0, 0, 0.2);
    box-shadow: 0 5px 15px rgba(108, 99, 255, 0.3);
}

.sound-icon {
    font-size: 16px;
    color: #666;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.sound-icon:hover {
    color: #6C63FF;
    transform: scale(1.1);
}

.sound-icon:after {
    content: '🔊';
    margin-left: 5px;
    font-size: 14px;
}

/* 장식적 요소 스타일 */
.decorations {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    z-index: -1;
    overflow: hidden;
}

.phonics-star {
    position: absolute;
    background-color: rgba(108, 99, 255, 0.3);
    clip-path: polygon(50% 0%, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%);
    animation: twinkle 4s ease-in-out infinite;
}

.star1 {
    width: 30px;
    height: 30px;
    top: 10%;
    left: 10%;
    animation-delay: 0s;
}

.star2 {
    width: 20px;
    height: 20px;
    top: 20%;
    right: 15%;
    animation-delay: 1s;
}

.star3 {
    width: 40px;
    height: 40px;
    bottom: 30%;
    left: 20%;
    animation-delay: 2s;
}

.cloud {
    position: absolute;
    background-color: rgba(255, 255, 255, 0.8);
    border-radius: 50%;
    animation: float 8s ease-in-out infinite;
}

.cloud1 {
    width: 100px;
    height: 50px;
    top: 40%;
    right: 10%;
    animation-delay: 0s;
}

.cloud2 {
    width: 70px;
    height: 35px;
    bottom: 20%;
    right: 20%;
    animation-delay: 2s;
}

/* 하단 영역 스타일 */
footer {
    margin-top: 50px;
    padding: 20px;
    background: white;
    border-top: 1px solid #eee;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
}

.navigation {
    margin-top: 15px;
    display: flex;
    justify-content: center;
    gap: 20px;
}

.navigation a {
    color: #666;
    text-decoration: none;
    transition: all 0.2s ease;
}

.navigation a:hover {
    color: #6C63FF;
}

/* 애니메이션 키프레임 */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

@keyframes twinkle {
    0%, 100% { opacity: 0.3; transform: scale(0.8) rotate(0deg); }
    50% { opacity: 1; transform: scale(1.2) rotate(15deg); }
}

/* 반응형 스타일 */
@media (max-width: 768px) {
    .phonics-menu {
        grid-template-columns: 1fr;
    }
    
    .phonics-title {
        font-size: 24px;
    }
    
    .alphabet-sample-container {
        justify-content: space-around;
    }
}

@media (max-width: 480px) {
    .alphabet-circle {
        width: 50px;
        height: 50px;
        font-size: 24px;
    }
    
    .phonics-title {
        font-size: 20px;
    }
    
    .phonics-menu-item {
        padding: 15px;
    }
}

/* 추가: 네비게이션 바 스타일 */
.footer-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  background-color: #ffffff;
  box-shadow: 0 -5px 20px rgba(0, 0, 0, 0.1);
  padding: 12px 0;
  z-index: 1000;
  display: flex;
  justify-content: space-around;
  align-items: center;
  border-top: 1px solid rgba(0, 0, 0, 0.05);
}

.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-decoration: none;
  color: #777;
  font-size: 0.85rem;
  padding: 8px 0;
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  position: relative;
  text-align: center;
}

.nav-item i {
  font-size: 1.4rem;
  margin-bottom: 6px;
  transition: transform 0.3s ease;
}

.nav-item.active {
  color: #f44336;
  font-weight: bold;
}

.nav-item.active i {
  transform: translateY(-4px);
  color: #f44336;
}

body {
  margin-bottom: 80px !important;
  padding-bottom: 30px !important;
}

#footer-container {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  z-index: 9999;
}

/* 공통 파닉스 스타일 */

/* 색상 변수 정의 */
:root {
  --primary-color-light: #6C63FF;
  --primary-color-dark: #4F46E5;
  --primary-hover-light: #5046e5;
  --primary-hover-dark: #3a31c8;
  --accent-color: #FF6B6B;
  --text-light: #FFFFFF;
  --text-dark: #333333;
  --background-light: #FFFFFF;
  --shadow-light: rgba(0, 0, 0, 0.1);
  --shadow-medium: rgba(0, 0, 0, 0.2);
  --shadow-dark: rgba(0, 0, 0, 0.25);
}

/* 페이지 기본 스타일 */
.phonics-page {
  font-family: 'Nunito', 'Apple SD Gothic Neo', -apple-system, BlinkMacSystemFont, sans-serif;
  background-color: #f5f8ff;
  margin: 0;
  padding: 0;
  color: #333;
  line-height: 1.6;
}

/* 상단 그라데이션 */
.top-gradient {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 200px;
  background: linear-gradient(to right, var(--primary-color-light), var(--primary-color-dark));
  z-index: -1;
}

/* 헤더 스타일 */
.phonics-header,
header {
  background: linear-gradient(to bottom, var(--primary-color-light), var(--primary-color-dark));
  color: var(--text-light);
  display: flex;
  align-items: center;
  padding: 15px 20px;
  border-radius: 0 0 30px 30px;
  box-shadow: 0 3px 10px var(--shadow-light);
  position: relative;
  z-index: 10;
}

.header-container {
  display: flex;
  align-items: center;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  position: relative;
}

/* 뒤로가기 버튼 */
.back-btn {
  background: var(--background-light);
  color: var(--primary-color-light);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 15px;
  box-shadow: 0 2px 5px var(--shadow-light);
  transition: all 0.3s ease;
  cursor: pointer;
  text-decoration: none;
}

.back-btn:hover {
  color: var(--primary-color-dark);
  transform: translateX(-3px);
  box-shadow: 0 4px 8px var(--shadow-medium);
}

/* 페이지 제목 */
.page-title,
.phonics-title {
  font-size: 24px;
  font-weight: 700;
  margin: 0;
  text-align: center;
  flex-grow: 1;
}

/* 캐릭터 이미지 */
.character {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
}

.phonics-character-img {
  height: 60px;
  width: auto;
}

/* 버튼 스타일 */
.btn-primary,
.menu-button,
.start-game-btn,
.card-button {
  background: linear-gradient(to bottom, var(--primary-color-light), var(--primary-color-dark));
  color: var(--text-light);
  border: none;
  border-radius: 25px;
  padding: 10px 20px;
  font-weight: bold;
  cursor: pointer;
  margin-top: 15px;
  box-shadow: 0 4px 8px var(--shadow-medium);
  transition: all 0.3s ease;
  font-size: 15px;
  letter-spacing: 0.5px;
  display: inline-block;
  text-align: center;
  text-decoration: none;
}

.btn-primary:hover,
.menu-button:hover,
.start-game-btn:hover,
.card-button:hover {
  background: linear-gradient(to bottom, var(--primary-hover-light), var(--primary-hover-dark));
  transform: translateY(-3px);
  box-shadow: 0 6px 12px var(--shadow-dark);
}

/* 메인 컨테이너 */
.phonics-container {
  max-width: 1200px;
  margin: 20px auto;
  padding: 20px;
  position: relative;
}

/* 카드 기본 스타일 */
.phonics-card {
  background: var(--background-light);
  border-radius: 15px;
  box-shadow: 0 5px 15px var(--shadow-light);
  padding: 20px;
  margin-bottom: 20px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.phonics-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px var(--shadow-medium);
}

/* 애니메이션 */
@keyframes pulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.05); }
  100% { transform: scale(1); }
}

@keyframes float {
  0% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
  100% { transform: translateY(0); }
}

/* 반응형 조정 */
@media (max-width: 768px) {
  .phonics-container {
    padding: 15px;
  }
  
  .page-title,
  .phonics-title {
    font-size: 20px;
  }
  
  .phonics-character-img {
    height: 50px;
  }
  
  .btn-primary,
  .menu-button,
  .start-game-btn,
  .card-button {
    padding: 8px 16px;
    font-size: 14px;
  }
} 