/* Material 3 基础配色 */
:root {
    --primary: #6200ee;
    --on-primary: #ffffff;
    --background: #ffffff;
    --surface: #ffffff;
    --error: #b00020;
    --on-background: #000000;
    --on-surface: #000000;
  }
  
  /* 全局 */
  body, html {
    margin: 0;
    padding: 0;
    font-family: 'Roboto', 'Noto Sans', sans-serif;
    background-color: var(--background);
    color: var(--on-background);
    height: 100%;
    overflow: hidden;
  }
  
  #app {
    display: flex;
    flex-direction: column;
    height: 100%;
  }
  
  /* 顶部 AppBar */
  .top-app-bar {
    background-color: var(--primary);
    color: var(--on-primary);
    display: flex;
    align-items: center;
    padding: 0 16px;
    height: 56px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
  }
  
  .top-app-bar__row {
    display: flex;
    justify-content: space-between;
    width: 100%;
  }
  
  .icon-button {
    background: none;
    border: none;
    color: inherit;
    padding: 8px;
    cursor: pointer;
    outline: none;
  }
  .icon-button svg {
    width: 24px;
    height: 24px;
    fill: currentColor;
  }
  
  /* 主内容 */
  #main-content {
    flex: 1;
    overflow-y: auto;
    padding: 8px;
    background: var(--surface);
  }
  
  /* tab 页面 */
  .tab-page {
    display: none;
  }
  .tab-page.active {
    display: block;
  }
  
  /* 底部导航栏 */
  .bottom-nav {
    display: flex;
    height: 56px;
    border-top: 1px solid #ccc;
    background: var(--surface);
  }
  .nav-button {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: var(--on-surface);
    background: none;
    border: none;
    font-size: 12px;
    padding: 4px 0;
  }
  .nav-button svg {
    width: 24px;
    height: 24px;
    fill: currentColor;
  }
  .nav-button.active {
    color: var(--primary);
  }
  
  /* FAB */
  .fab {
    position: fixed;
    bottom: 72px;
    right: 16px;
    background-color: var(--primary);
    color: var(--on-primary);
    border-radius: 50%;
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 6px 10px rgba(0,0,0,0.24);
    border: none;
    cursor: pointer;
  }
  .fab svg {
    width: 24px;
    height: 24px;
    fill: currentColor;
  }
  
  /* 表单元素 */
  .settings-form input,
  .settings-form select {
    width: 100%;
    margin: 8px 0;
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 4px;
  }
  .settings-form label {
    font-size: 14px;
    margin-top: 16px;
    display: block;
  }
  
  /* Loading Spinner */
  .spinner {
    border: 4px solid #ccc;
    border-top: 4px solid var(--primary);
    border-radius: 50%;
    width: 24px;
    height: 24px;
    animation: spin 1s linear infinite;
    display: inline-block;
  }
  @keyframes spin {
    0% { transform: rotate(0deg);}
    100% { transform: rotate(360deg);}
  }
  
  /* 弹窗 */
  #dialog-container {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0,0,0,0.5);
    display: none;
    justify-content: center;
    align-items: center;
  }
  .dialog {
    background: var(--surface);
    border-radius: 8px;
    padding: 16px;
    max-width: 90%;
    box-shadow: 0 2px 10px rgba(0,0,0,0.3);
  }
  
  .hidden {
    display: none;
  }
  