/* ============================================
   Glassmorphism Style - 玻璃拟态风格
   ============================================ */

/* 全局变量 */
:root {
    --glass-bg: rgba(255, 255, 255, 0.15);
    --glass-border: rgba(255, 255, 255, 0.25);
    --glass-blur: 20px;
    --glass-radius: 16px;
    --glass-shadow: inset 0 1px 1px rgba(255,255,255,0.3), 0 8px 32px rgba(0,0,0,0.1);
    --primary-color: #667eea;
    --primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --text-primary: #1a1a1a;
    --text-secondary: rgba(255, 255, 255, 0.9);
    --text-muted: rgba(255, 255, 255, 0.7);
}

/* 背景样式 - macOS Big Sur风格 */
body {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 25%, #f093fb 50%, #f5576c 75%, #4facfe 100%);
    background-attachment: fixed;
    min-height: 100vh;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

/* 背景装饰元素 */
body::before,
body::after {
    content: '';
    position: fixed;
    border-radius: 50%;
    opacity: 0.3;
    pointer-events: none;
    z-index: -1;
}

body::before {
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(255,255,255,0.4) 0%, transparent 70%);
    top: -100px;
    right: -100px;
    animation: float 15s ease-in-out infinite;
}

body::after {
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(255,255,255,0.3) 0%, transparent 70%);
    bottom: -100px;
    left: -100px;
    animation: float 12s ease-in-out infinite reverse;
}

@keyframes float {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(30px, -30px) scale(1.1); }
}

/* 玻璃容器基础样式 */
.glass-container {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 16px;
    box-shadow: inset 0 1px 1px rgba(255,255,255,0.3), 0 8px 32px rgba(0,0,0,0.1);
    position: relative;
    overflow: hidden;
}

/* 光泽扫过效果 */
.glass-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
    transition: left 0.6s ease;
}

.glass-container:hover::before {
    left: 100%;
}

/* 悬停效果 */
.glass-container:hover {
    transform: translateY(-4px);
    box-shadow: inset 0 1px 1px rgba(255,255,255,0.3), 0 12px 40px rgba(0,0,0,0.15);
}

/* 按钮样式 */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    border: none;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.btn-primary {
    background: rgba(255, 255, 255, 0.25);
    color: #fff;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.btn-primary:hover {
    background: rgba(255, 255, 255, 0.35);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.btn-secondary {
    background: transparent;
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.4);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-2px);
}

.btn-danger {
    background: rgba(245, 87, 108, 0.3);
    color: #fff;
    border: 1px solid rgba(245, 87, 108, 0.5);
}

.btn-danger:hover {
    background: rgba(245, 87, 108, 0.5);
}

/* 涟漪效果 */
.btn::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.6s ease, height 0.6s ease, opacity 0.6s ease;
    opacity: 0;
}

.btn:active::after {
    width: 300px;
    height: 300px;
    opacity: 1;
}

/* 图标按钮 */
.btn-icon {
    width: 44px;
    height: 44px;
    padding: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.25);
    color: #fff;
    font-size: 18px;
}

.btn-icon:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: scale(1.05);
}

/* 输入框样式 */
.input-field {
    width: 100%;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    color: #fff;
    font-size: 14px;
    outline: none;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.input-field::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.input-field:focus {
    border-color: rgba(255, 255, 255, 0.5);
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.3);
}

/* 导航栏样式 */
.nav-glass {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(30px) saturate(180%);
    -webkit-backdrop-filter: blur(30px) saturate(180%);
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
    padding: 12px 20px;
}

.nav-content {
    max-width: 480px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-title {
    font-size: 18px;
    font-weight: 700;
    color: #fff;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

/* 底部导航 */
.bottom-nav-glass {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 100;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(30px) saturate(180%);
    -webkit-backdrop-filter: blur(30px) saturate(180%);
    border-top: 1px solid rgba(255, 255, 255, 0.15);
    padding: 8px 0;
    padding-bottom: calc(8px + env(safe-area-inset-bottom));
}

.bottom-nav-content {
    max-width: 480px;
    margin: 0 auto;
    display: flex;
    justify-content: space-around;
}

.bottom-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 8px 16px;
    color: rgba(255, 255, 255, 0.7);
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.bottom-nav-item.active {
    color: #fff;
}

.bottom-nav-item.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    width: 24px;
    height: 3px;
    background: #fff;
    border-radius: 2px;
}

.bottom-nav-icon {
    font-size: 22px;
    margin-bottom: 4px;
}

.bottom-nav-label {
    font-size: 11px;
}

/* 卡片样式 */
.card-glass {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 20px;
    padding: 20px;
    margin-bottom: 16px;
    transition: all 0.3s ease;
}

.card-glass:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.2);
}

.card-title {
    font-size: 16px;
    font-weight: 600;
    color: #fff;
    margin-bottom: 8px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.card-text {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.5;
}

/* 弹窗样式 */
.modal-mask-glass {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-glass {
    width: 88%;
    max-width: 440px;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 20px;
    overflow: hidden;
    animation: slideUp 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

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

.modal-header {
    padding: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
}

.modal-title {
    font-size: 18px;
    font-weight: 600;
    color: #fff;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.modal-body {
    padding: 20px;
}

.modal-footer {
    padding: 16px 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.15);
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

/* 用户中心样式 */
.profile-section {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
    padding: 30px 20px 20px;
}

.profile-avatar-glass {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 3px solid rgba(255, 255, 255, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
    position: relative;
    overflow: hidden;
}

.profile-avatar-glass img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.profile-name {
    font-size: 22px;
    font-weight: 700;
    color: #fff;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
    margin-bottom: 4px;
}

.profile-id {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.7);
}

/* 菜单列表 */
.menu-list-glass {
    padding: 16px;
}

.menu-item-glass {
    display: flex;
    align-items: center;
    padding: 16px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 16px;
    margin-bottom: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.menu-item-glass:last-child {
    margin-bottom: 0;
}

.menu-item-glass:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateX(4px);
}

.menu-icon-glass {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 18px;
    margin-right: 14px;
}

.menu-text-glass {
    flex: 1;
    font-size: 15px;
    color: #fff;
}

.menu-arrow-glass {
    color: rgba(255, 255, 255, 0.5);
    font-size: 14px;
}

/* 积分卡片 */
.points-card-glass {
    display: flex;
    align-items: center;
    padding: 20px;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.3) 0%, rgba(118, 75, 162, 0.3) 100%);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 16px;
    margin: 16px;
}

.points-icon {
    font-size: 32px;
    margin-right: 16px;
}

.points-info {
    flex: 1;
}

.points-label {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 4px;
}

.points-value {
    font-size: 28px;
    font-weight: 700;
    color: #fff;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

/* 兼容性回退 */
@supports not (backdrop-filter: blur(20px)) {
    .glass-container,
    .card-glass,
    .modal-glass,
    .nav-glass,
    .bottom-nav-glass {
        background: rgba(255, 255, 255, 0.7);
        border-color: rgba(0, 0, 0, 0.1);
    }
    
    .card-title,
    .profile-name,
    .modal-title,
    .nav-title,
    .menu-text-glass,
    .points-value {
        color: #1a1a1a;
        text-shadow: none;
    }
    
    .card-text,
    .profile-id,
    .points-label,
    .bottom-nav-item {
        color: #666;
    }
    
    .btn-primary {
        background: #667eea;
    }
}

/* 响应式适配 */
@media (max-width: 480px) {
    .glass-container,
    .card-glass {
        border-radius: 12px;
        padding: 16px;
    }
    
    .btn {
        padding: 10px 20px;
        font-size: 13px;
    }
    
    .profile-section {
        padding: 24px 16px 16px;
    }
    
    .profile-avatar-glass {
        width: 75px;
        height: 75px;
    }
    
    .menu-item-glass {
        padding: 14px;
    }
}