/**
 * 蜂鸟地图 - 页面样式
 * Page Styles for Fengmap Indoor Navigation
 * 
 * 包含：手机框架、地图容器、底部导航、页面布局
 */

/* ==================== 手机框架样式 ==================== */

/* 页面容器 */
.page-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: var(--gradient-metal);
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* 手机外框 */
.phone-frame {
    width: 375px;
    height: 812px;
    background: linear-gradient(145deg, #2c2c2c 0%, #1a1a1a 50%, #0d0d0d 100%);
    border-radius: 40px;
    padding: 8px;
    box-shadow: 
        0 0 0 2px #333,
        0 0 0 4px #1a1a1a,
        0 20px 60px rgba(0, 0, 0, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.1),
        inset 0 -1px 0 rgba(0, 0, 0, 0.3);
    position: relative;
    margin: 20px auto !important;
    margin-left: auto !important;
    margin-right: auto !important;
}

/* 移除手机边框上的白色光泽覆盖层 */
.phone-frame::before {
    display: none;
}

/* 手机屏幕 */
.phone-screen {
    width: 100%;
    height: 100%;
    background: #000;
    border-radius: 32px;
    overflow: hidden;
    position: relative;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.1);
    display: flex;
    flex-direction: column;
}

/* 刘海屏设计 */
.phone-screen::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 150px;
    height: 30px;
    background: #000;
    border-radius: 0 0 20px 20px;
    z-index: 9999;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

/* 应用容器 */
.app-container {
    width: 100%;
    height: 100%;
    background: #fff;
    display: flex;
    flex-direction: column;
    position: relative;
}

/* 手机内容区域 */
.phone-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
}

/* ==================== 地图容器样式 ==================== */

/* 地图容器 */
.map-container {
    flex: 1;
    position: relative;
    overflow: hidden;
}

#fengMap {
    width: 100%;
    height: 100%;
    border: none;
    background: #f8f9fa;
}

/* 地图加载图标 */
.tu {
    position: absolute;
    z-index: 9999;
    left: calc(50% - 200px);
    top: calc(50% - 200px);
    width: 400px;
    height: 400px;
    object-fit: contain;
}

/* 隐藏蜂鸟地图logo */
#fengMap .fengmap-logo,
#fengMap .fm-logo,
#fengMap .fengmap-copyright,
#fengMap .fm-copyright,
#fengMap [class*="logo"],
#fengMap [class*="copyright"] {
    display: none !important;
    visibility: hidden !important;
}

/* ==================== 底部导航样式 ==================== */

/* 底部功能栏 */
.bottom-functions {
    background: var(--glass-bg-heavy);
    backdrop-filter: var(--glass-backdrop);
    border-top: 1px solid var(--glass-border);
    padding: 8px 0;
    display: flex;
    justify-content: space-around;
    align-items: center;
    position: relative;
    z-index: 10;
    flex-shrink: 0;
}

.bottom-functions::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--reflection-gradient);
    pointer-events: none;
    z-index: -1;
}

/* 功能按钮 */
.function-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 8px 12px;
    background: transparent;
    border: none;
    cursor: pointer;
    transition: all var(--duration-normal) var(--ease-out);
    border-radius: var(--radius-sm);
    position: relative;
    overflow: hidden;
}

.function-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--glass-bg-light);
    opacity: 0;
    transition: opacity var(--duration-fast) var(--ease-out);
    border-radius: var(--radius-sm);
}

.function-btn:hover::before {
    opacity: 1;
}

.function-btn:active {
    transform: scale(0.95);
}

.function-btn i {
    font-size: 20px;
    color: #666;
    margin-bottom: 4px;
    transition: all var(--duration-normal) var(--ease-out);
    position: relative;
    z-index: 1;
}

.function-btn span {
    font-size: 10px;
    color: #666;
    font-weight: 500;
    transition: all var(--duration-normal) var(--ease-out);
    position: relative;
    z-index: 1;
}

.function-btn.active i {
    color: #07C160;
    text-shadow: var(--glow-blue);
}

.function-btn.active span {
    color: #07C160;
}

.function-btn:hover i {
    transform: translateY(-2px);
    color: #40A9FF;
}

.function-btn:hover span {
    color: #40A9FF;
}

/* ==================== 响应式设计 ==================== */

/* 平板适配 */
@media (max-width: 768px) {
    .page-container {
        padding: 10px;
    }
    
    .phone-frame {
        width: 350px;
        height: 750px;
    }
    
    .phone-screen {
        width: 330px;
        height: 730px;
    }
}

/* AR内容触发测试按钮 */
.ar-trigger-test-btn {
    position: fixed;
    bottom: 20px;
    left: 20px;
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #FF6B6B 0%, #FF8E8E 100%);
    border: none;
    border-radius: 50%;
    color: white;
    font-size: 20px;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(255, 107, 107, 0.3);
    transition: all 0.3s ease;
    z-index: 1000;
}

.ar-trigger-test-btn:hover {
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 6px 20px rgba(255, 107, 107, 0.4);
}


/* 手机适配 */
@media (max-width: 480px) {
    .page-container {
        padding: 5px;
    }
    
    .phone-frame {
        width: 320px;
        height: 680px;
    }
    
    .phone-screen {
        width: 300px;
        height: 660px;
    }
    
    .phone-screen::before {
        width: 120px;
        height: 25px;
    }
}

/* ==================== 特殊状态样式 ==================== */

/* 加载状态 */
.loading {
    position: relative;
    overflow: hidden;
}

.loading::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    animation: loading-shimmer 1.5s infinite;
}

@keyframes loading-shimmer {
    0% {
        left: -100%;
    }
    100% {
        left: 100%;
    }
}

/* 错误状态 */
.error {
    background: #ffebee;
    border: 1px solid #f44336;
    color: #c62828;
}

/* 成功状态 */
.success {
    background: #e8f5e8;
    border: 1px solid #4caf50;
    color: #2e7d32;
}

/* ==================== 动画效果 ==================== */

/* 页面切换动画 */
.page-enter {
    animation: pageEnter var(--duration-normal) var(--ease-out);
}

.page-exit {
    animation: pageExit var(--duration-normal) var(--ease-in-out);
}

@keyframes pageEnter {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pageExit {
    from {
        opacity: 1;
        transform: translateY(0);
    }
    to {
        opacity: 0;
        transform: translateY(-20px);
    }
}

/* 弹出动画 */
.popup-enter {
    animation: popupEnter var(--duration-normal) var(--ease-bounce);
}

@keyframes popupEnter {
    from {
        opacity: 0;
        transform: scale(0.8) translateY(20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

/* 滑入动画 */
.slide-up {
    animation: slideUp var(--duration-normal) var(--ease-out);
}

.slide-down {
    animation: slideDown var(--duration-normal) var(--ease-out);
}

@keyframes slideUp {
    from {
        transform: translateY(100%);
    }
    to {
        transform: translateY(0);
    }
}

@keyframes slideDown {
    from {
        transform: translateY(-100%);
    }
    to {
        transform: translateY(0);
    }
}

/* ==================== 辅助类 ==================== */

/* 显示/隐藏 */
.show {
    display: block !important;
}

.hide {
    display: none !important;
}

.visible {
    visibility: visible;
    opacity: 1;
}

.invisible {
    visibility: hidden;
    opacity: 0;
}

/* 定位 */
.relative {
    position: relative;
}

.absolute {
    position: absolute;
}

.fixed {
    position: fixed;
}

/* 层级 */
.z-low {
    z-index: 1;
}

.z-medium {
    z-index: 100;
}

.z-high {
    z-index: 1000;
}

.z-top {
    z-index: 9999;
}

/* 溢出控制 */
.overflow-hidden {
    overflow: hidden;
}

.overflow-auto {
    overflow: auto;
}

.overflow-scroll {
    overflow: scroll;
}