/* PWA应用额外样式 */

/* 卡片标题 */
.card-title {
    font-size: 1.2rem;
    margin-bottom: 1rem;
    color: #4a6fa5;
    display: flex;
    align-items: center;
    gap: 10px;
}

.card-icon {
    width: 36px;
    height: 36px;
    background-color: #4a6fa5;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

/* 功能按钮 */
.feature-buttons {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 1rem;
    margin-top: 1.5rem;
}

.feature-btn {
    background: linear-gradient(135deg, #6c8dc3 0%, #4a6fa5 100%);
    color: white;
    border: none;
    border-radius: 10px;
    padding: 1rem;
    font-size: 1rem;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    transition: all 0.3s;
}

.feature-btn:active {
    transform: scale(0.98);
    background: linear-gradient(135deg, #5a7db3 0%, #3a5985 100%);
}

.feature-icon {
    font-size: 1.8rem;
}

/* 通知区域 */
.notification {
    background-color: #e8f4fd;
    border-left: 4px solid #4a6fa5;
    padding: 1rem;
    border-radius: 0 8px 8px 0;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.notification-icon {
    font-size: 1.5rem;
    color: #4a6fa5;
}

/* 状态指示器 */
.status {
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
    margin-left: 10px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.status.online {
    background-color: #e7f7ef;
    color: #2e7d32;
}

.status.offline {
    background-color: #fde7e9;
    color: #c62828;
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.status.online .status-dot {
    background-color: #2e7d32;
}

.status.offline .status-dot {
    background-color: #c62828;
}

/* 下拉菜单 */
.dropdown-menu {
    position: absolute;
    top: 70px;
    right: 1rem;
    background: white;
    border-radius: 8px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);
    width: 200px;
    z-index: 1000;
}

.dropdown-item {
    padding: 1rem;
    display: flex;
    align-items: center;
    gap: 10px;
    color: #333;
    text-decoration: none;
    border-bottom: 1px solid #f0f0f0;
    transition: background-color 0.3s;
    cursor: pointer;
}

.dropdown-item:last-child {
    border-bottom: none;
}

.dropdown-item:active {
    background-color: #f5f7fa;
}

.dropdown-icon {
    font-size: 1.2rem;
}

/* 安装提示 */
.install-prompt {
    position: fixed;
    bottom: 80px;
    left: 50%;
    transform: translateX(-50%);
    background: white;
    padding: 1rem;
    border-radius: 12px;
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    max-width: 90%;
    width: 350px;
    border: 1px solid #eee;
}

.install-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.8rem;
}

.install-title {
    font-weight: bold;
    color: #333;
}

.close-install {
    background: none;
    border: none;
    font-size: 1.2rem;
    color: #999;
    cursor: pointer;
}

.install-btn {
    background: #4a6fa5;
    color: white;
    border: none;
    border-radius: 8px;
    padding: 0.8rem 1.5rem;
    font-size: 1rem;
    cursor: pointer;
    width: 100%;
    transition: background-color 0.3s;
}

.install-btn:active {
    background-color: #3a5985;
}

/* 更新提示 */
.update-prompt {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 5px 30px rgba(0, 0, 0, 0.2);
    z-index: 1001;
    max-width: 90%;
    width: 300px;
    border: 1px solid #eee;
    text-align: center;
}

.update-header {
    margin-bottom: 0.8rem;
}

.update-title {
    font-weight: bold;
    color: #4a6fa5;
    font-size: 1.2rem;
}

.update-buttons {
    display: flex;
    gap: 10px;
    margin-top: 1rem;
}

.update-btn {
    flex: 1;
    padding: 0.8rem;
    border: none;
    border-radius: 8px;
    font-size: 0.9rem;
    cursor: pointer;
}

.update-btn:first-child {
    background: #4a6fa5;
    color: white;
}

.update-btn.secondary {
    background: #f0f0f0;
    color: #333;
}

/* 响应式调整 */
@media (max-width: 480px) {
    .card {
        padding: 1rem;
    }
    
    .feature-buttons {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .dropdown-menu {
        width: 180px;
        right: 0.5rem;
    }
}

@media (max-width: 360px) {
    .feature-buttons {
        grid-template-columns: 1fr;
    }
}

@media (min-width: 768px) {
    .feature-buttons {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* 深色模式支持 */
@media (prefers-color-scheme: dark) {
    body {
        background-color: #1a1a1a;
        color: #f0f0f0;
    }
    
    .card {
        background-color: #2a2a2a;
        color: #f0f0f0;
    }
    
    .notification {
        background-color: #2a3a4a;
        color: #f0f0f0;
    }
    
    .install-prompt,
    .update-prompt,
    .dropdown-menu {
        background-color: #2a2a2a;
        color: #f0f0f0;
        border-color: #444;
    }
    
    .dropdown-item {
        color: #f0f0f0;
        border-bottom-color: #444;
    }
    
    .dropdown-item:active {
        background-color: #3a3a3a;
    }
    
    .bottom-nav {
        background-color: #2a2a2a;
        border-top-color: #444;
    }
    
    .nav-item {
        color: #aaa;
    }
    
    .nav-item.active {
        color: #6c8dc3;
    }
}

/* 打印样式 */
@media print {
    .bottom-nav,
    .install-prompt,
    .update-prompt,
    .dropdown-menu,
    .menu-toggle {
        display: none !important;
    }
    
    .card {
        box-shadow: none;
        border: 1px solid #ddd;
    }
}