/* assets/css/style.css - V9.2 极光水晶宫格版 */

:root {
    --primary: #007AFF;
    --text-main: #1D1D1F;
    --text-sub: #86868B;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

body {
    margin: 0; padding: 0;
    font-family: -apple-system, "PingFang SC", "Helvetica Neue", sans-serif;
    color: var(--text-main);
    min-height: 100vh;
    background-attachment: fixed;
    
    /* 极光渐变背景 */
    background: 
        radial-gradient(circle at 0% 0%, rgba(50, 200, 255, 0.6), transparent 40%),
        radial-gradient(circle at 100% 0%, rgba(100, 50, 255, 0.4), transparent 40%),
        radial-gradient(circle at 100% 100%, rgba(0, 100, 255, 0.4), transparent 40%),
        radial-gradient(circle at 0% 100%, rgba(50, 255, 200, 0.4), transparent 40%),
        linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    background-size: 200% 200%;
    animation: aurora 15s ease infinite;
}

@keyframes aurora { 0%{background-position:0% 50%} 50%{background-position:100% 50%} 100%{background-position:0% 50%} }

/* --- 子页面主题覆盖 --- */
body.theme-eat { background: linear-gradient(180deg, #FFFFFF 0%, #E3F2FD 100%); --nav-active: #007AFF; }
body.theme-play { background: linear-gradient(to bottom, #203A43, #2C5364); color: #FFF; --nav-active: #FFD700; --text-main: #FFF; --text-sub: rgba(255,255,255,0.6); }
body.theme-task { background: linear-gradient(180deg, #FFF 0%, #FFF0F5 100%); --nav-active: #D46A86; }
body.theme-dice { background: linear-gradient(180deg, #FFF 0%, #F1F8E9 100%); --nav-active: #4CAF50; }

/* --- 布局容器 --- */
.app-container, .home-container {
    max-width: 480px; margin: 0 auto; min-height: 100vh;
    display: flex; flex-direction: column; padding: 20px; position: relative;
}
.home-container { justify-content: center; }

/* --- 顶部组件 --- */
.top-widget {
    position: absolute; top: 20px; z-index: 100;
    display: flex; align-items: center; gap: 6px;
    background: rgba(255,255,255,0.15); backdrop-filter: blur(12px);
    padding: 8px 14px; border-radius: 20px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    font-size: 13px; font-weight: 600; color: #FFF; 
    text-decoration: none; border: 1px solid rgba(255,255,255,0.2);
    transition: all 0.2s;
}
.top-widget:active { transform: scale(0.95); background: rgba(255,255,255,0.3); }
.weather-widget { left: 20px; }
.admin-widget { right: 20px; }
body.theme-eat .top-widget, body.theme-task .top-widget, body.theme-dice .top-widget { color: #555; background: rgba(255,255,255,0.6); }

/* --- 首页核心：极光玻璃卡片 --- */
.home-glass-card {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(30px) saturate(120%);
    -webkit-backdrop-filter: blur(30px) saturate(120%);
    border-radius: 30px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2), inset 0 0 0 1px rgba(255, 255, 255, 0.1);
    padding: 40px 30px; text-align: center; color: #FFF;
}

/* 卡片头部 */
.home-header { margin-bottom: 40px; }
.home-logo { 
    font-size: 48px; margin-bottom: 15px; 
    text-shadow: 0 4px 20px rgba(0,0,0,0.2);
    animation: float 6s ease-in-out infinite;
}
@keyframes float { 0%,100%{transform:translateY(0)} 50%{transform:translateY(-10px)} }
.home-title { font-size: 28px; font-weight: 800; margin: 0; letter-spacing: 1px; }
.home-slogan { font-size: 14px; opacity: 0.7; margin-top: 8px; font-weight: 400; letter-spacing: 0.5px; }

/* [V9.2] 2x2 水晶宫格菜单 */
.grid-menu {
    display: grid;
    grid-template-columns: 1fr 1fr; /* 2列 */
    gap: 15px; /* 间距 */
}

.grid-card {
    /* 小玻璃砖样式 */
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 24px;
    padding: 25px 15px;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    text-decoration: none; color: #FFF;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

/* 悬浮/点击效果：变亮并放大 */
.grid-card:hover, .grid-card:active {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.05);
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
    border-color: rgba(255, 255, 255, 0.3);
}

.grid-icon { font-size: 36px; margin-bottom: 12px; filter: drop-shadow(0 4px 8px rgba(0,0,0,0.2)); }
.grid-title { font-size: 16px; font-weight: 600; }

/* --- 子页面组件 (保持 V8 样式) --- */
.page-header { text-align: center; margin-bottom: 30px; position: relative; z-index: 2; }
.large-title { font-size: 32px; font-weight: 800; margin: 0; letter-spacing: -1px; }
.subtitle { font-size: 15px; color: var(--text-sub); margin-top: 8px; }
.filter-btn-wrap { display: flex; justify-content: center; margin-top: 30px; position: relative; z-index: 10; }
.btn-capsule { padding: 10px 24px; border-radius: 30px; font-size: 14px; font-weight: 600; background: rgba(255,255,255,0.6); border: 1px solid rgba(0,0,0,0.05); backdrop-filter: blur(5px); box-shadow: 0 4px 10px rgba(0,0,0,0.05); cursor: pointer; transition: 0.2s; color: var(--text-main); }
.theme-play .btn-capsule { background: rgba(255,255,255,0.1); color: #FFD700; border-color: rgba(255,215,0,0.3); }
.sheet-mask { position: fixed; inset: 0; background: rgba(0,0,0,0.5); backdrop-filter: blur(5px); z-index: 1000; display: none; align-items: center; justify-content: center; opacity: 0; transition: opacity 0.3s; }
.sheet-mask.show { display: flex; opacity: 1; }
.sheet-content { background: #fff; width: 85%; max-width: 320px; border-radius: 24px; padding: 25px; text-align: center; box-shadow: 0 20px 50px rgba(0,0,0,0.3); transform: scale(0.9); transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275); color: #333; }
.sheet-mask.show .sheet-content { transform: scale(1); }
.theme-play .sheet-content { background: #1B2735; color: #fff; border: 1px solid rgba(255,255,255,0.1); }
.btn-primary { width:100%; display: block; padding: 12px; border-radius: 12px; font-size: 15px; font-weight: bold; text-align: center; cursor: pointer; border: none; transition: 0.2s; color:white; background: var(--primary); }
.btn-primary:active { transform: scale(0.98); opacity: 0.9; }
.toast { position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%); background: rgba(0,0,0,0.8); color: #fff; padding: 10px 20px; border-radius: 30px; font-size: 13px; backdrop-filter: blur(10px); pointer-events: none; opacity: 0; transition: opacity 0.3s; z-index: 2000; }
.toast.show { opacity: 1; }
.site-footer { text-align: center; margin-top: 30px; font-size: 12px; color: rgba(255,255,255,0.4); }