/* ==========================================
   Dream Portal - Stylesheet (Material 3 & Glassmorphism)
   ========================================== */

/* 1. 变量与主题定义 */
:root {
    /* Google 品牌色 */
    --google-blue: #1a73e8;
    --google-red: #ea4335;
    --google-yellow: #fbbc05;
    --google-green: #34a853;

    /* 默认亮色模式下的流动色彩背景数据 */
    --bg-gradient: linear-gradient(-45deg, #f6f8fd, #e9eefc, #eef3fc, #e3ebfa);
    --sidebar-bg: rgba(255, 255, 255, 0.75);
    --card-bg: rgba(255, 255, 255, 0.65);
    --card-border: rgba(255, 255, 255, 0.45);
    --card-shadow: 0 8px 32px 0 rgba(18, 25, 41, 0.05);
    --card-hover-shadow: 0 12px 40px 0 rgba(18, 25, 41, 0.1);
    
    --text-primary: #1f2229;
    --text-secondary: #5f6368;
    --text-muted: #80868b;
    --border-color: rgba(0, 0, 0, 0.08);
    
    --input-bg: rgba(255, 255, 255, 0.8);
    --input-focus-bg: #ffffff;
    
    --active-item-bg: rgba(26, 115, 232, 0.1);
    --active-item-text: #1a73e8;
    
    --badge-bg: rgba(26, 115, 232, 0.15);
    --badge-text: #1a73e8;

    --transition-normal: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --sidebar-width: 260px;
    --blur-value: 20px;
}

[data-theme="dark"] {
    /* 默认暗色模式下的背景 */
    --bg-gradient: linear-gradient(-45deg, #0f111a, #171923, #13151e, #1a1d29);
    --sidebar-bg: rgba(22, 25, 35, 0.75);
    --card-bg: rgba(28, 31, 46, 0.6);
    --card-border: rgba(255, 255, 255, 0.05);
    --card-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3);
    --card-hover-shadow: 0 12px 40px 0 rgba(0, 0, 0, 0.45);
    
    --text-primary: #f3f4f6;
    --text-secondary: #a0aec0;
    --text-muted: #718096;
    --border-color: rgba(255, 255, 255, 0.08);
    
    --input-bg: rgba(20, 24, 38, 0.8);
    --input-focus-bg: #141826;
    
    --active-item-bg: rgba(255, 255, 255, 0.08);
    --active-item-text: #63b3ed;
    
    --badge-bg: rgba(99, 179, 237, 0.15);
    --badge-text: #63b3ed;
}

/* 🌈 选项二：天气流动色彩动画类 */
body {
    transition: background var(--transition-normal), color var(--transition-normal);
    background-size: 400% 400% !important;
    animation: gradientBG 15s ease infinite;
}

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

/* 晴天 (Sunny) - 温暖晨曦金背景 */
body.weather-sunny[data-theme="light"] {
    --bg-gradient: linear-gradient(-45deg, #f6f8fd, #fff8e8, #f0f4ff, #fff2cc);
}
body.weather-sunny[data-theme="dark"] {
    --bg-gradient: linear-gradient(-45deg, #0f111a, #1f1b11, #13151f, #282012);
}

/* 多云 (Cloudy) - 清爽淡蓝绿背景 */
body.weather-cloudy[data-theme="light"] {
    --bg-gradient: linear-gradient(-45deg, #f6f8fd, #e6f7ff, #f0fdf4, #e6fcf0);
}
body.weather-cloudy[data-theme="dark"] {
    --bg-gradient: linear-gradient(-45deg, #0f111a, #0b1a24, #0d2217, #0b1e22);
}

/* 小雨 (Rainy) - 静谧深海雨蓝背景 */
body.weather-rainy[data-theme="light"] {
    --bg-gradient: linear-gradient(-45deg, #e9eefc, #dbe4f9, #cbd5f6, #d0e8fc);
}
body.weather-rainy[data-theme="dark"] {
    --bg-gradient: linear-gradient(-45deg, #0a0c16, #121b2d, #1b263b, #111a2f);
}

/* 阴天 (Overcast) - 优雅雾霭灰背景 */
body.weather-overcast[data-theme="light"] {
    --bg-gradient: linear-gradient(-45deg, #f1f3f5, #e9ecef, #dee2e6, #e9ecef);
}
body.weather-overcast[data-theme="dark"] {
    --bg-gradient: linear-gradient(-45deg, #12141c, #1a1c24, #212529, #1a1c24);
}

/* 2. 全局重置与排版 */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Outfit', 'Noto Sans SC', sans-serif;
    background: var(--bg-gradient);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
}

/* 玻璃态卡片通用样式 */
.glass-card {
    background: var(--card-bg);
    backdrop-filter: blur(var(--blur-value));
    -webkit-backdrop-filter: blur(var(--blur-value));
    border: 1px solid var(--card-border);
    border-radius: 16px;
    box-shadow: var(--card-shadow);
    transition: transform var(--transition-normal), box-shadow var(--transition-normal), background var(--transition-normal), border-color var(--transition-normal);
}

.glass-card:hover {
    box-shadow: var(--card-hover-shadow);
}

/* 3. 布局结构 */
.app-layout {
    display: flex;
    min-height: 100vh;
}

/* 4. 侧边栏 (Sidebar) 样式 */
.sidebar {
    width: var(--sidebar-width);
    background: var(--sidebar-bg);
    backdrop-filter: blur(var(--blur-value));
    -webkit-backdrop-filter: blur(var(--blur-value));
    border-right: 1px solid var(--card-border);
    display: flex;
    flex-direction: column;
    padding: 24px 16px;
    position: fixed;
    height: 100vh;
    z-index: 100;
    transition: width var(--transition-normal), background var(--transition-normal), border-color var(--transition-normal);
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px;
    margin-bottom: 32px;
}

.brand-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.brand-text {
    font-size: 20px;
    font-weight: 700;
    background: linear-gradient(90deg, var(--google-blue), var(--google-red), var(--google-yellow), var(--google-green));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -0.5px;
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex-grow: 1;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 14px 16px;
    border: none;
    background: none;
    border-radius: 12px;
    color: var(--text-secondary);
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    text-align: left;
    transition: all var(--transition-normal);
    width: 100%;
}

.nav-item:hover {
    background: var(--border-color);
    color: var(--text-primary);
}

.nav-item.active {
    background: var(--active-item-bg);
    color: var(--active-item-text);
}

.nav-item span {
    font-size: 22px;
}

.sidebar-footer {
    padding-top: 16px;
    border-top: 1px solid var(--border-color);
}

.sidebar-btn {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 14px 16px;
    border: none;
    background: none;
    border-radius: 12px;
    color: var(--text-secondary);
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    width: 100%;
    transition: all var(--transition-normal);
}

.sidebar-btn:hover {
    background: var(--border-color);
    color: var(--text-primary);
}

/* 5. 主内容区 (Main Content) */
.main-content {
    flex-grow: 1;
    margin-left: var(--sidebar-width);
    padding: 40px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    transition: margin-left var(--transition-normal);
}

.content-panel {
    display: none;
    opacity: 0;
    transform: translateY(15px);
    transition: opacity 0.4s ease, transform 0.4s ease;
}

.content-panel.active {
    display: flex;
    flex-direction: column;
    opacity: 1;
    transform: translateY(0);
}

/* Google 品牌色类 */
.google-blue { background-color: var(--google-blue); color: var(--google-blue); }
.google-red { background-color: var(--google-red); color: var(--google-red); }
.google-yellow { background-color: var(--google-yellow); color: var(--google-yellow); }
.google-green { background-color: var(--google-green); color: var(--google-green); }

/* 6. 面板一：工作台仪表盘 (Dashboard) 样式 */
.dashboard-header {
    margin-bottom: 28px;
}

/* 动态时钟与天气卡片 */
.hero-widget {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 28px 36px;
}

.time-section h1 {
    font-size: 44px;
    font-weight: 700;
    letter-spacing: -1px;
    color: var(--text-primary);
    line-height: 1.1;
}

.time-section p {
    font-size: 14px;
    color: var(--text-secondary);
    margin-top: 6px;
    font-weight: 500;
}

.weather-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.weather-icon {
    font-size: 40px !important;
    background: none !important;
}

.weather-details {
    display: flex;
    flex-direction: column;
}

.weather-details .temp {
    font-size: 24px;
    font-weight: 600;
    color: var(--text-primary);
}

.weather-details .condition {
    font-size: 13px;
    color: var(--text-secondary);
}

.weather-city {
    font-size: 13px;
    color: var(--text-muted);
    text-align: right;
    margin-top: 4px;
    font-weight: 500;
}

/* 聚合搜索引擎 */
.search-hub {
    padding: 24px 32px;
    margin-bottom: 28px;
}

.search-engines {
    display: flex;
    gap: 16px;
    margin-bottom: 16px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 10px;
}

.engine-tab {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    padding: 6px 12px 10px 12px;
    position: relative;
    transition: color 0.2s;
    display: flex;
    align-items: center;
    gap: 6px;
}

.engine-indicator {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background-color: var(--text-muted);
    transition: background-color 0.2s;
}

.engine-tab:hover {
    color: var(--text-primary);
}

.engine-tab.active {
    color: var(--text-primary);
}

.engine-tab.active .engine-indicator {
    background-color: var(--accent-color);
}

.engine-tab.active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: var(--accent-color);
    border-radius: 2px;
}

.search-bar-form {
    display: flex;
    align-items: center;
    background: var(--input-bg);
    border: 1px solid var(--border-color);
    border-radius: 28px;
    padding: 4px 12px 4px 20px;
    transition: all var(--transition-normal);
}

.search-bar-form:focus-within {
    background: var(--input-focus-bg);
    border-color: var(--google-blue);
    box-shadow: 0 0 0 3px rgba(26, 115, 232, 0.15);
}

.search-bar-icon {
    color: var(--text-muted);
    font-size: 22px !important;
    margin-right: 12px;
}

.search-bar-input {
    flex-grow: 1;
    border: none;
    background: none;
    outline: none;
    font-size: 16px;
    color: var(--text-primary);
    height: 44px;
    font-family: inherit;
}

.search-bar-submit {
    background: var(--google-blue);
    color: #ffffff;
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s, transform 0.2s;
}

.search-bar-submit:hover {
    background: #155cb4;
    transform: scale(1.05);
}

/* 底部自适应三列网格布局 */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 28px;
}

.grid-card {
    padding: 24px;
    display: flex;
    flex-direction: column;
    min-height: 320px;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.card-title {
    display: flex;
    align-items: center;
    gap: 10px;
}

.card-title span {
    font-size: 24px;
}

.card-title h3 {
    font-size: 18px;
    font-weight: 600;
}

.badge {
    font-size: 12px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 20px;
    background: var(--badge-bg);
    color: var(--badge-text);
}

/* Todo 待办事项组件 */
.todo-body {
    display: flex;
    flex-direction: column;
    gap: 16px;
    flex-grow: 1;
}

#todo-form {
    display: flex;
    gap: 10px;
}

#todo-input {
    flex-grow: 1;
    border: 1px solid var(--border-color);
    background: var(--input-bg);
    border-radius: 10px;
    padding: 10px 14px;
    outline: none;
    font-family: inherit;
    font-size: 14px;
    color: var(--text-primary);
    transition: all var(--transition-normal);
}

#todo-input:focus {
    border-color: var(--google-blue);
    background: var(--input-focus-bg);
}

.todo-add-btn {
    background: var(--google-blue);
    color: #ffffff;
    border: none;
    width: 38px;
    height: 38px;
    border-radius: 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.todo-add-btn:hover {
    background: #155cb4;
}

.todo-list {
    list-style: none;
    max-height: 180px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding-right: 4px;
}

.todo-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    background: var(--border-color);
    border-radius: 10px;
    animation: slideIn 0.2s ease;
}

.todo-item-content {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    flex-grow: 1;
}

.todo-item-content.completed span.todo-text {
    text-decoration: line-through;
    color: var(--text-muted);
}

.todo-checkbox {
    font-size: 20px !important;
    color: var(--text-muted);
    transition: color 0.2s;
}

.todo-item-content.completed .todo-checkbox {
    color: var(--google-green);
}

.todo-text {
    font-size: 14px;
    font-weight: 500;
}

.todo-delete-btn {
    border: none;
    background: none;
    color: var(--text-muted);
    cursor: pointer;
    border-radius: 50%;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s, color 0.2s;
}

.todo-delete-btn:hover {
    background-color: rgba(234, 67, 53, 0.1);
    color: var(--google-red);
}

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

/* 🌈 选项三：随身便签组件样式 */
.note-widget {
    display: flex;
    flex-direction: column;
}

.note-body {
    display: flex;
    flex-grow: 1;
}

#note-textarea {
    width: 100%;
    height: 100%;
    min-height: 180px;
    border: 1px solid var(--border-color);
    background: var(--input-bg);
    border-radius: 10px;
    padding: 12px;
    outline: none;
    font-family: inherit;
    font-size: 14px;
    color: var(--text-primary);
    resize: none;
    line-height: 1.6;
    transition: all var(--transition-normal);
}

#note-textarea:focus {
    border-color: var(--google-yellow);
    background: var(--input-focus-bg);
}

/* 智能翻译组件 */
.translate-body {
    display: flex;
    flex-direction: column;
    gap: 12px;
    flex-grow: 1;
}

.translate-lang-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
}

.translate-lang-toggle select {
    border: 1px solid var(--border-color);
    background: var(--card-bg);
    color: var(--text-primary);
    border-radius: 8px;
    padding: 6px 12px;
    outline: none;
    font-family: inherit;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
}

.swap-icon {
    color: var(--text-secondary);
    cursor: pointer;
    user-select: none;
    padding: 4px;
    border-radius: 50%;
    transition: background-color 0.2s;
}

.swap-icon:hover {
    background-color: var(--border-color);
}

.translate-body textarea {
    border: 1px solid var(--border-color);
    background: var(--input-bg);
    border-radius: 10px;
    padding: 12px;
    outline: none;
    font-family: inherit;
    font-size: 14px;
    color: var(--text-primary);
    resize: none;
    height: 90px;
    transition: all var(--transition-normal);
}

.translate-body textarea:focus {
    border-color: var(--google-green);
    background: var(--input-focus-bg);
}

.translate-result {
    border: 1px solid var(--border-color);
    background: var(--border-color);
    border-radius: 10px;
    padding: 12px;
    font-size: 14px;
    min-height: 70px;
    color: var(--text-primary);
    white-space: pre-wrap;
    font-weight: 500;
}

.translate-submit-btn {
    background: var(--google-green);
    color: #ffffff;
    border: none;
    border-radius: 10px;
    padding: 10px;
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
    width: 100%;
}

.translate-submit-btn:hover {
    background: #2b8c44;
}

/* 7. 面板二：导航大厅 (Nav Hub) 样式 */
.navhub-header {
    margin-bottom: 28px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.navhub-title-section h2 {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.5px;
}

.navhub-title-section p {
    font-size: 14px;
    color: var(--text-secondary);
    margin-top: 4px;
}

.navhub-filter-bar {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 20px 24px;
}

.navhub-search-box {
    display: flex;
    align-items: center;
    background: var(--input-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 6px 14px;
    transition: all var(--transition-normal);
}

.navhub-search-box:focus-within {
    background: var(--input-focus-bg);
    border-color: var(--google-blue);
}

.navhub-search-box span {
    color: var(--text-muted);
    font-size: 20px !important;
    margin-right: 10px;
}

.navhub-search-box input {
    border: none;
    background: none;
    outline: none;
    width: 100%;
    font-family: inherit;
    font-size: 14px;
    color: var(--text-primary);
    height: 28px;
}

.filter-actions-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    flex-wrap: wrap;
    gap: 16px;
}

.filter-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.filter-tag {
    background: none;
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    padding: 8px 16px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    transition: all var(--transition-normal);
}

.filter-tag:hover {
    background: var(--border-color);
    color: var(--text-primary);
}

.filter-tag.active {
    background: var(--active-item-text);
    color: #ffffff;
    border-color: var(--active-item-text);
}

/* 🎨 选项一：新增自定义网址按钮 */
.add-custom-btn {
    background: var(--google-green) !important;
    color: #ffffff !important;
    border: none !important;
    display: flex;
    align-items: center;
    gap: 6px;
    box-shadow: 0 4px 12px rgba(52, 168, 83, 0.2);
}

.add-custom-btn:hover {
    background: #2b8c44 !important;
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(52, 168, 83, 0.3);
}

.add-custom-btn span {
    font-size: 18px !important;
}

/* 导航网址卡片网格 */
.navhub-grid-wrapper {
    flex-grow: 1;
}

.navhub-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
}

/* 导航卡片 */
.nav-card {
    padding: 20px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 190px;
    position: relative;
    overflow: hidden;
}

/* 🎨 选项一：自定义卡片右上角删除按钮 */
.nav-card-delete-btn {
    position: absolute;
    top: 14px;
    right: 14px;
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    border-radius: 50%;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    z-index: 10;
}

.nav-card-delete-btn:hover {
    background-color: rgba(234, 67, 53, 0.1);
    color: var(--google-red);
}

.nav-card-top {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.nav-card-header {
    display: flex;
    align-items: center;
    gap: 12px;
}

.nav-card-icon {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 18px;
    color: #ffffff;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.nav-card-title h4 {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    padding-right: 20px; /* 避开删除按钮 */
}

.nav-card-title span.category-label {
    font-size: 10px;
    color: var(--text-muted);
    font-weight: 700;
    text-transform: uppercase;
}

.nav-card-desc {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.5;
    margin-top: 4px;
}

.nav-card-bottom {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 14px;
}

.nav-card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.feature-tag {
    font-size: 11px;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 6px;
    background: var(--active-item-bg);
    color: var(--active-item-text);
}

.nav-card-link-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px;
    border-radius: 8px;
    background: var(--border-color);
    color: var(--text-primary);
    font-size: 13px;
    font-weight: 600;
    transition: all var(--transition-normal);
}

.nav-card:hover .nav-card-link-btn {
    background: var(--active-item-text);
    color: #ffffff;
}

.nav-card-link-btn span.material-icons-outlined {
    font-size: 16px;
}

/* 🎨 选项一：新增网址 Glassmorphism 弹窗 (Modal) 样式 */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--transition-normal);
}

.modal.active {
    opacity: 1;
    pointer-events: auto;
}

.modal-content {
    width: 90%;
    max-width: 500px;
    padding: 28px;
    animation: modalScale 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

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

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.modal-header h3 {
    font-size: 20px;
    font-weight: 700;
}

.modal-header span {
    cursor: pointer;
    padding: 4px;
    border-radius: 50%;
    transition: background-color 0.2s, color 0.2s;
    color: var(--text-muted);
}

.modal-header span:hover {
    background-color: var(--border-color);
    color: var(--text-primary);
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 18px;
}

.form-group label {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
}

.form-group input, .form-group textarea, .form-group select {
    border: 1px solid var(--border-color);
    background: var(--input-bg);
    border-radius: 8px;
    padding: 10px 12px;
    outline: none;
    font-family: inherit;
    font-size: 14px;
    color: var(--text-primary);
    transition: all var(--transition-normal);
}

.form-group input:focus, .form-group textarea:focus, .form-group select:focus {
    border-color: var(--google-blue);
    background: var(--input-focus-bg);
}

.form-group textarea {
    resize: none;
    height: 80px;
    line-height: 1.5;
}

.modal-submit-btn {
    width: 100%;
    background: var(--google-blue);
    color: white;
    border: none;
    border-radius: 8px;
    padding: 12px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    transition: background-color 0.2s;
    margin-top: 10px;
}

.modal-submit-btn:hover {
    background: #155cb4;
}

/* 8. 响应式布局优化 */
@media (max-width: 1024px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .app-layout {
        flex-direction: column;
    }
    
    .sidebar {
        width: 100%;
        height: auto;
        position: relative;
        padding: 16px;
        border-right: none;
        border-bottom: 1px solid var(--card-border);
    }
    
    .sidebar-brand {
        margin-bottom: 16px;
    }
    
    .sidebar-nav {
        flex-direction: row;
        gap: 8px;
    }
    
    .main-content {
        margin-left: 0;
        padding: 20px;
    }
    
    .hero-widget {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }
}

/* 👥 网友云端共享卡片的闪烁呼吸灯边框特效 */
.nav-card.cloud-shared-card {
    border: 1.5px solid rgba(26, 115, 232, 0.45);
    animation: cardPulse 3.5s infinite ease-in-out;
}

@keyframes cardPulse {
    0% {
        box-shadow: var(--card-shadow), 0 0 4px rgba(26, 115, 232, 0.1);
        border-color: rgba(26, 115, 232, 0.3);
    }
    50% {
        box-shadow: var(--card-shadow), 0 0 15px rgba(26, 115, 232, 0.4);
        border-color: rgba(26, 115, 232, 0.75);
    }
    100% {
        box-shadow: var(--card-shadow), 0 0 4px rgba(26, 115, 232, 0.1);
        border-color: rgba(26, 115, 232, 0.3);
    }
}

/* 隐藏显示工具类 */
.hidden {
    display: none !important;
}

/* ⚙️ 定制工作台触发按钮与微交互 */
.customize-trigger-btn {
    border: 1px solid var(--card-border);
    background: var(--card-bg);
    color: var(--text-primary);
    padding: 12px 20px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: var(--card-shadow);
    transition: all var(--transition-normal);
}

.customize-trigger-btn:hover {
    transform: translateY(-2px);
    border-color: var(--google-blue);
    box-shadow: var(--card-hover-shadow);
}

.customize-trigger-btn span {
    font-size: 18px;
    transition: transform 0.6s ease;
}

.customize-trigger-btn:hover span {
    transform: rotate(60deg);
}

/* 🤖 AI 极速助手侧滑对话抽屉 */
.ai-chat-drawer {
    position: fixed;
    right: -420px;
    top: 0;
    width: 400px;
    height: 100vh;
    z-index: 1100;
    background: var(--sidebar-bg);
    backdrop-filter: blur(var(--blur-value));
    -webkit-backdrop-filter: blur(var(--blur-value));
    border-left: 1px solid var(--card-border);
    box-shadow: -8px 0 32px rgba(18, 25, 41, 0.15);
    transition: right 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
}

[data-theme="dark"] .ai-chat-drawer {
    box-shadow: -8px 0 32px rgba(0, 0, 0, 0.5);
}

.ai-chat-drawer.open {
    right: 0 !important;
}

@media (max-width: 500px) {
    .ai-chat-drawer {
        width: 100%;
        right: -100%;
    }
    .ai-chat-drawer.open {
        right: 0 !important;
    }
}

.chat-header {
    padding: 24px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.chat-title {
    display: flex;
    align-items: center;
    gap: 10px;
}

.chat-title h4 {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary);
}

#close-chat-btn {
    cursor: pointer;
    color: var(--text-muted);
    padding: 4px;
    border-radius: 50%;
    transition: background-color 0.2s, color 0.2s;
}

#close-chat-btn:hover {
    background-color: var(--border-color);
    color: var(--text-primary);
}

.chat-messages {
    flex-grow: 1;
    padding: 24px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.message {
    padding: 12px 16px;
    border-radius: 12px;
    font-size: 14px;
    line-height: 1.6;
    max-width: 85%;
    word-wrap: break-word;
    animation: messageFadeIn 0.25s ease;
}

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

.ai-message {
    background: var(--border-color);
    color: var(--text-primary);
    align-self: flex-start;
    border-bottom-left-radius: 4px;
}

.user-message {
    background: var(--google-blue);
    color: white;
    align-self: flex-end;
    border-bottom-right-radius: 4px;
}

.chat-footer {
    padding: 16px 24px;
    border-top: 1px solid var(--border-color);
    font-size: 12px;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 8px;
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: var(--google-green);
    animation: pulseDot 2s infinite ease-in-out;
}

@keyframes pulseDot {
    0% { transform: scale(0.9); opacity: 0.5; }
    50% { transform: scale(1.1); opacity: 1; }
    100% { transform: scale(0.9); opacity: 0.5; }
}

/* 🗳️ 网友投票大厅样式 */
.vote-btn {
    border: 1px solid var(--border-color);
    background: var(--border-color);
    color: var(--text-primary);
    padding: 10px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: all var(--transition-normal);
}

.vote-btn:hover:not(:disabled) {
    background: var(--google-yellow);
    border-color: var(--google-yellow);
    color: #202124;
}

.vote-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.vote-btn.voted {
    background: rgba(251, 188, 5, 0.15);
    border-color: var(--google-yellow);
    color: var(--google-yellow);
}

/* 🏆 票王金色卡片发光特效 */
.nav-card.weekly-top-card {
    border: 1.5px solid rgba(251, 188, 5, 0.85);
    background: linear-gradient(135deg, rgba(255, 248, 224, 0.25), var(--card-bg)) !important;
    box-shadow: 0 8px 32px 0 rgba(251, 188, 5, 0.15);
    animation: goldShimmer 4s infinite ease-in-out;
}

[data-theme="dark"] .nav-card.weekly-top-card {
    background: linear-gradient(135deg, rgba(251, 188, 5, 0.05), var(--card-bg)) !important;
}

@keyframes goldShimmer {
    0% { border-color: rgba(251, 188, 5, 0.5); }
    50% { border-color: rgba(251, 188, 5, 0.95); box-shadow: 0 8px 32px 0 rgba(251, 188, 5, 0.3); }
    100% { border-color: rgba(251, 188, 5, 0.5); }
}

.weekly-top-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    font-size: 10px;
    font-weight: 700;
    color: #b98a00;
    background: rgba(251, 188, 5, 0.25);
    padding: 3px 8px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    gap: 4px;
    z-index: 5;
    border: 1px solid rgba(251, 188, 5, 0.4);
}

[data-theme="dark"] .weekly-top-badge {
    color: #ffd043;
    background: rgba(251, 188, 5, 0.15);
}

