/* 모바일 하단 네비게이션 */
.mobile-bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--bg-black);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: 12px 0 8px 0;
    z-index: 1000;
    display: none; /* 기본적으로 숨김 */
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 -2px 20px rgba(0, 0, 0, 0.3);
}

.mobile-nav-container {
    display: flex !important;
    justify-content: space-around !important;
    align-items: stretch !important;
    max-width: 100%;
    margin: 0 auto;
    padding: 0 16px;
    height: auto;
}

.mobile-nav-item {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    text-decoration: none;
    color: rgba(255, 255, 255, 0.7);
    transition: all 0.3s ease;
    padding: 12px 8px 8px 8px;
    border-radius: 12px;
    min-width: 70px;
    flex: 1;
    max-width: 85px;
    text-align: center;
}

.mobile-nav-item:hover,
.mobile-nav-item.active {
    color: var(--point-color);
    background: rgba(102, 112, 244, 0.15);
    transform: translateY(-1px);
}

.mobile-nav-icon {
    width: 26px;
    height: 26px;
    margin-bottom: 8px;
    display: block !important;
    filter: brightness(0.8);
    transition: all 0.3s ease;
}

.mobile-nav-item:hover .mobile-nav-icon,
.mobile-nav-item.active .mobile-nav-icon {
    filter: brightness(1) drop-shadow(0 0 10px rgba(102, 112, 244, 0.6));
    transform: scale(1.1);
}

.mobile-nav-text {
    font-size: 12px;
    font-weight: 600;
    text-align: center !important;
    line-height: 1.2;
    letter-spacing: -0.2px;
    display: block !important;
    width: 100%;
    margin-top: 0;
}

/* 라이트 모드에서의 스타일 */
.light-mode .mobile-bottom-nav,
.mobile-bottom-nav.light-theme {
    background: rgba(255, 255, 255, 0.95);
    border-top: 1px solid rgba(0, 0, 0, 0.08);
    box-shadow: 0 -2px 20px rgba(0, 0, 0, 0.1);
}

.light-mode .mobile-nav-item,
.mobile-bottom-nav.light-theme .mobile-nav-item {
    color: rgba(69, 69, 69, 0.8);
}

.light-mode .mobile-nav-item:hover,
.light-mode .mobile-nav-item.active,
.mobile-bottom-nav.light-theme .mobile-nav-item:hover,
.mobile-bottom-nav.light-theme .mobile-nav-item.active {
    color: var(--point-color);
    background: rgba(102, 112, 244, 0.12);
}

/* 모바일에서만 표시 */
@media (max-width: 768px) {
    .mobile-bottom-nav {
        display: block;
    }
    
    /* 하단 네비게이션 공간 확보 */
    body {
        padding-bottom: 85px;
    }
    
    .main_wrap {
        padding-bottom: 85px;
    }
    
    /* 작은 화면에서 더 최적화 */
    @media (max-width: 480px) {
        .mobile-nav-container {
            padding: 0 8px;
        }
        
        .mobile-nav-item {
            min-width: 60px;
            padding: 10px 4px 8px 4px;
            display: flex !important;
            flex-direction: column !important;
            align-items: center !important;
            justify-content: center !important;
        }
        
        .mobile-nav-icon {
            width: 24px;
            height: 24px;
            margin-bottom: 6px;
            display: block !important;
        }
        
        .mobile-nav-text {
            font-size: 11px;
            display: block !important;
            text-align: center !important;
            width: 100%;
        }
    }
}

/* 네비게이션 아이콘 애니메이션 */
.mobile-nav-item .mobile-nav-icon {
    transform: scale(1);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.mobile-nav-item:active .mobile-nav-icon {
    transform: scale(0.90);
}

.mobile-nav-item:hover .mobile-nav-icon {
    transform: scale(1.1) translateY(-1px);
}

/* 텍스트 애니메이션 */
.mobile-nav-text {
    transition: all 0.3s ease;
    opacity: 0.9;
}

.mobile-nav-item:hover .mobile-nav-text,
.mobile-nav-item.active .mobile-nav-text {
    opacity: 1;
    font-weight: 700;
}

/* 알림 배지 (필요시 사용) */
.mobile-nav-badge {
    position: absolute;
    top: -2px;
    right: -2px;
    background: var(--red);
    color: white;
    border-radius: 50%;
    width: 16px;
    height: 16px;
    font-size: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

/* 모바일 글작성 플로팅 버튼 */
.mobile-write-fab {
    position: fixed;
    bottom: 100px; /* 하단 네비게이션 위쪽에 위치 */
    right: 20px;
    width: 58px;
    height: 58px;
    background: linear-gradient(135deg, var(--point-color), #5a66e0);
    border: none;
    border-radius: 50%;
    color: white;
    cursor: pointer;
    box-shadow: 0 6px 25px rgba(102, 112, 244, 0.5);
    display: none; /* 기본적으로 숨김 */
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 999;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.mobile-write-fab:hover {
    transform: scale(1.08) translateY(-2px);
    box-shadow: 0 8px 30px rgba(102, 112, 244, 0.7);
}

.mobile-write-fab:active {
    transform: scale(0.95);
}

.mobile-write-fab svg {
    width: 26px;
    height: 26px;
    fill: currentColor;
}

/* 라이트 모드에서의 스타일 */
.light-mode .mobile-write-fab,
.mobile-write-fab.light-theme {
    box-shadow: 0 4px 20px rgba(102, 112, 244, 0.3);
}

.light-mode .mobile-write-fab:hover,
.mobile-write-fab.light-theme:hover {
    box-shadow: 0 6px 25px rgba(102, 112, 244, 0.5);
}

/* 모바일에서만 표시 */
@media (max-width: 768px) {
    .mobile-write-fab {
        display: flex;
    }
}

/* 애니메이션 효과 */
@keyframes fabPulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
    }
}

.mobile-write-fab.pulse {
    animation: fabPulse 2s infinite;
}
