/* ナビゲーションバーのレスポンシブ対応 */

/* ナビゲーションバーの基本スタイル */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: white;
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding: 10px 0;
    box-shadow: 0 -5px 20px rgba(254, 197, 187, 0.2);
    z-index: 10;
    border-top-left-radius: 25px;
    border-top-right-radius: 25px;
    border-top: 1px solid rgba(254, 197, 187, 0.1);
}

/* ナビゲーションボタンの基本スタイル */
.nav-btn {
    background: none;
    border: none;
    padding: 8px 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    color: var(--text-light);
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    position: relative;
    overflow: hidden;
    border-radius: 12px;
}

.nav-btn i {
    font-size: 1.4rem;
    margin-bottom: 4px;
    transition: all 0.3s;
}

.nav-btn:hover {
    color: var(--primary-color);
    background: rgba(254, 197, 187, 0.1);
}

.nav-btn:hover i {
    transform: translateY(-3px);
}

.nav-btn.active {
    color: var(--primary-color);
}

.nav-btn.active i {
    color: var(--primary-color);
    animation: nav-bounce 0.8s;
}

.nav-btn.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 20px;
    height: 3px;
    background: var(--primary-color);
    border-radius: 10px;
}

/* アニメーション定義 */
@keyframes nav-bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-5px); }
}

/* 超小型デバイス - 320px-374px */
@media screen and (max-width: 374px) {
    .bottom-nav {
        padding: 8px 0;
        border-top-left-radius: 20px;
        border-top-right-radius: 20px;
    }
    
    .nav-btn {
        padding: 6px 12px;
        font-size: 0.7rem;
    }
    
    .nav-btn i {
        font-size: 1.2rem;
        margin-bottom: 3px;
    }
    
    .nav-btn.active::after {
        width: 16px;
        height: 2px;
    }
}

/* 小型デバイス - 375px-479px */
@media screen and (min-width: 375px) and (max-width: 479px) {
    .bottom-nav {
        padding: 9px 0;
    }
    
    .nav-btn {
        padding: 7px 14px;
        font-size: 0.75rem;
    }
    
    .nav-btn i {
        font-size: 1.3rem;
    }
    
    .nav-btn.active::after {
        width: 18px;
    }
}

/* 中型デバイス - 480px-767px */
@media screen and (min-width: 480px) and (max-width: 767px) {
    .bottom-nav {
        padding: 10px 0;
    }
    
    .nav-btn {
        padding: 8px 16px;
        font-size: 0.8rem;
    }
    
    .nav-btn i {
        font-size: 1.4rem;
        margin-bottom: 4px;
    }
}

/* タブレット - 768px-1023px */
@media screen and (min-width: 768px) and (max-width: 1023px) {
    .app-container .bottom-nav {
        width: 600px;
        left: 50%;
        transform: translateX(-50%);
    }
    
    .bottom-nav {
        padding: 12px 0;
        border-top-left-radius: 0;
        border-top-right-radius: 0;
        border-bottom-left-radius: 30px;
        border-bottom-right-radius: 30px;
    }
    
    .nav-btn {
        padding: 10px 20px;
        font-size: 0.85rem;
    }
    
    .nav-btn i {
        font-size: 1.5rem;
        margin-bottom: 5px;
    }
    
    .nav-btn.active::after {
        width: 22px;
        height: 3px;
    }
}

/* 大型デバイス - 1024px以上 */
@media screen and (min-width: 1024px) {
    .app-container .bottom-nav {
        width: 700px;
        left: 50%;
        transform: translateX(-50%);
    }
    
    .bottom-nav {
        padding: 14px 0;
        border-bottom-left-radius: 30px;
        border-bottom-right-radius: 30px;
    }
    
    .nav-btn {
        padding: 12px 24px;
        font-size: 0.9rem;
    }
    
    .nav-btn i {
        font-size: 1.6rem;
        margin-bottom: 6px;
    }
    
    .nav-btn.active::after {
        width: 24px;
        height: 4px;
    }
}

/* 横向き対応 */
@media screen and (orientation: landscape) and (max-height: 500px) {
    .bottom-nav {
        padding: 6px 0;
    }
    
    .nav-btn {
        flex-direction: row;
        align-items: center;
        padding: 6px 10px;
    }
    
    .nav-btn i {
        font-size: 1.2rem;
        margin-bottom: 0;
        margin-right: 6px;
    }
    
    .nav-btn.active::after {
        width: 16px;
        height: 2px;
        bottom: 4px;
    }
}

/* タッチデバイス用の最適化 */
@media (pointer: coarse) {
    .nav-btn {
        min-height: 44px;
        min-width: 60px;
    }
}

/* 画面の高さが低い場合の最適化 */
@media screen and (max-height: 700px) {
    .bottom-nav {
        padding: 8px 0;
    }
    
    .nav-btn {
        padding: 6px 12px;
    }
    
    .nav-btn i {
        font-size: 1.3rem;
        margin-bottom: 3px;
    }
}