* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    position: relative;
}

/* 背景图片基础样式 */
.bg-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -2;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    filter: blur(var(--bg-blur, 0px));
    transition: all 0.5s ease;
}

/* iOS风格自适应背景 */
@media (orientation: portrait) {
    .bg-container {
        background-size: cover;
        background-position: center top;
    }
}

@media (orientation: landscape) {
    .bg-container {
        background-size: cover;
        background-position: center center;
    }
}

/* 移动设备优化 */
@media (max-width: 768px) {
    .bg-container {
        background-attachment: scroll;
        background-size: cover;
    }
    
    /* 竖屏时确保重要内容可见 */
    @media (orientation: portrait) {
        .bg-container {
            background-position: center 30%;
        }
    }
    
    /* 横屏时优化显示 */
    @media (orientation: landscape) {
        .bg-container {
            background-position: center center;
            background-size: cover;
        }
    }
}

/* 高分辨率设备 */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .bg-container {
        background-size: cover;
    }
}

/* 超宽屏适配 */
@media (min-aspect-ratio: 21/9) {
    .bg-container {
        background-size: cover;
        background-position: center center;
    }
}

/* 超高屏适配 */
@media (max-aspect-ratio: 9/16) {
    .bg-container {
        background-size: cover;
        background-position: center 25%;
    }
}

.bg-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background: var(--bg-overlay, rgba(0,0,0,0.3));
    transition: all 0.5s ease;
}

.hamburger {
    position: fixed;
    top: 20px;
    left: 20px;
    width: 40px;
    height: 40px;
    cursor: pointer;
    z-index: 1001;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 8px;
    transition: all 0.3s;
}

.hamburger:hover {
    background: white;
    transform: scale(1.1);
}

.hamburger span {
    width: 20px;
    height: 2px;
    background: #333;
    margin: 2px 0;
    transition: 0.3s;
}

.sidebar {
    position: fixed;
    top: 0;
    left: -300px;
    width: 300px;
    height: 100vh;
    background: white;
    z-index: 1000;
    transition: left 0.3s;
    box-shadow: 2px 0 10px rgba(0,0,0,0.1);
}

.sidebar.active {
    left: 0;
}

.sidebar-header {
    padding: 20px;
    background: #4CAF50;
    color: white;
}

.sidebar-header h3 {
    font-size: 18px;
}

.sidebar-menu {
    padding: 20px 0;
}

.menu-item {
    display: flex;
    align-items: center;
    padding: 15px 20px;
    color: #333;
    text-decoration: none;
    border-bottom: 1px solid #eee;
    transition: all 0.2s;
}

.menu-item:hover {
    background: #f5f5f5;
    padding-left: 30px;
}

.menu-item.active {
    background: #e8f5e9;
    border-left: 4px solid #4CAF50;
    color: #4CAF50;
    font-weight: bold;
}

.menu-icon {
    width: 24px;
    height: 24px;
    margin-right: 12px;
    flex-shrink: 0;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}

.menu-icon.fallback {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #4CAF50;
    border-radius: 50%;
    color: white;
    font-size: 12px;
    font-weight: bold;
}

.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
}

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

.main-content {
    padding: 20px;
    min-height: 100vh;
}

.welcome-screen {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
}

.welcome-card {
    background: rgba(255, 255, 255, 0.95);
    padding: 40px;
    border-radius: 20px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    max-width: 500px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.2);
}

.welcome-card h1 {
    color: #333;
    margin-bottom: 20px;
    font-size: 28px;
}

.welcome-card p {
    color: #666;
    margin-bottom: 30px;
    font-size: 16px;
    line-height: 1.6;
}

.features {
    display: flex;
    justify-content: space-around;
    margin-top: 30px;
}

.feature {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.feature .icon {
    font-size: 24px;
}

.feature span:last-child {
    color: #666;
    font-size: 14px;
}

.group-content {
    max-width: 1200px;
    margin: 0 auto;
    padding-top: 80px;
}

.group-header {
    text-align: center;
    margin-bottom: 40px;
}

.group-header h1 {
    color: white;
    font-size: 32px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.pwa-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    padding: 20px;
}

.pwa-card {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    padding: 25px;
    text-decoration: none;
    color: #333;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
    transition: all 0.3s;
    border-left: 5px solid #4CAF50;
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255,255,255,0.3);
}

.pwa-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
}

.pwa-card h3 {
    font-size: 18px;
    margin-bottom: 10px;
    color: #4CAF50;
}

.pwa-card p {
    color: #666;
    font-size: 14px;
}

@media (max-width: 768px) {
    .pwa-grid {
        grid-template-columns: 1fr;
        padding: 10px;
    }
    
    .welcome-card {
        margin: 20px;
        padding: 30px 20px;
    }
    
    .features {
        flex-direction: column;
        gap: 20px;
    }
}