/**
 * Starry Sky AR CSS Stylesheet
 * 星象 AR 專屬樣式表
 * 提供高科技感、深邃太空藍的磨砂玻璃 UI 視覺外觀
 */

/* ─── 回上頁按鈕樣式 (Back Button Style) ─── */
.ar-star-back {
    position: absolute;
    top: 20px;
    left: 20px;
    z-index: 200; /* 確保位於所有 HUD 與影片之上 */
    padding: 10px 24px;
    font-size: 0.95rem;
    font-weight: 700;
    color: #ffffff;
    background: rgba(10, 20, 30, 0.65);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(126, 200, 227, 0.3);
    border-radius: 50px;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5), 
                inset 0 1px 0 rgba(255, 255, 255, 0.1);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: none !important; /* 已由 index.html 中的統一模式切換列取代 */
    align-items: center;
    gap: 8px;
    outline: none;
}

/* 箭頭微標誌 */
.ar-star-back::before {
    content: "◀";
    font-size: 0.75rem;
    color: #7ec8e3;
    transition: transform 0.3s ease;
}

/* 懸停與點擊互動特效 (Hover & Active state) */
.ar-star-back:hover {
    background: rgba(15, 30, 50, 0.8);
    border-color: #7ec8e3;
    box-shadow: 0 0 20px rgba(126, 200, 227, 0.5), 
                inset 0 1px 0 rgba(255, 255, 255, 0.2);
    transform: scale(1.05);
}

.ar-star-back:hover::before {
    transform: translateX(-3px);
}

.ar-star-back:active {
    transform: scale(0.95);
}

/* ─── 星體資訊細節卡片 (Star Details Panel) ─── */
.ar-star-card {
    position: absolute;
    bottom: 25px;
    left: 50%;
    transform: translateX(-50%) translateY(150%); /* 預設在畫面下方之外 */
    width: 90%;
    max-width: 420px;
    z-index: 180;
    padding: 18px;
    border-radius: 20px;
    background: rgba(8, 15, 26, 0.78) !important;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(126, 200, 227, 0.25) !important;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.6),
                0 0 30px rgba(126, 200, 227, 0.15) !important;
    transition: transform 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    pointer-events: auto;
}

/* 脈衝發光呼吸微動畫 */
@keyframes star-card-glow {
    0%, 100% {
        border-color: rgba(126, 200, 227, 0.25);
        box-shadow: 0 15px 35px rgba(0, 0, 0, 0.6), 0 0 30px rgba(126, 200, 227, 0.1);
    }
    50% {
        border-color: rgba(126, 200, 227, 0.45);
        box-shadow: 0 15px 35px rgba(0, 0, 0, 0.6), 0 0 40px rgba(126, 200, 227, 0.25);
    }
}

.ar-star-card {
    animation: star-card-glow 4s infinite ease-in-out;
}

/* 針對小螢幕設備的響應式最佳化 (Mobile Optimization) */
@media (max-width: 480px) {
    .ar-star-back {
        top: 15px;
        left: 15px;
        padding: 8px 18px;
        font-size: 0.85rem;
    }
    
    .ar-star-card {
        bottom: 15px;
        padding: 14px;
        border-radius: 16px;
    }

    .ar-star-mode-bar {
        bottom: 15px;
        padding: 8px;
        gap: 6px;
    }

    .ar-star-mode-btn {
        padding: 8px 0;
        font-size: 0.78rem;
    }
}

/* ─── 底部模式切換按鈕列 (Bottom Mode Selector Bar) ─── */
.ar-star-mode-bar {
    position: absolute;
    bottom: 25px;
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    max-width: 450px;
    z-index: 200;
    display: flex;
    gap: 8px;
    padding: 10px;
    border-radius: 20px;
    background: rgba(8, 15, 26, 0.78);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(126, 200, 227, 0.25);
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.5);
    pointer-events: auto;
}

/* 等寬模式按鈕共用樣式 (Equal-width mode button shared style) */
.ar-star-mode-btn {
    flex: 1;
    padding: 10px 0;
    border-radius: 14px;
    border: none;
    background: transparent;
    color: rgba(255, 255, 255, 0.7);
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.85rem;
    outline: none;
    text-align: center;
    white-space: nowrap;
}

.ar-star-mode-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
}

.ar-star-mode-btn:active {
    transform: scale(0.95);
}

/* 當前活躍模式按鈕高亮 (Active mode button highlight) */
.ar-star-mode-btn-active {
    background: rgba(52, 152, 219, 0.85);
    color: #ffffff;
}

.ar-star-mode-btn-active:hover {
    background: rgba(52, 152, 219, 0.95);
}

/* 退出按鈕特殊紅色風格 (Exit button red accent) */
.ar-star-mode-btn-exit {
    background: rgba(231, 76, 60, 0.2);
    color: #e74c3c;
}

.ar-star-mode-btn-exit:hover {
    background: rgba(231, 76, 60, 0.35);
    color: #ff6b6b;
}
