:root {
    --primary-blue: #da7912;
    --secondary-blue: #f7dab9;
    --highlight-yellow: #FFD700;
    --background: #F8FBFF;
    --menu-height: 70px; /* 네비게이션 바 높이 */
}

@font-face {
    font-family: 'Moneygraphy';
    src: url('../font/Moneygraphy-Rounded.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}

/* 확장된 메뉴바 스타일 */
.navbar {
    height: var(--menu-height);
    width: 100vw; /* 전체 너비 */
    padding: 0 15px;
    background: linear-gradient(135deg, var(--primary-blue) 0%, #cf9a5d 80%);
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    
    display: flex;
    align-items: center;
    justify-content: space-around;

    position: fixed; /* 고정 위치 */
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000; /* 항상 위에 배치 */
}

.navbar-brand {
    display: flex;
    align-items: center;
}

.navbar-brand a {
    font-size: 1.8rem;
    color: white;
    text-decoration: none;
    font-family: 'Moneygraphy', cursive;
    display: flex;
    align-items: center;
}

.logo {
    height: 50px;
    width: auto;
}

.navbar-menu {
    display: flex;
    gap: 20px;
    margin: 0;
    padding: 0;
    list-style: none; /* li 요소 앞의 점 제거 */
}

.navbar-menu li {
    display: flex;
    align-items: center;
}

.navbar-menu li a {
    color: white;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    border-radius: 20px;
    transition: all 0.3s ease;
    text-decoration: none;
}

.navbar-menu li a:hover {
    background: rgba(255,255,255,0.15);
    transform: translateY(-2px);
}

/* 언어 선택 드롭다운 (메인 영역) */
.language-switcher-container {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 20px;
}

.language-switcher-container form {
    display: flex;
    align-items: center;
}

.language-select {
    background: white;
    color: #333;
    border: 2px solid var(--primary-blue);
    border-radius: 12px;
    padding: 12px 18px;
    font-size: 1rem;
    font-family: 'Moneygraphy', cursive;
    cursor: pointer;
    outline: none;
    appearance: none;
    padding-right: 40px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23da7912' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    box-shadow: 0 4px 12px rgba(218, 121, 18, 0.15);
    min-width: 120px;
    width: auto;
    will-change: auto;
    animation: none !important;
}

.language-select:hover {
    background: #fff9f0;
    border-color: #e89f3c;
    box-shadow: 0 6px 16px rgba(218, 121, 18, 0.25);
}

.language-select:focus {
    border-color: var(--highlight-yellow);
    box-shadow: 0 0 0 3px rgba(255, 215, 0, 0.2);
}

.language-select option {
    background: #faf8f3;
    color: #333;
    padding: 14px 20px;
    font-family: 'Moneygraphy', cursive;
    font-size: 1rem;
    border: none;
    border-bottom: 1px solid rgba(218, 121, 18, 0.1);
    min-height: 45px;
    line-height: 1.5;
    display: block;
}

.language-select option:hover,
.language-select option:active {
    background: linear-gradient(135deg, #fff5e6, #ffe8cc);
    color: var(--primary-blue);
    cursor: pointer;
}

.language-select option:checked {
    background: #faf8f3;
    color: #333;
    font-weight: 600;
}

.language-select option:focus {
    background: #fff9f0;
    outline: none;
}

/* 유저 정보 */
.user-info {
    display: flex;
    align-items: center;
    gap: 10px;
    color: white;
    font-size: 1rem;
}

.user-info li {
    display: flex;
    align-items: center;
}

.user-info li a {
    color: white;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    border-radius: 20px;
    transition: all 0.3s ease;
    text-decoration: none;
}

.user-info li a:hover {
    background: rgba(255,255,255,0.15);
    transform: translateY(-2px);
}

.user-info a {
    color: white;
    text-decoration: none;
    padding: 5px 10px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.1);
    transition: background 0.3s ease;
}

.user-info a:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* 메뉴바와 겹치는 문제 해결 */
body {
    padding-top: var(--menu-height); /* 메뉴바 높이만큼 전체 페이지 위쪽 여백 추가 */
}

/* 대시보드 영역 */
.dashboard {
    padding: 40px 5%;
    background: var(--background);
}

.welcome-banner {
    background: linear-gradient(95deg, var(--primary-blue), var(--secondary-blue));
    border-radius: 20px;
    padding: 30px;
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
    box-shadow: 0 10px 30px rgba(42,107,204,0.2);
}

.welcome-banner h1 {
    font-size: 2.5rem;
    max-width: 600px;
    line-height: 1.3;
}

.welcome-banner span {
    color: var(--highlight-yellow);
    text-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.ai-character img {
    height: 180px;
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-15px); }
    100% { transform: translateY(0px); }
}

/* 진행 현황 카드 */
.progress-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-bottom: 50px;
}

.progress {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-blue), var(--secondary-blue));
    transition: width 0.5s ease;
}

.progress-bar {
    height: 8px;
    background: #eee;
    border-radius: 4px;
    overflow: hidden;
}

.card {
    background: white;
    padding: 25px;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
    transition: transform 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
}

.card i {
    font-size: 2.5rem;
    color: var(--primary-blue);
    margin-bottom: 15px;
}

/* 활동 카드 */
.activity-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
}

.activity-card {
    position: relative;
    background: white;
    border-radius: 20px;
    padding: 40px;
    text-decoration: none;
    color: #333;
    overflow: hidden;
    transition: all 0.3s ease;
}

.activity-card:hover {
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    transform: translateY(-5px);
}

.card-content {
    position: relative;
    z-index: 2;
}

.activity-card i {
    font-size: 3.2rem;
    color: var(--primary-blue);
    margin-bottom: 20px;
}

.activity-card h4 {
    font-size: 1.6rem;
    margin-bottom: 12px;
}

.activity-card p {
    color: #666;
    line-height: 1.5;
    font-size: 1.1rem;
}

/* 뱃지 */
.badges {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    color: rgb(0, 0, 0);
}

.badge {
    background: #FFF;
    padding: 10px 15px;
    border-radius: 10px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    font-size: 1rem;
    font-weight: bold;
    display: inline-block;
    text-align: center;
    min-width: 120px;
}

.badge-📚 { background-color: #FFD700; }
.badge-🔍 { background-color: #FF6347; }
.badge-💡 { background-color: #4682B4; }
.badge-📝 { background-color: #32CD32; }
.badge-🚀 { background-color: #DA70D6; }
.badge-🔮 { background-color: #FF4500; }
.badge-🎯 { background-color: #4169E1; }
.badge-🗺 { background-color: #8A2BE2; }
.badge-🖼 { background-color: #DC143C; }

/* 반응형 디자인 */
@media (max-width: 992px) {
    .activity-cards {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 576px) {
    .activity-cards {
        grid-template-columns: repeat(1, 1fr);
    }
}

/* 반응형 메뉴바 여백 조정 */
@media (max-width: 768px) {
    .navbar {
        padding: 0 10px;
        height: var(--menu-height);
    }
    .navbar-brand a {
        font-size: 1.5rem;
    }
    .navbar-menu {
        gap: 15px;
    }
    body {
        padding-top: calc(var(--menu-height) + 10px);
    }
    .welcome-banner {
        flex-direction: column;
        text-align: center;
    }
    .ai-character img {
        height: 120px;
        margin-top: 20px;
    }
}

/* Footer Styling */
footer {
    width: 100%;
    background: linear-gradient(135deg, #9daec3, var(--primary-blue));
    color: white;
    padding: 40px 0;  /* 상하 패딩만 적용, 좌우는 꽉 차게 */
    text-align: center;
    box-sizing: border-box;
    margin: 0;
}

footer .footer-content {
    width: 100%;
    padding: 0 20px;
    box-sizing: border-box;
}

footer p {
    margin: 5px 0;
    line-height: 1.5;
}

.footer-address p,
.footer-text p {
    font-size: 1rem;
}

.footer-divider {
    border-top: 1px solid rgba(255, 255, 255, 0.3);
    padding-top: 20px;
    margin-top: 20px;
}

.footer-copyright {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.8);
}

/* 이미지 스타일 */
.activity-img {
    width: 60%;
    height: auto;
    border-radius: 10px;
    display: block;
    margin: 0 auto 10px;
}

/* ===================== Floating Menu (오른쪽 아래) ===================== */
.floating-menu {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1100;
}

.floating-menu .menu-button {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--primary-blue);
    color: white;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: background 0.3s ease;
    font-size: 1.5rem;
}

.floating-menu .menu-button:hover {
    background: var(--secondary-blue);
}

/* 메뉴 옵션은 기본적으로 숨김 */
.floating-menu .menu-options {
    position: absolute;
    bottom: 70px;
    right: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease, transform 0.3s ease;
    transform: translateY(10px);
    z-index: 1200;
}

/* .active 클래스가 있을 때 메뉴 옵션 표시 */
.floating-menu.active .menu-options {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

/* 기본 옵션 스타일 (공통) */
.floating-menu .menu-option {
    color: white;
    padding: 10px 15px;
    border-radius: 5px;
    text-decoration: none;
    white-space: nowrap;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
    transition: background 0.3s ease;
    font-size: 1rem;
}

/* 나만의 꿈의 길 (기존 색상 유지) */
.floating-menu .menu-option.dreampath {
    background: var(--primary-blue);
}
.floating-menu .menu-option.dreampath:hover {
    background: var(--secondary-blue);
}

/* 창작연구소: #2A6BCC */
.floating-menu .menu-option.creation {
    background: #2A6BCC;
}
.floating-menu .menu-option.creation:hover {
    background: #1e4d9a;
}

/* 동화작업실: 흰색 배경, 테두리 추가 */
.floating-menu .menu-option.fairytale {
    background: #FBBF70;
}
.floating-menu .menu-option.fairytale:hover {
    background: #c49167;
}
