body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen',
    'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue',
    sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

code {
  font-family: source-code-pro, Menlo, Monaco, Consolas, 'Courier New',
    monospace;
}

.page-container {
  width: 100%;
  max-width: 95%;
  margin-left: auto;
  margin-right: auto;
  padding: 20px;
  box-sizing: border-box;
}

.page-container h2 {
  font-size: 24px;
  color: #333;
  margin-bottom: 15px;
  padding-bottom: 10px;
  border-bottom: 1px solid #eee;
}

.analysis-description {
  margin: 10px 0 20px;
  font-size: 16px;
  line-height: 1.6;
  color: #333;
  max-width: 100%;
  width: 100%;
  text-align: justify;
  -webkit-hyphens: auto;
          hyphens: auto;
  word-wrap: break-word;
}

.page-content {
  width: 100%;
}

@media (max-width: 768px) {
  .page-container {
    max-width: 100%;
    padding: 0px;
  }
  h1 {
    text-align: center;
  }
}

/* 🍎 蘋果風格登入按鈕設計 - 2025 優化版 - 專用於認證對話框 */
.signin-dialog .btn-primary,
.auth-dialog .btn-primary,
.signin-dialog-overlay .btn-primary {
    /* 重置基礎樣式 */
    all: unset;
    box-sizing: border-box;

    /* 核心視覺設計 */
    background: linear-gradient(135deg, #007AFF 0%, #5856D6 50%, #AF52DE 100%);
    border: none;
    border-radius: 16px;
    color: white;

    /* 字體與文字 */
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Helvetica Neue', Arial, sans-serif;
    font-size: 17px;
    font-weight: 600;
    letter-spacing: -0.2px;
    text-align: center;
    text-decoration: none;

    /* 佈局與尺寸 */
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 16px 32px;
    margin: 8px auto !important;
    width: auto !important;
    max-width: 200px !important;
    min-height: 50px;

    /* 互動與動畫 */
    cursor: pointer;
    user-select: none;
    -webkit-user-select: none;
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);

    /* 蘋果風格多層陰影 */
    box-shadow:
        0 8px 24px rgba(0, 122, 255, 0.25),
        0 4px 12px rgba(0, 122, 255, 0.15),
        0 2px 4px rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);

    /* 初始狀態 */
    transform: translateY(0) scale(1);
    opacity: 1;

    /* 微妙的內部光澤效果 */
    position: relative;
    overflow: hidden;
}

/* Hover 效果 - 蘋果風格的微妙提升 */
.signin-dialog .btn-primary:hover,
.auth-dialog .btn-primary:hover,
.signin-dialog-overlay .btn-primary:hover {
    background: linear-gradient(135deg, #0056CC 0%, #4A44B8 50%, #9A47C7 100%);
    transform: translateY(-3px) scale(1.02);
    box-shadow:
        0 16px 40px rgba(0, 122, 255, 0.35),
        0 8px 20px rgba(0, 122, 255, 0.25),
        0 4px 12px rgba(0, 0, 0, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

/* 專注狀態 - 無障礙設計 */
.signin-dialog .btn-primary:focus-visible,
.auth-dialog .btn-primary:focus-visible,
.signin-dialog-overlay .btn-primary:focus-visible {
    outline: 3px solid rgba(0, 122, 255, 0.5);
    outline-offset: 2px;
}

/* Active 效果 - 按下時的回饋 */
.signin-dialog .btn-primary:active,
.auth-dialog .btn-primary:active,
.signin-dialog-overlay .btn-primary:active {
    transform: translateY(1px) scale(0.98);
    background: linear-gradient(135deg, #004999 0%, #3D3A9F 50%, #8A3FB4 100%);
    box-shadow:
        0 4px 12px rgba(0, 122, 255, 0.2),
        0 2px 6px rgba(0, 122, 255, 0.1),
        inset 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: all 0.1s ease;
}

/* 禁用狀態 - 優雅的灰色 */
.signin-dialog .btn-primary:disabled,
.auth-dialog .btn-primary:disabled,
.signin-dialog-overlay .btn-primary:disabled {
    background: linear-gradient(135deg, #8E8E93 0%, #AEAEB2 100%);
    color: rgba(255, 255, 255, 0.6);
    cursor: not-allowed;
    transform: none;
    box-shadow:
        0 2px 8px rgba(0, 0, 0, 0.1),
        0 1px 4px rgba(0, 0, 0, 0.05);
    opacity: 0.6;
}

/* 響應式設計 - 移動設備優化 */
@media (max-width: 480px) {
    .signin-dialog .btn-primary,
    .auth-dialog .btn-primary,
    .signin-dialog-overlay .btn-primary {
        font-size: 16px !important;
        padding: 14px 28px !important;
        max-width: 180px !important;
        min-height: 48px;
        border-radius: 14px;

        /* 移動設備上的觸控優化 */
        -webkit-tap-highlight-color: transparent;
        touch-action: manipulation;
    }
}

/* 平板設備優化 */
@media (min-width: 481px) and (max-width: 768px) {
    .signin-dialog .btn-primary,
    .auth-dialog .btn-primary,
    .signin-dialog-overlay .btn-primary {
        font-size: 17px !important;
        padding: 15px 30px !important;
        max-width: 190px !important;
        min-height: 49px;
    }
}

/* 觸控設備優化 */
@media (hover: none) and (pointer: coarse) {
    .signin-dialog .btn-primary,
    .auth-dialog .btn-primary,
    .signin-dialog-overlay .btn-primary {
        min-height: 52px;
        padding: 16px 32px !important;
        max-width: 200px !important;
    }

    .signin-dialog .btn-primary:hover,
    .auth-dialog .btn-primary:hover,
    .signin-dialog-overlay .btn-primary:hover {
        transform: none;
    }

    .signin-dialog .btn-primary:active,
    .auth-dialog .btn-primary:active,
    .signin-dialog-overlay .btn-primary:active {
        transform: scale(0.95);
        transition: transform 0.1s ease;
    }
}

/* 🍎 Top Navigation 登入按鈕 - 蘋果風格設計 */
.top-nav .user-actions .btn-primary {
    /* 重置基礎樣式 */
    all: unset;
    box-sizing: border-box;

    /* 核心視覺設計 */
    background: linear-gradient(135deg, #007AFF 0%, #5856D6 50%, #AF52DE 100%);
    border: none;
    border-radius: 12px;
    color: white;

    /* 字體與文字 */
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Helvetica Neue', Arial, sans-serif;
    font-size: 14px !important;
    font-weight: 600;
    letter-spacing: -0.1px;
    text-align: center;
    text-decoration: none;

    /* 佈局與尺寸 - 適合 top-nav */
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 6px;
    padding: 8px 16px !important;
    margin: 0 !important;
    width: auto !important;
    max-width: 120px !important;
    height: 32px !important;
    min-height: 32px !important;

    /* 互動與動畫 */
    cursor: pointer;
    user-select: none;
    -webkit-user-select: none;
    transition: all 0.2s cubic-bezier(0.25, 0.46, 0.45, 0.94);

    /* 蘋果風格陰影 - 較輕微適合 top-nav */
    box-shadow:
        0 4px 12px rgba(0, 122, 255, 0.2),
        0 2px 6px rgba(0, 122, 255, 0.1),
        0 1px 2px rgba(0, 0, 0, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.15);

    /* 初始狀態 */
    transform: translateY(0) scale(1);
    opacity: 1;

    /* 微妙的內部光澤效果 */
    position: relative;
    overflow: hidden;
}

/* Top-nav 按鈕 Hover 效果 */
.top-nav .user-actions .btn-primary:hover {
    background: linear-gradient(135deg, #0056CC 0%, #4A44B8 50%, #9A47C7 100%);
    transform: translateY(-1px) scale(1.02);
    box-shadow:
        0 6px 16px rgba(0, 122, 255, 0.25),
        0 3px 8px rgba(0, 122, 255, 0.15),
        0 2px 4px rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

/* Top-nav 按鈕 Focus 狀態 */
.top-nav .user-actions .btn-primary:focus-visible {
    outline: 2px solid rgba(0, 122, 255, 0.5);
    outline-offset: 1px;
}

/* Top-nav 按鈕 Active 效果 */
.top-nav .user-actions .btn-primary:active {
    transform: translateY(0) scale(0.98);
    background: linear-gradient(135deg, #004999 0%, #3D3A9F 50%, #8A3FB4 100%);
    box-shadow:
        0 2px 6px rgba(0, 122, 255, 0.15),
        0 1px 3px rgba(0, 122, 255, 0.08),
        inset 0 1px 2px rgba(0, 0, 0, 0.08);
    transition: all 0.1s ease;
}

/* Top-nav 按鈕禁用狀態 */
.top-nav .user-actions .btn-primary:disabled {
    background: linear-gradient(135deg, #8E8E93 0%, #AEAEB2 100%);
    color: rgba(255, 255, 255, 0.6);
    cursor: not-allowed;
    transform: none;
    box-shadow:
        0 1px 4px rgba(0, 0, 0, 0.08),
        0 1px 2px rgba(0, 0, 0, 0.04);
    opacity: 0.6;
}

/* Top-nav 按鈕內部光澤效果 */
.top-nav .user-actions .btn-primary::before {
    content: '';
    position: absolute;
    top: 1px;
    left: 1px;
    right: 1px;
    height: 40%;
    background: linear-gradient(180deg,
            rgba(255, 255, 255, 0.2) 0%,
            rgba(255, 255, 255, 0.08) 50%,
            transparent 100%);
    border-radius: 11px 11px 0 0;
    pointer-events: none;
    opacity: 1;
    transition: opacity 0.2s ease;
}

.top-nav .user-actions .btn-primary:hover::before {
    opacity: 0.8;
}

.top-nav .user-actions .btn-primary:active::before {
    opacity: 0.3;
}

/* 響應式設計 - 手機版 top-nav 按鈕 */
@media (max-width: 1300px) {
    .top-nav .user-actions .btn-primary {
        font-size: 13px !important;
        padding: 6px 12px !important;
        max-width: 100px !important;
        height: 28px !important;
        min-height: 28px !important;
        border-radius: 10px;
    }

    .top-nav .user-actions .btn-primary::before {
        border-radius: 9px 9px 0 0;
    }
}

/* 深色模式支援 - Top-nav 按鈕 */
@media (prefers-color-scheme: dark) {
    .top-nav .user-actions .btn-primary {
        background: linear-gradient(135deg, #0A84FF 0%, #5E5CE6 50%, #BF5AF2 100%);
        box-shadow:
            0 4px 12px rgba(10, 132, 255, 0.25),
            0 2px 6px rgba(10, 132, 255, 0.15),
            0 1px 2px rgba(0, 0, 0, 0.2),
            inset 0 1px 0 rgba(255, 255, 255, 0.1);
    }

    .top-nav .user-actions .btn-primary:hover {
        background: linear-gradient(135deg, #0066E6 0%, #5048CC 50%, #A845E8 100%);
        box-shadow:
            0 6px 16px rgba(10, 132, 255, 0.3),
            0 3px 8px rgba(10, 132, 255, 0.2),
            0 2px 4px rgba(0, 0, 0, 0.25),
            inset 0 1px 0 rgba(255, 255, 255, 0.15);
    }

    .top-nav .user-actions .btn-primary:active {
        background: linear-gradient(135deg, #0052CC 0%, #423DB8 50%, #9538D4 100%);
        box-shadow:
            0 2px 6px rgba(10, 132, 255, 0.2),
            0 1px 3px rgba(10, 132, 255, 0.1),
            inset 0 1px 2px rgba(0, 0, 0, 0.15);
    }

    .top-nav .user-actions .btn-primary::before {
        background: linear-gradient(180deg,
                rgba(255, 255, 255, 0.12) 0%,
                rgba(255, 255, 255, 0.04) 50%,
                transparent 100%);
    }
}
/* 引入認證按鈕樣式 */

body, html {
  overflow-x: hidden;
}

body {
  font-family: 'Roboto', sans-serif;
  margin: 0;
  padding: 0;
  background-color: #f0f2f5;
  background-color: var(--color-bg-page, #f0f2f5);
  min-height: 100vh;
  width: 100%;
  -webkit-text-size-adjust: none;  /* 防止 iOS 自動調整字體大小 */
}

:root {
  --top-nav-height: 68px;
  --top-nav-height-mobile: 56px;
}

/* 認證狀態骨架屏動畫 */
@keyframes auth-skeleton-loading {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

.auth-skeleton {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.05);
}

.skeleton-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: auth-skeleton-loading 1.5s infinite;
}

.skeleton-text {
  width: 80px;
  height: 16px;
  border-radius: 4px;
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: auth-skeleton-loading 1.5s infinite;
}

@media (max-width: 768px) {
  .auth-skeleton {
    padding: 6px 12px;
  }
  
  .skeleton-avatar {
    width: 28px;
    height: 28px;
  }
  
  .skeleton-text {
    width: 60px;
    height: 14px;
  }
}

.App {
  display: flex;
  min-height: 100vh;
  overflow-x: hidden;
  overflow-y: auto;  /* 允許內容滾動 */
  -webkit-overflow-scrolling: touch;  /* 在 iOS 上實現平滑滾動 */
}

.App-inner {
  display: flex;
  flex-direction: column;
  width: 100%;
}

.route-loading-placeholder {
  min-height: 40vh;
}

/* Keep the shared footer out of the layout-shift measurement while a lazy route
   is replaced by its real page. It becomes visible at its final document position. */
.App-inner:has(.route-loading-placeholder) > .site-footer {
  visibility: hidden;
}

.route-loading-placeholder--stable-page {
  min-height: 100vh;
  min-height: 100svh;
}

.route-loading-placeholder--priceanalysis {
  min-height: 1380px;
  box-sizing: border-box;
  padding: 18px 16px 28px;
}

.priceanalysis-route-skeleton {
  display: flex;
  flex-direction: column;
  gap: 14px;
  width: min(100%, 1240px);
  margin: 0 auto;
}

.priceanalysis-route-skeleton > div {
  border-radius: 12px;
  background: linear-gradient(100deg, #edf0f4 20%, #f7f8fa 42%, #edf0f4 64%);
  background-size: 220% 100%;
  animation: auth-skeleton-loading 1.5s ease-in-out infinite;
}

.priceanalysis-route-skeleton__intro {
  width: 58%;
  height: 56px;
}

.priceanalysis-route-skeleton__search {
  height: 88px;
}

.priceanalysis-route-skeleton__hot {
  height: 57px;
}

.priceanalysis-route-skeleton__chart {
  height: 720px;
}

.priceanalysis-route-skeleton__list {
  height: 250px;
}

.route-loading-placeholder--market-sentiment {
  min-height: 1280px;
}

@media (min-width: 1024px) {
  .route-loading-placeholder--priceanalysis {
    min-height: 980px;
  }

  .route-loading-placeholder--market-sentiment {
    min-height: 920px;
  }
}

/* 側邊欄樣式 */
.sidebar {
  position: fixed;
  top: 0;
  right: 0;
  left: auto;
  height: 100vh;
  width: 250px;
  min-width: 250px;
  background-color: #ffffff;
  background-color: var(--color-bg-card, #ffffff);
  color: #333333;
  color: var(--color-text-primary, #333333);
  overflow-y: auto;
  box-shadow: -2px 0 5px rgba(0,0,0,0.1);
  box-shadow: var(--shadow-m, -2px 0 5px rgba(0,0,0,0.1));
  z-index: 1000;
  padding-top: 20px;
  padding-top: var(--space-l, 20px);
  border-radius: 0px;
  border-radius: var(--border-radius-medium, 0px);
}

.sidebar-header {
  display: none;  /* 或直接刪除這個區塊 */
}

.sidebar-header .logo {
  width: auto;  /* 改為自動寬度 */
  height: 40px;  /* 調整高度，保持比例 */
  margin-bottom: 10px;
}

.sidebar-header h2 {
  font-size: 18px;
  margin: 0;
}

.sidebar ul {
  list-style-type: none;
  padding: 0;
  margin: 0;
}

.sidebar li {
  margin-bottom: 5px;
}

.sidebar a,
.sidebar-item {
  color: #333;
  text-decoration: none;
  display: flex;
  align-items: center;
  padding: 12px 16px;
  background-color: transparent;
  border-radius: 8px;
  margin: 8px 10px;
  position: relative;
}

.sidebar a:hover,
.sidebar-item:hover {
  background-color: rgba(59, 130, 246, 0.08);
  color: #3b82f6;
}

.sidebar .active-nav-link {
  background-color: rgba(59, 130, 246, 0.12);
  color: #3b82f6;
  font-weight: 500;
}

.sidebar a svg,
.sidebar-item svg {
  margin-right: 12px;
  font-size: 20px;
  color: #666;
  transition: all 0.2s ease;
}

.sidebar a:hover svg,
.sidebar-item:hover svg,
.sidebar .active-nav-link svg {
  color: #3b82f6;
}

.sidebar a span,
.sidebar-item span {
  font-size: 14px;
  font-weight: 400;
  letter-spacing: 0.3px;
}

/* 側邊欄選單項目動畫效果 */
.sidebar ul li {
  opacity: 1;
  transform: translateY(0);
  transition: all 0.3s ease;
}

/* 主內容區域樣式 */
.main-content {
  flex: 1 1;
  width: 100%;
  position: relative;
}

.main-content--home {
  background:
    linear-gradient(180deg, rgba(248, 251, 255, 0.92) 0%, rgba(248, 251, 255, 0) 180px);
}

.top-nav {
  position: fixed;
  top: 0;
  right: 0;
  left: 0;
  z-index: 999;
  height: 68px;
  height: var(--top-nav-height);
  transition:
    background-color 0.28s ease,
    box-shadow 0.28s ease,
    border-color 0.28s ease,
    -webkit-backdrop-filter 0.28s ease;
  transition:
    background-color 0.28s ease,
    box-shadow 0.28s ease,
    border-color 0.28s ease,
    backdrop-filter 0.28s ease;
  transition:
    background-color 0.28s ease,
    box-shadow 0.28s ease,
    border-color 0.28s ease,
    backdrop-filter 0.28s ease,
    -webkit-backdrop-filter 0.28s ease;
}

.top-nav__inner {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  grid-column-gap: clamp(22px, 2.6vw, 44px);
  column-gap: clamp(22px, 2.6vw, 44px);
  height: 100%;
}

.top-nav__shell {
  width: min(1440px, calc(100% - 24px));
  margin: 0 auto;
  box-sizing: border-box;
}

.top-nav--default,
.top-nav--immersive.top-nav--scrolled {
  background: rgba(248, 250, 252, 0.86);
  border-bottom: 1px solid rgba(201, 215, 231, 0.82);
  box-shadow: 0 12px 36px rgba(148, 163, 184, 0.16);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.top-nav--immersive {
  background: linear-gradient(180deg, rgba(248, 251, 255, 0.78) 0%, rgba(248, 251, 255, 0.34) 55%, rgba(248, 251, 255, 0) 100%);
  border-bottom: 1px solid transparent;
  box-shadow: none;
}

.top-nav--immersive::after {
  content: '';
  position: absolute;
  inset: auto 0 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(201, 215, 231, 0.5), transparent);
  opacity: 0;
  transition: opacity 0.28s ease;
}

.top-nav--immersive.top-nav--scrolled::after {
  opacity: 1;
}

.menu-toggle {
  display: none;  /* 預設隱藏 */
  font-size: 20px;
  cursor: pointer;
  flex: 0 0 auto;
  padding: 4px;
}

.user-actions {
  display: grid;
  grid-auto-flow: column;
  align-items: center;
  justify-content: end;
  justify-self: end;
  margin-right: 0;
  grid-gap: clamp(10px, 0.9vw, 18px);
  gap: clamp(10px, 0.9vw, 18px);
  min-width: -webkit-max-content;
  min-width: max-content;
  padding-right: 0;
  flex-shrink: 0;
}

.user-actions .btn-primary {
  font-size: 14px;
  padding: 6px 14px;
  min-height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.auth-status-slot {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  min-width: 170px;
}

.content-area {
  flex-grow: 1;
  padding: 20px;
  padding-top: calc(68px + 20px);
  padding-top: calc(var(--top-nav-height) + 20px);
  overflow-y: auto;
  overflow-x: hidden;
  margin-bottom: 0.5%;
  /* 移除過渡動畫，因為不再需要動態調整 */
}

.content-area--home {
  padding-top: 0;
}

.content-area h2 {
  font-size: 24px;
  color: #333;
  color: var(--color-text-primary, #333);
  margin-bottom: 20px;
  margin-bottom: var(--space-m, 20px);
  padding-bottom: 10px;
  padding-bottom: var(--space-s, 10px);
  border-bottom: 1px solid #eee;
  border-bottom: 1px solid var(--color-border-divider, #eee);
}

/* 側邊欄預設隱藏狀態 */
.sidebar {
  transform: translateX(100%);
  transition: transform 0.3s ease;
}

.sidebar.open {
  transform: translateX(0);
}

/* 響應式設計 */
@media (max-width: 1300px) {
  .App-inner {
    flex-direction: column;
  }

  /* 為每個選單項目添加延遲動畫 */
  .sidebar:not(.open) ul li,
  .sidebar:not(.open) ul a {  /* 添加 a 選擇器 */
    opacity: 0;
    transform: translateX(20px);
  }

  .sidebar.open ul li,
  .sidebar.open ul a {  /* 添加 a 選擇器 */
    opacity: 1;
    transform: translateX(0);
  }


  /* 為選單列表添加內邊距，確保最後一個項目不會貼底 */
  .sidebar ul {
    padding: 0 0 20px 0;  /* 添加底部內邊距 */
  }

  .main-content {
    margin-left: 0;
  }

  .top-nav {
    left: 0;
    width: 100%;
    height: 56px;
    height: var(--top-nav-height-mobile);
  }

  .menu-toggle {
    display: block;
  }

  .content-area {
    margin-left: 0;
    margin-right: 0;
    padding: 15px;
    padding-top: calc(56px + 15px);
    padding-top: calc(var(--top-nav-height-mobile) + 15px);
    /* 手機版也不需要為 AnnouncementBar 調整 margin-top */
  }

  .content-area--home {
    padding-top: 0;
  }

  /* 確保 overlay 在側邊欄打開時正確顯示 */
  .overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
  }

  .overlay.visible {
    display: block;
  }

  .sidebar .dropdown-menu {
    position: static;
    margin-top: 4px;
    padding: 8px 0;
    background-color: #ffffff;
    box-shadow: none;
    width: 100%;
  }
}

/* 按鈕樣式 */
.btn-primary {
  background-color: #000000; /* 黑色背景 */
  border: none;
  color: white;
  padding: 10px 20px; /* 減少上下內邊距以降低高度 */
  text-align: center;
  text-decoration: none;
  display: inline-block;
  font-size: 16px;
  margin: 4px 2px;
  cursor: pointer;
  transition: background-color 0.3s ease;
  border-radius: 4px;
}

.btn-primary:hover {
  background-color: #333333; /* 稍微淺一點的黑色作為懸停效果 */
}

.btn-primary:disabled {
  background-color: #666666; /* 更淺的灰色作為禁用狀態 */
  color: #cccccc;
  cursor: not-allowed;
}

.btn-loading {
  position: relative;
  color: transparent;
}

.btn-loading::after {
  content: "";
  position: absolute;
  width: 16px;
  height: 16px;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  margin: auto;
  border: 4px solid #ffffff;
  border-top: 4px solid #4CAF50;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}


/* 多股票圖表樣式 */
.multi-stock-dashboard {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  grid-gap: 20px;
  gap: 20px;
  margin-top: 20px;
}

.multi-stock-chart {
  background-color: white;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  padding: 20px;
}

/* 如果上面的修改不起作用，可以嘗試添加這個更具體的選擇器 */
.sidebar .sidebar-header {
  border-bottom: none;
}

/* 新增以下樣式 */
.overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 998;
}

.overlay.visible {
  display: block;
}

/* 對於 iOS 設備 */
@supports (-webkit-touch-callout: none) {
  input, select, textarea {
    font-size: 16px !important;
    transform: translateZ(0);
  }
  
  body {
    -webkit-text-size-adjust: none;  /* 防止 iOS 自動調整字體大小 */
  }
}

/* UserProfile 在頂部導航欄中的特定樣式 */
.top-nav .user-profile {
    display: flex;
    align-items: center;
    gap: 10px;
    position: relative;
}

.top-nav .user-profile__trigger {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 44px;
    padding: 6px 10px;
    border-radius: 999px;
    border: none;
    background: none;
    cursor: pointer;
}

.top-nav .user-profile__avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    object-fit: cover;
}

.top-nav .user-profile__name {
    color: #333;
    font-size: 14px;
    max-width: 112px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.top-nav .user-profile__menu {
    position: absolute;
    top: 100%;
    right: 0;
    width: 200px;
    background: white;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    margin-top: 8px;
    z-index: 1000;
}

/* 響應式調整 */
@media (max-width: 1300px) {
    .user-actions {
        padding-right: 15px;  /* 移除右側內邊距 */
        margin-right: 20px;  /* 添加右側外邊距 */
    }

    .top-nav .user-profile__name {
        display: none;
    }
    
    .top-nav .user-profile__menu {
        width: 180px;
        right: -10px;  /* 向左移動選單 */
    }

    .top-nav .user-profile__avatar {
        margin-right: 0;  /* 移除頭像右側邊距 */
    }

    /* 確保下拉選單不會超出螢幕 */
    .top-nav .user-profile__menu {
        right: 0;
        max-width: calc(100vw - 30px);  /* 預留一些邊距 */
    }
}


/* 關於本站頁面樣式 */
.about-page {
  padding: 2rem;
  max-width: 1200px;
  margin: 0 auto;
}

.about-container {
  background: white;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  overflow: hidden;
}

.about-image {
  width: 100%;
  height: 300px;
  overflow: hidden;
  position: relative;
}

.about-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.about-content {
  padding: 2rem;
}

.about-title {
  font-size: 2rem;
  color: #333;
  margin-bottom: 1.5rem;
  text-align: center;
}

.about-text {
  color: #666;
  line-height: 1.6;
  margin-bottom: 2rem;
}

.about-footer {
  border-top: 1px solid #eee;
  padding-top: 1.5rem;
  margin-top: 2rem;
  color: #666;
  font-size: 0.9rem;
}

.about-footer p {
  margin-bottom: 1rem;
}

.about-footer a {
  color: #007bff;
  text-decoration: none;
}

.about-footer a:hover {
  text-decoration: underline;
}

/* 響應式設計 */
@media (max-width: 1300px) {
  .about-page {
    padding: 1rem;
  }
  
  .about-image {
    height: 200px;
  }
  
  .about-title {
    font-size: 1.5rem;
  }
  
  .about-content {
    padding: 1rem;
  }
}

/* 桌面版導航項目容器 */
.desktop-nav-items {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(12px, 1.1vw, 22px);
  width: 100%;
  margin: 0;
  min-width: 0;
  flex-wrap: nowrap; /* 防止換行 */
  overflow: visible;
  transition: all 0.3s ease;
}



/* 桌面版顯示方式 - 移除固定的媒體查詢限制 */
.desktop-nav-items {
  /* 移除 @media (min-width: 1301px) 的限制 */
}

.desktop-nav-items > .desktop-nav-item {
  flex: 0 0 auto;
}

.top-nav-social-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  box-sizing: border-box;
  border: 1px solid rgba(191, 204, 218, 0.9);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.62);
  color: rgba(15, 23, 42, 0.76);
  text-decoration: none;
}

.top-nav-social-link svg,
.user-actions .language-switcher-button svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.top-nav-social-link:hover {
  background: rgba(255, 255, 255, 0.82);
  border-color: rgba(148, 163, 184, 0.95);
  color: #0f4c81;
}

.top-nav-social-link:focus-visible {
  outline: 2px solid #0f4c81;
  outline-offset: 3px;
}

/* 調整導航項目樣式 */
.desktop-nav-items a {
  color: rgba(15, 23, 42, 0.8);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 42px;
  padding: 8px clamp(10px, 0.85vw, 15px);
  border-radius: 999px;
  transition:
    color 0.22s ease,
    background-color 0.22s ease,
    transform 0.22s ease,
    box-shadow 0.22s ease;
  white-space: nowrap; /* 防止文字換行 */
  flex: 0 0 auto;
  min-width: 0;
}

.desktop-nav-items a:hover {
  background-color: rgba(255, 255, 255, 0.7);
  color: #0f4c81;
  transform: translateY(-1px);
}

.desktop-nav-items svg {
  font-size: 16px;
  flex-shrink: 0; /* 防止圖標收縮 */
}

/* 桌面導覽列活動連結樣式 */
.desktop-nav-items .active-nav-link {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.9), rgba(247, 250, 252, 0.82));
  color: #0f4c81;
  font-weight: 500;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.82);
}

/* 確保活動連結的 SVG 圖示顏色也改變 */
.desktop-nav-items .active-nav-link svg {
  color: #3b82f6;
}

/* 手機版強制使用側邊導航 */
@media (max-width: 1300px) {
  .desktop-nav-items {
    display: none !important;
  }
  
  .menu-toggle-wrapper {
    display: block !important;
  }
}

/* Logo 樣式 */
.top-nav-logo {
  display: flex;
  align-items: center;
  justify-self: start;
  width: clamp(144px, 12vw, 188px);
  min-width: 144px;
}

.top-nav-logo a {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  min-height: 44px;
}

.top-nav-logo .logo {
  display: block;
  width: 188px;
  max-width: 100%;
  height: auto;
  aspect-ratio: 47 / 8;
  object-fit: contain;
}

/* 調整頂部導航欄布局 */
.top-nav {
  min-height: 68px;
  min-height: var(--top-nav-height); /* 確保最小高度 */
  overflow: visible; /* 允許內容可見以便檢測 */
}



/* 導航項目文字樣式 */
.desktop-nav-items span {
  font-size: 13.5px;
  font-weight: 400;
  letter-spacing: 0.18px;
}

@media (max-width: 1520px) and (min-width: 1301px) {
  .top-nav__shell {
    width: min(1400px, calc(100% - 20px));
  }

  .top-nav__inner {
    column-gap: 18px;
  }

  .desktop-nav-items {
    gap: 8px;
  }

  .desktop-nav-items a {
    gap: 7px;
    padding: 8px 10px;
  }

  .desktop-nav-items span {
    font-size: 13px;
    letter-spacing: 0.08px;
  }

  .top-nav-logo {
    width: 156px;
    min-width: 156px;
  }

  .user-actions {
    gap: 10px;
  }

  .top-nav .user-profile__name {
    max-width: 96px;
  }
}



/* 響應式設計調整 */
@media (max-width: 1300px) {
  .top-nav__inner {
    grid-template-columns: 1fr auto;
    column-gap: 12px;
  }

  .top-nav__shell {
    width: 100%;
    padding-left: 12px;
    padding-right: 12px;
    box-sizing: border-box;
  }

  .top-nav {
    min-height: 56px;
    min-height: var(--top-nav-height-mobile);  /* 手機版稍微降低高度 */
  }

  .top-nav-logo {
    width: auto;
    min-width: 0;
  }

  .user-actions {
    width: -webkit-max-content;
    width: max-content;
    gap: 8px;
    margin-left: auto;
    justify-content: end;
    justify-items: end;
    justify-self: end;
  }

  .auth-status-slot {
    min-width: 80px;
  }

  .auth-skeleton .skeleton-text {
    display: none;
  }

  .menu-toggle {
    padding: 0;
  }
}

/* 確保所有選項的間距一致 */
.sidebar ul li {
  margin-bottom: 5px;
}

/* 將包含下拉選單的容器設定為相對定位 */
.desktop-nav-item.dropdown {
  position: relative;
}

/* 透明 hover bridge：補上 trigger 與 menu 之間的 6px 死區，避免滑鼠穿越時選單閃掉 */
.desktop-nav-item.dropdown::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  height: 10px;
  pointer-events: none;
}

.desktop-nav-item.dropdown:hover::after {
  pointer-events: auto;
}

.desktop-nav-items .desktop-nav-trigger {
  color: rgba(15, 23, 42, 0.8);
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 42px;
  padding: 8px clamp(10px, 0.85vw, 15px);
  border-radius: 999px;
  cursor: default;
  transition:
    color 0.22s ease,
    background-color 0.22s ease,
    box-shadow 0.22s ease;
  white-space: nowrap;
  -webkit-user-select: none;
          user-select: none;
}

.desktop-nav-items .desktop-nav-item.dropdown:hover .desktop-nav-trigger,
.desktop-nav-items .desktop-nav-item.active .desktop-nav-trigger {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.9), rgba(247, 250, 252, 0.82));
  color: #0f4c81;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.82);
}

.desktop-nav-items .desktop-nav-item.active .desktop-nav-trigger {
  font-weight: 500;
}

.desktop-nav-items .desktop-nav-item.active .desktop-nav-trigger svg {
  color: #3b82f6;
}

/* 桌面版下拉選單：用 opacity + visibility 過渡，滑鼠進出更柔順 */
.desktop-dropdown-menu {
  position: absolute;
  top: calc(100% + 6px);
  left: 50%;
  transform: translateX(-50%) translateY(-4px);
  padding: 6px 0;
  min-width: 160px;
  background-color: #ffffff;
  box-shadow:
    0 12px 32px rgba(15, 23, 42, 0.12),
    0 2px 6px rgba(15, 23, 42, 0.06);
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 12px;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition:
    opacity 0.18s ease,
    transform 0.18s cubic-bezier(0.22, 1, 0.36, 1),
    visibility 0s linear 0.18s;
}

.desktop-nav-item.dropdown:hover .desktop-dropdown-menu,
.desktop-nav-item.dropdown:focus-within .desktop-dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
  transition:
    opacity 0.18s ease,
    transform 0.18s cubic-bezier(0.22, 1, 0.36, 1),
    visibility 0s linear 0s;
}

.desktop-dropdown-menu a {
  padding: 9px 18px !important;
  display: block;
  width: 100%;
  color: rgba(15, 23, 42, 0.82);
  text-decoration: none;
  font-size: 0.88rem;
  letter-spacing: 0.01em;
  transition: background-color 0.15s ease, color 0.15s ease;
  box-sizing: border-box;
}

.desktop-dropdown-menu a:hover,
.desktop-dropdown-menu a.active-nav-link {
  background-color: rgba(59, 130, 246, 0.08);
  color: #0f4c81;
}

/* 修正側邊欄中 dropdown 的置左效果 */
.sidebar-item.dropdown {
  display: flex;
  flex-direction: column;
  align-items: flex-start; /* 確保子項目（例如 .sidebar-dropdown-title）向左對齊 */
}

/* 調整側邊欄下拉選單，取消絕對定位 */
.sidebar .dropdown-menu {
  position: static; /* 取消絕對定位，使下拉選單成為正常文件流的一部分 */
}

.sidebar .dropdown-menu a {
  padding: 8px 12px;
}
/* 讓側邊欄內的 Google 搜尋熱度項目內容靠左對齊 */
.sidebar-dropdown-title {
  display: flex;
  align-items: center;
  justify-content: flex-start; /* 內容靠左 */
  padding: 12px 16px;
}


/* 移除 .sidebar-item.dropdown 的邊框與內邊距 */
.sidebar-item.dropdown {
  border: none !important;
  padding: 0 !important;
}




/* Admin Navigation Styles */
.sidebar-item-admin {
  position: relative;
}

.admin-nav-link {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1rem;
  color: #6b7280;
  text-decoration: none;
  transition: all 0.2s ease;
  border-left: 3px solid transparent;
}

.admin-nav-link:hover {
  background-color: #f3f4f6;
  color: #374151;
}

.admin-nav-link.active-nav-link {
  background-color: #eff6ff;
  color: #3b82f6;
  border-left-color: #3b82f6;
}

.admin-badge {
  background-color: #dc2626;
  color: white;
  font-size: 0.625rem;
  font-weight: 600;
  padding: 0.125rem 0.375rem;
  border-radius: 0.25rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.admin-nav-link.active-nav-link .admin-badge {
  background-color: #3b82f6;
}

/* Desktop admin navigation */
.desktop-nav-items .admin-nav-link {
  border-left: none;
  border-bottom: 2px solid transparent;
  padding: 0.5rem 1rem;
}

.desktop-nav-items .admin-nav-link.active-nav-link {
  border-bottom-color: #3b82f6;
  background-color: transparent;
}

.desktop-nav-items .admin-nav-link:hover {
  background-color: #f9fafb;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .admin-nav-link {
    padding: 0.5rem 0.75rem;
  }
  
  .admin-badge {
    font-size: 0.5rem;
    padding: 0.1rem 0.25rem;
  }
}/* A
dmin Actions Component */
.admin-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.admin-actions--small {
  gap: 0.25rem;
}

.admin-actions--large {
  gap: 0.75rem;
}

.admin-action-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  border: 1px solid transparent;
  border-radius: 0.375rem;
  font-size: 0.875rem;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s ease;
  min-height: 2.5rem;
}

.admin-action-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.admin-action-btn--small {
  padding: 0.25rem 0.5rem;
  font-size: 0.75rem;
  min-height: 2rem;
}

.admin-action-btn--large {
  padding: 0.75rem 1.5rem;
  font-size: 1rem;
  min-height: 3rem;
}

.admin-action-btn--primary {
  background-color: #3b82f6;
  color: white;
  border-color: #3b82f6;
}

.admin-action-btn--primary:hover:not(:disabled) {
  background-color: #2563eb;
  border-color: #2563eb;
}

.admin-action-btn--secondary {
  background-color: white;
  color: #374151;
  border-color: #d1d5db;
}

.admin-action-btn--secondary:hover:not(:disabled) {
  background-color: #f9fafb;
  border-color: #9ca3af;
}

.admin-action-btn--danger {
  background-color: #ef4444;
  color: white;
  border-color: #ef4444;
}

.admin-action-btn--danger:hover:not(:disabled) {
  background-color: #dc2626;
  border-color: #dc2626;
}

.admin-action-icon {
  font-size: 1em;
}

.admin-action-label {
  white-space: nowrap;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .admin-actions {
    flex-direction: column;
  }
  
  .admin-action-btn {
    justify-content: center;
    width: 100%;
  }
}

/* The adaptive menu also applies above the mobile breakpoint. */
.top-nav--side-navigation .top-nav__inner {
  grid-template-columns: minmax(0, 1fr) auto;
}

.top-nav--side-navigation .menu-toggle {
  display: block;
}

@media (min-width: 1301px) {
  .top-nav:lang(en) .desktop-nav-items {
    gap: clamp(4px, 0.5vw, 8px);
  }

  .top-nav:lang(en) .desktop-nav-items > a,
  .top-nav:lang(en) .desktop-nav-items .desktop-nav-trigger {
    gap: 6px;
    padding-inline: 6px;
  }
}

/* 引入專用的認證按鈕樣式 */

.signin-dialog-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    animation: fadeIn 0.2s ease;
}

.signin-dialog {
    background: white;
    border-radius: 8px;
    padding: 24px;
    width: 80%;
    max-width: 360px;
    max-height: 85vh;
    position: relative;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    animation: slideIn 0.3s ease;
    overflow-y: auto;
}

.signin-dialog__close {
    position: absolute;
    top: 16px;
    right: 16px;
    border: none;
    background: transparent;
    font-size: 20px;
    cursor: pointer;
    padding: 4px;
    color: #666;
    transition: color 0.2s ease;
}

.signin-dialog__close:hover {
    color: #333;
}

.signin-dialog__title {
    width: 100%;
    text-align: center;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 20px;
}

.signin-dialog__description {
    color: #666;
    margin: 0 0 24px;
    font-size: 14px;
}

.google-signin-button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: auto;
    max-width: 280px;
    min-width: 160px;
    margin: 8px auto;
    padding: 12px;
    border: 1px solid #dadce0;
    border-radius: 4px;
    background-color: white;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.google-signin-button:hover {
    background-color: #f8f9fa;
}

.google-signin-button .google-icon {
    width: 18px;
    height: 18px;
    margin-right: 12px;
}

.google-signin-button span {
    color: #3c4043;
    font-size: 14px;
    font-weight: 500;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

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

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Loading 狀態樣式 */
.signin-dialog__loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 20px;
    color: #666;
    font-size: 14px;
}

.signin-dialog__loading__spinner {
    border: 2px solid #f3f3f3;
    border-top: 2px solid #4285f4;
    border-radius: 50%;
    width: 16px;
    height: 16px;
    animation: signin-dialog-spin 1s linear infinite;
    flex-shrink: 0;
}

@keyframes signin-dialog-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.google-button-container {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0px 0 0;
    height: 100%;
    position: relative;
    transition: opacity 0.3s ease;
}

.google-button-container--hidden {
    display: none !important;
}

/* 從 AuthDialog.css 合併過來的樣式 */
.feature-list {
    list-style: none;
    padding: 0;
    margin: 25px auto 8px;
    text-align: center;
    width: 90%;
    max-width: 340px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.feature-list li {
    margin: 5px auto;
    padding: 8px 16px;
    background: linear-gradient(45deg, rgba(52, 168, 83, 0.05), rgba(66, 133, 244, 0.05));
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    gap: 12px;
    position: relative;
    width: -webkit-fit-content;
    width: fit-content;
    min-width: auto;
    opacity: 0;
    transform: translateX(-20px);
    animation: checkFeature 0.5s ease forwards;
}

.feature-list li::before {
    content: '✓';
    color: white;
    font-weight: bold;
    background: #34A853;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    opacity: 0;
    transform: scale(0);
    animation: showCheck 0.3s ease forwards;
}

/* 調整每個 li 的動畫延遲 */
.feature-list li:nth-child(1) {
    animation-delay: 0.2s;
}

.feature-list li:nth-child(1)::before {
    animation-delay: 0.4s;
}

.feature-list li:nth-child(2) {
    animation-delay: 0.7s;
}

.feature-list li:nth-child(2)::before {
    animation-delay: 0.9s;
}

.feature-list li:nth-child(3) {
    animation-delay: 1.2s;
}

.feature-list li:nth-child(3)::before {
    animation-delay: 1.4s;
}

/* 定義新的動畫 */
@keyframes checkFeature {
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes showCheck {
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.auth-dialog-description {
    text-align: center;
    margin: 15px 0 5px;
    color: #666;
}

/* 新增功能說明文字的樣式 */
.feature-description {
    text-align: center;
    margin: 15px 0;
    color: #666;
    width: 100%;
}

.auth-dialog-content {
    width: 90%;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.auth-dialog-preview-image {
    width: 100%;
    max-width: 400px;
    aspect-ratio: 16 / 9;
    margin: 20px auto;
    height: auto;
    max-height: 400px;
    border-radius: 12px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
    display: block;
    object-fit: cover;
}

/* Google 登入按鈕樣式 */
.google-login-button {
    background-color: #ffffff;
    color: #757575;
    border: 1px solid #dadce0;
    border-radius: 4px;
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    width: auto;
    max-width: 280px;
    min-width: 160px;
    margin: 8px auto;
    cursor: pointer;
    transition: background-color 0.3s;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.google-login-button:hover {
    background-color: #f8f9fa;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
}

.google-login-button:before {
    content: '';
    background-image: url("data:image/svg+xml,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 width=%2718%27 height=%2718%27 viewBox=%270 0 18 18%27%3E%3Cg fill=%27none%27 fill-rule=%27evenodd%27%3E%3Cpath d=%27M17.6 9.2l-.1-1.8H9v3.4h4.8C13.6 12 13 13 12 13.6v2.2h3a8.8 8.8 0 0 0 2.6-6.6z%27 fill=%27%234285F4%27 fill-rule=%27nonzero%27%2F%3E%3Cpath d=%27M9 18c2.4 0 4.5-.8 6-2.2l-3-2.2a5.4 5.4 0 0 1-8-2.9H1V13a9 9 0 0 0 8 5z%27 fill=%27%2334A853%27 fill-rule=%27nonzero%27%2F%3E%3Cpath d=%27M4 10.7a5.4 5.4 0 0 1 0-3.4V5H1a9 9 0 0 0 0 8l3-2.3z%27 fill=%27%23FBBC05%27 fill-rule=%27nonzero%27%2F%3E%3Cpath d=%27M9 3.6c1.3 0 2.5.4 3.4 1.3L15 2.3A9 9 0 0 0 1 5l3 2.4a5.4 5.4 0 0 1 5-3.7z%27 fill=%27%23EA4335%27 fill-rule=%27nonzero%27%2F%3E%3Cpath d=%27M0 0h18v18H0z%27%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E");
    width: 18px;
    height: 18px;
    margin-right: 10px;
    background-repeat: no-repeat;
    background-position: center;
}

/* 對話框內容樣式 */
.auth-dialog-content {
    padding: 0px;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 90%;
    margin: 0 auto;
}

/* 對話框描述文字樣式 */
.auth-dialog-description {
    text-align: center;
    margin: 15px 0;
    color: #666;
}

.auth-dialog-description p {
    margin: 8px 0;
    line-height: 1.5;
}

/* 對話框標題樣式 */
.dialog-title {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    text-align: center;
}

/* 自定義標題大小 - 更突出的樣式 */
.auth-dialog-title {
    font-size: 1.75rem !important;
    font-weight: 700 !important;
    line-height: 1.2 !important;
    margin-bottom: 1.5rem !important;
    /* 備用顏色，適用於不支援 background-clip 的瀏覽器 */
    color: #667eea;
    /* 漸層文字效果 */
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-align: center;
    position: relative;
    opacity: 0;
    transform: translateY(-10px);
    animation: titleFadeIn 0.6s ease forwards;
}

/* 為不支援 background-clip 的瀏覽器提供備用樣式 */
@supports not (-webkit-background-clip: text) {
    .auth-dialog-title {
        background: none;
        color: #667eea;
    }
}

/* 標題動畫 */
@keyframes titleFadeIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 預覽圖片樣式 */
.auth-dialog-preview-image {
    width: 100%;
    max-width: 400px;
    margin: 20px auto;
    height: auto;
    max-height: 400px;
    border-radius: 12px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
    display: block;
    object-fit: cover;
}

/* 響應式設計調整 */
@media (max-width: 768px) {
    .auth-dialog-content {
        padding: 0 10px;
        width: 95%;
        align-items: center;
        justify-content: center;
    }

    .auth-dialog-preview-image {
        max-width: 100%;
        max-height: 350px;
        margin: 16px auto;
    }

    .dialog-title {
        font-size: 1.2rem;
    }

    .auth-dialog-title {
        font-size: 1.5rem !important;
    }

    .feature-list {
        width: 100%;
    }

    .feature-list li {
        width: 100%;
        margin-left: -20px;
        justify-content: center;
    }
}

/* 
認證對話框專用的關閉按鈕樣式 */
.auth-dialog-content .dialog-close {
    top: 12px;
    right: 12px;
    width: 28px;
    height: 28px;
    background: rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(0, 0, 0, 0.1);
    font-size: 14px;
    color: rgba(60, 60, 67, 0.8);
    transition: all 0.2s ease;
}

.auth-dialog-content .dialog-close:hover {
    background: rgba(255, 59, 48, 0.1);
    border-color: rgba(255, 59, 48, 0.2);
    color: #ff3b30;
    transform: scale(1.05);
}

.auth-dialog-content .dialog-close:active {
    transform: scale(0.95);
    background: rgba(255, 59, 48, 0.15);
}

/* 為關閉按鈕添加工具提示效果 */
.auth-dialog-content .dialog-close::after {
    content: attr(aria-label);
    position: absolute;
    top: 100%;
    right: 0;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transform: translateY(-4px);
    transition: all 0.2s ease;
    z-index: 1001;
}

.auth-dialog-content .dialog-close:hover::after {
    opacity: 1;
    transform: translateY(4px);
}

/* 手機版本的調整 */
@media (max-width: 480px) {
    .auth-dialog-content .dialog-close {
        top: 8px;
        right: 8px;
        width: 24px;
        height: 24px;
        font-size: 12px;
    }

    .auth-dialog-content .dialog-close::after {
        display: none;
        /* 手機版隱藏工具提示 */
    }
}

/* 新功能標籤樣式 */
.new-feature-badge {
  background-color: #ff4757;
  color: white;
  font-size: 10px;
  padding: 2px 6px;
  border-radius: 10px;
  margin-left: 8px;
  font-weight: bold;
  animation: pulse 2s infinite;
  display: inline-block;
  line-height: 1;
}

/* 漢堡選單的通知點 */
.notification-dot {
  position: absolute;
  top: -2px;
  right: -2px;
  width: 8px;
  height: 8px;
  background-color: #ff4757;
  border-radius: 50%;
  animation: pulse 2s infinite;
}

/* 導航連結中的通知點 */
.sidebar-item-content {
  position: relative;
  display: flex;
  align-items: center;
}

.sidebar-item-content .notification-dot {
  position: absolute;
  top: 0;
  right: -10px;
  width: 8px;
  height: 8px;
}

/* 桌面導航中的通知點 */
.desktop-nav-items a {
  position: relative;
}

.desktop-nav-items a .notification-dot {
  position: absolute;
  top: 8px;
  right: 4px;
  width: 8px;
  height: 8px;
}

/* 包裝漢堡選單圖示的容器 */
.menu-toggle-wrapper {
  position: relative;
  display: inline-block;
}

@media (max-width: 1300px) {
  .top-nav .menu-toggle-wrapper {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    margin-right: -12px;
  }

  .top-nav .notification-dot {
    right: 2px;
  }
}

/* 閃爍動畫 */
@keyframes pulse {
  0% {
    transform: scale(1);
    opacity: 1;
  }
  50% {
    transform: scale(1.1);
    opacity: 0.8;
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
} 

/* 建議放在一個全域的 CSS 檔案或 :root 選擇器中 */
:root {
  --font-family-sans: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', sans-serif;
  --font-family-mono: 'SF Mono', Monaco, 'Cascadia Code', 'Roboto Mono', Consolas, 'Courier New', monospace;

  /* 背景顏色 */
  --color-bg-page: #f5f5f7; /* 或 #ffffff */
  --color-bg-card: #ffffff;
  --color-bg-elevated: #ffffff; /* 用於彈窗等更高層級的元素 */
  --color-bg-subtle: #f0f0f0; /* 細微背景，用於輕微區分區塊或 active 狀態 */
  --color-bg-secondary: #f2f2f7; /* 次級背景，比 page 再深一階 */

  /* 文字顏色 */
  --color-text-primary: rgba(0, 0, 0, 0.85); /* 主要文字，接近黑色 */
  --color-text-secondary: rgba(0, 0, 0, 0.60); /* 次要文字 */
  --color-text-tertiary: rgba(0, 0, 0, 0.40); /* 輔助文字、提示文字 */
  --color-text-link: #007aff; /* 蘋果藍 */
  --accent-color-blue: #007aff; /* 強調色 - 蘋果藍 (用於主要操作、正面強烈 CTA) */
  --color-brand-soft: rgba(0, 122, 255, 0.12);
  --color-accent-premium: #ff9500;
  --color-success: #34c759;
  --color-success-bg: rgba(52, 199, 89, 0.12);
  --color-success-border: rgba(52, 199, 89, 0.24);
  --color-warning-bg: #fff3cd;
  --color-warning-border: #ffeaa7;
  --color-warning-text: #856404;
  --color-destructive-red: #ff3b30; /* 蘋果標準紅 (用於刪除、警告等破壞性操作) */

  /* 邊框顏色 */
  --color-border-soft: #e5e5e5;
  --color-border-default: #d1d1d6; /* 類似 iOS 輸入框 */
  --color-border-strong: #b7bcc6;
  --color-border-divider: #ebebeb; /* 分隔線 */
  --color-border-light: var(--color-border-divider); /* 舊碼別名，避免落回 Bootstrap 灰 */

  /* 圓角 */
  --border-radius-small: 6px;
  --border-radius-medium: 10px;
  --border-radius-large: 14px;
  --border-radius-xlarge: 18px; /* 用於較大卡片或圖片 */
  --border-radius-pill: 999px;

  /* 陰影 */
  --shadow-xs: 0 1px 2px rgba(0,0,0,0.03);
  --shadow-s: 0 2px 6px rgba(0,0,0,0.05);
  --shadow-m: 0 5px 15px rgba(0,0,0,0.07);
  --shadow-l: 0 10px 30px rgba(0,0,0,0.08);
  --shadow-floating: 0 20px 40px rgba(15, 23, 42, 0.15);
  --shadow-focus-ring: 0 0 0 4px rgba(0, 122, 255, 0.3); /* 輸入框 focus 效果 */

  /* 漸層與表面 */
  --gradient-brand: linear-gradient(135deg, #007aff 0%, #5856d6 100%);
  --gradient-brand-strong: linear-gradient(135deg, #007aff 0%, #0056cc 100%);
  --gradient-destructive: linear-gradient(135deg, #ff3b30 0%, #d70015 100%);
  --gradient-premium: linear-gradient(135deg, #ff9500 0%, #ff5f00 100%);
  --gradient-surface: linear-gradient(180deg, rgba(255, 255, 255, 0.96) 0%, #ffffff 100%);
  --gradient-elevated: linear-gradient(135deg, rgba(0, 122, 255, 0.1) 0%, rgba(88, 86, 214, 0.08) 50%, rgba(255, 45, 85, 0.06) 100%), rgba(255, 255, 255, 0.95);
  --overlay-scrim: rgba(0, 0, 0, 0.45);

  /* 間距 (範例) */
  --space-xs: 4px;
  --space-s: 8px;
  --space-m: 16px;
  --space-l: 24px;
  --space-xl: 32px;
}

/* 通用 H1 標題樣式 */
h1 {
  font-size: 2rem; /* 設定基礎字體大小 */
  color: rgba(0, 0, 0, 0.85);
  color: var(--color-text-primary, #333333); /* 使用主要文字顏色 */
  font-weight: 600; /* 設定為半粗體 */
  margin-top: 24px;
  margin-top: var(--space-l, 24px); /* 移除瀏覽器預設的頂部外邊距 */
  margin-bottom: 24px;
  margin-bottom: var(--space-l, 24px); /* 設定與下方內容的標準間距 */
  padding-bottom: 8px;
  padding-bottom: var(--space-s, 8px);  /* 為底線預留空間 */
  border-bottom: 1px solid #ebebeb;
  border-bottom: 1px solid var(--color-border-divider, #eeeeee); /* 添加淺色細底線 */
  line-height: 1.3; /* 改善可讀性的行高 */
  text-align: left; /* 預設文字靠左對齊 */
}

.ui-surface-card {
  background: #ffffff;
  background: var(--ui-surface-bg, var(--color-bg-card, #ffffff));
  border: 1px solid #e5e5e5;
  border: 1px solid var(--ui-surface-border, var(--color-border-soft, #e5e5e5));
  border-radius: 14px;
  border-radius: var(--ui-surface-radius, var(--border-radius-large, 14px));
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
  box-shadow: var(--ui-surface-shadow, var(--shadow-s, 0 2px 6px rgba(0, 0, 0, 0.05)));
}

.ui-page-shell {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
}

.ui-section {
  padding: 40px 0 84px;
}

.ui-section-intro {
  display: grid;
  grid-gap: 12px;
  gap: 12px;
  max-width: 760px;
}

.ui-section-eyebrow {
  font-size: 12px;
  font-weight: 700;
  line-height: 1.4;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #007aff;
  color: var(--accent-color-blue, #007aff);
}

.ui-section-title {
  margin: 0;
  border-bottom: none;
  padding-bottom: 0;
  font-family: 'Avenir Next', 'SF Pro Display', 'Segoe UI', sans-serif;
  font-size: clamp(2rem, 3vw, 3rem);
  line-height: 1.02;
  letter-spacing: -0.04em;
  color: rgba(0, 0, 0, 0.85);
  color: var(--color-text-primary, rgba(0, 0, 0, 0.85));
}

.ui-section-description {
  margin: 0;
  font-size: 1.05rem;
  line-height: 1.75;
  color: rgba(0, 0, 0, 0.6);
  color: var(--color-text-secondary, rgba(0, 0, 0, 0.6));
}

.ui-callout {
  padding: 24px;
  border-radius: 28px;
  border: 1px solid rgba(255, 255, 255, 0.7);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.07);
  box-shadow: var(--shadow-m, 0 5px 15px rgba(0, 0, 0, 0.07));
}

.ui-callout--brand {
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.96) 0%, rgba(247, 250, 255, 0.95) 100%),
    radial-gradient(circle at top right, rgba(0, 122, 255, 0.16), transparent 38%);
}

.ui-data-panel {
  padding: 24px;
  border-radius: 28px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.94) 0%, rgba(255, 255, 255, 0.88) 100%);
  border: 1px solid rgba(15, 23, 42, 0.08);
  box-shadow:
    0 20px 32px rgba(15, 23, 42, 0.06),
    inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.ui-surface-card--prominent {
  --ui-surface-shadow: var(--shadow-m, 0 5px 15px rgba(0, 0, 0, 0.07));
}

.ui-surface-card--glass {
  --ui-surface-bg: rgba(255, 255, 255, 0.8);
  --ui-surface-border: rgba(255, 255, 255, 0.2);
  --ui-surface-radius: 24px;
  --ui-surface-shadow:
    0 8px 32px rgba(0, 0, 0, 0.06),
    0 1px 2px rgba(0, 0, 0, 0.04),
    inset 0 1px 0 rgba(255, 255, 255, 0.4);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

@media (prefers-color-scheme: dark) {
  .ui-surface-card {
    --ui-surface-bg: rgba(28, 28, 30, 1);
    --ui-surface-border: rgba(84, 84, 88, 0.6);
  }

  .ui-surface-card--glass {
    --ui-surface-bg: rgba(28, 28, 30, 0.84);
    --ui-surface-border: rgba(84, 84, 88, 0.32);
    --ui-surface-shadow:
      0 10px 32px rgba(0, 0, 0, 0.26),
      inset 0 1px 0 rgba(255, 255, 255, 0.04);
  }
}

@media (max-width: 768px) {
  .ui-page-shell {
    width: min(100% - 32px, 1180px);
  }

  .ui-section {
    padding: 24px 0 64px;
  }

  .ui-callout,
  .ui-data-panel {
    padding: 20px;
    border-radius: 24px;
  }
}

.user-profile {
    position: relative;
}

.user-profile__trigger {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px;
    border: none;
    background: transparent;
    cursor: pointer;
    border-radius: 20px;
    transition: background-color 0.2s ease;
}

.user-profile__trigger:hover {
    background-color: rgba(0, 0, 0, 0.05);
}

.user-profile__trigger:focus {
    outline: 2px solid #4285f4;
    outline-offset: 2px;
}

.user-profile__avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
}

.user-profile__avatar--default {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 14px;
    text-transform: uppercase;
}

.user-profile__name {
    font-size: 14px;
    color: #333;
    max-width: 150px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.user-profile__menu {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 8px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    min-width: 200px;
    z-index: 100;
    animation: menuSlideIn 0.2s ease;
}

.user-profile__menu-item {
    width: 100%;
    padding: 12px 16px;
    border: none;
    background: transparent;
    text-align: left;
    cursor: pointer;
    color: rgba(0, 0, 0, 0.85);
    color: var(--color-text-primary, rgba(0, 0, 0, 0.85));
    font-size: 14px;
    font-weight: 500;
    transition: background-color 0.2s ease;
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', sans-serif;
}

.user-profile__menu-item:hover {
    background-color: #f0f0f0;
    background-color: var(--color-bg-subtle, #f0f0f0);
}

.user-profile__menu-item:focus {
    outline: none;
    background-color: rgba(0, 122, 255, 0.1);
}

@keyframes menuSlideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
} 
.site-footer {
  background-color: #f8f9fa;
  padding: 40px 0 20px;
  margin-top: auto;
  border-top: 1px solid #e9ecef;
  font-size: 14px;
  color: #495057;
}

.footer-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* 頁尾導航樣式 */
.footer-navigation {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  grid-gap: 30px;
  gap: 30px;
  margin-bottom: 40px;
}

.footer-section h3 {
  color: #343a40;
  font-size: 16px;
  margin-bottom: 15px;
  font-weight: 600;
}

.footer-section ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-section ul li {
  margin-bottom: 8px;
}

.footer-section ul li a {
  color: #495057;
  text-decoration: none;
  transition: color 0.2s;
}

.footer-section ul li a:hover {
  color: #0056b3;
}

/* 版權聲明區域樣式 */
.footer-bottom {
  padding-top: 20px;
  border-top: 1px solid #dee2e6;
}

.copyright {
  margin-bottom: 15px;
  font-weight: 500;
}

.disclaimer {
  line-height: 1.6;
}

.disclaimer p {
  margin: 8px 0;
}

/* 響應式設計 */
@media (max-width: 768px) {
  .site-footer {
    padding: 30px 0 15px;
  }
  
  .footer-content {
    padding: 0 15px;
  }
  
  .footer-navigation {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  
  .footer-section {
    text-align: center;
  }
  
  .footer-section h3 {
    font-size: 15px;
  }

  .footer-section ul li a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 48px;
    min-height: 48px;
    padding: 0 8px;
  }
  
  .disclaimer {
    font-size: 12px;
  }
}

.language-switcher {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.language-switcher-button {
  background: rgba(255, 255, 255, 0.62);
  border: 1px solid rgba(191, 204, 218, 0.9);
  cursor: pointer;
  width: 38px;
  height: 38px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  color: rgba(15, 23, 42, 0.76);
  border-radius: 999px;
  transition:
    background-color 0.2s ease,
    border-color 0.2s ease,
    color 0.2s ease,
    transform 0.2s ease;
}

.language-switcher-button:hover {
  background: rgba(255, 255, 255, 0.82);
  border-color: rgba(148, 163, 184, 0.95);
  color: #0f4c81;
  transform: translateY(-1px);
}

.language-dropdown {
  position: absolute;
  top: 100%; /* Position below the button */
  right: 0; /* Align to the right */
  background-color: white;
  border: 1px solid #ccc;
  border-radius: 4px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.15);
  z-index: 100; /* Ensure it's above other content */
  width: -webkit-max-content;
  width: max-content;
  min-width: 160px;
  max-width: calc(100vw - 24px);
  box-sizing: border-box;
  padding: 5px 0;
}

.language-dropdown button {
  display: block;
  width: 100%;
  box-sizing: border-box;
  padding: 8px 15px;
  text-align: left;
  white-space: nowrap;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 0.9em;
  color: #333;
}

.language-dropdown button:hover {
  background-color: #f0f0f0;
}

.language-dropdown button:disabled {
  cursor: default;
  opacity: 0.6;
  background-color: transparent;
} 

.loading-container {
    display: flex;
    flex-direction: row;      /* 橫向排列 */
    align-items: center;      /* 垂直置中 */
    justify-content: center;
    min-height: 50vh;
}

.loading-spinner {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 1rem;
}

.spinner {
    border: 2px solid #f3f3f3;
    border-top: 2px solid #3498db;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    animation: spin 1s linear infinite;
    flex-shrink: 0;
}

.loading-text {
    font-size: 1.1em;
    color: #333;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
} 
.interstitial-ad-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.7); /* 半透明黑色背景 */
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1050; /* 提高 z-index，使其高於 AdBanner (1000/1001) */
  cursor: pointer; /* 提示可以點擊關閉 */
  /* overlay 本身是 fixed 定位，可以作為 absolute 定位按鈕的容器 */
  /* 添加 backdrop-filter 以模糊背景 */
  -webkit-backdrop-filter: blur(3px);
          backdrop-filter: blur(3px); /* 模糊半徑為 5px，可以調整 */
  /* 為了更好的瀏覽器兼容性，可以考慮添加 -webkit- 前綴，但現代瀏覽器通常不需要 */
  /* -webkit-backdrop-filter: blur(5px); */
}

.interstitial-ad-modal-content {
  background-color: white;
  padding: 20px;
  border-radius: 8px;
  /* position: relative;  <-- 不再需要，因為按鈕已移出 */
  min-width: 300px;
  max-width: 90%;
  max-height: 90%;
  /* overflow: auto; <-- 移除此行以防止滾動條 */
  text-align: center;
  cursor: default;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  /* 添加 display: flex 和 flex-direction: column 可能有助於內部廣告的對齊 */
  display: flex;
  flex-direction: column;
  justify-content: center; /* 如果希望廣告垂直居中 */
}

.interstitial-ad-modal-close {
  position: absolute;
  top: 15px;
  right: 15px;
  background: rgb(255, 255, 255);
  border: none;
  border-radius: 5px;
  padding: 5px 10px;
  font-size: 0.9rem;
  color: rgb(89, 87, 87);
  cursor: pointer;
  text-align: center;
  z-index: 1051;
  /* --- 新增/修改 --- */
  opacity: 0; /* 初始透明度為 0 */
  visibility: hidden; /* 初始隱藏，輔助 opacity */
  pointer-events: none; /* 初始不可點擊 */
}

/* 新增：當按鈕有 'visible' class 時的樣式 */
.interstitial-ad-modal-close.visible {
  opacity: 1; /* 完全可見 */
  visibility: visible; /* 變為可見 */
  pointer-events: auto; /* 允許點擊 */
}

.interstitial-ad-modal-close:hover {
  /* 保持 hover 效果，但只在 visible 時有效 */
  color: #fff;
  background: rgba(0, 0, 0, 0.9);
}

/* 確保 AdSense 容器有基本樣式 */
.interstitial-ad-modal-content .adsbygoogle {
  margin-top: 0; /* 如果不需要額外間隔，可以設為 0 */
  min-height: 50px;
  background-color: #f0f0f0;
  /* 讓廣告嘗試填滿容器寬度 */
  display: block; /* 確保是塊級元素 */
  width: 100%; /* 嘗試佔滿 content 寬度 */
} 
.dialog-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.45);
    background: var(--overlay-scrim, rgba(0, 0, 0, 0.45));
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    animation: fadeIn 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.dialog-overlay--closing {
    animation: fadeOut 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

.dialog {
    background: linear-gradient(135deg, rgba(0, 122, 255, 0.1) 0%, rgba(88, 86, 214, 0.08) 50%, rgba(255, 45, 85, 0.06) 100%), rgba(255, 255, 255, 0.95);
    background: var(--gradient-elevated, linear-gradient(135deg, rgba(0, 122, 255, 0.1) 0%, rgba(88, 86, 214, 0.08) 50%, rgba(255, 45, 85, 0.06) 100%), rgba(255, 255, 255, 0.95));
    backdrop-filter: blur(40px);
    -webkit-backdrop-filter: blur(40px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 24px;
    width: 90%;
    max-height: calc(100vh - 120px);
    position: relative;
    box-shadow: 
        0 32px 64px rgba(0, 0, 0, 0.12),
        0 16px 32px rgba(0, 0, 0, 0.08),
        0 8px 16px rgba(0, 0, 0, 0.04);
    animation: slideIn 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    padding: 28px 24px 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    overflow-y: auto;
}

.dialog--sm {
    max-width: 420px;
}

.dialog--md {
    max-width: 560px;
}

.dialog--lg {
    max-width: 720px;
}

.dialog--closing {
    animation: slideOut 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

.dialog-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 32px;
    height: 32px;
    border: none;
    background: rgba(120, 120, 128, 0.16);
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    color: rgba(60, 60, 67, 0.7);
    font-size: 16px;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 10;
}

.dialog-close:hover {
    background: rgba(255, 59, 48, 0.15);
    color: #ff3b30;
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(255, 59, 48, 0.2);
}

.dialog-close:active {
    transform: scale(0.9);
    background: rgba(255, 59, 48, 0.25);
}

.dialog-close::before,
.dialog-close::after {
    display: none;
}

.dialog-title {
    font-size: 28px;
    font-weight: 700;
    margin: 16px 0 12px;
    color: #1d1d1f;
    color: var(--color-text-primary, #1d1d1f);
    text-align: center;
    padding: 0 20px;
    line-height: 1.2;
    letter-spacing: -0.5px;
}

.dialog-description {
    color: rgba(60, 60, 67, 0.7);
    color: var(--color-text-secondary, rgba(60, 60, 67, 0.7));
    margin: 0 0 32px;
    font-size: 17px;
    line-height: 1.47;
    text-align: center;
    padding: 0 8px;
    font-weight: 400;
}

.dialog-content {
    margin-top: 0;
    width: 100%;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}

/* Apple-style gradient background applied to entire dialog */

/* Premium button styles */
.dialog-premium-button {
    background: linear-gradient(135deg, #007AFF 0%, #5856D6 100%);
    border: none;
    border-radius: 14px;
    color: white;
    font-size: 17px;
    font-weight: 600;
    padding: 16px 32px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    box-shadow: 
        0 8px 24px rgba(0, 122, 255, 0.25),
        0 4px 12px rgba(0, 122, 255, 0.15);
    min-width: 200px;
    letter-spacing: -0.2px;
}

.dialog-premium-button:hover {
    transform: translateY(-2px);
    box-shadow: 
        0 12px 32px rgba(0, 122, 255, 0.3),
        0 6px 16px rgba(0, 122, 255, 0.2);
}

.dialog-premium-button:active {
    transform: translateY(0);
}

/* Secondary button */
.dialog-secondary-button {
    background: rgba(120, 120, 128, 0.12);
    border: none;
    border-radius: 14px;
    color: #007AFF;
    font-size: 17px;
    font-weight: 500;
    padding: 14px 24px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.dialog-secondary-button:hover {
    background: rgba(120, 120, 128, 0.2);
    transform: translateY(-1px);
}

/* Feature list styling */
.dialog-features {
    list-style: none;
    padding: 0;
    margin: 24px 0;
    width: 100%;
}

.dialog-features li {
    display: flex;
    align-items: center;
    padding: 12px 0;
    color: rgba(60, 60, 67, 0.8);
    font-size: 16px;
    line-height: 1.4;
}

.feature-icon {
    font-size: 20px;
    margin-right: 12px;
    width: 24px;
    text-align: center;
    flex-shrink: 0;
}

.feature-text {
    flex: 1 1;
}

@keyframes fadeIn {
    from { 
        opacity: 0;
        backdrop-filter: blur(0px);
        -webkit-backdrop-filter: blur(0px);
    }
    to { 
        opacity: 1;
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
    }
}

@keyframes fadeOut {
    from { 
        opacity: 1;
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
    }
    to { 
        opacity: 0;
        backdrop-filter: blur(0px);
        -webkit-backdrop-filter: blur(0px);
    }
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-30px) scale(0.95);
        backdrop-filter: blur(0px);
        -webkit-backdrop-filter: blur(0px);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
        backdrop-filter: blur(40px);
        -webkit-backdrop-filter: blur(40px);
    }
}

@keyframes slideOut {
    from {
        opacity: 1;
        transform: translateY(0) scale(1);
        backdrop-filter: blur(40px);
        -webkit-backdrop-filter: blur(40px);
    }
    to {
        opacity: 0;
        transform: translateY(30px) scale(0.95);
        backdrop-filter: blur(0px);
        -webkit-backdrop-filter: blur(0px);
    }
}

/* Responsive design */
@media (max-width: 480px) {
    .dialog {
        width: 95%;
        max-width: none;
        margin: 20px;
        padding: 28px 20px 20px;
    }
    
    .dialog-title {
        font-size: 24px;
        margin: 12px 0 8px;
    }
    
    .dialog-description {
        font-size: 16px;
        margin-bottom: 24px;
    }
    
    .dialog-premium-button {
        font-size: 16px;
        padding: 14px 28px;
        min-width: 180px;
    }
}

/* Quota Dialog Specific Styles */
.quota-dialog-content {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 24px;
}

.quota-dialog-premium-icon {
    margin: 8px 0 16px;
}

.premium-crown {
    width: 64px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.1), rgba(255, 165, 0, 0.1));
    border-radius: 50%;
    animation: crownFloat 3s ease-in-out infinite;
}

@keyframes crownFloat {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-4px); }
}



.premium-features {
    width: 100%;
}

.features-title {
    font-size: 18px;
    font-weight: 600;
    color: #1d1d1f;
    text-align: center;
    margin: 0 0 16px;
}

.quota-dialog-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 100%;
    align-items: center;
}

.dialog-premium-button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    max-width: 280px;
}

.button-text {
    font-weight: 600;
}

.button-icon {
    font-size: 16px;
    animation: sparkle 2s ease-in-out infinite;
}

@keyframes sparkle {
    0%, 100% { transform: scale(1) rotate(0deg); }
    50% { transform: scale(1.1) rotate(5deg); }
}

.trust-indicators {
    display: flex;
    justify-content: space-evenly;
    width: 100%;
    margin-top: 8px;
    padding-top: 20px;
    border-top: 1px solid rgba(226, 232, 240, 0.5);
}

.trust-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    flex: 1 1;
}

.trust-icon {
    font-size: 20px;
    margin-bottom: 4px;
}

.trust-text {
    font-size: 12px;
    color: rgba(60, 60, 67, 0.6);
    text-align: center;
    line-height: 1.3;
}

/* Responsive adjustments for quota dialog */
@media (max-width: 480px) {
    .quota-dialog-content {
        gap: 20px;
    }
    

    
    .features-title {
        font-size: 16px;
    }
    
    .trust-indicators {
        flex-direction: column;
        gap: 12px;
    }
    
    .trust-item {
        flex-direction: row;
        justify-content: center;
        gap: 8px;
    }
    
    .trust-text {
        font-size: 13px;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .dialog {
        background: rgba(28, 28, 30, 0.95);
        border: 1px solid rgba(255, 255, 255, 0.1);
    }
    
    .dialog-title {
        color: #f2f2f7;
    }
    
    .dialog-description {
        color: rgba(235, 235, 245, 0.6);
    }
    
    .features-title {
        color: #f2f2f7;
    }
    
    .dialog-features li {
        color: rgba(235, 235, 245, 0.8);
    }
    
    .trust-indicators {
        border-top: 1px solid rgba(255, 255, 255, 0.1);
    }
    
    .trust-text {
        color: rgba(235, 235, 245, 0.6);
    }
}

.dialog.free-trial-promotion {
  box-sizing: border-box;
  width: min(92vw, 820px);
  max-width: 820px;
  min-height: 500px;
  max-height: calc(100dvh - 48px);
  padding: 58px 365px 46px 52px;
  align-items: flex-start;
  overflow-x: hidden;
  overflow-y: auto;
  border: 1px solid rgba(223, 231, 239, 0.9);
  border-radius: 28px;
  background: #fbfcfe;
  box-shadow: 0 32px 90px rgba(16, 38, 64, 0.22);
}

.free-trial-promotion .dialog-close {
  top: 22px;
  right: 22px;
  background: rgba(243, 247, 251, 0.22);
  color: #eaf3fd;
}

.free-trial-promotion .dialog-close:hover {
  background: rgba(243, 247, 251, 0.35);
  color: #ffffff;
  box-shadow: none;
  transform: none;
}

.free-trial-promotion .dialog-title {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 28px;
  width: 100%;
  margin: 0 0 16px;
  padding: 0;
  color: #142e48;
  font-size: clamp(2.2rem, 4vw, 3.05rem);
  font-weight: 730;
  letter-spacing: -0.045em;
  line-height: 1.12;
  text-align: left;
}

.free-trial-promotion__eyebrow {
  color: #1d619e;
  font-size: 0.76rem;
  font-weight: 750;
  letter-spacing: 0.12em;
  line-height: 1.2;
}

.free-trial-promotion .dialog-description {
  width: 100%;
  margin: 0 0 28px;
  padding: 0;
  color: #50637a;
  font-size: 1.08rem;
  line-height: 1.55;
  text-align: left;
}

.free-trial-promotion .dialog-content {
  width: 100%;
  flex: 1 1;
  align-items: stretch;
  gap: 0;
}

.free-trial-promotion__art {
  position: absolute;
  inset: 0 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 41%;
  padding: 20px;
  box-sizing: border-box;
  overflow: hidden;
  background: linear-gradient(135deg, #007aff 0%, #5856d6 52%, #af52de 100%);
  color: #f4f9ff;
}

.free-trial-promotion__artOffer {
  font-size: clamp(2.3rem, 3.2vw, 2.7rem);
  font-weight: 720;
  letter-spacing: -0.055em;
  line-height: 1.2;
  white-space: nowrap;
}


.free-trial-promotion__terms {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: auto;
  padding: 17px 0 0;
  border-top: 1px solid #dfe7ef;
  color: #708195;
  font-size: 0.82rem;
  line-height: 1.55;
}

.free-trial-promotion__terms strong {
  color: #47617b;
  font-weight: 670;
}

.free-trial-promotion__actions {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 4px;
  width: min(100%, 320px);
  margin-top: 26px;
  align-self: center;
}

.free-trial-promotion__cta {
  min-height: 54px;
  padding: 13px 18px;
  border: 0;
  border-radius: 13px;
  background: #1761a8;
  color: #f8fbff;
  cursor: pointer;
  font: inherit;
  font-size: 0.99rem;
  font-weight: 700;
  transition: background-color 180ms ease, transform 180ms ease;
}

.free-trial-promotion__cta:hover {
  background: #104f90;
  transform: translateY(-1px);
}

.free-trial-promotion__later {
  min-height: 42px;
  padding: 8px;
  border: 0;
  background: transparent;
  color: #718196;
  cursor: pointer;
  font: inherit;
  font-size: 0.88rem;
}

.free-trial-promotion__later:hover {
  color: #153758;
}

.free-trial-promotion__cta:focus-visible,
.free-trial-promotion__later:focus-visible {
  outline: 3px solid #86bff0;
  outline-offset: 3px;
}

@media (max-width: 850px) {
  .dialog.free-trial-promotion {
    width: min(92vw, 520px);
    min-height: 0;
    max-height: calc(100dvh - 32px);
    margin: 16px;
    padding: 34px 28px 22px;
    border-radius: 24px;
  }

  .free-trial-promotion .dialog-close {
    top: 17px;
    right: 17px;
    background: #e8edf3;
    color: #52667a;
  }

  .free-trial-promotion .dialog-close:hover {
    background: #dfe7ee;
    color: #173a62;
  }

  .free-trial-promotion .dialog-title {
    gap: 17px;
    padding-right: 30px;
    font-size: clamp(2rem, 7.7vw, 2.6rem);
  }

  .free-trial-promotion .dialog-description {
    margin-bottom: 24px;
    font-size: 1rem;
  }

  .free-trial-promotion .dialog-content {
    flex: none;
  }

  .free-trial-promotion__art {
    position: relative;
    inset: auto;
    order: -1;
    width: 100%;
    height: 148px;
    margin-bottom: 24px;
    border-radius: 16px;
  }

  .free-trial-promotion__artOffer {
    font-size: clamp(2rem, 7vw, 2.5rem);
  }

  .free-trial-promotion__actions {
    margin-top: 22px;
  }
}

@media (max-width: 360px) {
  .dialog.free-trial-promotion {
    padding-right: 22px;
    padding-left: 22px;
  }

  .free-trial-promotion__artOffer {
    font-size: 1.85rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .free-trial-promotion__cta {
    transition: none;
  }
}

/* Toast 通知 */
.toast {
    position: fixed;
    top: 90px;
    right: 24px;
    padding: 16px 24px;
    border-radius: 8px;
    background: #ffffff;
    color: #333333;
    z-index: 1000;
    min-width: 300px;
    max-width: 400px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 500;
    animation: slideIn 0.3s ease-out;
    border-left: 4px solid #333333;
}

/* 成功樣式 */
.toast.toast-success {
    background: #f0fdf4;
    border-left-color: #22c55e;
    color: #166534;
}

/* 錯誤樣式 */
.toast.toast-error {
    background: #fef2f2;
    border-left-color: #ef4444;
    color: #991b1b;
}

/* 警告樣式 */
.toast.toast-warning {
    background: #fffbeb;
    border-left-color: #f59e0b;
    color: #92400e;
}

/* 資訊樣式 */
.toast.toast-info {
    background: #f0f9ff;
    border-left-color: #0ea5e9;
    color: #075985;
}

/* 動畫效果 */
@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* 添加圖示 */
.toast::before {
    content: '';
    width: 20px;
    height: 20px;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}

.toast.toast-success::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 24 24%27 fill=%27%2322c55e%27%3E%3Cpath d=%27M20.3 5.3L9 16.6l-5.3-5.3-1.4 1.4 6.7 6.7 12.7-12.7z%27%2F%3E%3C%2Fsvg%3E");
}

.toast.toast-error::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 24 24%27 fill=%27%23ef4444%27%3E%3Cpath d=%27M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 15h-2v-2h2v2zm0-4h-2V7h2v6z%27%2F%3E%3C%2Fsvg%3E");
}

.toast.toast-warning::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 24 24%27 fill=%27%23f59e0b%27%3E%3Cpath d=%27M1 21h22L12 2 1 21zm12-3h-2v-2h2v2zm0-4h-2v-4h2v4z%27%2F%3E%3C%2Fsvg%3E");
}

.toast.toast-info::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 24 24%27 fill=%27%230ea5e9%27%3E%3Cpath d=%27M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 15h-2v-6h2v6zm0-8h-2V7h2v2z%27%2F%3E%3C%2Fsvg%3E");
}

/* 響應式設計 */
@media (max-width: 768px) {
    .toast {
        top: 50px;
        right: 16px;
        left: 16px;
        min-width: auto;
        max-width: none;
        text-align: left;
        padding: 12px 20px;
    }
}

/* 多個 Toast 堆疊時的間距 */
.toast + .toast {
    margin-bottom: 8px;
} 
.market-pulse {
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  width: min(1440px, 100%);
  min-height: 72px;
  margin: 0 auto 18px;
  padding: 9px 0;
  border: 1px solid #e5eaf0;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 5px 20px rgba(37, 51, 75, 0.035);
}

.market-pulse__value {
  color: #788696;
  font-size: 11px;
  line-height: 16px;
  font-feature-settings: "tnum";
  font-variant-numeric: tabular-nums;
}

.market-pulse__viewport,
.market-pulse__empty {
  /* 三行行情（17 + 16 + 20）與上下 padding（4）的固定預留高度。 */
  min-height: 57px;
}

.market-pulse__viewport {
  width: 100%;
  min-width: 0;
  overflow: hidden;
}

.market-pulse__track,
.market-pulse__group {
  display: flex;
  min-width: 0;
}

.market-pulse__track {
  width: 100%;
}

.market-pulse__group {
  flex: 1 0 100%;
}

.market-pulse__viewport.is-rotating .market-pulse__track {
  width: -webkit-max-content;
  width: max-content;
  animation: market-pulse-rotate 72s linear infinite;
}

.market-pulse__viewport.is-rotating .market-pulse__group {
  flex: 0 0 auto;
  width: -webkit-max-content;
  width: max-content;
}

.market-pulse__viewport.is-rotating:hover .market-pulse__track,
.market-pulse__viewport.is-rotating:focus-within .market-pulse__track {
  animation-play-state: paused;
}

@keyframes market-pulse-rotate {
  to { transform: translateX(-50%); }
}

.market-pulse__item {
  box-sizing: border-box;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 88px;
  grid-template-rows: auto auto auto;
  grid-column-gap: 8px;
  column-gap: 8px;
  flex: 1 0 180px;
  min-width: 180px;
  padding: 2px 12px;
  border-left: 1px solid #edf0f4;
  white-space: nowrap;
}

.market-pulse__item:first-child {
  border-left: 0;
}

.market-pulse__name {
  overflow: hidden;
  color: #33445a;
  font-size: 12px;
  line-height: 17px;
  font-weight: 600;
  text-overflow: ellipsis;
}

.market-pulse__change {
  align-self: end;
  font-size: 14px;
  line-height: 20px;
  font-feature-settings: "tnum";
  font-variant-numeric: tabular-nums;
  font-weight: 700;
}

.market-pulse__change--up,
.market-pulse__sparkline--up {
  color: #13846e;
}

.market-pulse__change--down,
.market-pulse__sparkline--down {
  color: #c45261;
}

.market-pulse__change--flat,
.market-pulse__sparkline--flat {
  color: #708090;
}

.market-pulse__sparkline {
  grid-column: 2;
  grid-row: 1 / 4;
  align-self: stretch;
  width: 88px;
  height: 100%;
  min-height: 44px;
}

.market-pulse__refresh-note {
  margin: 6px 14px 0;
  color: #788696;
  font-size: 11px;
  line-height: 1.5;
  text-align: right;
}

.market-pulse__empty {
  box-sizing: border-box;
  display: flex;
  align-items: center;
  margin: 0;
  padding-left: 14px;
  color: #788696;
  font-size: 12px;
}

@media (max-width: 768px) {
  .market-pulse {
    min-height: 65px;
    margin-bottom: 14px;
    border-radius: 13px;
  }

  .market-pulse__item {
    flex-basis: 170px;
    min-width: 170px;
    padding-right: 8px;
    padding-left: 10px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .market-pulse__viewport.is-rotating {
    overflow-x: auto;
  }

  .market-pulse__viewport.is-rotating .market-pulse__track {
    animation: none;
  }

  .market-pulse__group--copy {
    display: none;
  }
}

.startup-loader {
  position: fixed;
  z-index: 2000;
  inset: 0;
  display: grid;
  min-height: 100vh;
  min-height: 100svh;
  place-items: center;
  overflow: hidden;
  background:
    radial-gradient(ellipse at 50% 43%, rgba(107, 121, 243, 0.075), transparent 34%),
    radial-gradient(ellipse at 50% 56%, rgba(40, 215, 229, 0.055), transparent 45%),
    #f8f9fc;
  color: #182033;
}

.startup-loader__content {
  display: flex;
  width: min(100% - 40px, 280px);
  flex-direction: column;
  align-items: center;
  opacity: 0;
  transform: translateY(5px);
  visibility: hidden;
  transition:
    opacity 280ms ease,
    transform 280ms ease,
    visibility 280ms;
}

.startup-loader--visible .startup-loader__content {
  opacity: 1;
  transform: translateY(0);
  visibility: visible;
}

.startup-loader__logo {
  display: block;
  width: min(212px, 72vw);
  height: auto;
  object-fit: contain;
}

.startup-loader__signal {
  width: 164px;
  height: 30px;
  margin-top: 27px;
}

.startup-loader__signal svg {
  display: block;
  width: 100%;
  height: 100%;
  overflow: visible;
}

.startup-loader__signal-track,
.startup-loader__signal-pulse {
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.startup-loader__signal-track {
  stroke: #dce1eb;
}

.startup-loader__signal-pulse {
  stroke: url(#startup-loader-signal-gradient);
  stroke-dasharray: 22 220;
  animation: startup-loader-signal-travel 2.2s linear infinite;
}

.startup-loader__signal-point {
  fill: #6b79f3;
  transform-box: fill-box;
  transform-origin: center;
  animation: startup-loader-signal-beat 1.7s ease-in-out infinite;
}

.startup-loader__progress {
  width: 88px;
  height: 2px;
  margin-top: 19px;
  overflow: hidden;
  border-radius: 999px;
  background: #e6e9f0;
}

.startup-loader__progress span {
  display: block;
  width: 38%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #28d7e5 0%, #6b79f3 58%, #ef3f98 100%);
  animation: startup-loader-progress 1.65s ease-in-out infinite;
}

@keyframes startup-loader-signal-travel {
  from { stroke-dashoffset: 0; }
  to { stroke-dashoffset: -242; }
}

@keyframes startup-loader-signal-beat {
  0%, 100% { opacity: 0.55; transform: scale(0.8); }
  50% { opacity: 1; transform: scale(1.25); }
}

@keyframes startup-loader-progress {
  0% { transform: translateX(-115%); }
  100% { transform: translateX(265%); }
}

@media (prefers-reduced-motion: reduce) {
  .startup-loader__content {
    transition: none;
  }

  .startup-loader__signal-pulse,
  .startup-loader__signal-point,
  .startup-loader__progress span {
    animation: none;
  }

  .startup-loader__progress span {
    width: 100%;
    opacity: 0.7;
  }
}

