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;
}

/* 🍎 蘋果風格登入按鈕設計 - 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 自動調整字體大小 */
}

/* 認證狀態骨架屏動畫 */
@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%;
}

/* 側邊欄樣式 */
.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;
}

.top-nav {
  position: fixed;
  top: 0;
  right: 0;
  left: 0;
  background-color: white;
  background-color: var(--color-bg-card, white);
  padding: 5px 20px;
  padding: 5px var(--space-l, 20px);
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  box-shadow: var(--shadow-s, 0 2px 4px rgba(0,0,0,0.1));
  height: 50px;
  z-index: 999;
}

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

.user-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
  padding-right: 5px;
}

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

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

.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);
}

/* 添加這個新的樣式 */
.market-sentiment-container {
  margin-top: -10px; /* 減少頂部間距 */
}

/* 側邊欄預設隱藏狀態 */
.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%;
    padding: 5px 15px;
  }

  .menu-toggle {
    display: block;
  }

  .content-area {
    margin-left: 0;
    margin-right: 0;
    padding: 15px;
    /* 手機版也不需要為 AnnouncementBar 調整 margin-top */
  }

  /* 確保 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 自動調整字體大小 */
  }
}

/* 為標準差和情緒指標頁面添加特定樣式 */
.standard-deviation-page,
.market-sentiment-index {
  width: 100%;
  max-width: 100%;
  padding: 0 20px; /* 添加左右內邊距 */
  box-sizing: border-box;
}

/* 調整圖表容器和輸入區塊的寬度 */
.chart-container,
.indicator-chart-container,
.input-group {  /* 添加 input-group */
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
}


/* 響應式設計調整 */
@media (max-width: 1300px) {
  .standard-deviation-page,
  .market-sentiment-index {
    padding: 0 10px; /* 減少左右內邊距 */
  }
}



.tab-button {
    padding: 8px 16px;
    border: none;
    border-radius: 4px;
    background-color: #f5f5f5;
    cursor: pointer;
    transition: background-color 0.3s;
}

.tab-button.active {
    background-color: #1a73e8;
    color: white;
}

.tab-button:hover {
    background-color: #e4e6e9;
}

.tab-button.active:hover {
    background-color: #1557b0;
}

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

.top-nav .user-profile__trigger {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px;
    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;
}

.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;
  gap: 20px;
  margin-right: auto;
  margin-left: auto;
  flex-wrap: nowrap; /* 防止換行 */
  overflow: hidden; /* 隱藏溢出內容 */
  transition: all 0.3s ease;
}



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

/* 調整導航項目樣式 */
.desktop-nav-items a {
  color: #333;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 4px;
  transition: all 0.2s ease;
  white-space: nowrap; /* 防止文字換行 */
  flex-shrink: 0; /* 防止項目收縮 */
}

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

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

/* 桌面導覽列活動連結樣式 */
.desktop-nav-items .active-nav-link {
  background-color: rgba(59, 130, 246, 0.12);
  color: #3b82f6;
  font-weight: 500;
}

/* 確保活動連結的 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;
  max-width: 200px;  /* 限制最大寬度 */
}

.top-nav-logo .logo {
  width: auto;
  height: 40px;  /* 調整高度 */
  margin-right: 20px;
}

/* 調整頂部導航欄布局 */
.top-nav {
  display: flex;
  align-items: center;
  padding: 8px 20px;
  height: 60px;
  min-height: 60px; /* 確保最小高度 */
  overflow: visible; /* 允許內容可見以便檢測 */
}



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



/* 響應式設計調整 */
@media (max-width: 1300px) {
  .top-nav {
    height: 50px;  /* 手機版稍微降低高度 */
    padding: 5px 15px;
  }

  .top-nav-logo {
    max-width: 150px;  /* 手機版限制 logo 容器寬度 */
  }

  .top-nav-logo .logo {
    height: 32px;  /* 手機版縮小 logo */
    margin-right: 10px;
  }
}

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

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

/* 修改桌面版下拉選單樣式 */
.desktop-dropdown-menu {
  position: absolute;
  top: 100%;
  padding: 8px 0;
  min-width: 160px;
  background-color: #ffffff;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  border-radius: 4px;
  z-index: 1000;
}

.desktop-dropdown-menu a {
  padding: 8px 16px !important;
  display: block;
  width: 100%;
  color: #333;
  text-decoration: none;
  transition: all 0.2s ease;
}

.desktop-dropdown-menu a:hover {
  background-color: rgba(59, 130, 246, 0.08);
  color: #3b82f6;
  width: 80%;
}

/* 修正側邊欄中 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%;
  }
}
/* 引入專用的認證按鈕樣式 */

.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);
    }
}

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

/* 從 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;
    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;
}

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

/* 閃爍動畫 */
@keyframes pulse {
  0% {
    transform: scale(1);
    opacity: 1;
  }
  50% {
    transform: scale(1.1);
    opacity: 0.8;
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
} 
@charset "UTF-8";
.react-datepicker__navigation-icon::before, .react-datepicker__year-read-view--down-arrow,
.react-datepicker__month-read-view--down-arrow,
.react-datepicker__month-year-read-view--down-arrow {
  border-color: #ccc;
  border-style: solid;
  border-width: 3px 3px 0 0;
  content: "";
  display: block;
  height: 9px;
  position: absolute;
  top: 6px;
  width: 9px;
}
.react-datepicker-wrapper {
  display: inline-block;
  padding: 0;
  border: 0;
}

.react-datepicker {
  font-family: "Helvetica Neue", helvetica, arial, sans-serif;
  font-size: 0.8rem;
  background-color: #fff;
  color: #000;
  border: 1px solid #aeaeae;
  border-radius: 0.3rem;
  display: inline-block;
  position: relative;
  line-height: normal;
  line-height: initial;
}

.react-datepicker--time-only .react-datepicker__time-container {
  border-left: 0;
}
.react-datepicker--time-only .react-datepicker__time,
.react-datepicker--time-only .react-datepicker__time-box {
  border-bottom-left-radius: 0.3rem;
  border-bottom-right-radius: 0.3rem;
}

.react-datepicker-popper {
  z-index: 1;
  line-height: 0;
}
.react-datepicker-popper .react-datepicker__triangle {
  stroke: #aeaeae;
}
.react-datepicker-popper[data-placement^=bottom] .react-datepicker__triangle {
  fill: #f0f0f0;
  color: #f0f0f0;
}
.react-datepicker-popper[data-placement^=top] .react-datepicker__triangle {
  fill: #fff;
  color: #fff;
}

.react-datepicker__header {
  text-align: center;
  background-color: #f0f0f0;
  border-bottom: 1px solid #aeaeae;
  border-top-left-radius: 0.3rem;
  padding: 8px 0;
  position: relative;
}
.react-datepicker__header--time {
  padding-bottom: 8px;
  padding-left: 5px;
  padding-right: 5px;
}
.react-datepicker__header--time:not(.react-datepicker__header--time--only) {
  border-top-left-radius: 0;
}
.react-datepicker__header:not(.react-datepicker__header--has-time-select) {
  border-top-right-radius: 0.3rem;
}

.react-datepicker__year-dropdown-container--select,
.react-datepicker__month-dropdown-container--select,
.react-datepicker__month-year-dropdown-container--select,
.react-datepicker__year-dropdown-container--scroll,
.react-datepicker__month-dropdown-container--scroll,
.react-datepicker__month-year-dropdown-container--scroll {
  display: inline-block;
  margin: 0 15px;
}

.react-datepicker__current-month,
.react-datepicker-time__header,
.react-datepicker-year-header {
  margin-top: 0;
  color: #000;
  font-weight: bold;
  font-size: 0.944rem;
}

h2.react-datepicker__current-month {
  padding: 0;
  margin: 0;
}

.react-datepicker-time__header {
  text-overflow: ellipsis;
  white-space: nowrap;
  overflow: hidden;
}

.react-datepicker__navigation {
  align-items: center;
  background: none;
  display: flex;
  justify-content: center;
  text-align: center;
  cursor: pointer;
  position: absolute;
  top: 2px;
  padding: 0;
  border: none;
  z-index: 1;
  height: 32px;
  width: 32px;
  text-indent: -999em;
  overflow: hidden;
}
.react-datepicker__navigation--previous {
  left: 2px;
}
.react-datepicker__navigation--next {
  right: 2px;
}
.react-datepicker__navigation--next--with-time:not(.react-datepicker__navigation--next--with-today-button) {
  right: 85px;
}
.react-datepicker__navigation--years {
  position: relative;
  top: 0;
  display: block;
  margin-left: auto;
  margin-right: auto;
}
.react-datepicker__navigation--years-previous {
  top: 4px;
}
.react-datepicker__navigation--years-upcoming {
  top: -4px;
}
.react-datepicker__navigation:hover *::before {
  border-color: rgb(165.75, 165.75, 165.75);
}

.react-datepicker__navigation-icon {
  position: relative;
  top: -1px;
  font-size: 20px;
  width: 0;
}
.react-datepicker__navigation-icon--next {
  left: -2px;
}
.react-datepicker__navigation-icon--next::before {
  transform: rotate(45deg);
  left: -7px;
}
.react-datepicker__navigation-icon--previous {
  right: -2px;
}
.react-datepicker__navigation-icon--previous::before {
  transform: rotate(225deg);
  right: -7px;
}

.react-datepicker__month-container {
  float: left;
}

.react-datepicker__year {
  margin: 0.4rem;
  text-align: center;
}
.react-datepicker__year-wrapper {
  display: flex;
  flex-wrap: wrap;
  max-width: 180px;
}
.react-datepicker__year .react-datepicker__year-text {
  display: inline-block;
  width: 4rem;
  margin: 2px;
}

.react-datepicker__month {
  margin: 0.4rem;
  text-align: center;
}
.react-datepicker__month .react-datepicker__month-text,
.react-datepicker__month .react-datepicker__quarter-text {
  display: inline-block;
  width: 4rem;
  margin: 2px;
}

.react-datepicker__input-time-container {
  clear: both;
  width: 100%;
  float: left;
  margin: 5px 0 10px 15px;
  text-align: left;
}
.react-datepicker__input-time-container .react-datepicker-time__caption {
  display: inline-block;
}
.react-datepicker__input-time-container .react-datepicker-time__input-container {
  display: inline-block;
}
.react-datepicker__input-time-container .react-datepicker-time__input-container .react-datepicker-time__input {
  display: inline-block;
  margin-left: 10px;
}
.react-datepicker__input-time-container .react-datepicker-time__input-container .react-datepicker-time__input input {
  width: auto;
}
.react-datepicker__input-time-container .react-datepicker-time__input-container .react-datepicker-time__input input[type=time]::-webkit-inner-spin-button,
.react-datepicker__input-time-container .react-datepicker-time__input-container .react-datepicker-time__input input[type=time]::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
.react-datepicker__input-time-container .react-datepicker-time__input-container .react-datepicker-time__input input[type=time] {
  -moz-appearance: textfield;
}
.react-datepicker__input-time-container .react-datepicker-time__input-container .react-datepicker-time__delimiter {
  margin-left: 5px;
  display: inline-block;
}

.react-datepicker__time-container {
  float: right;
  border-left: 1px solid #aeaeae;
  width: 85px;
}
.react-datepicker__time-container--with-today-button {
  display: inline;
  border: 1px solid #aeaeae;
  border-radius: 0.3rem;
  position: absolute;
  right: -87px;
  top: 0;
}
.react-datepicker__time-container .react-datepicker__time {
  position: relative;
  background: white;
  border-bottom-right-radius: 0.3rem;
}
.react-datepicker__time-container .react-datepicker__time .react-datepicker__time-box {
  width: 85px;
  overflow-x: hidden;
  margin: 0 auto;
  text-align: center;
  border-bottom-right-radius: 0.3rem;
}
.react-datepicker__time-container .react-datepicker__time .react-datepicker__time-box ul.react-datepicker__time-list {
  list-style: none;
  margin: 0;
  height: calc(195px + 1.7rem / 2);
  overflow-y: scroll;
  padding-right: 0;
  padding-left: 0;
  width: 100%;
  box-sizing: content-box;
}
.react-datepicker__time-container .react-datepicker__time .react-datepicker__time-box ul.react-datepicker__time-list li.react-datepicker__time-list-item {
  height: 30px;
  padding: 5px 10px;
  white-space: nowrap;
}
.react-datepicker__time-container .react-datepicker__time .react-datepicker__time-box ul.react-datepicker__time-list li.react-datepicker__time-list-item:hover {
  cursor: pointer;
  background-color: #f0f0f0;
}
.react-datepicker__time-container .react-datepicker__time .react-datepicker__time-box ul.react-datepicker__time-list li.react-datepicker__time-list-item--selected {
  background-color: #216ba5;
  color: white;
  font-weight: bold;
}
.react-datepicker__time-container .react-datepicker__time .react-datepicker__time-box ul.react-datepicker__time-list li.react-datepicker__time-list-item--selected:hover {
  background-color: #216ba5;
}
.react-datepicker__time-container .react-datepicker__time .react-datepicker__time-box ul.react-datepicker__time-list li.react-datepicker__time-list-item--disabled {
  color: #ccc;
}
.react-datepicker__time-container .react-datepicker__time .react-datepicker__time-box ul.react-datepicker__time-list li.react-datepicker__time-list-item--disabled:hover {
  cursor: default;
  background-color: transparent;
}

.react-datepicker__week-number {
  color: #ccc;
  display: inline-block;
  width: 1.7rem;
  line-height: 1.7rem;
  text-align: center;
  margin: 0.166rem;
}
.react-datepicker__week-number.react-datepicker__week-number--clickable {
  cursor: pointer;
}
.react-datepicker__week-number.react-datepicker__week-number--clickable:not(.react-datepicker__week-number--selected):hover {
  border-radius: 0.3rem;
  background-color: #f0f0f0;
}
.react-datepicker__week-number--selected {
  border-radius: 0.3rem;
  background-color: #216ba5;
  color: #fff;
}
.react-datepicker__week-number--selected:hover {
  background-color: rgb(28.75, 93.2196969697, 143.75);
}

.react-datepicker__day-names {
  white-space: nowrap;
  margin-bottom: -8px;
}

.react-datepicker__week {
  white-space: nowrap;
}

.react-datepicker__day-name,
.react-datepicker__day,
.react-datepicker__time-name {
  color: #000;
  display: inline-block;
  width: 1.7rem;
  line-height: 1.7rem;
  text-align: center;
  margin: 0.166rem;
}

.react-datepicker__day,
.react-datepicker__month-text,
.react-datepicker__quarter-text,
.react-datepicker__year-text {
  cursor: pointer;
}
.react-datepicker__day:not([aria-disabled=true]):hover,
.react-datepicker__month-text:not([aria-disabled=true]):hover,
.react-datepicker__quarter-text:not([aria-disabled=true]):hover,
.react-datepicker__year-text:not([aria-disabled=true]):hover {
  border-radius: 0.3rem;
  background-color: #f0f0f0;
}
.react-datepicker__day--today,
.react-datepicker__month-text--today,
.react-datepicker__quarter-text--today,
.react-datepicker__year-text--today {
  font-weight: bold;
}
.react-datepicker__day--highlighted,
.react-datepicker__month-text--highlighted,
.react-datepicker__quarter-text--highlighted,
.react-datepicker__year-text--highlighted {
  border-radius: 0.3rem;
  background-color: #3dcc4a;
  color: #fff;
}
.react-datepicker__day--highlighted:not([aria-disabled=true]):hover,
.react-datepicker__month-text--highlighted:not([aria-disabled=true]):hover,
.react-datepicker__quarter-text--highlighted:not([aria-disabled=true]):hover,
.react-datepicker__year-text--highlighted:not([aria-disabled=true]):hover {
  background-color: rgb(49.8551020408, 189.6448979592, 62.5632653061);
}
.react-datepicker__day--highlighted-custom-1,
.react-datepicker__month-text--highlighted-custom-1,
.react-datepicker__quarter-text--highlighted-custom-1,
.react-datepicker__year-text--highlighted-custom-1 {
  color: magenta;
}
.react-datepicker__day--highlighted-custom-2,
.react-datepicker__month-text--highlighted-custom-2,
.react-datepicker__quarter-text--highlighted-custom-2,
.react-datepicker__year-text--highlighted-custom-2 {
  color: green;
}
.react-datepicker__day--holidays,
.react-datepicker__month-text--holidays,
.react-datepicker__quarter-text--holidays,
.react-datepicker__year-text--holidays {
  position: relative;
  border-radius: 0.3rem;
  background-color: #ff6803;
  color: #fff;
}
.react-datepicker__day--holidays .overlay,
.react-datepicker__month-text--holidays .overlay,
.react-datepicker__quarter-text--holidays .overlay,
.react-datepicker__year-text--holidays .overlay {
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  background-color: #333;
  color: #fff;
  padding: 4px;
  border-radius: 4px;
  white-space: nowrap;
  visibility: hidden;
  opacity: 0;
  transition: visibility 0s, opacity 0.3s ease-in-out;
}
.react-datepicker__day--holidays:not([aria-disabled=true]):hover,
.react-datepicker__month-text--holidays:not([aria-disabled=true]):hover,
.react-datepicker__quarter-text--holidays:not([aria-disabled=true]):hover,
.react-datepicker__year-text--holidays:not([aria-disabled=true]):hover {
  background-color: rgb(207, 82.9642857143, 0);
}
.react-datepicker__day--holidays:hover .overlay,
.react-datepicker__month-text--holidays:hover .overlay,
.react-datepicker__quarter-text--holidays:hover .overlay,
.react-datepicker__year-text--holidays:hover .overlay {
  visibility: visible;
  opacity: 1;
}
.react-datepicker__day--selected, .react-datepicker__day--in-selecting-range, .react-datepicker__day--in-range,
.react-datepicker__month-text--selected,
.react-datepicker__month-text--in-selecting-range,
.react-datepicker__month-text--in-range,
.react-datepicker__quarter-text--selected,
.react-datepicker__quarter-text--in-selecting-range,
.react-datepicker__quarter-text--in-range,
.react-datepicker__year-text--selected,
.react-datepicker__year-text--in-selecting-range,
.react-datepicker__year-text--in-range {
  border-radius: 0.3rem;
  background-color: #216ba5;
  color: #fff;
}
.react-datepicker__day--selected:not([aria-disabled=true]):hover, .react-datepicker__day--in-selecting-range:not([aria-disabled=true]):hover, .react-datepicker__day--in-range:not([aria-disabled=true]):hover,
.react-datepicker__month-text--selected:not([aria-disabled=true]):hover,
.react-datepicker__month-text--in-selecting-range:not([aria-disabled=true]):hover,
.react-datepicker__month-text--in-range:not([aria-disabled=true]):hover,
.react-datepicker__quarter-text--selected:not([aria-disabled=true]):hover,
.react-datepicker__quarter-text--in-selecting-range:not([aria-disabled=true]):hover,
.react-datepicker__quarter-text--in-range:not([aria-disabled=true]):hover,
.react-datepicker__year-text--selected:not([aria-disabled=true]):hover,
.react-datepicker__year-text--in-selecting-range:not([aria-disabled=true]):hover,
.react-datepicker__year-text--in-range:not([aria-disabled=true]):hover {
  background-color: rgb(28.75, 93.2196969697, 143.75);
}
.react-datepicker__day--keyboard-selected,
.react-datepicker__month-text--keyboard-selected,
.react-datepicker__quarter-text--keyboard-selected,
.react-datepicker__year-text--keyboard-selected {
  border-radius: 0.3rem;
  background-color: rgb(186.25, 217.0833333333, 241.25);
  color: rgb(0, 0, 0);
}
.react-datepicker__day--keyboard-selected:not([aria-disabled=true]):hover,
.react-datepicker__month-text--keyboard-selected:not([aria-disabled=true]):hover,
.react-datepicker__quarter-text--keyboard-selected:not([aria-disabled=true]):hover,
.react-datepicker__year-text--keyboard-selected:not([aria-disabled=true]):hover {
  background-color: rgb(28.75, 93.2196969697, 143.75);
}
.react-datepicker__day--in-selecting-range:not(.react-datepicker__day--in-range,
.react-datepicker__month-text--in-range,
.react-datepicker__quarter-text--in-range,
.react-datepicker__year-text--in-range),
.react-datepicker__month-text--in-selecting-range:not(.react-datepicker__day--in-range,
.react-datepicker__month-text--in-range,
.react-datepicker__quarter-text--in-range,
.react-datepicker__year-text--in-range),
.react-datepicker__quarter-text--in-selecting-range:not(.react-datepicker__day--in-range,
.react-datepicker__month-text--in-range,
.react-datepicker__quarter-text--in-range,
.react-datepicker__year-text--in-range),
.react-datepicker__year-text--in-selecting-range:not(.react-datepicker__day--in-range,
.react-datepicker__month-text--in-range,
.react-datepicker__quarter-text--in-range,
.react-datepicker__year-text--in-range) {
  background-color: rgba(33, 107, 165, 0.5);
}
.react-datepicker__month--selecting-range .react-datepicker__day--in-range:not(.react-datepicker__day--in-selecting-range,
.react-datepicker__month-text--in-selecting-range,
.react-datepicker__quarter-text--in-selecting-range,
.react-datepicker__year-text--in-selecting-range), .react-datepicker__year--selecting-range .react-datepicker__day--in-range:not(.react-datepicker__day--in-selecting-range,
.react-datepicker__month-text--in-selecting-range,
.react-datepicker__quarter-text--in-selecting-range,
.react-datepicker__year-text--in-selecting-range),
.react-datepicker__month--selecting-range .react-datepicker__month-text--in-range:not(.react-datepicker__day--in-selecting-range,
.react-datepicker__month-text--in-selecting-range,
.react-datepicker__quarter-text--in-selecting-range,
.react-datepicker__year-text--in-selecting-range),
.react-datepicker__year--selecting-range .react-datepicker__month-text--in-range:not(.react-datepicker__day--in-selecting-range,
.react-datepicker__month-text--in-selecting-range,
.react-datepicker__quarter-text--in-selecting-range,
.react-datepicker__year-text--in-selecting-range),
.react-datepicker__month--selecting-range .react-datepicker__quarter-text--in-range:not(.react-datepicker__day--in-selecting-range,
.react-datepicker__month-text--in-selecting-range,
.react-datepicker__quarter-text--in-selecting-range,
.react-datepicker__year-text--in-selecting-range),
.react-datepicker__year--selecting-range .react-datepicker__quarter-text--in-range:not(.react-datepicker__day--in-selecting-range,
.react-datepicker__month-text--in-selecting-range,
.react-datepicker__quarter-text--in-selecting-range,
.react-datepicker__year-text--in-selecting-range),
.react-datepicker__month--selecting-range .react-datepicker__year-text--in-range:not(.react-datepicker__day--in-selecting-range,
.react-datepicker__month-text--in-selecting-range,
.react-datepicker__quarter-text--in-selecting-range,
.react-datepicker__year-text--in-selecting-range),
.react-datepicker__year--selecting-range .react-datepicker__year-text--in-range:not(.react-datepicker__day--in-selecting-range,
.react-datepicker__month-text--in-selecting-range,
.react-datepicker__quarter-text--in-selecting-range,
.react-datepicker__year-text--in-selecting-range) {
  background-color: #f0f0f0;
  color: #000;
}
.react-datepicker__day--disabled,
.react-datepicker__month-text--disabled,
.react-datepicker__quarter-text--disabled,
.react-datepicker__year-text--disabled {
  cursor: default;
  color: #ccc;
}
.react-datepicker__day--disabled .overlay,
.react-datepicker__month-text--disabled .overlay,
.react-datepicker__quarter-text--disabled .overlay,
.react-datepicker__year-text--disabled .overlay {
  position: absolute;
  bottom: 70%;
  left: 50%;
  transform: translateX(-50%);
  background-color: #333;
  color: #fff;
  padding: 4px;
  border-radius: 4px;
  white-space: nowrap;
  visibility: hidden;
  opacity: 0;
  transition: visibility 0s, opacity 0.3s ease-in-out;
}

.react-datepicker__input-container {
  position: relative;
  display: inline-block;
  width: 100%;
}
.react-datepicker__input-container .react-datepicker__calendar-icon {
  position: absolute;
  padding: 0.5rem;
  box-sizing: content-box;
}

.react-datepicker__view-calendar-icon input {
  padding: 6px 10px 5px 25px;
}

.react-datepicker__year-read-view,
.react-datepicker__month-read-view,
.react-datepicker__month-year-read-view {
  border: 1px solid transparent;
  border-radius: 0.3rem;
  position: relative;
}
.react-datepicker__year-read-view:hover,
.react-datepicker__month-read-view:hover,
.react-datepicker__month-year-read-view:hover {
  cursor: pointer;
}
.react-datepicker__year-read-view:hover .react-datepicker__year-read-view--down-arrow,
.react-datepicker__year-read-view:hover .react-datepicker__month-read-view--down-arrow,
.react-datepicker__month-read-view:hover .react-datepicker__year-read-view--down-arrow,
.react-datepicker__month-read-view:hover .react-datepicker__month-read-view--down-arrow,
.react-datepicker__month-year-read-view:hover .react-datepicker__year-read-view--down-arrow,
.react-datepicker__month-year-read-view:hover .react-datepicker__month-read-view--down-arrow {
  border-top-color: rgb(178.5, 178.5, 178.5);
}
.react-datepicker__year-read-view--down-arrow,
.react-datepicker__month-read-view--down-arrow,
.react-datepicker__month-year-read-view--down-arrow {
  transform: rotate(135deg);
  right: -16px;
  top: 0;
}

.react-datepicker__year-dropdown,
.react-datepicker__month-dropdown,
.react-datepicker__month-year-dropdown {
  background-color: #f0f0f0;
  position: absolute;
  width: 50%;
  left: 25%;
  top: 30px;
  z-index: 1;
  text-align: center;
  border-radius: 0.3rem;
  border: 1px solid #aeaeae;
}
.react-datepicker__year-dropdown:hover,
.react-datepicker__month-dropdown:hover,
.react-datepicker__month-year-dropdown:hover {
  cursor: pointer;
}
.react-datepicker__year-dropdown--scrollable,
.react-datepicker__month-dropdown--scrollable,
.react-datepicker__month-year-dropdown--scrollable {
  height: 150px;
  overflow-y: scroll;
}

.react-datepicker__year-option,
.react-datepicker__month-option,
.react-datepicker__month-year-option {
  line-height: 20px;
  width: 100%;
  display: block;
  margin-left: auto;
  margin-right: auto;
}
.react-datepicker__year-option:first-of-type,
.react-datepicker__month-option:first-of-type,
.react-datepicker__month-year-option:first-of-type {
  border-top-left-radius: 0.3rem;
  border-top-right-radius: 0.3rem;
}
.react-datepicker__year-option:last-of-type,
.react-datepicker__month-option:last-of-type,
.react-datepicker__month-year-option:last-of-type {
  -webkit-user-select: none;
  user-select: none;
  border-bottom-left-radius: 0.3rem;
  border-bottom-right-radius: 0.3rem;
}
.react-datepicker__year-option:hover,
.react-datepicker__month-option:hover,
.react-datepicker__month-year-option:hover {
  background-color: #ccc;
}
.react-datepicker__year-option:hover .react-datepicker__navigation--years-upcoming,
.react-datepicker__month-option:hover .react-datepicker__navigation--years-upcoming,
.react-datepicker__month-year-option:hover .react-datepicker__navigation--years-upcoming {
  border-bottom-color: rgb(178.5, 178.5, 178.5);
}
.react-datepicker__year-option:hover .react-datepicker__navigation--years-previous,
.react-datepicker__month-option:hover .react-datepicker__navigation--years-previous,
.react-datepicker__month-year-option:hover .react-datepicker__navigation--years-previous {
  border-top-color: rgb(178.5, 178.5, 178.5);
}
.react-datepicker__year-option--selected,
.react-datepicker__month-option--selected,
.react-datepicker__month-year-option--selected {
  position: absolute;
  left: 15px;
}

.react-datepicker__close-icon {
  cursor: pointer;
  background-color: transparent;
  border: 0;
  outline: 0;
  padding: 0 6px 0 0;
  position: absolute;
  top: 0;
  right: 0;
  height: 100%;
  display: table-cell;
  vertical-align: middle;
}
.react-datepicker__close-icon::after {
  cursor: pointer;
  background-color: #216ba5;
  color: #fff;
  border-radius: 50%;
  height: 16px;
  width: 16px;
  padding: 2px;
  font-size: 12px;
  line-height: 1;
  text-align: center;
  display: table-cell;
  vertical-align: middle;
  content: "×";
}
.react-datepicker__close-icon--disabled {
  cursor: default;
}
.react-datepicker__close-icon--disabled::after {
  cursor: default;
  background-color: #ccc;
}

.react-datepicker__today-button {
  background: #f0f0f0;
  border-top: 1px solid #aeaeae;
  cursor: pointer;
  text-align: center;
  font-weight: bold;
  padding: 5px 0;
  clear: left;
}

.react-datepicker__portal {
  position: fixed;
  width: 100vw;
  height: 100vh;
  background-color: rgba(0, 0, 0, 0.8);
  left: 0;
  top: 0;
  justify-content: center;
  align-items: center;
  display: flex;
  z-index: 2147483647;
}
.react-datepicker__portal .react-datepicker__day-name,
.react-datepicker__portal .react-datepicker__day,
.react-datepicker__portal .react-datepicker__time-name {
  width: 3rem;
  line-height: 3rem;
}
@media (max-width: 400px), (max-height: 550px) {
  .react-datepicker__portal .react-datepicker__day-name,
  .react-datepicker__portal .react-datepicker__day,
  .react-datepicker__portal .react-datepicker__time-name {
    width: 2rem;
    line-height: 2rem;
  }
}
.react-datepicker__portal .react-datepicker__current-month,
.react-datepicker__portal .react-datepicker-time__header {
  font-size: 1.44rem;
}

.react-datepicker__children-container {
  width: 13.8rem;
  margin: 0.4rem;
  padding-right: 0.2rem;
  padding-left: 0.2rem;
  height: auto;
}

.react-datepicker__aria-live {
  position: absolute;
  -webkit-clip-path: circle(0);
          clip-path: circle(0);
  border: 0;
  height: 1px;
  margin: -1px;
  overflow: hidden;
  padding: 0;
  width: 1px;
  white-space: nowrap;
}

.react-datepicker__calendar-icon {
  width: 1em;
  height: 1em;
  vertical-align: -0.125em;
}

/* 建議放在一個全域的 CSS 檔案或 :root 選擇器中 */
:root {
  /* 背景顏色 */
  --color-bg-page: #f5f5f7; /* 或 #ffffff */
  --color-bg-card: #ffffff;
  --color-bg-elevated: #ffffff; /* 用於彈窗等更高層級的元素 */
  --color-bg-subtle: #f0f0f0; /* 細微背景，用於輕微區分區塊或 active 狀態 */

  /* 文字顏色 */
  --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-destructive-red: #ff3b30; /* 蘋果標準紅 (用於刪除、警告等破壞性操作) */

  /* 邊框顏色 */
  --color-border-soft: #e5e5e5;
  --color-border-default: #d1d1d6; /* 類似 iOS 輸入框 */
  --color-border-divider: #ebebeb; /* 分隔線 */

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

  /* 陰影 */
  --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-focus-ring: 0 0 0 4px rgba(0, 122, 255, 0.3); /* 輸入框 focus 效果 */

  /* 間距 (範例) */
  --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; /* 預設文字靠左對齊 */
} 
/* FeatureUpgradeDialog - Apple-inspired Design */

.feature-upgrade-dialog {
  --apple-blue: #007AFF;
  --apple-blue-hover: #0056CC;
  --apple-gray: #8E8E93;
  --apple-light-gray: #F2F2F7;
  --apple-dark-gray: #1C1C1E;
  --apple-green: #34C759;
  --apple-orange: #FF9500;
  --apple-red: #FF3B30;
  --apple-purple: #AF52DE;
  --apple-radius: 12px;
  --apple-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
  --apple-shadow-hover: 0 15px 50px rgba(0, 0, 0, 0.2);
}

.feature-upgrade-dialog .dialog-content {
  gap: 0 !important;
}

.feature-upgrade-content {
  width: 100%;
  text-align: center;
  position: relative;
}

/* 移除背景漸層效果，因為 Dialog 基礎組件已經有了 */

/* 頂部區域 */
.upgrade-header {
  margin-bottom: 20px;
}

.upgrade-icon {
  position: relative;
  display: inline-block;
  margin-bottom: 16px;
}

.main-icon {
  font-size: 48px;
  display: block;
  filter: drop-shadow(0 4px 12px rgba(0, 122, 255, 0.3));
  animation: iconFloat 3s ease-in-out infinite;
}

.icon-glow {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 80px;
  height: 80px;
  background: radial-gradient(circle, rgba(0, 122, 255, 0.2) 0%, transparent 70%);
  border-radius: 50%;
  animation: glowPulse 2s ease-in-out infinite;
  z-index: -1;
}

@keyframes iconFloat {

  0%,
  100% {
    transform: translateY(0px);
  }

  50% {
    transform: translateY(-4px);
  }
}

@keyframes glowPulse {

  0%,
  100% {
    opacity: 0.5;
    transform: translate(-50%, -50%) scale(1);
  }

  50% {
    opacity: 0.8;
    transform: translate(-50%, -50%) scale(1.1);
  }
}

.upgrade-title {
  font-size: 24px;
  font-weight: 700;
  color: var(--apple-dark-gray);
  margin: 0 0 8px 0;
  line-height: 1.2;
  letter-spacing: -0.5px;
}



/* 描述區域 */
.upgrade-description {
  margin-bottom: 20px;
  padding: 0 8px;
}

.upgrade-description p {
  font-size: 15px;
  color: #666;
  line-height: 1.5;
  margin: 0;
}

/* 功能列表 */
.upgrade-features {
  margin-bottom: 24px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.feature-upgrade-dialog .feature-item {
  display: flex !important;
  align-items: center !important;
  padding: 8px 16px !important;
  background: var(--apple-light-gray);
  border-radius: 10px;
  transition: all 0.2s ease;
  border: 1px solid transparent;
  min-height: 32px;
}

.feature-upgrade-dialog .feature-item:hover {
  background: #E8E8ED;
  transform: translateY(-1px);
  border-color: rgba(0, 122, 255, 0.2);
}

.feature-upgrade-dialog .feature-item .feature-icon {
  font-size: 16px !important;
  margin-right: 10px !important;
  width: 18px !important;
  height: 18px !important;
  text-align: center !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  flex-shrink: 0 !important;
}

.feature-upgrade-dialog .feature-item .feature-text {
  font-size: 15px !important;
  font-weight: 500 !important;
  color: var(--apple-dark-gray) !important;
  flex: 1 1 !important;
  text-align: left !important;
  line-height: 1.2 !important;
  display: flex !important;
  align-items: center !important;
  margin: 0 !important;
  padding: 0 !important;
}

/* 按鈕區域 */
.upgrade-actions {
  margin-bottom: 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.upgrade-primary-btn {
  background: linear-gradient(135deg, #007AFF 0%, #5856D6 100%);
  color: white;
  border: none;
  border-radius: 12px;
  padding: 16px 24px;
  font-size: 17px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow:
    0 8px 24px rgba(0, 122, 255, 0.25),
    0 4px 12px rgba(0, 122, 255, 0.15);
  position: relative;
  overflow: hidden;
  min-height: 52px;
  width: 100%;
  letter-spacing: -0.2px;
}

.upgrade-primary-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  transition: left 0.6s ease;
}

.upgrade-primary-btn:hover::before {
  left: 100%;
}

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

.upgrade-primary-btn:active {
  transform: translateY(0);
  box-shadow:
    0 8px 24px rgba(0, 122, 255, 0.25),
    0 4px 12px rgba(0, 122, 255, 0.15);
}

.btn-text {
  font-weight: 600;
  color: white;
  display: inline-block;
}

.btn-icon {
  font-size: 16px;
  transition: transform 0.3s ease;
  color: white;
  display: inline-block;
}

.upgrade-primary-btn:hover .btn-icon {
  transform: translateX(3px);
}

.upgrade-secondary-btn {
  background: rgba(120, 120, 128, 0.12);
  color: var(--apple-blue);
  border: none;
  border-radius: 12px;
  padding: 14px 24px;
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  min-height: 48px;
  width: 100%;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

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

.upgrade-secondary-btn:active {
  transform: translateY(0);
  background: rgba(120, 120, 128, 0.16);
}

/* 信任指標 */
.upgrade-trust {
  display: flex;
  justify-content: center;
  gap: 20px;
  padding-top: 16px;
  border-top: 1px solid #E5E5EA;
}

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

.trust-icon {
  font-size: 16px;
  opacity: 0.8;
}

.trust-text {
  font-size: 12px;
  color: var(--apple-gray);
  font-weight: 500;
}

/* 響應式設計 */
@media (max-width: 480px) {
  .upgrade-header {
    margin-bottom: 16px;
  }

  .upgrade-title {
    font-size: 22px;
  }



  .main-icon {
    font-size: 40px;
  }

  .upgrade-features {
    margin-bottom: 20px;
    gap: 6px;
  }

  .feature-upgrade-dialog .feature-item {
    padding: 6px 14px;
    min-height: 28px;
  }

  .upgrade-actions {
    margin-bottom: 16px;
    gap: 8px;
  }

  .upgrade-primary-btn {
    padding: 12px 20px;
    min-height: 44px;
  }

  .upgrade-secondary-btn {
    padding: 10px 20px;
    min-height: 40px;
  }

  .upgrade-trust {
    gap: 16px;
  }

  .trust-item {
    gap: 2px;
  }

  .trust-text {
    font-size: 11px;
  }
}

/* 深色模式支援 */
@media (prefers-color-scheme: dark) {
  .feature-upgrade-content {
    background: #1C1C1E;
    color: #FFFFFF;
  }

  .feature-upgrade-content::before {
    background: linear-gradient(135deg,
        rgba(0, 122, 255, 0.1) 0%,
        rgba(175, 82, 222, 0.1) 50%,
        rgba(255, 149, 0, 0.1) 100%);
  }

  .upgrade-title {
    color: #FFFFFF;
  }



  .upgrade-description p {
    color: #AEAEB2;
  }

  .feature-upgrade-dialog .feature-item {
    background: #2C2C2E !important;
    color: #FFFFFF !important;
    align-items: center !important;
  }

  .feature-upgrade-dialog .feature-item:hover {
    background: #3A3A3C !important;
  }

  .feature-upgrade-dialog .feature-text {
    color: #FFFFFF !important;
  }

  .upgrade-secondary-btn {
    color: var(--apple-blue);
    border-color: rgba(0, 122, 255, 0.5);
  }

  .upgrade-secondary-btn:hover {
    background: rgba(0, 122, 255, 0.1);
  }

  .upgrade-trust {
    border-top-color: #38383A;
  }
}

/* 動畫效果 */
.feature-upgrade-content {
  animation: dialogSlideIn 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

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

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

/* 無障礙設計 */
.upgrade-primary-btn:focus,
.upgrade-secondary-btn:focus {
  outline: 2px solid var(--apple-blue);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {

  .feature-upgrade-content,
  .main-icon,
  .icon-glow,
  .upgrade-primary-btn::before {
    animation: none;
  }

  .feature-upgrade-dialog .upgrade-primary-btn,
  .feature-upgrade-dialog .upgrade-secondary-btn,
  .feature-upgrade-dialog .feature-item {
    transition: none;
  }
}
.home-container {
  width: 100vw;
  margin-left: calc(-50vw + 50%);
  margin-right: calc(-50vw + 50%);
  overflow-x: hidden;
  margin-top: -30px;
}

/* 英雄區（Hero Section） */
.hero-section {
  width: 100%;
  padding: 60px 20px;
  padding: var(--space-xl, 60px) var(--space-m, 20px);
  text-align: center;
  /* 1. 為不支援 image-set() 的舊版瀏覽器提供 PNG 備援 */
  background: linear-gradient(rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.6)), url(/static/media/home-top.299582b3a68947e3e211.png);
  /* 2. 現代瀏覽器使用 image-set()，優先選擇 WebP，若無則用 PNG。
     漸層背景需要與 image-set() 一起定義在同一個 background 宣告中，
     因為它們共同構成背景圖層。 */
  background: linear-gradient(rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.6)),
    url(/static/media/home-top.d10e4b59626edf23089c.webp);
  background: linear-gradient(rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.6)),
    -webkit-image-set(url(/static/media/home-top.d10e4b59626edf23089c.webp) type('image/webp'),
      url(/static/media/home-top.299582b3a68947e3e211.png) type('image/png'));
  background: linear-gradient(rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.6)),
    image-set(url(/static/media/home-top.d10e4b59626edf23089c.webp) type('image/webp'),
      url(/static/media/home-top.299582b3a68947e3e211.png) type('image/png'));
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  color: white;
  color: var(--color-bg-card, white);
  position: relative;
  height: 88vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.hero-section h1 {
  font-size: 3.5rem;
  font-weight: 700;
  margin-bottom: 1rem;
  margin-bottom: var(--space-m, 1rem);
  background: linear-gradient(to right, #fff, rgba(255, 255, 255, 0.8));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
  position: relative;
  z-index: 1;
}

.hero-subtitle {
  font-size: 1.5rem;
  color: rgba(255, 255, 255, 0.9);
  max-width: 700px;
  margin-bottom: 2rem;
  margin-bottom: var(--space-l, 2rem);
  line-height: 1.6;
  padding: 0 20px;
  position: relative;
  z-index: 1;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
}

/* 特點區段（Feature Sections） - Apple Design Inspired */
.home-page .features-wrapper {
  background: linear-gradient(180deg,
      var(--color-bg-page) 0%,
      rgba(248, 249, 250, 0.6) 50%,
      var(--color-bg-page) 100%);
  padding: 120px 0;
}

.home-page .feature-section {
  position: relative;
  padding: 80px 0;
  margin: 0 auto;
  max-width: 1200px;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: auto;
}

.home-page .feature-section:not(:last-child) {
  margin-bottom: 60px;
}

.home-page .feature-container {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  grid-gap: 80px;
  gap: 80px;
  align-items: center;
  width: 100%;
  padding: 0 40px;
}

/* 桌面版 - feature2 左右相反佈局，但保持圖片大小一致 */
.home-page .feature-container.reverse {
  grid-template-columns: 0.8fr 1.2fr;
}

.home-page .feature-container.reverse .feature-media {
  order: 2;
}

.home-page .feature-container.reverse .feature-content {
  order: 1;
}



.home-page .feature-media {
  position: relative;
  overflow: hidden;
  border-radius: 24px;
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  box-shadow:
    0 20px 40px rgba(0, 0, 0, 0.08),
    0 8px 16px rgba(0, 0, 0, 0.04),
    inset 0 1px 0 rgba(255, 255, 255, 0.8);
  transition: all 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.home-page .feature-media:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow:
    0 32px 64px rgba(0, 0, 0, 0.12),
    0 16px 32px rgba(0, 0, 0, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.home-page .feature-media img {
  width: 100%;
  height: auto;
  display: block;
  transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.home-page .feature-media:hover img {
  transform: scale(1.05);
}

.home-page .feature-content {
  padding: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.home-page .feature-content h2 {
  font-size: clamp(2.5rem, 4vw, 3.5rem);
  font-weight: 700;
  line-height: 1.1;
  margin-bottom: 24px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -0.02em;
}

.home-page .feature-content p {
  font-size: 1.25rem;
  line-height: 1.6;
  margin-bottom: 32px;
  color: #6b7280;
  color: var(--color-text-secondary, #6b7280);
  font-weight: 400;
  max-width: 480px;
}

.home-page .feature-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, #007aff 0%, #0056cc 100%);
  color: white;
  padding: 16px 32px;
  border-radius: 50px;
  text-decoration: none;
  font-weight: 600;
  font-size: 1rem;
  transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  box-shadow:
    0 8px 24px rgba(0, 122, 255, 0.3),
    0 4px 12px rgba(0, 122, 255, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.2);
  -webkit-backdrop-filter: blur(10px);
          backdrop-filter: blur(10px);
  position: relative;
  overflow: hidden;
  width: -webkit-fit-content;
  width: fit-content;
}

.home-page .feature-link::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg,
      transparent,
      rgba(255, 255, 255, 0.2),
      transparent);
  transition: left 0.6s;
}

.home-page .feature-link:hover::before {
  left: 100%;
}

.home-page .feature-link .arrow {
  transition: transform 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  font-size: 0.9rem;
}

.home-page .feature-link:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow:
    0 16px 32px rgba(0, 122, 255, 0.4),
    0 8px 16px rgba(0, 122, 255, 0.3);
}

.home-page .feature-link:hover .arrow {
  transform: translateX(4px);
}

.home-page .feature-link:active {
  transform: translateY(0) scale(0.98);
}

/* 行動呼籲區（CTA Section） */
.cta-section {
  text-align: center;
  padding: 50px 20px;
  padding: var(--space-xl, 50px) var(--space-m, 20px);
  background-color: var(--color-bg-page);
}

.cta-button {
  background-color: #007aff;
  background-color: var(--accent-color-blue, #007aff);
  color: white;
  color: var(--color-bg-card, white);
  border: none;
  padding: 15px 30px;
  padding: var(--space-m, 15px) var(--space-xl, 30px);
  font-size: 1.2rem;
  font-weight: bold;
  border-radius: 8px;
  border-radius: var(--border-radius-medium, 8px);
  cursor: pointer;
  transition: background-color 0.3s ease, transform 0.2s ease;
  box-shadow: 0 3px 6px rgba(0, 0, 0, 0.1);
  box-shadow: var(--shadow-s, 0 3px 6px rgba(0, 0, 0, 0.1));
}

.cta-button:hover {
  background-color: color-mix(in srgb, #2980b9 85%, black);
  background-color: color-mix(in srgb, var(--accent-color-blue, #2980b9) 85%, black);
  transform: translateY(-2px);
  box-shadow: 0 5px 10px rgba(0, 0, 0, 0.15);
  box-shadow: var(--shadow-m, 0 5px 10px rgba(0, 0, 0, 0.15));
}

/* 響應式設計 - Apple Design System Approach */

/* Large Desktop (1440px+) */
@media (min-width: 1440px) {
  .home-page .feature-container {
    gap: 120px;
    padding: 0 60px;
  }

  .home-page .feature-container.reverse {
    grid-template-columns: 0.8fr 1.2fr;
  }

  .home-page .feature-container.reverse .feature-media {
    order: 2;
  }

  .home-page .feature-container.reverse .feature-content {
    order: 1;
  }

  .home-page .feature-content h2 {
    font-size: 4rem;
  }

  .home-page .feature-content p {
    font-size: 1.375rem;
  }
}

/* Desktop (1024px - 1439px) */
@media (max-width: 1439px) and (min-width: 1024px) {
  .home-page .feature-container {
    gap: 60px;
    padding: 0 40px;
  }

  .home-page .feature-container.reverse {
    grid-template-columns: 0.8fr 1.2fr;
  }

  .home-page .feature-container.reverse .feature-media {
    order: 2;
  }

  .home-page .feature-container.reverse .feature-content {
    order: 1;
  }
}

/* Tablet Landscape (834px - 1023px) */
@media (max-width: 1023px) and (min-width: 834px) {
  .home-page .features-wrapper {
    padding: 80px 0;
  }

  .home-page .feature-section {
    padding: 60px 0;
  }

  .home-page .feature-container {
    gap: 48px;
    padding: 0 32px;
  }

  .home-page .feature-container.reverse {
    grid-template-columns: 0.8fr 1.2fr;
  }

  .home-page .feature-container.reverse .feature-media {
    order: 2;
  }

  .home-page .feature-container.reverse .feature-content {
    order: 1;
  }

  .home-page .feature-content h2 {
    font-size: 2.75rem;
  }

  .home-page .feature-content p {
    font-size: 1.125rem;
  }
}

/* Tablet Portrait (768px - 833px) */
@media (max-width: 833px) and (min-width: 768px) {
  .home-page .features-wrapper {
    padding: 60px 0;
  }

  .home-page .feature-section {
    padding: 40px 0;
  }

  .home-page .feature-container,
  .home-page .feature-container.reverse {
    grid-template-columns: 1fr;
    gap: 40px;
    padding: 0 24px;
    text-align: center;
  }

  /* 重置 reverse 的 order，讓所有 feature 都相同 */
  .home-page .feature-container.reverse .feature-media,
  .home-page .feature-container.reverse .feature-content {
    order: initial;
  }

  .home-page .feature-content {
    align-items: center;
  }

  .home-page .feature-content h2 {
    font-size: 2.5rem;
    text-align: center;
  }

  .home-page .feature-content p {
    font-size: 1.125rem;
    text-align: center;
    max-width: 600px;
  }
}

/* Mobile Large (430px - 767px) */
@media (max-width: 767px) and (min-width: 430px) {
  .home-container {
    margin-top: -50px;
  }

  .hero-section {
    height: 60vh;
    padding: 60px 20px;
  }

  .hero-section h1 {
    font-size: 2.5rem;
  }

  .hero-subtitle {
    font-size: 1.2rem;
  }

  .home-page .features-wrapper {
    padding: 40px 0;
  }

  .home-page .feature-section {
    padding: 32px 0;
  }

  .home-page .feature-section:not(:last-child) {
    margin-bottom: 32px;
  }

  .home-page .feature-container,
  .home-page .feature-container.reverse {
    grid-template-columns: 1fr;
    gap: 32px;
    padding: 0 20px;
    text-align: center;
  }

  /* 重置 reverse 的 order，讓所有 feature 都相同 */
  .home-page .feature-container.reverse .feature-media,
  .home-page .feature-container.reverse .feature-content {
    order: initial;
  }

  .home-page .feature-media {
    border-radius: 16px;
    margin: 0 auto;
    max-width: 400px;
  }

  .home-page .feature-content {
    align-items: center;
  }

  .home-page .feature-content h2 {
    font-size: 2rem;
    text-align: center;
    margin-bottom: 16px;
  }

  .home-page .feature-content p {
    font-size: 1rem;
    text-align: center;
    margin-bottom: 24px;
    max-width: 100%;
  }

  .home-page .feature-link {
    padding: 14px 28px;
    font-size: 0.9rem;
  }

  .cta-section {
    padding: 40px 20px;
  }
}

/* Mobile Small (320px - 429px) */
@media (max-width: 429px) {
  .home-container {
    margin-top: -50px;
  }

  .hero-section {
    height: 50vh;
    padding: 40px 16px;
  }

  .hero-section h1 {
    font-size: 2rem;
  }

  .hero-subtitle {
    font-size: 1rem;
    padding: 0 16px;
  }

  .home-page .features-wrapper {
    padding: 32px 0;
  }

  .home-page .feature-section {
    padding: 24px 0;
  }

  .home-page .feature-section:not(:last-child) {
    margin-bottom: 24px;
  }

  .home-page .feature-container,
  .home-page .feature-container.reverse {
    grid-template-columns: 1fr;
    gap: 24px;
    padding: 0 16px;
    text-align: center;
  }

  /* 重置 reverse 的 order，讓所有 feature 都相同 */
  .home-page .feature-container.reverse .feature-media,
  .home-page .feature-container.reverse .feature-content {
    order: initial;
  }

  .home-page .feature-media {
    border-radius: 12px;
    margin: 0 auto;
    max-width: 100%;
  }

  .home-page .feature-content {
    align-items: center;
  }

  .home-page .feature-content h2 {
    font-size: 1.75rem;
    text-align: center;
    margin-bottom: 12px;
    line-height: 1.2;
  }

  .home-page .feature-content p {
    font-size: 0.95rem;
    text-align: center;
    margin-bottom: 20px;
    line-height: 1.5;
    max-width: 100%;
  }

  .home-page .feature-link {
    padding: 12px 24px;
    font-size: 0.85rem;
    border-radius: 40px;
  }

  .cta-section {
    padding: 32px 16px;
  }

  .scroll-arrow {
    bottom: 40px;
    font-size: 1.25rem;
  }
}

/* 新增樣式來處理首頁特定的 main-content */
.home-page .main-content {
  margin-top: 0;
  /* 覆蓋原本的 margin-top */
}

/* 覆蓋父元素的內邊距 */
.home-page .content-area {
  padding: 0;
  margin: 0;
  max-width: none;
}

/* 性能優化 - 硬體加速 */
.home-page .feature-media,
.home-page .feature-link {
  will-change: transform;
  transform: translateZ(0);
}

/* 視差效果 - 微妙的深度感 */
.home-page .feature-section:nth-child(even) {
  background: linear-gradient(135deg,
      rgba(248, 249, 250, 0.3) 0%,
      rgba(255, 255, 255, 0.1) 100%);
}

/* 載入動畫 */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(40px);
  }

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

.home-page .feature-section {
  animation: fadeInUp 0.8s ease-out;
}

.home-page .feature-section:nth-child(2) {
  animation-delay: 0.2s;
}

.home-page .feature-section:nth-child(3) {
  animation-delay: 0.4s;
}

/* 減少動畫對於偏好減少動作的用戶 */
@media (prefers-reduced-motion: reduce) {

  .home-page .feature-media,
  .home-page .feature-link,
  .home-page .feature-section {
    animation: none;
    transition: none;
  }

  .home-page .feature-media:hover {
    transform: none;
  }

  .home-page .feature-link:hover {
    transform: none;
  }
}

/* 添加動態箭頭樣式 */
.scroll-arrow {
  position: absolute;
  bottom: 70px;
  left: 50%;
  transform: translateX(-50%);
  animation: bounce 2s infinite;
  cursor: pointer;
  z-index: 2;
  color: white;
  font-size: 2rem;
  opacity: 0.8;
  transition: opacity 0.3s ease;
}

.scroll-arrow:hover {
  opacity: 1;
}

/* 箭頭動畫 */
@keyframes bounce {

  0%,
  20%,
  50%,
  80%,
  100% {
    transform: translateY(0) translateX(-50%);
  }

  40% {
    transform: translateY(-20px) translateX(-50%);
  }

  60% {
    transform: translateY(-10px) translateX(-50%);
  }
}

/* 響應式調整 */
@media (max-width: 768px) {
  .scroll-arrow {
    bottom: 60px;
    font-size: 1.5rem;
  }
}

.home-page {
  /* 確保 home-page 使用全域的頁面背景色 */
  background-color: var(--color-bg-page);
  color: #333;
  color: var(--color-text-primary, #333);
}
.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;
  }
}

/* 載入中容器 */
.loading-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 200px;
    color: #666;
}

/* 載入中動畫容器 */
.loading-spinner {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #666;
}

/* 旋轉動畫 */
.spinner {
    border: 2px solid #f3f3f3;
    border-top: 2px solid #1a73e8;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    animation: spin 1s linear infinite;
    flex-shrink: 0;
}

/* 旋轉動畫關鍵幀 */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
} 
/* 引入 Loading 樣式 */

.market-sentiment {
  padding: 20px;
}

/* 左側面板標題設計 - 蘋果風格優化 */
.market-sentiment-view .left-panel .panel-header {
  text-align: center;
  margin-bottom: 24px;
  padding: 0 16px;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.market-sentiment-view .left-panel .panel-title {
  font-size: 1.75rem;
  font-weight: 600;
  color: #1d1d1f;
  margin: 0 0 12px 0;
  text-align: center;
  letter-spacing: -0.022em;
  line-height: 1.2;
  display: flex;
  flex-direction: column;
  gap: 4px;
  justify-content: center;
  align-items: center;
  transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', sans-serif;
}

.market-sentiment-view .left-panel .panel-title-brand {
  display: block !important;
  font-size: 1em;
  font-weight: 600;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  visibility: visible !important;
  white-space: nowrap;
  margin-bottom: 2px;
}

.market-sentiment-view .left-panel .panel-title-index {
  display: block !important;
  font-size: 0.85em;
  font-weight: 500;
  opacity: 0.8;
  visibility: visible !important;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  min-height: 1.2em;
  line-height: 1.3;
  white-space: nowrap;
  letter-spacing: -0.01em;
}

/* Header 內的 subtitle container */
.market-sentiment-view .left-panel .panel-header .panel-subtitle-container {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
  margin: 0 0 8px 0;
  padding: 0 8px;
  width: 100%;
}

/* Gauge 內的 subtitle container - 包含 Current Market Sentiment 和 Last Update Time */
.market-sentiment-view .left-panel .gauge-sentiment-container .panel-subtitle-container {
  position: absolute;
  bottom: 3%;
  left: 50%;
  transform: translateX(-50%);
  margin: 0;
  width: 90%;
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  /* 移除卡片效果 */
  background: none;
  -webkit-backdrop-filter: none;
          backdrop-filter: none;
  border-radius: 0;
  padding: 0;
  box-shadow: none;
  border: none;
}

/* 響應式調整：不同螢幕尺寸下的定位 */
@media (max-width: 1023px) {
  .market-sentiment-view .left-panel .gauge-sentiment-container .panel-subtitle-container {
    bottom: -1% !important;
    width: 92%;
  }

  .market-sentiment-view .left-panel .gauge-sentiment-container .panel-last-update-time {
    font-size: 0.65rem;
    margin-top: 4px;
  }
}

@media (max-width: 768px) {
  .market-sentiment-view .left-panel .gauge-sentiment-container .panel-subtitle-container {
    bottom: -3% !important;
    width: 94%;
  }

  .market-sentiment-view .left-panel .gauge-sentiment-container .panel-last-update-time {
    font-size: 0.6rem;
    margin-top: 3px;
  }

  /* 為 768px 以下增加高度 */
  .market-sentiment-view .left-panel {
    min-height: 360px !important;
  }
}

@media (max-width: 480px) {
  .market-sentiment-view .left-panel .gauge-sentiment-container .panel-subtitle-container {
    bottom: -2% !important;
    width: 96%;
  }

  .market-sentiment-view .left-panel .gauge-sentiment-container .panel-last-update-time {
    font-size: 0.55rem;
    margin-top: 2px;
  }

  /* 增加 left-panel 高度以容納下移的元素 */
  .market-sentiment-view .left-panel {
    min-height: 360px !important;
  }
}

/* 額外的小螢幕調整 */
@media (max-width: 390px) {
  .market-sentiment-view .left-panel .gauge-sentiment-container .panel-subtitle-container {
    bottom: -1% !important;
    width: 98%;
  }

  .market-sentiment-view .left-panel .gauge-sentiment-container .panel-last-update-time {
    font-size: 0.5rem;
    margin-top: 1px;
  }

  /* 超小螢幕需要更多高度 */
  .market-sentiment-view .left-panel {
    min-height: 330px !important;
  }
}

.market-sentiment-view .left-panel .panel-subtitle {
  font-size: 0.875rem;
  color: #86868b;
  margin: 0;
  font-weight: 400;
  line-height: 1.4;
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', sans-serif;
}

.market-sentiment-view .left-panel .panel-sentiment-value {
  font-size: 0.875rem;
  font-weight: 500;
  margin: 0;
  line-height: 1.4;
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', sans-serif;
}

/* Last Update Time - 在 gauge 容器內，Current Market Sentiment 下方 */
.market-sentiment-view .left-panel .gauge-sentiment-container .panel-last-update-time {
  font-size: 0.7rem;
  color: #86868b;
  font-weight: 400;
  line-height: 1.4;
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', sans-serif;
  margin-top: 6px;
  text-align: center;
  width: 100%;
  /* 移除外框和背景 */
  padding: 0;
  border-radius: 0;
  border: none;
  background: none;
  box-shadow: none;
  white-space: nowrap;
  z-index: 20;
}

/* 桌面版本優化 - 蘋果風格 */
@media (min-width: 1024px) {
  .market-sentiment-view .left-panel .panel-header {
    padding: 0 24px;
    margin-bottom: 15px;
  }

  .market-sentiment-view .left-panel .panel-title {
    font-size: 2rem;
    margin-bottom: 16px;
  }

  .market-sentiment-view .left-panel .panel-title-brand {
    font-size: 1em;
    margin-bottom: 4px;
  }

  .market-sentiment-view .left-panel .panel-title-index {
    font-size: 0.8em;
  }

  /* Header 內的 subtitle container */


  .market-sentiment-view .left-panel .panel-subtitle,
  .market-sentiment-view .left-panel .panel-sentiment-value {
    font-size: 0.9rem;
  }


}

@media (max-width: 1023px) {
  .market-sentiment-view .left-panel .panel-header {
    margin-bottom: 20px;
    padding: 0 20px;
  }

  .market-sentiment-view .left-panel .panel-title {
    font-size: 1.625rem;
    margin-bottom: 10px;
  }

  .market-sentiment-view .left-panel .panel-title-brand {
    font-size: 1em;
    display: block !important;
  }

  .market-sentiment-view .left-panel .panel-title-index {
    font-size: 0.82em !important;
    display: block !important;
    visibility: visible !important;
  }

  /* Header 內的 subtitle container */


  .market-sentiment-view .left-panel .panel-subtitle,
  .market-sentiment-view .left-panel .panel-sentiment-value {
    font-size: 0.8rem;
  }


}

@media (max-width: 768px) {
  .market-sentiment-view .left-panel .panel-header {
    margin-bottom: 16px;
    padding: 0 16px;
  }

  .market-sentiment-view .left-panel .panel-title {
    font-size: 1.5rem;
    margin-bottom: 8px;
  }

  .market-sentiment-view .left-panel .panel-title-brand {
    font-size: 1em;
    display: block !important;
  }

  .market-sentiment-view .left-panel .panel-title-index {
    font-size: 0.8em !important;
    display: block !important;
    visibility: visible !important;
  }

  /* Header 內的 subtitle container */


  .market-sentiment-view .left-panel .panel-subtitle,
  .market-sentiment-view .left-panel .panel-sentiment-value {
    font-size: 0.75rem;
  }


}

@media (max-width: 480px) {
  .market-sentiment-view .left-panel .panel-header {
    margin-bottom: 12px;
    padding: 0 12px;
  }

  .market-sentiment-view .left-panel .panel-title {
    font-size: 1.375rem;
    margin-bottom: 6px;
  }

  .market-sentiment-view .left-panel .panel-title-brand {
    font-size: 1em;
    display: block !important;
  }

  .market-sentiment-view .left-panel .panel-title-index {
    font-size: 0.75em !important;
    display: block !important;
    visibility: visible !important;
  }

  /* Header 內的 subtitle container */


  .market-sentiment-view .left-panel .panel-subtitle,
  .market-sentiment-view .left-panel .panel-sentiment-value {
    font-size: 0.7rem;
  }


}

.composite-score {
  margin-bottom: 20px;
}


.indicators-list {
  display: flex;
  flex-direction: column;
}


.real-data {
  color: green;
}

.simulated-data {
  color: red;
}

.indicator-description {
  margin-top: 10px;
  font-size: 14px;
  color: #555;
}

.chart-container {
  position: relative;
  width: 100%;
  height: 450px;
  /* 根據需要調整高度 */
}

/* 確保市場情緒指數頁面在小螢幕上顯示良好 */
.market-sentiment-view .market-sentiment-index {
  overscroll-behavior: contain;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

/* 在市場情緒指數頁面中置中 TimeRangeSelector */
.market-sentiment-view .indicator-item .time-range-selector,
.composition-modal .indicator-item .time-range-selector {
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 3% auto;
  width: -webkit-fit-content;
  width: fit-content;
  text-align: center;
}

.market-sentiment-view .last-update-time {
  position: absolute;
  bottom: -8%;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  text-align: center;
  color: #666;
  font-size: 12px;
  z-index: 1;
}

/* 新增以下部分 */
@media (max-width: 768px) {
  .market-sentiment-view .indicator-list {
    flex-direction: column;
    /* 小螢幕上垂直排列 */
  }

  .market-sentiment-view .indicator-chart {
    height: 200px;
    /* 調整圖表高度 */
  }
}

/* 確保圖表卡片的寬度一致 */
.market-sentiment-view .sentiment-dashboard {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 20px;
}

.market-sentiment-view .sentiment-chart-card {
  width: calc(33.333% - 20px);
  /* 每列顯示三個圖表卡片減去間距 */
  background-color: white;
  border-radius: 1px;
  padding: 20px;
  box-sizing: border-box;
}

@media (max-width: 1024px) {
  .market-sentiment-view .sentiment-chart-card {
    width: calc(50% - 20px);
    /* 中等螢幕每列顯示兩個圖表卡片 */
  }
}


@media (max-width: 768px) {
  .market-sentiment-view .sentiment-dashboard {
    flex-direction: column;
  }

  .market-sentiment-view .sentiment-chart-card {
    width: 100%;
    /* 小螢幕上圖表卡片佔據全寬 */
  }
}

/* 調整指標列表的佈局 */
.market-sentiment-view .indicator-list {
  display: flex;
  flex-direction: column;
  /* 垂直排列 */
  gap: 20px;
  width: 100%;
  box-sizing: border-box;
}

/* 調整指標項目的樣式 */
.market-sentiment-view .indicator-item {
  width: 100%;
  background-color: white;
  padding: 20px 20px 70px 20px;
  /* Padding accommodates absolutely positioned view-mode-selector */
  position: relative;
  border-radius: 8px;
  box-sizing: border-box;
  margin-bottom: 30px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  display: flex;
  flex-direction: column;
}

/* 調整圖表區域的樣式 */
.market-sentiment-view .indicator-chart {
  height: 100%;
  width: 100%;
  flex-grow: 1;
  min-height: 300px;
  /* 設定圖表最小高度 */
}

.market-sentiment-view .indicator-chart-container {
  width: 100%;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
  min-height: 0;
}


/* 移除大螢幕桌面版面配置的特殊處理 */

.market-sentiment-view .analysis-description {
  margin-top: 30px;
  /* 增加頂部間距 */
  margin-bottom: 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;
}

/* 移除以下 h3 樣式 */
/* .indicator-item h3 {
  font-size: 20px;
  color: #333;
  margin: 0 0 10px 0;
  padding: 0;
} */

.market-sentiment-view .tabs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  /* 減小最小寬度 */
  grid-gap: 8px;
  gap: 8px;
  /* 稍微減小間距 */
  margin-bottom: 20px;
  justify-content: center;
  /* 水平分布 */
  display: none !important;
  /* Hide the tabs grid */
}

.market-sentiment-view .tab-button {
  padding: 8px 5px;
  /* 減小上下內邊距，左右內邊距更小 */
  border: none;
  border-radius: 5px;
  cursor: pointer;
  font-size: 12px;
  /* 減小字體大小 */
  text-align: center;
  transition: all 0.3s ease;
  background-color: #e0e0e0;
  color: #333;
  white-space: nowrap;
  /* 防止文字換行 */
  overflow: hidden;
  /* 隱藏溢出的文字 */
  text-overflow: ellipsis;
  /* 使用省略號表示溢出的文字 */
  line-height: 1.2;
  /* 調整行高 */
}

.market-sentiment-view .tab-button.active {
  background-color: #4a4a4a;
  color: white;
}

/* 在小螢幕上進一步調整 */
@media (max-width: 768px) {
  .market-sentiment-view .tabs-grid {
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    /* 進一步減小最小寬度 */
  }

  .market-sentiment-view .tab-button {
    font-size: 11px;
    /* 在小螢幕上進一步減小字體 */
    padding: 6px 4px;
    /* 在小螢幕上進一步減小內邊距 */
  }
}

.market-sentiment-view .tab-content {
  /* background-color: white; */
  /* 移除背景色 */
  /* border-radius: 8px; */
  /* 如果 indicator-item 總是有 radius，這裡也可以考慮移除 */
  /* padding: 0; */
  /* box-shadow: 0 2px 4px rgba(0,0,0,0.1); */
  /* 移除陰影 */
  /* indicator-item 將提供卡片視覺效果 */
}

/* 新增：主內容區域佈局 */
.market-sentiment-view .content-layout-container {
  display: flex;
  flex-direction: column;
  /* 預設垂直排列，適用於小螢幕 */
  gap: 20px;
  /* 垂直和水平間距 */
  margin-top: 20px;
  /* 與上方 tabs 的間距 */
  height: auto;
  /* 改為自動高度 */
  /* 設定最小高度 */
  max-height: none;
  /* 移除最大高度限制 */

}

/* 桌面版左右並列佈局 - 使用更靈活的高度設定 */
@media (min-width: 1024px) {
  .market-sentiment-view .content-layout-container {
    flex-direction: row;
    align-items: stretch;
    min-height: 500px;
    /* Minimum height to ensure usability */
    height: auto;
    /* Auto height based on content */
  }

  /* 桌面版本增加內容區域高度 */
  .market-sentiment-view .content-area {
    min-height: 450px;
    /* 桌面版本更大的最小高度 */
  }

  .market-sentiment-view .indicator-chart {
    min-height: 380px;
    /* 桌面版本圖表更大的最小高度，增加視覺效果 */
  }
  
  /* 桌面版本組成視圖和列表的最小高度 */
  .market-sentiment-view .composition-view {
    min-height: 450px;
    /* 與 content-area 一致 */
  }
  
  .market-sentiment-view .composition-list {
    min-height: 380px;
    /* 與圖表高度一致 */
  }
}

/* 左側面板樣式 */
.market-sentiment-view .left-panel {
  flex: 0 0 35%;
  background-color: white;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  padding: 20px;
  display: flex;
  flex-direction: column;
  min-height: 0;
  gap: 0;
  position: relative;
  /* 為絕對定位的 last-update-time 提供定位上下文 */
}

/* 新增：創建一個包含 gauge 和 sentiment 的容器 */
.market-sentiment-view .left-panel .gauge-sentiment-container {
  flex: 1 1;
  position: relative;
  min-height: 0;
  width: 100%;
  /* 簡化佈局，讓 gauge 直接佔據空間，不使用 flex 以避免佈局衝突 */
}

/* 右側面板樣式 */
.market-sentiment-view .right-panel {
  flex: 1 1;
  background-color: white;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  padding: 20px;
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
}

/* 右側面板的視圖模式選擇器 */
.market-sentiment-view .right-panel .view-mode-selector-container {
  display: flex;
  gap: 8px;
  background-color: #f5f5f7;
  padding: 4px;
  border-radius: 8px;
  margin-bottom: 8px;
  width: -webkit-fit-content;
  width: fit-content;
  justify-content: center;
  margin-left: auto;
  margin-right: auto;
}

.market-sentiment-view .right-panel .view-mode-button {
  padding: 8px 16px;
  border: none;
  background: none;
  cursor: pointer;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  color: #1d1d1f;
  transition: all 0.2s ease;
  position: relative;
  white-space: nowrap;
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', sans-serif;
  min-width: auto;
  flex: none;
}

.market-sentiment-view .right-panel .view-mode-button:hover {
  color: #86868b;
}

.market-sentiment-view .right-panel .view-mode-button.active {
  background-color: #ffffff;
  color: #1d1d1f;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

/* 右側面板的內容區域 */
.market-sentiment-view .content-area {
  flex: 1 1;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  margin-top: 0
}

/* 左側面板現在使用 MarketSentimentGauge 組件 */

/* 左側面板中的 MarketSentimentGauge 樣式調整 */
.market-sentiment-view .left-panel .market-sentiment-gauge {
  flex: 1 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

/* 新增：確保 gauge 在新容器中正確定位 */
.market-sentiment-view .left-panel .gauge-sentiment-container .market-sentiment-gauge {
  width: 100%;
  height: 100%;
  /* 讓 gauge 完全填滿容器，與原本的行為一致 */
}

/* 響應式調整 for left panel analysis-result */
@media (max-width: 768px) {
  .market-sentiment-view .left-panel .analysis-result {
    padding: 10px;
  }

  .market-sentiment-view .left-panel .analysis-result .analysis-value {
    font-size: 1.2em;
  }

  .market-sentiment-view .right-panel .view-mode-selector-container {
    width: 100%;
    justify-content: stretch;
  }

  .market-sentiment-view .right-panel .view-mode-button {
    flex: 1 1;
    text-align: center;
    padding: 8px 8px;
    font-size: 13px;
  }
}

/* 中等桌面尺寸 (1281px-1599px) - 適用於 1534x864 等 */
@media (min-width: 1281px) and (max-width: 1599px) {
  .market-sentiment-view .content-layout-container {
    min-height: 500px;
    /* Minimum height for medium desktop screens */
    height: auto;
    /* Auto height based on content */
  }

  /* Optimize composition list for medium desktop screens */
  .composition-item {
    padding: 7px 10px;
    margin-bottom: 1px;
  }

  .composition-list {
    gap: 4px;
  }
}

/* 大中等桌面尺寸 (1600px-1919px) */
@media (min-width: 1600px) and (max-width: 1919px) {
  .market-sentiment-view .content-layout-container {
    min-height: 500px;
    /* Minimum height for large desktop screens */
    height: auto;
    /* Auto height based on content */
  }
}

/* 大桌面尺寸 (1920px+) */
@media (min-width: 1920px) {
  .market-sentiment-view .content-layout-container {
    min-height: 500px;
    /* Minimum height for very large screens */
    height: auto;
    /* Auto height based on content */
  }
}

@media (max-width: 820px) {
  .market-sentiment-view .content-layout-container {
    height: auto;
    min-height: 70vh;
    max-height: none;
  }
}

/* .tab-content 的樣式已在上方定義，此處註解掉重複或不再需要的規則 */
/* .market-sentiment-view .tab-content { */
/* box-shadow 和 border-radius 已有，保持即可 */
/* 移除固定的 padding，讓子元件控制 */
/* padding: 0; */
/* 在 flex 佈局中，不需要 width: 100% */
/* } */

/* 移除不再需要的 description-container-wrapper 樣式 */

@media (max-width: 430px) {
  .market-sentiment-view .content-layout-container {
    height: auto;
    min-height: 60vh;
    max-height: none;
  }

  .market-sentiment-view .content-layout-container .tab-content .indicator-item {
    height: auto;
    min-height: 50vh;
    max-height: none;
  }

  .market-sentiment-view .indicator-item .indicator-chart {
    height: 250px;
  }

  .market-sentiment-view .indicator-item .time-range-selector {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 3% auto;
    width: -webkit-fit-content;
    width: fit-content;
    text-align: center;
  }

  .market-sentiment-view .description-scroll-content .description-container {
    padding-top: 5px;
  }

  /* Gauge 相關樣式已移至 MarketSentimentGauge 組件 */
}

/* 移除舊的 1024px 規則，因為已經在上面重新定義了 */

/* 新增情緒文字顏色 - 適用於所有 analysis-value */
.market-sentiment-view .analysis-value.sentiment-extremeFear {
  color: #0000FF !important;
  /* 極度恐懼 - 深藍色 */
}

.market-sentiment-view .analysis-value.sentiment-fear {
  color: #5B9BD5 !important;
  /* 恐懼 - 藍色 */
}

.market-sentiment-view .analysis-value.sentiment-neutral {
  color: #708090 !important;
  /* 中性 - 灰色 */
}

.market-sentiment-view .analysis-value.sentiment-greed {
  color: #F0B8CE !important;
  /* 貪婪 - 粉色 */
}

.market-sentiment-view .analysis-value.sentiment-extremeGreed {
  color: #D24A93 !important;
  /* 極度貪婪 - 深粉色 */
}

/* 確保左側面板的 analysis-value 也有顏色效果 */
.market-sentiment-view .left-panel .analysis-result .analysis-value.sentiment-extremeFear {
  color: #0000FF !important;
}

.market-sentiment-view .left-panel .analysis-result .analysis-value.sentiment-fear {
  color: #5B9BD5 !important;
}

.market-sentiment-view .left-panel .analysis-result .analysis-value.sentiment-neutral {
  color: #708090 !important;
}

.market-sentiment-view .left-panel .analysis-result .analysis-value.sentiment-greed {
  color: #F0B8CE !important;
}

.market-sentiment-view .left-panel .analysis-result .analysis-value.sentiment-extremeGreed {
  color: #D24A93 !important;
}

/* 新增：左側面板標題中的情緒值特殊設計 */
.market-sentiment-view .left-panel .panel-sentiment-value {
  position: relative;
  padding: 8px 16px;
  border-radius: 20px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  -webkit-backdrop-filter: blur(10px);
          backdrop-filter: blur(10px);
  border: 2px solid transparent;
  background-clip: padding-box;
  animation: sentimentPulse 1.8s ease-in-out infinite;
  transform-origin: center;
}

.market-sentiment-view .left-panel .panel-sentiment-value::before {
  content: '';
  position: absolute;
  top: -2px;
  left: -2px;
  right: -2px;
  bottom: -2px;
  border-radius: 22px;
  z-index: -1;
  transition: all 0.3s ease;
}

.market-sentiment-view .left-panel .panel-sentiment-value.sentiment-extremeFear {
  color: #ffffff !important;
  background: linear-gradient(135deg, #0000FF 0%, #4169E1 100%);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.market-sentiment-view .left-panel .panel-sentiment-value.sentiment-extremeFear::before {
  background: linear-gradient(135deg, #0000FF 0%, #1E90FF 100%);
}

.market-sentiment-view .left-panel .panel-sentiment-value.sentiment-fear {
  color: #ffffff !important;
  background: linear-gradient(135deg, #5B9BD5 0%, #87CEEB 100%);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.market-sentiment-view .left-panel .panel-sentiment-value.sentiment-fear::before {
  background: linear-gradient(135deg, #4682B4 0%, #5B9BD5 100%);
}

.market-sentiment-view .left-panel .panel-sentiment-value.sentiment-neutral {
  color: #ffffff !important;
  background: linear-gradient(135deg, #708090 0%, #9CA0B0 100%);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.market-sentiment-view .left-panel .panel-sentiment-value.sentiment-neutral::before {
  background: linear-gradient(135deg, #696969 0%, #708090 100%);
}

.market-sentiment-view .left-panel .panel-sentiment-value.sentiment-greed {
  color: #ffffff !important;
  background: linear-gradient(135deg, #F0B8CE 0%, #FFB6C1 100%);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.market-sentiment-view .left-panel .panel-sentiment-value.sentiment-greed::before {
  background: linear-gradient(135deg, #FF69B4 0%, #F0B8CE 100%);
}

.market-sentiment-view .left-panel .panel-sentiment-value.sentiment-extremeGreed {
  color: #ffffff !important;
  background: linear-gradient(135deg, #D24A93 0%, #FF1493 100%);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
  animation: sentimentPulseIntense 1.5s ease-in-out infinite;
}

.market-sentiment-view .left-panel .panel-sentiment-value.sentiment-extremeGreed::before {
  background: linear-gradient(135deg, #C71585 0%, #D24A93 100%);
}

.market-sentiment-view .left-panel .panel-sentiment-value.sentiment-extremeFear {
  animation: sentimentPulseIntense 1.5s ease-in-out infinite;
}

/* 脈動動畫效果 - 更明顯的跳動 */
@keyframes sentimentPulse {

  0%,
  100% {
    transform: scale(1);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  }

  25% {
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
  }

  50% {
    transform: scale(1.08);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.25);
  }

  75% {
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
  }
}

/* 極端情緒的更強烈脈動 */
@keyframes sentimentPulseIntense {

  0%,
  100% {
    transform: scale(1);
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.15);
  }

  20% {
    transform: scale(1.08);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
  }

  40% {
    transform: scale(1.12);
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.35);
  }

  60% {
    transform: scale(1.08);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
  }

  80% {
    transform: scale(1.04);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.2);
  }
}

/* Hover 效果 */
.market-sentiment-view .left-panel .panel-sentiment-value:hover {
  transform: scale(1.05);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
  animation-play-state: paused;
}

/* 極小螢幕調整 */
@media (max-width: 480px) {
  .market-sentiment-view .left-panel .panel-sentiment-value {
    padding: 5px 10px;
    font-size: 0.8rem;
    letter-spacing: 0.3px;
    border-radius: 16px;
  }

  .market-sentiment-view .left-panel .panel-sentiment-value::before {
    border-radius: 18px;
  }

  /* 在小螢幕上減少動畫效果以提升性能 */
  @media (prefers-reduced-motion: reduce) {
    .market-sentiment-view .left-panel .panel-sentiment-value {
      animation: none;
    }
  }
}

/* 組成指標的情緒顏色 */
.market-sentiment-view .composition-sentiment.sentiment-extremeFear {
  color: #0000FF !important;
}

.market-sentiment-view .composition-sentiment.sentiment-fear {
  color: #5B9BD5 !important;
}

.market-sentiment-view .composition-sentiment.sentiment-neutral {
  color: #708090 !important;
}

.market-sentiment-view .composition-sentiment.sentiment-greed {
  color: #F0B8CE !important;
}

.market-sentiment-view .composition-sentiment.sentiment-extremeGreed {
  color: #D24A93 !important;
}

.market-sentiment-view .composition-sentiment.sentiment-notAvailable {
  color: #6c757d !important;
}

/* 組成指標的長條圖顏色 */
.market-sentiment-view .composition-bar.sentiment-extremeFear {
  background-color: #0000FF !important;
}

.market-sentiment-view .composition-bar.sentiment-fear {
  background-color: #5B9BD5 !important;
}

.market-sentiment-view .composition-bar.sentiment-neutral {
  background-color: #708090 !important;
}

.market-sentiment-view .composition-bar.sentiment-greed {
  background-color: #F0B8CE !important;
}

.market-sentiment-view .composition-bar.sentiment-extremeGreed {
  background-color: #D24A93 !important;
}

.market-sentiment-view .composition-bar.sentiment-notAvailable {
  background-color: #ced4da !important;
}

/* 確保在觸摸設備上的滾動行為正常 */
@media (hover: none) and (pointer: coarse) {
  .market-sentiment-view .indicator-chart-container {
    touch-action: pan-x pan-y;
  }
}

.market-sentiment-view .view-mode-selector {
  display: flex;
  justify-content: center;
  margin-bottom: 20px;
}

.market-sentiment-view .view-mode-button {
  padding: 8px 16px;
  margin: 0 5px;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  font-size: 14px;
  transition: all 0.3s ease;
  background-color: #e0e0e0;
  color: #333;
}

.market-sentiment-view .view-mode-button.active {
  background-color: #4a4a4a;
  color: white;
}

/* Gauge 相關樣式已移至 MarketSentimentGauge 組件 */


/* 移除舊的 1280px 斷點樣式 */

@media (max-width: 768px) {
  .market-sentiment-view .indicator-chart-container {
    margin-bottom: 0px;
    /* 在小螢幕上使用較小的間距 */
    padding-bottom: 0px;
  }

  .market-sentiment-view .analysis-description {
    margin-top: 20px;
    /* 在小螢幕上使用較小的間距 */
  }
}

/* Gauge 相關樣式已移至 MarketSentimentGauge 組件 */

@media (min-width: 1024px) {
  .market-sentiment-view .last-update-time {
    font-size: 15px;
  }
}

/* 新增：確保 analysis-result 置中 */
.market-sentiment-view .indicator-item .analysis-result,
.composition-modal .indicator-item .analysis-result {
  display: flex;
  flex-direction: row;
  justify-content: center;
  gap: 30px;
  padding: 1% 2%;
  margin: 0 0;
  /* PriceAnalysis 用的是 margin: 10px 0; MarketSentiment 原本是 margin: 10px auto; */
  overflow: visible;
  text-align: center;
}

.market-sentiment-view .indicator-item .analysis-result .analysis-item,
.composition-modal .indicator-item .analysis-result .analysis-item {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 100px;
  max-width: 200px;
  flex-shrink: 1;
  align-items: center;
  padding: 0px 7px;
}

.market-sentiment-view .indicator-item .analysis-result .analysis-label,
.composition-modal .indicator-item .analysis-result .analysis-label {
  font-size: 1em;
  color: #6c757d;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.market-sentiment-view .indicator-item .analysis-result .analysis-value,
.composition-modal .indicator-item .analysis-result .analysis-value {
  font-size: 1.3em;
  font-weight: 600;
  color: #2c3e50;
  /* 基礎顏色，會被下方的情緒顏色覆蓋 */
  font-family: 'SF Pro Display', -apple-system, BlinkMacSystemFont, sans-serif;
}


@media (min-width: 769px) and (max-width: 1280px) {
  .market-sentiment-view .content-layout-container {
    min-height: 500px;
    /* Minimum height for smaller desktop screens */
    height: auto;
    /* Auto height based on content */
  }

  .market-sentiment-view .indicator-item .analysis-result,
  .composition-modal .indicator-item .analysis-result {
    padding: 0px 10px;
  }

  .market-sentiment-view .indicator-item .time-range-selector {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 5px auto;
    width: -webkit-fit-content;
    width: fit-content;
    text-align: center;
  }

  /* Gauge 相關樣式已移至 MarketSentimentGauge 組件 */

  .market-sentiment-view .last-update-time {
    /* margin-top: 20px; REMOVED */
    /* margin-bottom: 50px; REMOVED */
    /* Font size and other properties specific to this breakpoint can remain if needed */
  }

  /* Optimize composition list for 1280x720 and similar resolutions */
  .composition-item {
    padding: 6px 10px;
    margin-bottom: 1px;
  }

  .composition-list {
    gap: 3px;
  }

  .composition-emotion-tag {
    flex: 0 0 105px;
    /* Increased from 85px to 105px for better text display */
  }
}

/* 響應式設計調整 for analysis-result */
@media (max-width: 768px) {

  .market-sentiment-view .indicator-item .analysis-result,
  .composition-modal .indicator-item .analysis-result {
    align-items: flex-start;
    gap: 15px;
    padding: 0px;
  }

  .market-sentiment-view .indicator-item .analysis-result .analysis-item,
  .composition-modal .indicator-item .analysis-result .analysis-item {
    max-width: none;
  }

  .market-sentiment-view .indicator-item .analysis-result .analysis-value,
  .composition-modal .indicator-item .analysis-result .analysis-value {
    font-size: 1.2em;
  }

  /* 下方是原本 MarketSentimentIndex 在此斷點下的 .indicator-item padding，決定是否保留 */
  .market-sentiment-view .indicator-item {
    padding: 20px 15px 70px 15px;
    margin-bottom: 0px;
  }
}

/* 移除舊的 view-mode-selector-container 樣式，因為已經在右側面板中重新定義了 */

/* 移除舊的 view-mode-button 樣式，因為已經在右側面板中重新定義了 */

/* 移除舊的 768px 斷點樣式，因為已經在右側面板樣式中處理了 */

/* 新增情緒文字顏色 */
/* 更新：使用英文鍵名 */
.market-sentiment-view .indicator-item .analysis-result .analysis-value.sentiment-extremeFear,
.composition-modal .indicator-item .analysis-result .analysis-value.sentiment-extremeFear {
  color: #0000FF;
  /* 極度恐懼 - 深綠色 */
}

.market-sentiment-view .indicator-item .analysis-result .analysis-value.sentiment-fear,
.composition-modal .indicator-item .analysis-result .analysis-value.sentiment-fear {
  color: #5B9BD5;
  /* 恐懼 - 綠色 */
}

.market-sentiment-view .indicator-item .analysis-result .analysis-value.sentiment-neutral,
.composition-modal .indicator-item .analysis-result .analysis-value.sentiment-neutral {
  color: #708090;
  /* 中性 - 黃色 */
}

.market-sentiment-view .indicator-item .analysis-result .analysis-value.sentiment-greed,
.composition-modal .indicator-item .analysis-result .analysis-value.sentiment-greed {
  color: #F0B8CE;
  /* 貪婪 - 橘色 */
}

.market-sentiment-view .indicator-item .analysis-result .analysis-value.sentiment-extremeGreed,
.composition-modal .indicator-item .analysis-result .analysis-value.sentiment-extremeGreed {
  color: #D24A93;
  /* 極度貪婪 - 紅色 */
}

@media (max-width: 430px) {

  .market-sentiment-view .indicator-item .analysis-result,
  .composition-modal .indicator-item .analysis-result {
    align-items: flex-start;
    gap: 2px;
    padding: 0px;
  }

  /* Gauge 相關樣式已移至 MarketSentimentGauge 組件 */

  /* 如果 analysis-label 在此斷點下也需要強制換行，可以類似處理 */
  .market-sentiment-view .indicator-item .analysis-result .analysis-label,
  .composition-modal .indicator-item .analysis-result .analysis-label {
    white-space: normal;
    max-width: 100px;
  }

  .market-sentiment-view .view-mode-selector-container {
    margin-bottom: -1.5%;
  }

}

@media (max-width: 375px) {

  .market-sentiment-view .indicator-item .analysis-result,
  .composition-modal .indicator-item .analysis-result {
    gap: 0px;
  }

  .market-sentiment-view .indicator-item .analysis-result .analysis-item,
  .composition-modal .indicator-item .analysis-result .analysis-item {
    padding: 0px 0px;
  }

  .market-sentiment-view .indicator-item .analysis-result .analysis-label,
  .composition-modal .indicator-item .analysis-result .analysis-label {
    font-size: 0.8em;
  }
}

/* 新增滑桿容器樣式 */
.market-sentiment-view .slider-container {
  width: 90%;
  /* 調整寬度以適應父容器 */
  margin: 0 auto;
  /* 上下間距，並水平置中 */
  padding: 10px;
}

/* 滑桿標籤樣式 */
.market-sentiment-view .slider-labels {
  display: flex;
  justify-content: space-between;
  margin-top: 8px;
  font-size: 12px;
  color: #555;
}

/* rc-slider 客製化樣式 */
.market-sentiment-view .rc-slider-track {
  background-color: #C78F57;
  /* 與圖表主色調一致 */
}

.market-sentiment-view .rc-slider-handle {
  border-color: #C78F57;
  background-color: white;
  opacity: 1;
  /* 確保 handle 可見 */
  box-shadow: 0 0 5px rgba(0, 0, 0, 0.2);
}

.market-sentiment-view .rc-slider-handle:focus {
  box-shadow: 0 0 0 3px rgba(199, 143, 87, 0.4);
  /* 焦點樣式 */
}

.market-sentiment-view .rc-slider-rail {
  background-color: #e9e9e9;
}

/* 響應式調整 */
@media (max-width: 768px) {
  .market-sentiment-view .slider-container {
    width: 95%;
    /* 在小螢幕上使用更大寬度 */
    margin: 15px auto;
  }

  .market-sentiment-view .slider-labels {
    font-size: 11px;
  }
}

@media (max-width: 480px) {
  .market-sentiment-view .slider-container {
    padding: 5px;
  }

  .market-sentiment-view .slider-labels {
    font-size: 10px;
    /* 在非常小的螢幕上，可以考慮隱藏標籤或使其堆疊顯示 */
    /* flex-direction: column; */
    /* align-items: center; */
  }
}

/* 新增：組成指標列表 */
.composition-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  /* Reduced gap to fit more items */
  margin-top: 5px;
  /* Reduced margin-top */
  padding: 0 5px;
  /* Add some horizontal padding to the list */
  overflow-y: visible;
  /* No scrolling - show all items */
  flex: 1 1;
  /* Take available space */
  min-height: 300px; /* 設定最小高度 */
  box-sizing: border-box;
  /* Ensure padding doesn't add to max-height calculation issues */
}

/* Original composition-item styles - will be overridden by EmotionTag integration styles */

/* If you remove border-bottom from .composition-item because of margin-bottom, ensure the last item doesn't have extra margin or the list has a bottom border */
.composition-list>.composition-item:last-child {
  /* border-bottom: none; /* Optional: if you want to remove the border for the last item */
  /* margin-bottom: 0; /* Optional: if you want to remove margin for the last item */
}

/* Original composition-name and composition-analysis-value styles - will be overridden by EmotionTag integration styles */

/* Old composition-bar-wrapper styles - replaced by EmotionTag integration styles */

.composition-bar {
  height: 100%;
  border-radius: 5px;
  /* Match wrapper's radius */
  transition: width 0.3s ease-in-out;
}

/* 在 430px 以下隱藏長條圖 */
@media (max-width: 430px) {
  .composition-bar-wrapper {
    display: none;
  }

  /* 調整 composition-analysis-value 的樣式以適應沒有長條圖的情況 */
  .composition-item .composition-analysis-value {
    display: none;
  }

  .composition-name {
    flex: 1 1 50%;
    /* 讓名稱佔據更多空間 */
  }

  .composition-sentiment {
    flex: 1 1 30%;
    /* 讓情緒文本佔據更多空間 */
    text-align: left;
    /* 情緒文本左對齊 */
  }

  .composition-item {
    padding: 6px 10px;
    /* Further reduced padding for mobile */
    margin-bottom: 2px;
    /* Further reduced margin */
  }

  .composition-list {
    gap: 6px;
    /* Further reduced gap for mobile */
    margin-top: 10px;
    /* Further reduced margin-top */
  }
}

/* Bar colors based on sentiment */
.composition-bar.sentiment-extremeFear {
  background-color: #0000FF;
}

.composition-bar.sentiment-fear {
  background-color: #5B9BD5;
}

.composition-bar.sentiment-neutral {
  background-color: #708090;
}

.composition-bar.sentiment-greed {
  background-color: #F0B8CE;
}

.composition-bar.sentiment-extremeGreed {
  background-color: #D24A93;
}

.composition-bar.sentiment-notAvailable {
  background-color: #ced4da;
}

/* Color for notAvailable */

/* Old composition-score-text styles - replaced by EmotionTag integration styles */


.composition-sentiment {
  flex: 0 0 20%;
  /* Allocate space for sentiment text */
  font-size: 0.8rem;
  /* Smaller font size */
  text-align: right;
  white-space: nowrap;
  /* Colors for sentiment text are now explicitly defined below */
}

/* Colors for composition-sentiment text */
.composition-sentiment.sentiment-extremeFear {
  color: #0000FF;
}

.composition-sentiment.sentiment-fear {
  color: #5B9BD5;
}

.composition-sentiment.sentiment-neutral {
  color: #708090;
}

.composition-sentiment.sentiment-greed {
  color: #F0B8CE;
}

.composition-sentiment.sentiment-extremeGreed {
  color: #D24A93;
}

.composition-sentiment.sentiment-notAvailable {
  color: #6c757d;
}

/* Muted color for notAvailable */

/* 當前及左右半顯示模態框佈局 */
.composition-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

.composition-modal {
  background: #fff;
  width: 80vw;
  max-width: 800px;
  max-height: 90vh;
  overflow: auto;
  border-radius: 8px;
  padding: 20px;
  position: relative;
}

.modal-close-btn {
  position: absolute;
  top: 12px;
  right: 12px;
  background: transparent;
  border: none;
  font-size: 24px;
  cursor: pointer;
  z-index: 1;
}

.modal-description {
  margin-top: 5%;
}

@media (min-width: 1280px) {
  .modal-description {
    margin-top: 12%;
  }
}

/* 當前及左右半顯示模態框佈局 */
.composition-carousel {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  /* 由子元素決定點擊 */
}

.composition-modal {
  position: absolute;
  width: 80vw;
  max-width: 700px;
  max-height: 90vh;
  overflow: auto;
  background: #fff;
  border-radius: 8px;
  padding: 20px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  pointer-events: auto;
  transition: opacity 0.3s, transform 0.3s;
}

.composition-modal.current {
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  opacity: 1;
  height: 80%;
  z-index: 101;
}

.composition-modal .indicator-item {
  height: 70%;
  box-shadow: none;
  /* 移除陰影 */
  border: none;
  /* 移除邊框 */
}

.composition-modal .indicator-item .indicator-chart {
  height: 65%;
}

.composition-modal.prev {
  top: 50%;
  left: 0;
  transform: translate(-50%, -50%);
  opacity: 0.8;
  /* 設定透明度為 0.5 */
  filter: grayscale(100%);
  /* 將顏色轉為灰階 */
  z-index: 100;
}

.composition-modal.next {
  top: 50%;
  left: 100%;
  transform: translate(-50%, -50%);
  opacity: 0.8;
  /* 設定透明度為 0.5 */
  filter: grayscale(100%);
  /* 將顏色轉為灰階 */
  z-index: 100;
}

/* 新增：走馬燈箭頭 */
.carousel-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  font-size: 2rem;
  color: #fff;
  opacity: 0.7;
  pointer-events: auto;
  cursor: pointer;
  z-index: 102;
  width: 15%;
  /* 增加可點擊區域寬度 */
  height: 15%;
  /* 增加可點擊區域高度 */
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.3s;
}

.carousel-arrow:hover {
  opacity: 1;
}

.carousel-arrow--left {
  left: 18%;
  /* 固定在左側 10% 的位置 */
}

.carousel-arrow--right {
  right: 18%;
  /* 固定在右側 10% 的位置 */
}

/* 在1024px以下隱藏箭頭 */
@media (max-width: 1024px) {
  .carousel-arrow {
    display: none;
  }
}

/* 移除最新數據視圖樣式，因為已經不需要了 */

/* 新增：歷史視圖樣式 */
.market-sentiment-view .history-view {
  height: 100%;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.market-sentiment-view .history-view .indicator-chart {
  flex: 1 1;
  min-height: 0;
  margin-bottom: 10px;
}

/* 新增：組成視圖樣式 */
.market-sentiment-view .composition-view {
  height: 100%;
  min-height: 400px; /* 設定最小高度與 content-area 一致 */
  overflow-y: visible;
  /* No scrolling - show all items */
  display: flex;
  flex-direction: column;
}

/* 響應式設計：手機版回到垂直佈局 */
@media (max-width: 1023px) {
  .market-sentiment-view .content-layout-container {
    flex-direction: column;
    height: auto;
 
  }

  .market-sentiment-view .left-panel {
    flex: none;
    height: 400px;
  }

  .market-sentiment-view .left-panel .panel-header {
    margin-bottom: 15px;
  }

  .market-sentiment-view .right-panel {
    flex: none;
    min-height: 400px;
  }

  /* Old composition styles removed - handled by EmotionTag integration styles */
}

/* Medium tablets - handled by EmotionTag integration styles */

@media (max-width: 767px) {
  .market-sentiment-view .content-layout-container {
    flex-direction: column;
    gap: 15px;
    height: auto;

  }

  .market-sentiment-view .left-panel,
  .market-sentiment-view .right-panel {
    flex: none;
    height: auto;
    min-height: 350px;
    /* 增加高度以容納下移的元素 */
  }

  .market-sentiment-view .left-panel .panel-header {
    text-align: center;
    margin-bottom: 25px;
  }
}

/* EmotionTag integration styles - Redesigned layout */
.composition-emotion-tag {
  flex: 0 0 120px;
  /* Increased from 100px to 120px for longer text like "Extreme Greed" */
  display: flex;
  justify-content: center;
}

/* Override existing composition-item styles for better layout */
.composition-item {
  display: flex;
  align-items: center;
  gap: 8px;
  /* Reduced gap to accommodate wider EmotionTag */
  padding: 8px 12px;
  /* Reduced padding to fit more items */
  border-bottom: 1px solid #e8e8e8;
  cursor: pointer;
  transition: background-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
  border-radius: 4px;
  margin-bottom: 2px;
  /* Reduced margin to fit more items */
  background-color: #ffffff;
  flex-shrink: 0;
}

/* Three-column layout: Name | Bar+Score | EmotionTag */
.composition-item .composition-name {
  flex: 0 0 28%;
  /* Reduced from 35% to 28% for better centering */
  font-weight: 500;
  font-size: 0.85rem;
  color: #333;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  padding-right: 8px;
}

.composition-item .composition-analysis-value {
  flex: 1 1;
  /* Take remaining space between name and emotion tag */
  display: flex;
  align-items: center;
  justify-content: center;
  /* Center the content horizontally */
  min-width: 0;
  /* Allow shrinking */
  padding-right: 8px;
}

/* Ensure bar wrapper takes most of the analysis-value space */
.composition-bar-wrapper {
  flex: 1 1;
  height: 10px;
  background-color: #e9ecef;
  border-radius: 5px;
  overflow: hidden;
  margin-right: 8px;
  min-width: 60px;
  /* Minimum width to maintain visibility */
}

.composition-score-text {
  flex: 0 0 auto;
  font-size: 0.8rem;
  font-weight: 600;
  color: #1d1d1f;
  min-width: 35px;
  text-align: right;
}

/* Hide the old composition-sentiment styles since we're using EmotionTag now */
.composition-sentiment {
  display: none;
}

/* Enhanced hover effect for the redesigned layout */
.composition-item:hover {
  background-color: #f8f9fa;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
  transform: translateY(-1px);
}

.composition-item:hover .composition-emotion-tag {
  transform: scale(1.05);
}

/* Responsive adjustments for the new layout */
@media (max-width: 1023px) {
  .composition-emotion-tag {
    flex: 0 0 110px;
    /* Increased from 90px to 110px for tablets */
  }

  .composition-item .composition-name {
    flex: 0 0 26%;
    /* Reduced for better centering on tablets */
    font-size: 0.8rem;
  }

  .composition-score-text {
    font-size: 0.75rem;
    min-width: 30px;
  }
}

@media (max-width: 767px) {
  .composition-emotion-tag {
    flex: 0 0 100px;
    /* Increased from 80px to 100px for mobile */
  }

  .composition-item {
    gap: 8px;
    padding: 8px 10px;
  }

  .composition-item .composition-name {
    flex: 0 0 25%;
    /* Reduced for better centering on mobile */
    font-size: 0.75rem;
  }

  .composition-bar-wrapper {
    min-width: 50px;
    height: 8px;
  }

  .composition-score-text {
    font-size: 0.7rem;
    min-width: 28px;
  }
}

@media (max-width: 430px) {

  /* On very small screens, simplify to two-column layout */
  .composition-item .composition-analysis-value {
    display: none;
    /* Hide the bar and score */
  }

  .composition-item .composition-name {
    flex: 1 1;
    /* Take most space */
  }

  .composition-emotion-tag {
    flex: 0 0 70px;
    /* Smaller fixed width */
  }

  .composition-item {
    gap: 8px;
    padding: 8px 10px;
  }
}
/* Market Sentiment Description Section Styles */
/* 基於 PriceAnalysis 的底部說明區域設計 */

.market-sentiment-description-section {
  margin-top: 40px;
  background-color: white;
  background-color: var(--color-bg-card, white);
  border-radius: 8px;
  border-radius: var(--border-radius-large, 8px);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  box-shadow: var(--shadow-m, 0 2px 4px rgba(0, 0, 0, 0.1));
  overflow: hidden;
}

/* 標籤式說明容器 */
.market-sentiment-description-section .description-tabs-container {
  display: flex;
  flex-direction: column;
  padding: 20px;
  padding: var(--space-l, 20px);
}

/* 水平說明標籤導航 */
.market-sentiment-description-section .description-tabs {
  display: flex;
  border-bottom: 2px solid #f0f0f0;
  border-bottom: 2px solid var(--color-border-light, #f0f0f0);
  margin-bottom: 20px;
  gap: 0;
}

.market-sentiment-description-section .description-tab {
  flex: 1 1;
  padding: 12px 16px;
  border: none;
  background: none;
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 500;
  color: #666;
  color: var(--color-text-secondary, #666);
  transition: all 0.2s ease;
  text-align: center;
  border-bottom: 3px solid transparent;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  position: relative;
  outline: none;
}

.market-sentiment-description-section .description-tab:hover {
  color: #1d1d1f;
  color: var(--color-text-primary, #1d1d1f);
  background-color: #f8f8f8;
  background-color: var(--color-bg-muted, #f8f8f8);
}

.market-sentiment-description-section .description-tab.active {
  color: #007aff;
  border-bottom-color: #007aff;
  background-color: transparent;
  font-weight: 600;
}

.market-sentiment-description-section .description-tab.active:hover {
  background-color: transparent;
}

/* 標籤內容區域 */
.market-sentiment-description-section .description-tab-content {
  min-height: 200px;
  max-height: 400px;
  overflow-y: auto;
}

.market-sentiment-description-section .description-tab-content h3 {
  margin: 0 0 15px 0;
  font-size: 1.1rem;
  font-weight: 600;
  color: #1d1d1f;
  color: var(--color-text-primary, #1d1d1f);
}

.market-sentiment-description-section .description-tab-content h4 {
  margin: 20px 0 10px 0;
  font-size: 1rem;
  font-weight: 600;
  color: #1d1d1f;
  color: var(--color-text-primary, #1d1d1f);
}

.market-sentiment-description-section .description-tab-content p {
  margin: 0 0 15px 0;
  line-height: 1.6;
  color: #666;
  color: var(--color-text-secondary, #666);
}

/* 列表樣式 */
.market-sentiment-description-section .description-list {
  list-style: none;
  padding: 0;
  margin: 0 0 15px 0;
}

.market-sentiment-description-section .description-list li {
  padding: 8px 0;
  padding-left: 20px;
  position: relative;
  line-height: 1.5;
  color: #666;
  color: var(--color-text-secondary, #666);
}

.market-sentiment-description-section .description-list li:before {
  content: "•";
  color: #007aff;
  color: var(--accent-color-blue, #007aff);
  font-weight: bold;
  position: absolute;
  left: 0;
}

/* 總覽標籤特定樣式 */
.market-sentiment-description-section .overview-key-points {
  margin-top: 20px;
}

.market-sentiment-description-section .composite-overview {
  margin-top: 20px;
  padding-top: 15px;
  border-top: 1px solid #f0f0f0;
  border-top: 1px solid var(--color-border-light, #f0f0f0);
}

/* 組成指標標籤特定樣式 */

.market-sentiment-description-section .indicators-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  grid-gap: 20px;
  gap: 20px;
  margin-top: 20px;
}

.market-sentiment-description-section .indicator-summary {
  padding: 15px;
  background-color: #f8f8f8;
  background-color: var(--color-bg-muted, #f8f8f8);
  border-radius: 6px;
  border-radius: var(--border-radius-medium, 6px);
  border-left: 4px solid #007aff;
  border-left: 4px solid var(--accent-color-blue, #007aff);
}

.market-sentiment-description-section .indicator-summary h4 {
  margin: 0 0 8px 0;
  font-size: 0.95rem;
  color: #1d1d1f;
  color: var(--color-text-primary, #1d1d1f);
}

.market-sentiment-description-section .indicator-summary p {
  margin: 0;
  font-size: 0.85rem;
  line-height: 1.4;
}



/* 使用技巧標籤特定樣式 */
.market-sentiment-description-section .tips-section {
  margin-bottom: 25px;
}

.market-sentiment-description-section .tips-section:last-child {
  margin-bottom: 0;
}

/* 歷史分析標籤特定樣式 */
.market-sentiment-description-section .history-section {
  margin-bottom: 25px;
}

.market-sentiment-description-section .history-section:last-child {
  margin-bottom: 0;
}

/* 響應式設計 */
@media (max-width: 768px) {
  .market-sentiment-description-section .description-tabs {
    flex-wrap: wrap;
    gap: 5px;
    margin-bottom: 15px;
  }

  .market-sentiment-description-section .description-tab {
    flex: 1 1 45%;
    font-size: 0.8rem;
    padding: 10px 8px;
    min-width: 0;
  }

  .market-sentiment-description-section .description-tabs-container {
    padding: 15px;
  }

  .market-sentiment-description-section .description-tab-content h3 {
    font-size: 1rem;
    margin-bottom: 12px;
  }

  .market-sentiment-description-section .indicators-grid {
    grid-template-columns: 1fr;
    gap: 15px;
  }

  .market-sentiment-description-section .indicator-summary {
    padding: 12px;
  }
}

@media (max-width: 480px) {
  .market-sentiment-description-section .description-tab {
    flex: 1 1 45%;
    margin-bottom: 5px;
    font-size: 0.75rem;
    padding: 8px 6px;
  }

  .market-sentiment-description-section .description-tabs {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: space-between;
  }
}

/* 捲動條美化 */
.market-sentiment-description-section .description-tab-content::-webkit-scrollbar {
  width: 6px;
}

.market-sentiment-description-section .description-tab-content::-webkit-scrollbar-track {
  background: transparent;
}

.market-sentiment-description-section .description-tab-content::-webkit-scrollbar-thumb {
  background: #dcdcdc;
  background: var(--color-scrollbar-thumb, #dcdcdc);
  border-radius: 6px;
}

.market-sentiment-description-section .description-tab-content::-webkit-scrollbar-thumb:hover {
  background: #bfbfbf;
  background: var(--color-scrollbar-thumb-hover, #bfbfbf);
}

/* 無障礙支持 */
.market-sentiment-description-section .description-tab:focus {
  outline-offset: 2px;
}

/* 動畫效果 */
.market-sentiment-description-section .description-tab-content {
  animation: fadeIn 0.3s ease-in-out;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

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

/* 側邊佈局
樣式 */
.market-sentiment-description-section.side-layout {
  margin-top: 0;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.market-sentiment-description-section.side-layout .description-tabs-container {
  height: 100%;
  display: flex;
  flex-direction: column;
}

.market-sentiment-description-section.side-layout .description-tabs {
  flex-direction: column;
  border-bottom: none;
  border-right: 2px solid #f0f0f0;
  border-right: 2px solid var(--color-border-light, #f0f0f0);
  margin-bottom: 0;
  margin-right: 20px;
  width: 120px;
  flex-shrink: 0;
}

.market-sentiment-description-section.side-layout .description-tab {
  border-bottom: none;
  border-right: 3px solid transparent;
  text-align: left;
  padding: 12px 16px;
  font-size: 0.85rem;
}

.market-sentiment-description-section.side-layout .description-tab.active {
  border-right-color: #007aff;
  border-bottom-color: transparent;
}

.market-sentiment-description-section.side-layout .description-tabs-container {
  flex-direction: row;
}

.market-sentiment-description-section.side-layout .description-tab-content {
  flex: 1 1;
  max-height: none;
  overflow-y: auto;
}

/* 底部佈局：在所有螢幕尺寸下都顯示 */
.market-sentiment-description-section.bottom-layout {
  display: block;
  margin-top: 20px;
  background-color: white;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  clear: both; /* 確保不與浮動元素重疊 */
  position: relative;
  z-index: 1; /* 確保在正確的層級 */
}




/* 側邊佈局：只在 modal 中使用 */
.market-sentiment-description-section.side-layout {
  margin-top: 0;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.market-sentiment-description-section.side-layout .description-tabs-container {
  height: 100%;
  display: flex;
  flex-direction: row;
}

.market-sentiment-description-section.side-layout .description-tabs {
  flex-direction: column;
  border-bottom: none;
  border-right: 2px solid #f0f0f0;
  border-right: 2px solid var(--color-border-light, #f0f0f0);
  margin-bottom: 0;
  margin-right: 20px;
  width: 120px;
  flex-shrink: 0;
}

.market-sentiment-description-section.side-layout .description-tab {
  border-bottom: none;
  border-right: 3px solid transparent;
  text-align: left;
  padding: 12px 16px;
  font-size: 0.85rem;
}

.market-sentiment-description-section.side-layout .description-tab.active {
  border-right-color: #007aff;
  border-bottom-color: transparent;
}

.market-sentiment-description-section.side-layout .description-tab-content {
  flex: 1 1;
  max-height: none;
  overflow-y: auto;
}

/* 手機版響應式設計：覆蓋 side-layout 的垂直排列 */
@media (max-width: 768px) {
  .market-sentiment-description-section.side-layout .description-tabs-container {
    flex-direction: column;
    height: auto;
  }

  .market-sentiment-description-section.side-layout .description-tabs {
    flex-direction: row;
    border-right: none;
    border-bottom: 2px solid #f0f0f0;
    border-bottom: 2px solid var(--color-border-light, #f0f0f0);
    margin-right: 0;
    margin-bottom: 15px;
    width: 100%;
    flex-wrap: wrap;
    gap: 5px;
  }

  .market-sentiment-description-section.side-layout .description-tab {
    border-right: none;
    border-bottom: 3px solid transparent;
    text-align: center;
    flex: 1 1 45%;
    font-size: 0.8rem;
    padding: 10px 8px;
    min-width: 0;
  }

  .market-sentiment-description-section.side-layout .description-tab.active {
    border-right-color: transparent;
    border-bottom-color: #007aff;
  }

  .market-sentiment-description-section.side-layout .description-tab-content {
    max-height: 400px;
    overflow-y: auto;
  }
}

@media (max-width: 480px) {
  .market-sentiment-description-section.side-layout .description-tab {
    flex: 1 1 45%;
    margin-bottom: 5px;
    font-size: 0.75rem;
    padding: 8px 6px;
  }

  .market-sentiment-description-section.side-layout .description-tabs {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: space-between;
  }
}
/* MarketSentimentGauge 組件樣式 */

.market-sentiment-gauge {
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100%;
  min-height: 0;
  container-type: inline-size;
  container-name: market-gauge;

  /* CSS 變數用於響應式尺寸控制 */
  --gauge-size: 350px;
  --font-size-value: 24px;
  --font-size-label: 18px;
  --font-size-analysis: 1.3em;
  --font-size-update: 12px;
  --gauge-label-bottom: -25px;
}

/* 分析結果樣式 - 調整為在底部顯示 */
.market-sentiment-gauge .analysis-result {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 10px 20px 0; /* 調整 padding */
  text-align: center;
  margin-top: -5%; /* 向上移動一點以更貼近 gauge */
  position: relative;
  z-index: 5;
}

.market-sentiment-gauge .analysis-result .analysis-item {
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: center;
  width: 100%;
}

.market-sentiment-gauge .analysis-result .analysis-label {
  font-size: 1em;
  color: #6c757d;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.market-sentiment-gauge .analysis-result .analysis-value {
  font-size: var(--font-size-analysis);
  font-weight: 600;
  color: #2c3e50;
  font-family: 'SF Pro Display', -apple-system, BlinkMacSystemFont, sans-serif;
}

/* 情緒顏色 (無須變動) */
.market-sentiment-gauge .analysis-value.sentiment-extremeFear {
  color: #0000FF !important;
}

.market-sentiment-gauge .analysis-value.sentiment-fear {
  color: #5B9BD5 !important;
}

.market-sentiment-gauge .analysis-value.sentiment-neutral {
  color: #708090 !important;
}

.market-sentiment-gauge .analysis-value.sentiment-greed {
  color: #F0B8CE !important;
}

.market-sentiment-gauge .analysis-value.sentiment-extremeGreed {
  color: #D24A93 !important;
}

/* Gauge 圖表容器 (無須變動) */
.market-sentiment-gauge .gauge-chart-container {
  flex: 1 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 0;
  margin-top: 5%;
}

/* 鎖定長寬比，這是解決軸心偏移的關鍵 */
.market-sentiment-gauge .gauge-chart {
  position: relative;
  width: 80%;
  max-width: var(--gauge-size);
  margin: 0 auto 10% auto;
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 2 / 1;
}

/* --- 優化核心：將距離單位改為 cqw --- */
.market-sentiment-gauge .gauge-value-rotator {
  position: absolute;
  top: 75%;
  /* 這個值在鎖定長寬比後應該是固定的 */
  left: 50%;
  width: 0;

  /* 旋轉臂的長度，設為容器寬度的 30%。可微調此數值來改變整體距離。*/
  height: 33cqw;
  margin-top: -33cqw;
  /* 必須與 height 保持一致 */

  transform-origin: center bottom;
  z-index: 15;
  margin-left: 0;
}

/* 動態數值與自訂指針樣式 */
.market-sentiment-gauge .gauge-dynamic-value {
  position: absolute;

  /* 數值圓圈在旋轉臂上的位置，也使用 cqw */
  top: -10cqw;
  left: -6.25cqw;
  /* -(width / 2) */
  width: 12.5cqw;
  height: 12.5cqw;

  font-size: var(--font-size-value);
  font-weight: bold;
  color: #4a4a4a;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.95) 0%, rgba(240, 240, 240, 0.9) 100%);
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  border: 2px solid rgba(255, 255, 255, 0.8);
}

.market-sentiment-gauge .custom-gauge-needle {
  position: absolute;
  top: -2.5cqw;
  left: -0.5cqw;
  width: 1cqw;

  /* 指針長度，也使用 cqw */
  height: 30cqw;

  transform-origin: center bottom;
}

/* 更新時間樣式 (無須變動) */
.market-sentiment-gauge .last-update-time {
  /* position: absolute; */ /* 改為相對定位 */
  /* bottom: -8%; */
  /* left: 50%; */
  /* transform: translateX(-50%); */
  width: 100%;
  text-align: center;
  color: #666;
  font-size: var(--font-size-update);
  z-index: 1;
  padding-bottom: 10px;
}

/* 載入與錯誤狀態 (無須變動) */
.market-sentiment-gauge.loading,
.market-sentiment-gauge.error {
  justify-content: center;
  align-items: center;
}

.market-sentiment-gauge .gauge-loading-skeleton,
.market-sentiment-gauge .gauge-error-state {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 200px;
}

.market-sentiment-gauge .loading-spinner {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

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

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

  100% {
    transform: rotate(360deg);
  }
}

.market-sentiment-gauge .gauge-error-state {
  color: #dc3545;
  font-size: 16px;
  text-align: center;
}

/* 使用 @container 專注於調整字體等細節 */
@container market-gauge (width < 376px) {
  .market-sentiment-gauge {
    --font-size-value: 16px;
    --font-size-label: 12px;
    --font-size-analysis: 1.1em;
    --font-size-update: 10px;
  }
}

@container market-gauge (376px <=width < 769px) {
  .market-sentiment-gauge {
    --font-size-value: 18px;
    --font-size-label: 14px;
    --font-size-analysis: 1.2em;
    --font-size-update: 11px;
  }
}

@container market-gauge (width >=769px) {
  .market-sentiment-gauge {
    --font-size-value: 28px;
    --font-size-label: 20px;
    --font-size-analysis: 1.5em;
    --font-size-update: 16px;
  }
}

/* 針對大螢幕 (1920px+) 的 Gauge 調整 */
@media (min-width: 1920px) {
  .market-sentiment-gauge .gauge-value-rotator {
    height: 28cqw;
    margin-top: -28cqw;
  }

  .market-sentiment-gauge .gauge-dynamic-value {
    top: -9cqw;
    left: -5.5cqw;
    width: 11cqw;
    height: 11cqw;
  }

  .market-sentiment-gauge .custom-gauge-needle {
    height: 26cqw;
    top: -2.2cqw;
  }
}

/* 互動覆蓋層樣式 (無須變動) */
.market-sentiment-gauge .gauge-interactive-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 10;
  pointer-events: auto;
}

.market-sentiment-gauge .interactive-zone {
  position: absolute;
  width: 100%;
  height: 100%;
  cursor: pointer;
  opacity: 0;
  background: transparent;
  pointer-events: auto;
  touch-action: manipulation;
}

.market-sentiment-gauge .interactive-zone:hover {
  opacity: 0;
}

.market-sentiment-gauge .interactive-zone.active {
  opacity: 0;
}

/* 五個扇形區域的定位 (無須變動) */
.market-sentiment-gauge .interactive-zone-extreme-fear {
  -webkit-clip-path: polygon(50% 100%, 0% 100%, 15% 15%);
          clip-path: polygon(50% 100%, 0% 100%, 15% 15%);
}

.market-sentiment-gauge .interactive-zone-fear {
  -webkit-clip-path: polygon(50% 100%, 15% 15%, 35% 5%);
          clip-path: polygon(50% 100%, 15% 15%, 35% 5%);
}

.market-sentiment-gauge .interactive-zone-neutral {
  -webkit-clip-path: polygon(50% 100%, 35% 5%, 65% 5%);
          clip-path: polygon(50% 100%, 35% 5%, 65% 5%);
}

.market-sentiment-gauge .interactive-zone-greed {
  -webkit-clip-path: polygon(50% 100%, 65% 5%, 85% 15%);
          clip-path: polygon(50% 100%, 65% 5%, 85% 15%);
}

.market-sentiment-gauge .interactive-zone-extreme-greed {
  -webkit-clip-path: polygon(50% 100%, 85% 15%, 100% 100%);
          clip-path: polygon(50% 100%, 85% 15%, 100% 100%);
}

/* --- 新的浮動標籤樣式 --- */
.floating-sentiment-label {
  position: absolute;
  z-index: 30;
  pointer-events: none; /* 確保標籤不會阻擋滑鼠事件 */
  padding: 8px 16px;
  font-size: var(--font-size-label);
  font-weight: 600;
  color: #ffffff;
  white-space: nowrap;
  
  border-radius: 20px;
  -webkit-backdrop-filter: blur(10px);
          backdrop-filter: blur(10px);
  border: 2px solid rgba(255, 255, 255, 0.4);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);

  /* 定位在游標上方偏左，避免遮擋 */
  transform: translate(-50%, -120%); 
  
  /* 動畫效果 */
  animation: floatFadeIn 0.2s ease-out;
}

/* 浮動標籤淡入動畫 */
@keyframes floatFadeIn {
  from {
    opacity: 0;
    transform: translate(-50%, -100%);
  }
  to {
    opacity: 1;
    transform: translate(-50%, -120%);
  }
}

/* 為不同情緒狀態設定背景顏色 */
.floating-sentiment-label.sentiment-extremeFear {
  background: linear-gradient(135deg, rgba(0, 0, 255, 0.9) 0%, rgba(65, 105, 225, 0.8) 100%);
}

.floating-sentiment-label.sentiment-fear {
  background: linear-gradient(135deg, rgba(91, 155, 213, 0.9) 0%, rgba(135, 206, 235, 0.8) 100%);
}

.floating-sentiment-label.sentiment-neutral {
  background: linear-gradient(135deg, rgba(112, 128, 144, 0.9) 0%, rgba(156, 160, 176, 0.8) 100%);
}

.floating-sentiment-label.sentiment-greed {
  background: linear-gradient(135deg, rgba(240, 184, 206, 0.9) 0%, rgba(255, 182, 193, 0.8) 100%);
}

.floating-sentiment-label.sentiment-extremeGreed {
  background: linear-gradient(135deg, rgba(210, 74, 147, 0.9) 0%, rgba(255, 20, 147, 0.8) 100%);
}


/* 響應式調整 - 浮動標籤 */
@container market-gauge (width < 376px) {
  .floating-sentiment-label {
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 10px;
  }
}

@container market-gauge (376px <=width < 769px) {
  .floating-sentiment-label {
    padding: 6px 12px;
    border-radius: 16px;
  }
}

@container market-gauge (width >=769px) {
  .floating-sentiment-label {
    padding: 8px 16px;
    border-radius: 20px;
  }
}

/* 減少動畫偏好設定 - 互動功能 */
@media (prefers-reduced-motion: reduce) {
  .floating-sentiment-label {
    animation: none;
  }
}

/* 可訪問性支援 */
.market-sentiment-gauge .sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* 鍵盤焦點樣式 */
.market-sentiment-gauge .interactive-zone:focus {
  outline: 2px solid #4A90E2;
  outline-offset: 2px;
  opacity: 0.2;
}

.market-sentiment-gauge .interactive-zone:focus:not(:focus-visible) {
  outline: none;
}

/* 性能優化 */
.market-sentiment-gauge .gauge-chart-wrapper {
  position: relative;
  width: 100%;
  height: 100%;
  isolation: isolate;
  contain: layout style paint;
}

.market-sentiment-gauge .gauge-interactive-overlay {
  will-change: auto;
}

.market-sentiment-gauge .interactive-zone {
  will-change: opacity;
  -webkit-backface-visibility: hidden;
          backface-visibility: hidden;
  transform: translateZ(0);
}

.floating-sentiment-label {
  will-change: transform, opacity;
  -webkit-backface-visibility: hidden;
          backface-visibility: hidden;
}
.restricted-gauge-container {
    position: relative;
    width: 100%;
    height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 16px;
    overflow: hidden;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border: 1px solid rgba(0, 0, 0, 0.05);
    z-index: 20; /* 提高 z-index 確保在其他元素之上 */
    isolation: isolate; /* 創建新的堆疊上下文 */
}

.feature-screenshot-background {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 5; /* 提高 z-index */
}

.screenshot-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.6;
    filter: blur(1px);
}

.restriction-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 15; /* 提高 z-index，但低於容器 */
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.6);  /* 從 0.85 降到 0.6，更透明 */
    backdrop-filter: blur(2px);  /* 從 4px 降到 2px，減少模糊 */
    -webkit-backdrop-filter: blur(2px);
}

.restriction-content {
    text-align: center;
    padding: 32px;
    max-width: 280px;
}

.lock-icon {
    width: 48px;
    height: 48px;
    margin: 0 auto 16px;
    border-radius: 50%;
    background: linear-gradient(135deg, #9D00FF 0%, #C78F57 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

.restriction-title {
    font-size: 18px;
    font-weight: 600;
    color: #1d1d1f;
    margin: 0 0 8px;
    line-height: 1.3;
}

.restriction-description {
    font-size: 14px;
    color: #6e6e73;
    margin: 0 0 20px;
    line-height: 1.4;
}

.upgrade-cta-button {
    padding: 12px 24px;
    border: none;
    border-radius: 12px;
    background: linear-gradient(135deg, #9D00FF 0%, #C78F57 100%);
    color: white;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    box-shadow: 
        0 4px 12px rgba(157, 0, 255, 0.3),
        0 2px 6px rgba(157, 0, 255, 0.2);
}

.upgrade-cta-button:hover {
    transform: translateY(-1px);
    box-shadow: 
        0 6px 16px rgba(157, 0, 255, 0.4),
        0 3px 8px rgba(157, 0, 255, 0.3);
}

.upgrade-cta-button:active {
    transform: translateY(0);
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .restricted-gauge-container {
        background: linear-gradient(135deg, #2c2c2e 0%, #1c1c1e 100%);
        border: 1px solid rgba(255, 255, 255, 0.1);
    }

    .restriction-overlay {
        background: rgba(28, 28, 30, 0.6);  /* 從 0.9 降到 0.6，更透明 */
    }

    .restriction-title {
        color: #f5f5f7;
    }

    .restriction-description {
        color: #a1a1a6;
    }
}

/* Responsive design */
@media (max-width: 768px) {
    .restricted-gauge-container {
        height: 250px;
    }

    .restriction-content {
        padding: 24px;
        max-width: 240px;
    }

    .lock-icon {
        width: 40px;
        height: 40px;
        margin-bottom: 12px;
    }

    .restriction-title {
        font-size: 16px;
    }

    .restriction-description {
        font-size: 13px;
    }

    .upgrade-cta-button {
        padding: 10px 20px;
        font-size: 13px;
    }
}
.restricted-composition-container {
    position: relative;
    width: 100%;
    min-height: 400px;
    border-radius: 16px;
    overflow: hidden;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border: 1px solid rgba(0, 0, 0, 0.05);
    z-index: 1;
    isolation: isolate; /* 創建新的堆疊上下文 */
}

.composition-feature-screenshot-background {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1;
}

.composition-screenshot-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.6;
    filter: blur(1px);
}

/* 模擬樣式已移除 */

.composition-restriction-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.6);  /* 從 0.85 降到 0.6，更透明 */
    backdrop-filter: blur(2px);  /* 從 4px 降到 2px，減少模糊 */
    -webkit-backdrop-filter: blur(2px);
}

.composition-restriction-content {
    text-align: center;
    padding: 40px;
    max-width: 360px;
}

.composition-lock-icon {
    width: 56px;
    height: 56px;
    margin: 0 auto 20px;
    border-radius: 50%;
    background: linear-gradient(135deg, #9D00FF 0%, #C78F57 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    box-shadow: 0 8px 24px rgba(157, 0, 255, 0.3);
}

.composition-restriction-title {
    font-size: 22px;
    font-weight: 700;
    color: #1d1d1f;
    margin: 0 0 12px;
    line-height: 1.3;
    letter-spacing: -0.3px;
}

.composition-restriction-description {
    font-size: 16px;
    color: #6e6e73;
    margin: 0 0 24px;
    line-height: 1.4;
}


.composition-upgrade-button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 16px 32px;
    border: none;
    border-radius: 14px;
    background: linear-gradient(135deg, #9D00FF 0%, #C78F57 100%);
    color: white;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    box-shadow:
        0 6px 20px rgba(157, 0, 255, 0.3),
        0 3px 10px rgba(157, 0, 255, 0.2);
    min-width: 180px;
    margin: 0 auto;
}

.composition-upgrade-button:hover {
    transform: translateY(-2px);
    box-shadow:
        0 8px 28px rgba(157, 0, 255, 0.4),
        0 4px 14px rgba(157, 0, 255, 0.3);
}

.composition-upgrade-button:active {
    transform: translateY(0);
}

.button-icon {
    display: flex;
    align-items: center;
    justify-content: center;
}

@keyframes shimmer {
    0% {
        background-position: -200px 0;
    }

    100% {
        background-position: calc(200px + 100%) 0;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .restricted-composition-container {
        background: linear-gradient(135deg, #2c2c2e 0%, #1c1c1e 100%);
        border: 1px solid rgba(255, 255, 255, 0.1);
    }

    .composition-restriction-overlay {
        background: rgba(28, 28, 30, 0.6);  /* 從 0.92 降到 0.6，更透明 */
    }

    .composition-restriction-title {
        color: #f5f5f7;
    }

    .composition-restriction-description,
    .feature-text {
        color: #a1a1a6;
    }

    /* 模擬樣式已移除 */
}

/* Responsive design */
@media (max-width: 768px) {
    .composition-restriction-content {
        padding: 32px 24px;
        max-width: 320px;
    }

    .composition-lock-icon {
        width: 48px;
        height: 48px;
        margin-bottom: 16px;
    }

    .composition-restriction-title {
        font-size: 20px;
    }

    .composition-restriction-description {
        font-size: 15px;
    }

    .composition-upgrade-button {
        padding: 14px 28px;
        font-size: 15px;
        min-width: 160px;
    }

    .feature-preview-item {
        padding: 6px 0;
    }

    .feature-text {
        font-size: 13px;
    }
}

@media (max-width: 480px) {
    .restricted-composition-container {
        min-height: 350px;
    }

    .composition-restriction-content {
        padding: 24px 20px;
    }

    .composition-features-preview {
        margin-bottom: 24px;
    }

    .composition-upgrade-button {
        width: 100%;
        min-width: auto;
    }
}
/* Data Restriction Tutorial - Apple Style Tutorial Overlay */
.data-restriction-tutorial-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 9999;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.data-restriction-tutorial-overlay.visible {
  opacity: 1;
  pointer-events: all;
}

.tutorial-backdrop {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.tutorial-content {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.9);
  opacity: 0;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  pointer-events: all;
}

.tutorial-content.visible {
  transform: translate(-50%, -50%) scale(1);
  opacity: 1;
}

.tutorial-arrow {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 12px solid transparent;
  border-right: 12px solid transparent;
  border-bottom: 12px solid rgba(255, 255, 255, 0.95);
  filter: drop-shadow(0 -2px 8px rgba(0, 0, 0, 0.1));
}

.tutorial-card {
  background: linear-gradient(135deg, 
    rgba(255, 255, 255, 0.95) 0%, 
    rgba(255, 255, 255, 0.9) 100%);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 20px;
  padding: 24px;
  min-width: 320px;
  max-width: 400px;
  box-shadow: 
    0 20px 60px rgba(0, 0, 0, 0.15),
    0 8px 32px rgba(0, 0, 0, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.4);
  position: relative;
}

.tutorial-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  position: relative;
}

.tutorial-icon {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  background: linear-gradient(135deg, #007AFF 0%, #0056CC 100%);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  box-shadow: 0 4px 12px rgba(0, 122, 255, 0.3);
}

.tutorial-title {
  flex: 1 1;
  font-size: 18px;
  font-weight: 600;
  color: #1d1d1f;
  margin: 0;
  line-height: 1.3;
}

.tutorial-close {
  position: absolute;
  top: -4px;
  right: -4px;
  width: 24px;
  height: 24px;
  border: none;
  background: rgba(0, 0, 0, 0.1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: #666;
  transition: all 0.2s ease;
}

.tutorial-close:hover {
  background: rgba(0, 0, 0, 0.15);
  color: #333;
  transform: scale(1.1);
}

.tutorial-close:active {
  transform: scale(0.95);
}

.tutorial-body {
  margin-bottom: 20px;
}

.tutorial-message {
  font-size: 15px;
  font-weight: 500;
  color: #1d1d1f;
  line-height: 1.5;
  margin: 0 0 8px 0;
}

.tutorial-submessage {
  font-size: 13px;
  color: #666;
  line-height: 1.4;
  margin: 0;
}

.tutorial-actions {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
}

.tutorial-btn {
  padding: 10px 20px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
  min-width: 80px;
}

.tutorial-btn-secondary {
  background: rgba(0, 0, 0, 0.05);
  color: #666;
}

.tutorial-btn-secondary:hover {
  background: rgba(0, 0, 0, 0.1);
  color: #333;
}

.tutorial-btn-primary {
  background: linear-gradient(135deg, #007AFF 0%, #0056CC 100%);
  color: white;
  box-shadow: 0 4px 12px rgba(0, 122, 255, 0.3);
}

.tutorial-btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(0, 122, 255, 0.4);
}

.tutorial-btn:active {
  transform: scale(0.98);
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
  .tutorial-card {
    background: linear-gradient(135deg, 
      rgba(28, 28, 30, 0.95) 0%, 
      rgba(28, 28, 30, 0.9) 100%);
    border: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: 
      0 20px 60px rgba(0, 0, 0, 0.4),
      0 8px 32px rgba(0, 0, 0, 0.3),
      inset 0 1px 0 rgba(255, 255, 255, 0.1);
  }

  .tutorial-arrow {
    border-bottom-color: rgba(28, 28, 30, 0.95);
  }

  .tutorial-title {
    color: #f5f5f7;
  }

  .tutorial-message {
    color: #f5f5f7;
  }

  .tutorial-submessage {
    color: #a1a1a6;
  }

  .tutorial-close {
    background: rgba(255, 255, 255, 0.1);
    color: #a1a1a6;
  }

  .tutorial-close:hover {
    background: rgba(255, 255, 255, 0.15);
    color: #f5f5f7;
  }

  .tutorial-btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: #a1a1a6;
  }

  .tutorial-btn-secondary:hover {
    background: rgba(255, 255, 255, 0.15);
    color: #f5f5f7;
  }

  .tutorial-btn-primary {
    background: linear-gradient(135deg, #0A84FF 0%, #409CFF 100%);
    box-shadow: 0 4px 12px rgba(10, 132, 255, 0.3);
  }

  .tutorial-btn-primary:hover {
    box-shadow: 0 6px 16px rgba(10, 132, 255, 0.4);
  }
}

/* Responsive design */
@media (max-width: 768px) {
  .tutorial-card {
    margin: 20px;
    min-width: auto;
    max-width: calc(100vw - 40px);
    padding: 20px;
  }

  .tutorial-title {
    font-size: 16px;
  }

  .tutorial-message {
    font-size: 14px;
  }

  .tutorial-submessage {
    font-size: 12px;
  }

  .tutorial-actions {
    flex-direction: column-reverse;
    gap: 8px;
  }

  .tutorial-btn {
    width: 100%;
    padding: 12px 20px;
  }
}

@media (max-width: 480px) {
  .tutorial-card {
    margin: 16px;
    max-width: calc(100vw - 32px);
    padding: 16px;
  }

  .tutorial-icon {
    width: 28px;
    height: 28px;
  }

  .tutorial-title {
    font-size: 15px;
  }
}
.dialog-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.4);
    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);
    backdrop-filter: blur(40px);
    -webkit-backdrop-filter: blur(40px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 24px;
    width: 90%;
    max-width: 420px;
    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--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;
    text-align: center;
    padding: 0 20px;
    line-height: 1.2;
    letter-spacing: -0.5px;
}

.dialog-description {
    color: 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);
    }
}
.time-range-selector {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin: 20px 0;
}

.time-range-selector label {
  font-size: 13px;
  color: #666;
  font-weight: 400;
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Helvetica Neue', sans-serif;
}

.time-range-selector select {
  appearance: none;
  -webkit-appearance: none;
  background-color: #f5f5f7;
  border: none;
  border-radius: 20px;
  padding: 8px 28px 8px 16px;
  font-size: 13px;
  color: #1d1d1f;
  cursor: pointer;
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Helvetica Neue', sans-serif;
  transition: background-color 0.2s ease;
  background-image: url("data:image/svg+xml,%3Csvg width=%2710%27 height=%276%27 viewBox=%270 0 10 6%27 fill=%27none%27 xmlns=%27http://www.w3.org/2000/svg%27%3E%3Cpath d=%27M1 1L5 5L9 1%27 stroke=%27%23666666%27 stroke-width=%271.5%27 stroke-linecap=%27round%27 stroke-linejoin=%27round%27%2F%3E%3C%2Fsvg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
}

.time-range-selector select:hover {
  background-color: #ebebeb;
}

.time-range-selector select:focus {
  outline: none;
  background-color: #ebebeb;
  box-shadow: 0 0 0 2px rgba(0, 125, 250, 0.6);
}

@media (max-width: 768px) {
  .time-range-selector {
    margin: 16px 0;
  }
  
  .time-range-selector select {
    padding: 6px 24px 6px 12px;
    font-size: 12px;
  }
  
  .time-range-selector label {
    font-size: 12px;
  }
} 
.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 寬度 */
} 
/* 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;
} 
/* 引入 Loading 樣式 */

.indicator-item {
  margin-bottom: 20px;
  position: relative; /* 將 indicator-item 設定為 relative */
  background-color: white; /* 新增 */
  padding: 0px; /* 新增 */
  border-radius: 8px; /* 新增 */
  box-shadow: 0 2px 4px rgba(0,0,0,0.1); /* 新增 */
}


/* 新增以下部分 */
@media (max-width: 768px) {
  .indicator-chart {
    height: 200px; /* 在小螢幕上調整圖表高度 */
  }

  /* 移除或註解掉之前對父元素的修改 */
  /* .indicator-item.analysis-item {
    white-space: normal;
    word-break: break-word;
  } */

  /* 更新：使用正確的後代選擇器，並重置可能衝突的樣式 */
  .indicator-item .analysis-item .analysis-label { /* 正確的後代選擇器 */
    white-space: normal !important; /* 允許文字換行 */
    word-break: break-word !important; /* 允許長單字斷詞換行 */
    /* text-transform: none !important; 重置 text-transform */
    /* letter-spacing: normal !important; 重置 letter-spacing */
    text-align: center; /* 可選：讓換行後的文字居中 */
    /* min-width: 60px; 可選：給標籤一個最小寬度 */
    /* 移除 font-size 覆蓋，讓 PriceAnalysis.css 的 font-size 生效 */
    /* font-size: 0.85em; */ /* 如果需要覆蓋 PriceAnalysis 的字體大小，可以取消註解 */
  }

  /* 新增：讓 analysis-value 也能換行 */
  .indicator-item .analysis-item .analysis-value {
    white-space: normal !important; /* 允許文字/數字換行 */
    word-break: break-word !important; /* 對於數字或無空格字串，強制斷開 */
    display: block; /* 視為塊級元素 */
    width: 100%; /* 佔滿父容器寬度 */
    text-align: center; /* 保持居中 */
  }
}

/* 新增 h3 樣式並置中 */
.indicator-item h3 {
  font-size: 20px; /* 從 MarketSentimentIndex.css 移過來 */
  color: #333; /* 從 MarketSentimentIndex.css 移過來 */
  margin: 0 0 15px 0; /* 稍微增加底部間距 */
  padding: 0;
  text-align: center; /* 置中文字 */
}

.tooltip {
    position: absolute;
    z-index: 10;
    background-color: #333;
    color: white;
    padding: 8px;
    border-radius: 4px;
    font-size: 0.8em;
    white-space: normal;
    width: 200px;
    top: 10%;
    left: 50%;
    transform: translateX(-50%) translateY(-100%);
    margin-top: 5px;
}

.indicator-item.analysis-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 10px;
    /* white-space: nowrap; */ /* 考慮移除或註解掉這裡的 nowrap，因為子元素需要換行 */
    margin: 10px 5%;
}

.interactive-label {
    -webkit-text-decoration: underline dotted #007bff;
            text-decoration: underline dotted #007bff; /* 使用藍色虛線底線 */
    text-underline-offset: 3px; /* 調整虛線與文字的距離 */
    text-decoration-thickness: 1.5px; /* 加粗虛線 */
    cursor: help; /* 顯示滑鼠指標為問號 */
    color: inherit; /* 保持文字顏色不變 */
}

/* 新增情緒文字顏色 */
/* 更新：使用英文鍵名 */
.analysis-value.sentiment-extremeFear {
  color: #143829; /* 極度恐懼 - 深綠色 */
}

.analysis-value.sentiment-fear {
  color: #2B5B3F; /* 恐懼 - 綠色 */
}

.analysis-value.sentiment-neutral {
  color: #E9972D; /* 中性 - 黃色 */
}

.analysis-value.sentiment-greed {
  color: #C4501B; /* 貪婪 - 橘色 */
}

.analysis-value.sentiment-extremeGreed {
  color: #A0361B; /* 極度貪婪 - 紅色 */
}

/* CSS Variables for EmotionTag */
:root {
  --emotion-tag-size: 12px;
  --emotion-tag-pulse-size: 16px;
  --emotion-tag-border-radius: 6px;
  --emotion-tag-transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --emotion-tag-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  --emotion-tag-shadow-hover: 0 4px 16px rgba(0, 0, 0, 0.15);
  --emotion-tag-bg: rgba(255, 255, 255, 0.8);
  --emotion-tag-text: #1d1d1f;
}

/* Base EmotionTag Styles */
.emotion-tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 6px 8px;
  background: rgba(255, 255, 255, 0.8);
  background: var(--emotion-tag-bg);
  border-radius: 6px;
  border-radius: var(--emotion-tag-border-radius);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  box-shadow: var(--emotion-tag-shadow);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  transition: var(--emotion-tag-transition);
  position: relative;
  -webkit-backdrop-filter: blur(10px);
          backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  will-change: transform, opacity;
  transform: translateZ(0); /* Hardware acceleration */
  width: 100%; /* Take full width of container */
  min-width: 80px; /* Minimum width for consistency */
  max-width: 140px; /* Increased from 120px to 140px for longer text */
}

/* Clickable state */
.emotion-tag--clickable {
  cursor: pointer;
}

.emotion-tag--clickable:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
  box-shadow: var(--emotion-tag-shadow-hover);
}

.emotion-tag--clickable:focus {
  outline: 2px solid rgba(0, 123, 255, 0.5);
  outline-offset: 2px;
}

/* Active state */
.emotion-tag--active {
  transform: scale(1.02);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
  box-shadow: var(--emotion-tag-shadow-hover);
}

/* Loading state */
.emotion-tag--loading {
  opacity: 0.7;
  pointer-events: none;
}

/* Indicator Styles */
.emotion-tag__indicator {
  position: relative;
  width: 16px;
  width: var(--emotion-tag-pulse-size);
  height: 16px;
  height: var(--emotion-tag-pulse-size);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.emotion-tag__core {
  width: 12px;
  width: var(--emotion-tag-size);
  height: 12px;
  height: var(--emotion-tag-size);
  border-radius: 50%;
  position: relative;
  z-index: 2;
}

.emotion-tag__pulse {
  position: absolute;
  width: 16px;
  width: var(--emotion-tag-pulse-size);
  height: 16px;
  height: var(--emotion-tag-pulse-size);
  border-radius: 50%;
  opacity: 0.6;
  z-index: 1;
}

/* Content Styles */
.emotion-tag__content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  min-width: 0;
  flex: 1 1;
  text-align: center;
}

.emotion-tag__text {
  font-size: 0.75rem;
  font-weight: 600;
  color: #1d1d1f;
  color: var(--emotion-tag-text);
  white-space: nowrap;
  line-height: 1.2;
  overflow: visible; /* Changed from hidden to visible */
  text-overflow: clip; /* Changed from ellipsis to clip */
  max-width: 100%;
}

.emotion-tag__value {
  font-size: 0.7rem;
  font-weight: 500;
  opacity: 0.8;
  color: #1d1d1f;
  color: var(--emotion-tag-text);
  line-height: 1;
  display: none; /* Hide percentage value to avoid duplication */
}

/* Connection Line */
.emotion-tag__connection-line {
  position: absolute;
  right: -8px;
  top: 50%;
  width: 16px;
  height: 1px;
  background: currentColor;
  opacity: 0.3;
  transform: translateY(-50%);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  transition: var(--emotion-tag-transition);
}

.emotion-tag--active .emotion-tag__connection-line {
  opacity: 0.6;
  width: 20px;
}

/* Loading Overlay */
.emotion-tag__loading-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(255, 255, 255, 0.8);
  border-radius: 6px;
  border-radius: var(--emotion-tag-border-radius);
  display: flex;
  align-items: center;
  justify-content: center;
}

.emotion-tag__loading-spinner {
  width: 12px;
  height: 12px;
  border: 2px solid rgba(0, 0, 0, 0.1);
  border-left-color: rgba(0, 0, 0, 0.5);
  border-radius: 50%;
  animation: emotionTagSpin 1s linear infinite;
}

/* Animations */
@keyframes emotionTagFadeIn {
  0% {
    opacity: 0;
    transform: translateY(10px) scale(0.95);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes emotionPulse {
  0%, 100% {
    transform: scale(1);
    opacity: 0.6;
  }
  50% {
    transform: scale(1.2);
    opacity: 0.3;
  }
}

@keyframes valueUpdate {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.1);
  }
  100% {
    transform: scale(1);
  }
}

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

/* Apply fade-in animation */
.emotion-tag {
  animation: emotionTagFadeIn 0.6s ease-out forwards;
}

/* Apply pulse animation to pulse element */
.emotion-tag__pulse {
  animation: emotionPulse 3s ease-in-out infinite;
}

/* Sentiment-specific styles will be added in the next step */
/* S
entiment-specific Styles */

/* Extreme Fear */
.emotion-tag--extremeFear {
  --emotion-sentiment-color: #0000FF;
  --emotion-sentiment-glow: rgba(0, 0, 255, 0.3);
  --emotion-pulse-speed: 2s;
}

.emotion-tag--extremeFear .emotion-tag__core {
  background-color: var(--emotion-sentiment-color);
  box-shadow: 0 0 8px var(--emotion-sentiment-glow);
}

.emotion-tag--extremeFear .emotion-tag__pulse {
  background-color: var(--emotion-sentiment-color);
  animation-duration: var(--emotion-pulse-speed);
}

.emotion-tag--extremeFear .emotion-tag__text {
  color: var(--emotion-sentiment-color);
}

.emotion-tag--extremeFear .emotion-tag__connection-line {
  background-color: var(--emotion-sentiment-color);
}

/* Fear */
.emotion-tag--fear {
  --emotion-sentiment-color: #5B9BD5;
  --emotion-sentiment-glow: rgba(91, 155, 213, 0.3);
  --emotion-pulse-speed: 2.5s;
}

.emotion-tag--fear .emotion-tag__core {
  background-color: var(--emotion-sentiment-color);
  box-shadow: 0 0 6px var(--emotion-sentiment-glow);
}

.emotion-tag--fear .emotion-tag__pulse {
  background-color: var(--emotion-sentiment-color);
  animation-duration: var(--emotion-pulse-speed);
}

.emotion-tag--fear .emotion-tag__text {
  color: var(--emotion-sentiment-color);
}

.emotion-tag--fear .emotion-tag__connection-line {
  background-color: var(--emotion-sentiment-color);
}

/* Neutral */
.emotion-tag--neutral {
  --emotion-sentiment-color: #708090;
  --emotion-sentiment-glow: rgba(112, 128, 144, 0.3);
  --emotion-pulse-speed: 3s;
}

.emotion-tag--neutral .emotion-tag__core {
  background-color: var(--emotion-sentiment-color);
  box-shadow: 0 0 4px var(--emotion-sentiment-glow);
}

.emotion-tag--neutral .emotion-tag__pulse {
  background-color: var(--emotion-sentiment-color);
  animation-duration: var(--emotion-pulse-speed);
}

.emotion-tag--neutral .emotion-tag__text {
  color: var(--emotion-sentiment-color);
}

.emotion-tag--neutral .emotion-tag__connection-line {
  background-color: var(--emotion-sentiment-color);
}

/* Greed */
.emotion-tag--greed {
  --emotion-sentiment-color: #F0B8CE;
  --emotion-sentiment-glow: rgba(240, 184, 206, 0.3);
  --emotion-pulse-speed: 2.5s;
}

.emotion-tag--greed .emotion-tag__core {
  background-color: var(--emotion-sentiment-color);
  box-shadow: 0 0 6px var(--emotion-sentiment-glow);
}

.emotion-tag--greed .emotion-tag__pulse {
  background-color: var(--emotion-sentiment-color);
  animation-duration: var(--emotion-pulse-speed);
}

.emotion-tag--greed .emotion-tag__text {
  color: var(--emotion-sentiment-color);
}

.emotion-tag--greed .emotion-tag__connection-line {
  background-color: var(--emotion-sentiment-color);
}

/* Extreme Greed */
.emotion-tag--extremeGreed {
  --emotion-sentiment-color: #D24A93;
  --emotion-sentiment-glow: rgba(210, 74, 147, 0.3);
  --emotion-pulse-speed: 2s;
}

.emotion-tag--extremeGreed .emotion-tag__core {
  background-color: var(--emotion-sentiment-color);
  box-shadow: 0 0 8px var(--emotion-sentiment-glow);
}

.emotion-tag--extremeGreed .emotion-tag__pulse {
  background-color: var(--emotion-sentiment-color);
  animation-duration: var(--emotion-pulse-speed);
}

.emotion-tag--extremeGreed .emotion-tag__text {
  color: var(--emotion-sentiment-color);
}

.emotion-tag--extremeGreed .emotion-tag__connection-line {
  background-color: var(--emotion-sentiment-color);
}

/* Not Available */
.emotion-tag--notAvailable {
  --emotion-sentiment-color: #6c757d;
  --emotion-sentiment-glow: rgba(108, 117, 125, 0.2);
  --emotion-pulse-speed: none;
}

.emotion-tag--notAvailable .emotion-tag__core {
  background-color: var(--emotion-sentiment-color);
  box-shadow: 0 0 2px var(--emotion-sentiment-glow);
}

.emotion-tag--notAvailable .emotion-tag__pulse {
  background-color: var(--emotion-sentiment-color);
  animation: none; /* No pulse for not available */
}

.emotion-tag--notAvailable .emotion-tag__text {
  color: var(--emotion-sentiment-color);
}

.emotion-tag--notAvailable .emotion-tag__connection-line {
  background-color: var(--emotion-sentiment-color);
}

/* Enhanced animations for extreme states */
.emotion-tag--extremeFear .emotion-tag__pulse,
.emotion-tag--extremeGreed .emotion-tag__pulse {
  animation-name: emotionPulseIntense;
}

@keyframes emotionPulseIntense {
  0%, 100% {
    transform: scale(1);
    opacity: 0.8;
  }
  25% {
    transform: scale(1.3);
    opacity: 0.4;
  }
  50% {
    transform: scale(1.5);
    opacity: 0.2;
  }
  75% {
    transform: scale(1.3);
    opacity: 0.4;
  }
}

/* Hover effects for clickable tags */
.emotion-tag--clickable:hover .emotion-tag__pulse {
  animation-duration: calc(var(--emotion-pulse-speed) * 0.7);
}

.emotion-tag--clickable:hover .emotion-tag__core {
  transform: scale(1.1);
}

/* Value update animation trigger */
.emotion-tag__value--updating {
  animation: valueUpdate 0.6s ease-out;
}

/* Responsive Design */
@media (max-width: 1023px) {
  .emotion-tag {
    gap: 5px;
    padding: 5px 6px;
    min-width: 70px;
    max-width: 120px; /* Increased for tablets */
  }
  
  .emotion-tag__text {
    font-size: 0.7rem;
  }
  
  /* Hide connection line on tablets and mobile */
  .emotion-tag__connection-line {
    display: none;
  }
}

@media (max-width: 767px) {
  .emotion-tag {
    gap: 4px;
    padding: 4px 6px;
    min-width: 60px;
    max-width: 105px; /* Increased for mobile */
  }
  
  :root {
    --emotion-tag-size: 10px;
    --emotion-tag-pulse-size: 14px;
  }
  
  .emotion-tag__text {
    font-size: 0.65rem;
  }
  
  /* Reduce animation intensity on mobile */
  .emotion-tag__pulse {
    animation-duration: calc(var(--emotion-pulse-speed) * 1.5);
  }
}

@media (max-width: 430px) {
  .emotion-tag {
    min-width: 55px;
    max-width: 95px; /* Increased for small mobile */
    padding: 3px 5px;
  }
  
  .emotion-tag__text {
    font-size: 0.6rem;
  }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
  .emotion-tag,
  .emotion-tag * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  
  .emotion-tag__pulse {
    animation: none !important;
  }
  
  .emotion-tag--clickable:hover {
    transform: none;
  }
}

/* Dark theme support (if needed) */
[data-theme="dark"] .emotion-tag {
  --emotion-tag-bg: rgba(0, 0, 0, 0.6);
  --emotion-tag-text: rgba(255, 255, 255, 0.9);
  --emotion-tag-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  border-color: rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .emotion-tag__loading-overlay {
  background: rgba(0, 0, 0, 0.8);
}

[data-theme="dark"] .emotion-tag__loading-spinner {
  border-color: rgba(255, 255, 255, 0.1);
  border-left-color: rgba(255, 255, 255, 0.5);
}
.rc-slider {
  position: relative;
  width: 100%;
  height: 14px;
  padding: 5px 0;
  border-radius: 6px;
  touch-action: none;
  box-sizing: border-box;
  -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
}
.rc-slider * {
  box-sizing: border-box;
  -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
}
.rc-slider-rail {
  position: absolute;
  width: 100%;
  height: 4px;
  background-color: #e9e9e9;
  border-radius: 6px;
}
.rc-slider-track,
.rc-slider-tracks {
  position: absolute;
  height: 4px;
  background-color: #abe2fb;
  border-radius: 6px;
}
.rc-slider-track-draggable {
  z-index: 1;
  box-sizing: content-box;
  background-clip: content-box;
  border-top: 5px solid rgba(0, 0, 0, 0);
  border-bottom: 5px solid rgba(0, 0, 0, 0);
  transform: translateY(-5px);
}
.rc-slider-handle {
  position: absolute;
  z-index: 1;
  width: 14px;
  height: 14px;
  margin-top: -5px;
  background-color: #fff;
  border: solid 2px #96dbfa;
  border-radius: 50%;
  cursor: pointer;
  cursor: grab;
  opacity: 0.8;
  -webkit-user-select: none;
          user-select: none;
  touch-action: pan-x;
}
.rc-slider-handle-dragging.rc-slider-handle-dragging.rc-slider-handle-dragging {
  border-color: #57c5f7;
  box-shadow: 0 0 0 5px #96dbfa;
}
.rc-slider-handle-dragging.rc-slider-handle-dragging.rc-slider-handle-dragging-delete {
  opacity: 0;
}
.rc-slider-handle:focus {
  outline: none;
  box-shadow: none;
}
.rc-slider-handle:focus-visible {
  border-color: #2db7f5;
  box-shadow: 0 0 0 3px #96dbfa;
}
.rc-slider-handle-click-focused:focus {
  border-color: #96dbfa;
  box-shadow: none;
  box-shadow: initial;
}
.rc-slider-handle:hover {
  border-color: #57c5f7;
}
.rc-slider-handle:active {
  border-color: #57c5f7;
  box-shadow: 0 0 5px #57c5f7;
  cursor: grabbing;
}
.rc-slider-mark {
  position: absolute;
  top: 18px;
  left: 0;
  width: 100%;
  font-size: 12px;
}
.rc-slider-mark-text {
  position: absolute;
  display: inline-block;
  color: #999;
  text-align: center;
  vertical-align: middle;
  cursor: pointer;
}
.rc-slider-mark-text-active {
  color: #666;
}
.rc-slider-step {
  position: absolute;
  width: 100%;
  height: 4px;
  background: transparent;
}
.rc-slider-dot {
  position: absolute;
  bottom: -2px;
  width: 8px;
  height: 8px;
  vertical-align: middle;
  background-color: #fff;
  border: 2px solid #e9e9e9;
  border-radius: 50%;
  cursor: pointer;
}
.rc-slider-dot-active {
  border-color: #96dbfa;
}
.rc-slider-dot-reverse {
  margin-right: -4px;
}
.rc-slider-disabled {
  background-color: #e9e9e9;
}
.rc-slider-disabled .rc-slider-track {
  background-color: #ccc;
}
.rc-slider-disabled .rc-slider-handle,
.rc-slider-disabled .rc-slider-dot {
  background-color: #fff;
  border-color: #ccc;
  box-shadow: none;
  cursor: not-allowed;
}
.rc-slider-disabled .rc-slider-mark-text,
.rc-slider-disabled .rc-slider-dot {
  cursor: not-allowed !important;
}
.rc-slider-vertical {
  width: 14px;
  height: 100%;
  padding: 0 5px;
}
.rc-slider-vertical .rc-slider-rail {
  width: 4px;
  height: 100%;
}
.rc-slider-vertical .rc-slider-track {
  bottom: 0;
  left: 5px;
  width: 4px;
}
.rc-slider-vertical .rc-slider-track-draggable {
  border-top: 0;
  border-right: 5px solid rgba(0, 0, 0, 0);
  border-bottom: 0;
  border-left: 5px solid rgba(0, 0, 0, 0);
  transform: translateX(-5px);
}
.rc-slider-vertical .rc-slider-handle {
  position: absolute;
  z-index: 1;
  margin-top: 0;
  margin-left: -5px;
  touch-action: pan-y;
}
.rc-slider-vertical .rc-slider-mark {
  top: 0;
  left: 18px;
  height: 100%;
}
.rc-slider-vertical .rc-slider-step {
  width: 4px;
  height: 100%;
}
.rc-slider-vertical .rc-slider-dot {
  margin-left: -2px;
}
.rc-slider-tooltip-zoom-down-enter,
.rc-slider-tooltip-zoom-down-appear {
  display: block !important;
  animation-duration: 0.3s;
  animation-fill-mode: both;
  animation-play-state: paused;
}
.rc-slider-tooltip-zoom-down-leave {
  display: block !important;
  animation-duration: 0.3s;
  animation-fill-mode: both;
  animation-play-state: paused;
}
.rc-slider-tooltip-zoom-down-enter.rc-slider-tooltip-zoom-down-enter-active,
.rc-slider-tooltip-zoom-down-appear.rc-slider-tooltip-zoom-down-appear-active {
  animation-name: rcSliderTooltipZoomDownIn;
  animation-play-state: running;
}
.rc-slider-tooltip-zoom-down-leave.rc-slider-tooltip-zoom-down-leave-active {
  animation-name: rcSliderTooltipZoomDownOut;
  animation-play-state: running;
}
.rc-slider-tooltip-zoom-down-enter,
.rc-slider-tooltip-zoom-down-appear {
  transform: scale(0, 0);
  animation-timing-function: cubic-bezier(0.23, 1, 0.32, 1);
}
.rc-slider-tooltip-zoom-down-leave {
  animation-timing-function: cubic-bezier(0.755, 0.05, 0.855, 0.06);
}
@keyframes rcSliderTooltipZoomDownIn {
  0% {
    transform: scale(0, 0);
    transform-origin: 50% 100%;
    opacity: 0;
  }
  100% {
    transform: scale(1, 1);
    transform-origin: 50% 100%;
  }
}
@keyframes rcSliderTooltipZoomDownOut {
  0% {
    transform: scale(1, 1);
    transform-origin: 50% 100%;
  }
  100% {
    transform: scale(0, 0);
    transform-origin: 50% 100%;
    opacity: 0;
  }
}
.rc-slider-tooltip {
  position: absolute;
  top: -9999px;
  left: -9999px;
  visibility: visible;
  box-sizing: border-box;
  -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
}
.rc-slider-tooltip * {
  box-sizing: border-box;
  -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
}
.rc-slider-tooltip-hidden {
  display: none;
}
.rc-slider-tooltip-placement-top {
  padding: 4px 0 8px 0;
}
.rc-slider-tooltip-inner {
  min-width: 24px;
  height: 24px;
  padding: 6px 2px;
  color: #fff;
  font-size: 12px;
  line-height: 1;
  text-align: center;
  text-decoration: none;
  background-color: #6c6c6c;
  border-radius: 6px;
  box-shadow: 0 0 4px #d9d9d9;
}
.rc-slider-tooltip-arrow {
  position: absolute;
  width: 0;
  height: 0;
  border-color: transparent;
  border-style: solid;
}
.rc-slider-tooltip-placement-top .rc-slider-tooltip-arrow {
  bottom: 4px;
  left: 50%;
  margin-left: -4px;
  border-width: 4px 4px 0;
  border-top-color: #6c6c6c;
}

.announcement-bar {
  /* 蘋果風格毛玻璃背景 */
  background: linear-gradient(135deg,
      rgba(0, 122, 255, 0.08) 0%,
      rgba(88, 86, 214, 0.06) 50%,
      rgba(255, 45, 85, 0.04) 100%),
    rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);

  /* 現代化邊框與陰影 - 覆蓋模式需要更明顯的陰影 */
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow:
    0 12px 40px rgba(0, 0, 0, 0.08),
    0 6px 20px rgba(0, 0, 0, 0.04),
    0 2px 8px rgba(0, 0, 0, 0.02),
    inset 0 1px 0 rgba(255, 255, 255, 0.5);

  /* 佈局與間距 - 固定在 top-nav 下方，覆蓋在頁面內容上 */
  padding: 20px 6px 1px 20px;
  position: fixed;
  top: 50px;
  /* top-nav 的高度 */
  left: 0;
  right: 0;
  z-index: 998;
  /* 比 top-nav (999) 稍低，但高於頁面內容，實現覆蓋效果 */
  overflow: hidden;

  /* 字體與顏色 */
  color: #1d1d1f;
  font-size: 0.875rem;
  font-weight: 500;
  line-height: 1.4;

  /* 流暢過渡效果 */
  transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* 關閉動畫 */
.announcement-bar.closing {
  opacity: 0;
  transform: translateY(-100%);
  transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.announcement-content {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 12px 60px 8px 20px;
  /* 上下內邊距，右側為關閉按鈕預留空間 */
  width: 100%;
  box-sizing: border-box;
}

.announcement-message {
  margin: 0;
  padding: 0;
  /* 更溫和的換行策略 */
  word-wrap: break-word;
  word-break: normal;
  /* 改為 normal，避免強制在任意字符間換行 */
  overflow-wrap: break-word;
  /* 現代化的屬性，只在必要時換行 */
  white-space: normal;
  /* 允許換行 */
  line-height: 1.4;
  text-align: center;

  /* 現代化字體樣式 */
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica Neue', Arial, sans-serif;
  letter-spacing: -0.01em;

  /* 確保 emoji 和文字在同一行 */
  display: block;
}

.announcement-close {
  /* 蘋果風格按鈕設計 */
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: 50%;

  /* 尺寸與位置 */
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: absolute;
  right: 16px;
  top: 70%;
  transform: translateY(-50%);
  z-index: 100;

  /* 字體與顏色 */
  color: #6e6e73;
  font-size: 16px;
  font-weight: 300;
  line-height: 1;

  /* 互動效果 */
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.25, 0.46, 0.45, 0.94);

  /* 陰影效果 */
  box-shadow:
    0 2px 8px rgba(0, 0, 0, 0.08),
    0 1px 4px rgba(0, 0, 0, 0.04);
}

.announcement-close:hover {
  background: rgba(255, 255, 255, 1);
  color: #1d1d1f;
  transform: translateY(-50%) scale(1.05);
  box-shadow:
    0 4px 16px rgba(0, 0, 0, 0.12),
    0 2px 8px rgba(0, 0, 0, 0.08);
}

.announcement-close:active {
  transform: translateY(-50%) scale(0.95);
  transition-duration: 0.1s;
}

/* 移除所有跑馬燈動畫 - 使用靜態顯示和自動換行 */

/* 淡入動畫 */
@keyframes fadeInSlide {
  0% {
    opacity: 0;
    transform: translateY(-20px);
  }

  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

.announcement-bar {
  animation: fadeInSlide 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* 懸停時增強視覺效果 */
.announcement-bar:hover {
  background: linear-gradient(135deg,
      rgba(0, 122, 255, 0.12) 0%,
      rgba(88, 86, 214, 0.08) 50%,
      rgba(255, 45, 85, 0.06) 100%),
    rgba(255, 255, 255, 0.98);
  box-shadow:
    0 12px 40px rgba(0, 0, 0, 0.06),
    0 6px 20px rgba(0, 0, 0, 0.04),
    inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

/* 響應式設計優化 */
@media (max-width: 768px) {
  .announcement-bar {
    font-size: 0.85rem;
    top: 50px;
    /* 保持固定在 top-nav 下方，覆蓋在內容上 */
    left: 8px;
    right: 8px;
    border-radius: 8px;
    /* 稍微減少圓角 */

    /* 移動端毛玻璃效果調整 */
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
  }

  .announcement-content {
    padding: 10px 40px 10px 12px;
    /* 調整內邊距適應小螢幕 */
  }

  .announcement-close {
    width: 24px;
    height: 24px;
    right: 8px;
    font-size: 14px;
  }

  .announcement-message {
    line-height: 1.5;
    /* 增加行高提高可讀性 */
    /* 手機版特殊處理：確保 emoji 和文字不會意外換行 */
    word-break: keep-all;
    /* 保持單詞完整 */
    overflow-wrap: anywhere;
    /* 只在絕對必要時才換行 */
    -webkit-hyphens: none;
            hyphens: none;
    /* 禁用連字符 */
  }
}

/* Emoji 和文字組合優化 */
.announcement-message {
  /* 防止 emoji 和緊隨其後的文字分離 */
  text-rendering: optimizeLegibility;
  font-feature-settings: "liga" 1, "kern" 1;
}

/* URL 連結樣式 */
.announcement-link {
  color: #007AFF;
  text-decoration: none;
  font-weight: 500;
  border-bottom: 1px solid transparent;
  transition: all 0.2s cubic-bezier(0.25, 0.46, 0.45, 0.94);

  /* 確保連結在公告欄中不會換行 */
  white-space: nowrap;
  display: inline;
}

.announcement-link:hover {
  color: #0051D5;
  border-bottom-color: #007AFF;
  text-decoration: none;
}

.announcement-link:active {
  color: #003D99;
  transform: scale(0.98);
}

/* 在深色模式下的連結樣式 */
@media (prefers-color-scheme: dark) {
  .announcement-link {
    color: #409CFF;
  }

  .announcement-link:hover {
    color: #66B3FF;
    border-bottom-color: #409CFF;
  }

  .announcement-link:active {
    color: #80CCFF;
  }

  /* 深色模式下保持簡潔 - 省略號已經足夠暗示 */
}

/* 包含連結的公告訊息特殊處理 */
.announcement-message.announcement-has-links {
  /* 確保連結和文字的間距合適 */
  word-spacing: 0.1em;

  /* 在移動端允許連結換行 */
  @media (max-width: 768px) {
    white-space: normal;
    word-break: break-word;
  }
}

/* 連結在小螢幕上的特殊處理 */
@media (max-width: 768px) {
  .announcement-link {
    /* 在小螢幕上允許連結換行 */
    white-space: normal;
    word-break: break-all;

    /* 增加觸控區域 */
    padding: 2px 0;
    margin: -2px 0;
  }
}

@media (max-width: 480px) {
  .announcement-link {
    /* 超小螢幕上的連結樣式 */
    font-size: 0.9em;
    line-height: 1.4;
  }
}

/* 針對包含 emoji 的內容進行特殊處理 */
.announcement-message.announcement-has-emoji {
  /* 在手機版上，如果內容包含 emoji，使用更保守的換行策略 */
  white-space: pre-line;
  /* 保留換行但允許自動換行 */
  word-spacing: -0.1em;
  /* 稍微減少詞間距 */
}

@media (max-width: 768px) {
  .announcement-message.announcement-has-emoji:not(.announcement-expandable) {
    /* 手機版的 emoji 內容處理 - 但不包括可展開的公告 */
    word-break: normal;
    overflow-wrap: normal;
    white-space: nowrap;
    /* 嘗試保持單行 */
    overflow: hidden;
    text-overflow: ellipsis;
    /* 如果太長則顯示省略號 */
  }

  /* 如果內容不是太長，允許顯示完整內容 */
  .announcement-message.announcement-has-emoji.announcement-short-content {
    white-space: normal;
    overflow: visible;
    text-overflow: initial;
  }

  /* 可展開的公告不使用 CSS 省略符號，改用 JavaScript 控制 */
  .announcement-message.announcement-expandable {
    white-space: normal;
    overflow: visible;
    text-overflow: initial;
  }
}

/* 可展開公告樣式 - 簡潔的點擊提示 */
.announcement-message.announcement-expandable {
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  position: relative;
}

/* 桌面端懸停效果 */
@media (hover: hover) and (pointer: fine) {
  .announcement-message.announcement-expandable:hover {
    opacity: 0.8;
    transform: translateY(-1px);
  }
}

.announcement-message.announcement-expandable:active {
  transform: scale(0.98);
  transition-duration: 0.1s;
}

/* 超小螢幕優化 */
@media (max-width: 480px) {
  .announcement-bar {
    font-size: 0.8rem;
    top: 50px;
    /* 保持固定在 top-nav 下方，覆蓋在內容上 */
    left: 6px;
    right: 6px;
    border-radius: 6px;
  }

  .announcement-content {
    padding: 12px 40px 12px 12px;
    /* 為關閉按鈕預留空間 */
  }

  .announcement-close {
    width: 22px;
    height: 22px;
    right: 6px;
    top: 30px;
    transform: none; /* 重置桌面版的 transform */
    font-size: 13px;
  }

  .announcement-message {
    line-height: 1.6;
    /* 小螢幕上更大的行高 */
    word-break: keep-all;
    overflow-wrap: anywhere;
    -webkit-hyphens: none;
            hyphens: none;
    /* 確保 emoji 和數字緊密相連 */
    font-feature-settings: "tnum";
    font-variant-numeric: tabular-nums;
    /* 統一數字寬度 */
  }

  /* 移動端簡化樣式 - 省略號已經足夠暗示可點擊 */
}
/* 公告對話框樣式 */
.announcement-modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  padding: 20px;
  animation: announcementModalFadeIn 0.2s ease-out;
}

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

.announcement-modal {
  background: linear-gradient(135deg,
      rgba(255, 255, 255, 0.95) 0%,
      rgba(255, 255, 255, 0.9) 100%);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 16px;
  box-shadow:
    0 20px 60px rgba(0, 0, 0, 0.15),
    0 8px 30px rgba(0, 0, 0, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.6);
  
  max-width: 90vw;
  max-height: 80vh;
  width: 100%;
  max-width: 480px;
  display: flex;
  flex-direction: column;
  
  animation: announcementModalSlideUp 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  transform-origin: center bottom;
}

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

/* 對話框標題區域 */
.announcement-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px 16px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.announcement-modal-title {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 600;
  color: #1d1d1f;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica Neue', Arial, sans-serif;
}

.announcement-modal-close {
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: 50%;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  color: #6e6e73;
  font-size: 18px;
  font-weight: 300;
  line-height: 1;
  
  box-shadow:
    0 2px 8px rgba(0, 0, 0, 0.08),
    0 1px 4px rgba(0, 0, 0, 0.04);
}

.announcement-modal-close:hover {
  background: rgba(255, 255, 255, 1);
  color: #1d1d1f;
  transform: scale(1.05);
  box-shadow:
    0 4px 16px rgba(0, 0, 0, 0.12),
    0 2px 8px rgba(0, 0, 0, 0.08);
}

.announcement-modal-close:active {
  transform: scale(0.95);
  transition-duration: 0.1s;
}

/* 對話框內容區域 */
.announcement-modal-content {
  flex: 1 1;
  padding: 20px 24px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.announcement-modal-message {
  margin: 0;
  font-size: 1rem;
  line-height: 1.6;
  color: #1d1d1f;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica Neue', Arial, sans-serif;
  word-wrap: break-word;
  word-break: normal;
  overflow-wrap: break-word;
}

/* 對話框中的連結樣式 */
.announcement-modal-link {
  color: #007AFF;
  text-decoration: none;
  font-weight: 500;
  border-bottom: 1px solid transparent;
  transition: all 0.2s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  word-break: break-all;
}

.announcement-modal-link:hover {
  color: #0051D5;
  border-bottom-color: #007AFF;
  text-decoration: none;
}

.announcement-modal-link:active {
  color: #003D99;
  transform: scale(0.98);
}

/* 對話框底部按鈕區域 */
.announcement-modal-footer {
  padding: 16px 24px 20px;
  border-top: 1px solid rgba(0, 0, 0, 0.08);
}

.announcement-modal-btn {
  width: 100%;
  background: linear-gradient(135deg, #007AFF 0%, #0051D5 100%);
  border: none;
  border-radius: 12px;
  padding: 14px 20px;
  font-size: 1rem;
  font-weight: 600;
  color: white;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica Neue', Arial, sans-serif;
  
  box-shadow:
    0 4px 16px rgba(0, 122, 255, 0.3),
    0 2px 8px rgba(0, 122, 255, 0.2);
}

.announcement-modal-btn:hover {
  background: linear-gradient(135deg, #0051D5 0%, #003D99 100%);
  transform: translateY(-1px);
  box-shadow:
    0 6px 20px rgba(0, 122, 255, 0.4),
    0 4px 12px rgba(0, 122, 255, 0.3);
}

.announcement-modal-btn:active {
  transform: translateY(0);
  transition-duration: 0.1s;
  box-shadow:
    0 2px 8px rgba(0, 122, 255, 0.3),
    0 1px 4px rgba(0, 122, 255, 0.2);
}

/* 響應式設計 */
@media (max-width: 480px) {
  .announcement-modal-backdrop {
    padding: 16px;
  }
  
  .announcement-modal {
    border-radius: 12px;
    max-height: 85vh;
  }
  
  .announcement-modal-header {
    padding: 16px 20px 12px;
  }
  
  .announcement-modal-title {
    font-size: 1rem;
  }
  
  .announcement-modal-close {
    width: 28px;
    height: 28px;
    font-size: 16px;
  }
  
  .announcement-modal-content {
    padding: 16px 20px;
  }
  
  .announcement-modal-message {
    font-size: 0.95rem;
    line-height: 1.5;
  }
  
  .announcement-modal-footer {
    padding: 12px 20px 16px;
  }
  
  .announcement-modal-btn {
    padding: 12px 16px;
    font-size: 0.95rem;
  }
}

/* 深色模式支援 */
@media (prefers-color-scheme: dark) {
  .announcement-modal {
    background: linear-gradient(135deg,
        rgba(28, 28, 30, 0.95) 0%,
        rgba(28, 28, 30, 0.9) 100%);
    border-color: rgba(255, 255, 255, 0.1);
  }
  
  .announcement-modal-title,
  .announcement-modal-message {
    color: #f2f2f7;
  }
  
  .announcement-modal-header,
  .announcement-modal-footer {
    border-color: rgba(255, 255, 255, 0.1);
  }
  
  .announcement-modal-close {
    background: rgba(58, 58, 60, 0.8);
    border-color: rgba(255, 255, 255, 0.1);
    color: #8e8e93;
  }
  
  .announcement-modal-close:hover {
    background: rgba(58, 58, 60, 1);
    color: #f2f2f7;
  }
  
  .announcement-modal-link {
    color: #409CFF;
  }
  
  .announcement-modal-link:hover {
    color: #66B3FF;
    border-bottom-color: #409CFF;
  }
  
  .announcement-modal-link:active {
    color: #80CCFF;
  }
}
.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);
    }
} 
.about-page {
  display: flex;
  justify-content: center;
  padding: 20px 20px;
  padding: var(--space-l, 20px) var(--space-m, 20px);
  background-color: #f0f2f5;
  background-color: var(--color-bg-page, #f0f2f5);
}

.about-container {
  width: 90%;
  max-width: 1000px;
  background-color: #fff;
  background-color: var(--color-bg-card, #fff);
  padding: 20px;
  padding: var(--space-l, 20px);
  border-radius: 12px;
  border-radius: var(--border-radius-large, 12px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
  box-shadow: var(--shadow-m, 0 5px 15px rgba(0, 0, 0, 0.05));
  flex-direction: column;
  gap: 10px;
  gap: var(--space-m, 10px);
  margin-top: 32px;
  margin-top: var(--space-xl, 32px);
  margin-bottom: 32px;
  margin-bottom: var(--space-xl, 32px);
}

.about-image {
  width: 100%;
  height: auto;
  overflow: hidden;
  border-radius: 12px;
  margin-bottom: 5px;
  box-shadow: 0 3px 7px rgba(0, 0, 0, 0.03);
}

.about-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease-in-out;
}

.about-image:hover img {
  transform: scale(1.05);
}

.about-title {
  border-bottom: none;
}

.about-content {
  max-width: 800px;
  margin: 0 auto;
}

.about-title {
  font-size: 2.2em;
  color: #e67e22;
  margin-bottom: 20px;
  margin-top: 0px;
  text-align: center;
}

.about-text {
  font-size: 1.1em;
  line-height: 1.7;
  color: #555;
  margin-bottom: 25px;
}

.about-section {
  margin-bottom: 40px;
}

.about-section h2 {
  font-size: 1.6em;
  color: #3498db;
  margin-bottom: 20px;
  font-weight: 600;
  text-align: center;
}

.about-section p {
  margin-bottom: 20px;
}

.contact-section {
  margin-top: 30px;
  text-align: center;
}

.contact-section h2 {
  font-size: 1.6em;
  color: #3498db;
  margin-bottom: 20px;
  font-weight: 600;
}

.contact-info {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.contact-icon {
  font-size: 1.5em;
  color: #3498db;
  color: var(--accent-color-blue, #3498db);
}

.contact-info a {
  color: #3498db;
  color: var(--accent-color-blue, #3498db);
  text-decoration: none;
}

.contact-info a:hover {
  text-decoration: underline;
}

/* 響應式設計 */
@media (max-width: 768px) {
  .about-page {
    padding: 20px;
  }

  .about-title {
    font-size: 2rem;
  }

  .about-section h2 {
    font-size: 1.5rem;
  }

  .about-text {
    font-size: 1rem;
  }

  .about-image {
    max-height: 400px;
    height: 180px;
    
  }
}

@media (min-width: 1024px) {
  .about-image {
    height: 400px;
    overflow: hidden;
    border-radius: 12px;
  }
} 
.legal-page {
  max-width: 1000px;
  margin: 0 auto;
  padding: 40px 20px;
  padding: var(--space-xl, 40px) var(--space-m, 20px);
  color: #333;
  color: var(--color-text-primary, #333);
  background-color: #f9f9f9;
  background-color: var(--color-bg-page, #f9f9f9);
}

.legal-title {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 2rem;
  margin-bottom: var(--space-xl, 2rem);
  color: #1a1a1a;
  color: var(--color-text-primary, #1a1a1a);
  text-align: center;
}

.legal-section {
  margin-bottom: 4rem;
  margin-bottom: var(--space-xl, 4rem);
  background-color: #ffffff;
  background-color: var(--color-bg-card, #ffffff);
  padding: 20px;
  padding: var(--space-l, 20px);
  border-radius: 12px;
  border-radius: var(--border-radius-large, 12px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
  box-shadow: var(--shadow-m, 0 5px 15px rgba(0, 0, 0, 0.05));
}

.section-title {
  font-size: 2rem;
  font-weight: 600;
  margin-bottom: 2rem;
  margin-bottom: var(--space-l, 2rem);
  color: #2a2a2a;
  color: var(--color-text-primary, #2a2a2a);
  padding-bottom: 0.5rem;
  padding-bottom: var(--space-s, 0.5rem);
  border-bottom: 2px solid #eaeaea;
  border-bottom: 2px solid var(--color-border-divider, #eaeaea);
}

.subsection {
  margin-bottom: 2rem;
  margin-bottom: var(--space-l, 2rem);
  padding: 20px;
  padding: var(--space-m, 20px);
}

.subsection-title {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 1rem;
  margin-bottom: var(--space-m, 1rem);
  color: #3a3a3a;
  color: var(--color-text-primary, #3a3a3a);
}

.subsection-content {
  margin-bottom: 1rem;
  margin-bottom: var(--space-m, 1rem);
  line-height: 1.8;
  color: #555;
  color: var(--color-text-secondary, #555);
}

.legal-list {
  list-style-type: disc;
  padding-left: 1.5rem;
  margin: 1rem 0;
}

.legal-list li {
  margin-bottom: 0.8rem;
  margin-bottom: var(--space-s, 0.8rem);
  line-height: 1.6;
  color: #555;
  color: var(--color-text-secondary, #555);
}

/* Markdown 渲染器樣式 */
.legal-intro {
  text-align: center;
  margin-bottom: 2rem;
  margin-bottom: var(--space-xl, 2rem);
  padding: 20px;
  padding: var(--space-m, 20px);
  background-color: #ffffff;
  background-color: var(--color-bg-card, #ffffff);
  border-radius: 12px;
  border-radius: var(--border-radius-large, 12px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
  box-shadow: var(--shadow-m, 0 5px 15px rgba(0, 0, 0, 0.05));
}

.legal-last-updated {
  color: #666;
  color: var(--color-text-secondary, #666);
  font-size: 0.9rem;
  line-height: 1.6;
}

.markdown-content {
  background-color: #ffffff;
  background-color: var(--color-bg-card, #ffffff);
  padding: 40px;
  padding: var(--space-xl, 40px);
  border-radius: 12px;
  border-radius: var(--border-radius-large, 12px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
  box-shadow: var(--shadow-m, 0 5px 15px rgba(0, 0, 0, 0.05));
}

.markdown-loading,
.markdown-error {
  text-align: center;
  padding: 40px;
  padding: var(--space-xl, 40px);
  background-color: #ffffff;
  background-color: var(--color-bg-card, #ffffff);
  border-radius: 12px;
  border-radius: var(--border-radius-large, 12px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
  box-shadow: var(--shadow-m, 0 5px 15px rgba(0, 0, 0, 0.05));
}

.loading-spinner {
  color: #666;
  color: var(--color-text-secondary, #666);
  font-size: 1.1rem;
}

.markdown-error p {
  color: #e74c3c;
  color: var(--color-error, #e74c3c);
  font-weight: 500;
}

/* Markdown 內容樣式 */
.markdown-content .legal-paragraph {
  margin-bottom: 1rem;
  margin-bottom: var(--space-m, 1rem);
  line-height: 1.8;
  color: #555;
  color: var(--color-text-secondary, #555);
}

.markdown-content .legal-strong {
  font-weight: 600;
  color: #333;
  color: var(--color-text-primary, #333);
}

.markdown-content .legal-list-item {
  margin-bottom: 0.8rem;
  margin-bottom: var(--space-s, 0.8rem);
  line-height: 1.6;
  color: #555;
  color: var(--color-text-secondary, #555);
}

/* 響應式設計 */
@media (max-width: 768px) {
  .legal-page {
    padding: 20px;
  }

  .legal-title {
    font-size: 2rem;
  }

  .section-title {
    font-size: 1.8rem;
  }

  .subsection-title {
    font-size: 1.3rem;
  }

  .subsection {
    padding: 15px;
  }

  .markdown-content {
    padding: 20px;
    padding: var(--space-l, 20px);
  }

  .legal-intro {
    padding: 15px;
    padding: var(--space-s, 15px);
  }
}
/* 引入 Loading 樣式 */

/* 容器樣式 */
.watchlist-container {
    padding: 20px;
    max-width: 1200px;
    margin: 0 auto;
}

/* 標題區域 */
.watchlist-header {
    display: none;
}

/* 操作按鈕容器 */
.category-operations {
    position: absolute;
    right: 16px;
    top: 8px;
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
}

/* 所有圓形按鈕的共用基礎樣式 */
.category-operations button {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    background-color: #f3f4f6;
    color: #666;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* 添加按鈕特殊樣式 */
.category-operations .add-stock-button {
    background-color: #f3f4f6;
    color: #666;
}

/* 按鈕懸浮效果 */
.category-operations button:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.category-operations .add-stock-button:hover {
    background-color: #3b82f6;
    color: white;
}

.category-operations .edit-mode-button:hover {
    background-color: #dc2626;
    color: white;
}

/* 移除舊的編輯模式相關樣式 */
.category-operations .edit-mode-button,
.category-operations .edit-mode-button.active {
    display: none;
}

/* 分類區塊 */
.watchlist-category {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
    padding: 16px;
}

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

.category-header h2 {
    margin: 0;
    font-size: 18px;
    color: #333;
}

.category-actions {
    display: flex;
    gap: 8px;
    align-items: center;
}

/* 編輯和刪除按鈕 */
.edit-category-button,
.delete-category-button {
    padding: 4px 8px;
    border: none;
    background: none;
    cursor: pointer;
    font-size: 16px;
    color: #666;
    transition: color 0.2s;
}

.edit-category-button:hover {
    color: #1a73e8;
}

.delete-category-button:hover {
    color: #dc3545;
}

/* 表格容器 - 基礎樣式 */
.stock-list {
    display: grid;
    grid-template-columns: 1fr !important;
    grid-gap: 10px;
    gap: 10px;
    padding: 0;
    border: none;
    border-radius: 0;
    overflow: hidden;
    max-width: 100%;
}

/* Logo 容器樣式 */
.stock-logo {
    width: 32px;
    height: 32px;
    min-width: 32px;
    border-radius: 50%;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #f3f4f6;
}

/* Logo 圖片樣式 */
.stock-logo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* 預設 Logo 樣式 */
.default-logo {
    width: 32px;
    height: 32px;
    min-width: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #f3f4f6;
    color: #666;
    font-weight: 500;
}

/* 台股和美股 ETF 的特殊 Logo 樣式 */
.default-logo.tw-stock,
.default-logo.us-etf {
    width: 32px;
    height: 32px;
    min-width: 32px;
    border-radius: 50%;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: transparent;
}

/* 國旗圖標樣式 */
.flag-icon {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* 股票代碼樣式 */
.watchlist-stock-symbol {
    font-size: 1.1em;
    font-weight: 600;
    color: #1f2937;
}


/* 響應式調整 */
@media (max-width: 1200px) {
    .stock-list {
        grid-template-columns: 1fr !important;
        padding: 0;
        gap: 10px;
    }
}

@media (max-width: 640px) {
    .stock-list {
        grid-template-columns: 1fr !important;
        padding: 0;
        gap: 10px;
    }
    
    .watchlist-container {
        padding: 1px;
    }
    
    .category-content {
        padding: 8px;
    }
}

/* 空狀態 */
.empty-state {
    text-align: center;
    padding: 40px;
    color: #666;
}

.empty-state p {
    margin-bottom: 16px;
}

/* 錯誤狀態 */
.error-container {
    padding: 16px;
    color: #dc3545;
    text-align: center;
}

/* 響應式設計 */
@media (max-width: 768px) {
    .watchlist-header {
        flex-direction: column;
        gap: 12px;
        align-items: stretch;
    }

    .stock-list {
        grid-template-columns: 1fr;
    }

    .category-header {
        flex-direction: column;
        gap: 12px;
    }

    .category-actions {
        width: 100%;
        justify-content: flex-end;
    }
}

.category-tabs {
    display: flex;
    overflow-x: auto;
    border-bottom: 1px solid #ddd;
    margin-bottom: 20px;
}

.category-tab {
    padding: 10px 20px;
    border: none;
    background: none;
    cursor: pointer;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 8px;
    position: relative;
}

.category-tab.active {
    border-bottom: 2px solid #007bff;
    color: #007bff;
}

.tab-actions {
    display: flex;
    gap: 4px;
    opacity: 0;
    transition: opacity 0.2s;
}

.category-tab:hover .tab-actions {
    opacity: 1;
}

/* 修改分類內容的樣式 */
.category-content {
    position: relative;
    padding: 16px;
    display: none;
}

.category-content.active {
    display: block;
}

.watchlist-content {
    width: 100%;
}

.add-category-tab {
    padding: 10px;
    min-width: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    cursor: pointer;
    color: #666;
    transition: color 0.2s;
}

.add-category-tab:hover {
    color: #007bff;
}

.add-category-tab:disabled {
    color: #ccc;
    cursor: not-allowed;
}

.folder-tab {
    color: #666;
    transition: color 0.2s;
}

.folder-tab:hover {
    color: #007bff;
}

/* 當有搜尋結果或正在載入時才顯示邊框和背景 */
.search-results-container:not(:empty) {
    border: 1px solid #e2e8f0;
    background: white;
}

/* 響應式設計 */
@media (max-width: 640px) {
    .dialog {
        width: 95%;
        padding: 16px;
    }
    
    .search-input {
        padding: 10px 36px;
    }
    
    .search-results-container {
        max-height: 320px;
    }
}

/* 新聞對話框樣式 */
.news-dialog-content {
    padding: 20px;
    max-width: 600px;
    scrollbar-width: thin;
    scrollbar-color: rgba(0, 0, 0, 0.2) transparent;
}

.news-dialog-content::-webkit-scrollbar {
    width: 6px;
}

.news-dialog-content::-webkit-scrollbar-track {
    background: transparent;
}

.news-dialog-content::-webkit-scrollbar-thumb {
    background-color: rgba(0, 0, 0, 0.2);
    border-radius: 3px;
}

.news-dialog-content::-webkit-scrollbar-thumb:hover {
    background-color: rgba(0, 0, 0, 0.3);
}

.news-dialog-header {
    margin-bottom: 16px;
}

.news-dialog-title {
    font-size: 1.2em;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 8px;
}

.news-dialog-meta {
    display: flex;
    gap: 12px;
    font-size: 0.9em;
    color: #6b7280;
}

.news-dialog-source {
    font-weight: 500;
}

.news-dialog-date {
    font-style: italic;
}

.news-dialog-description {
    line-height: 1.6;
    color: #374151;
    margin-bottom: 16px;
}

.news-dialog-link {
    display: inline-block;
    color: #1a73e8;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
}

.news-dialog-link:hover {
    color: #1557b0;
    text-decoration: underline;
}

/* 新增搜尋區域樣式 */
.watchlist-search-area {
    position: relative;
    margin-bottom: 16px;
    z-index: 100;
    max-width: 350px;
    margin-left: auto;
    margin-right: auto;
}

/* 更新搜尋容器樣式 */
.search-container {
    position: relative;
    width: 100%;
    max-width: 350px;
}

/* 更新搜尋結果容器樣式 */
.search-results-container {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    max-width: 350px;
    width: 100%;
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    max-height: 320px;
    overflow-y: auto;
    margin-top: 8px;
    z-index: 100;
}

/* 響應式調整 */
@media (max-width: 640px) {
    .watchlist-search-area {
        max-width: 65%;
        padding: 0 px;
    }

    .search-container,
    .search-results-container {
        max-width: 100%;
    }
}

.stock-text-info {
    display: flex;
    flex-direction: column;
    margin-left: 10px;
    min-width: 0;
}

.watchlist-stock-symbol {
    font-size: 1.1em;
    font-weight: bold;
    color: #333;
}

.stock-names {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.stock-name-zh,
.stock-name-en,
.stock-name {
    font-size: 0.8em;
    color: #6b7280;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* 在較小螢幕上調整最大寬度 */
@media (max-width: 768px) {
    .stock-name-zh,
    .stock-name-en {
        /* 移除 max-width 限制 */
    }
}

/* 調整其他可能會影響到 InfoTool 的元素 z-index */
.info-tool-wrapper {
    position: absolute;
    right: 350px;
    top: 0;
}

/* 響應式調整 InfoTool 位置 */
@media (max-width: 1200px) {
    .info-tool-wrapper {
        right: 100px;
    }
}

@media (max-width: 768px) {
    .info-tool-wrapper {
        right: 30px;
    }
}

@media (max-width: 640px) {
    .info-tool-wrapper {
        right: 0px;
    }
}

/* 確保搜尋結果不會蓋住 InfoTool */
.search-results-container {
    z-index: 100;
}

/* 確保對話框不會蓋住 InfoTool */
.dialog-overlay {
    z-index: 1000;
}
/* 新
的標題區域設計 */
.watchlist-header-section {
    text-align: center;
    margin-bottom: 30px;
    padding: 20px 0;
}

.watchlist-title-group {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

.watchlist-main-title {
    font-size: 1.8rem;
    font-weight: 700;
    color: #1d1d1f;
    margin: 0;
    text-align: center;
    letter-spacing: -0.02em;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.3;
}

.watchlist-subtitle-container {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: -5px;
}

.watchlist-subtitle {
    font-size: 1rem;
    color: #666;
    margin: 0;
    font-weight: 400;
    opacity: 0.8;
    line-height: 1.4;
    text-align: center;
}

/* 標題響應式設計 */
@media (max-width: 1023px) {
    .watchlist-header-section {
        margin-bottom: 25px;
        padding: 15px 0;
    }

    .watchlist-main-title {
        font-size: 1.6rem;
    }

    .watchlist-subtitle {
        font-size: 0.9rem;
    }
}

@media (max-width: 768px) {
    .watchlist-header-section {
        margin-bottom: 20px;
        padding: 10px 0;
    }

    .watchlist-main-title {
        font-size: 1.4rem;
    }

    .watchlist-subtitle {
        font-size: 0.85rem;
    }
}

@media (max-width: 480px) {
    .watchlist-main-title {
        font-size: 1.3rem;
    }

    .watchlist-subtitle {
        font-size: 0.8rem;
    }
}
/* 搜尋區域容器 */
.watchlist-search-area {
    width: 100%;
    box-sizing: border-box;
    position: relative;
}

/* 搜尋框容器 */
.search-container {
    position: relative;
    width: 100%;
    margin-bottom: 8px;
    box-sizing: border-box;
}

/* 搜尋輸入框 */
.search-input {
    width: 100%;
    padding: 8px 36px;
    height: 40px;
    border: 1px solid #e2e8f0;
    border-radius: 20px;
    background: #f8fafc;
    font-size: 14px;
    color: #1f2937;
    box-sizing: border-box;
    transition: all 0.2s ease;
}

.search-input:focus {
    background: #ffffff;
    border-color: #3b82f6;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.1);
    outline: none;
}

/* 搜尋圖標 */
.search-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    font-size: 16px;
}

/* 搜尋結果容器 */
.search-results-container {
    position: absolute;
    width: 100%;
    max-height: 320px;
    margin-top: 8px;
    box-sizing: border-box;
    border-radius: 16px;
    border: 1px solid #e2e8f0;
    background: white;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    overflow-y: auto;
    z-index: 1000;
}

/* 載入中狀態 */
.search-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    color: #64748b;
    gap: 8px;
    background: white;
}

.search-loading .spinner {
    width: 20px;
    height: 20px;
    border: 2px solid #e2e8f0;
    border-top: 2px solid #3b82f6;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    flex-shrink: 0;
}

/* 空狀態 */
.search-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 32px 24px;
    color: #94a3b8;
    text-align: center;
}

.search-empty-state .icon {
    font-size: 24px;
    margin-bottom: 12px;
    color: #cbd5e1;
}

.search-empty-state .message {
    font-size: 14px;
    line-height: 1.5;
}

/* 搜尋結果項目 */
.stock-result-item {
    display: grid;
    grid-template-columns: 80px 1fr 60px;
    align-items: center;
    padding: 10px 16px;
    border-bottom: 1px solid #f1f5f9;
    cursor: pointer;
    transition: all 0.2s ease;
    background: white;
}

.stock-result-item:hover {
    background: #f8fafc;
}

.stock-result-item:last-child {
    border-bottom: none;
}

.stock-result-item .stock-symbol {
    font-weight: 600;
    color: #1f2937;
    font-size: 14px;
    min-width: 80px;
    padding-right: 8px;
}

.stock-result-item .stock-name {
    color: #64748b;
    font-size: 14px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    padding: 0 8px;
}

.stock-result-item .stock-market {
    min-width: 60px;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
    text-align: center;
}

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

/* 響應式設計 */
@media (max-width: 640px) {
    .search-loading,
    .search-empty-state {
        padding: 20px 16px;
    }
    
    .search-empty-state .icon {
        font-size: 20px;
    }
    
    .stock-result-item {
        grid-template-columns: 70px 1fr 50px;
        padding: 8px 12px;
    }
    
    .stock-result-item .stock-symbol {
        min-width: 70px;
    }
    
    .stock-result-item .stock-market {
        min-width: 50px;
        padding: 3px 6px;
        font-size: 11px;
    }
} 
.category-manager-dialog {
    padding: 20px;
    width: 100%;
    max-width: 320px;
    margin: 0 auto;
}

.create-category-button {
    width: 100%;
    padding: 12px;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background-color: #3b82f6;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 14px;
    font-weight: 500;
}

.create-category-button:hover {
    background-color: #2563eb;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.category-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 100%;
}

.category-item {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    padding: 12px 16px;
    border-radius: 8px;
    background-color: #f8fafc;
    transition: all 0.2s ease;
    border: 1px solid #e2e8f0;
    width: 100%;
    box-sizing: border-box;
}

.category-item:hover {
    background-color: #f1f5f9;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.category-name {
    font-size: 14px;
    color: #1f2937;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    padding-right: 16px;
}

.category-actions {
    display: flex;
    gap: 12px;
    flex-shrink: 0;
}

.edit-button,
.delete-button {
    padding: 6px;
    width: 28px;
    height: 28px;
    border: none;
    background: none;
    cursor: pointer;
    color: #64748b;
    transition: all 0.2s ease;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.edit-button:hover {
    color: #3b82f6;
    background-color: rgba(59, 130, 246, 0.1);
}

.delete-button:hover {
    color: #ef4444;
    background-color: rgba(239, 68, 68, 0.1);
}

/* 響應式設計 */
@media (max-width: 480px) {
    .category-manager-dialog {
        padding: 16px;
    }

    .category-item {
        padding: 10px 12px;
    }

    .category-name {
        font-size: 13px;
    }

    .create-category-button {
        padding: 10px;
        font-size: 13px;
    }
} 
.create-category-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 16px;
    align-items: center;
    width: 100%;
    max-width: 320px;
    margin: 0 auto;
}

.input-container {
    position: relative;
    width: 180px;
    margin: 0 auto;
}

.create-category-form input {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.2s;
    box-sizing: border-box;
}

.create-category-form input:focus {
    outline: none;
    border-color: #3b82f6;
}

.error-message {
    color: #dc2626;
    font-size: 12px;
    margin-top: -8px;
    width: 180px;
    text-align: left;
    margin-left: auto;
    margin-right: auto;
}

.dialog-actions {
    display: flex;
    justify-content: center;
    gap: 8px;
    width: 180px;
    margin: 0 auto;
}

.dialog-actions button {
    padding: 8px 16px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s;
}

.dialog-actions button[type="submit"] {
    background-color: #3b82f6;
    color: white;
}

.dialog-actions button[type="submit"]:hover {
    background-color: #2563eb;
}

.dialog-actions button[type="button"] {
    background-color: #e5e7eb;
    color: #374151;
}

.dialog-actions button[type="button"]:hover {
    background-color: #d1d5db;
}

/* 響應式設計 */
@media (max-width: 640px) {
    .create-category-form {
        padding: 12px;
    }

    .dialog-actions button {
        padding: 6px 12px;
        font-size: 13px;
    }
} 
.edit-category-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 16px;
    align-items: center;
    width: 100%;
    max-width: 320px;
    margin: 0 auto;
}

.edit-category-form input {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.2s;
    box-sizing: border-box;
}

.edit-category-form input:focus {
    outline: none;
    border-color: #3b82f6;
}

.dialog-actions {
    display: flex;
    justify-content: center;
    gap: 8px;
    width: 180px;
    margin: 0 auto;
}

.dialog-actions button {
    padding: 8px 16px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s;
}

.dialog-actions button[type="submit"] {
    background-color: #3b82f6;
    color: white;
}

.dialog-actions button[type="submit"]:hover {
    background-color: #2563eb;
}

.dialog-actions button[type="button"] {
    background-color: #e5e7eb;
    color: #374151;
}

.dialog-actions button[type="button"]:hover {
    background-color: #d1d5db;
}

/* 響應式設計 */
@media (max-width: 640px) {
    .edit-category-form {
        padding: 12px;
    }

    .dialog-actions button {
        padding: 6px 12px;
        font-size: 13px;
    }
}

.input-container {
    position: relative;
    width: 180px;
    margin: 0 auto;
}

.error-message {
    color: #dc2626;
    font-size: 12px;
    margin-top: -8px;
    width: 180px;
    text-align: left;
    margin-left: auto;
    margin-right: auto;
}
  
.category-tabs {
    display: flex;
    overflow-x: auto;
    border-bottom: 1px solid #ddd;
    margin-bottom: 20px;
    scrollbar-width: thin;
    -webkit-overflow-scrolling: touch;
}

.category-tab {
    padding: 10px 20px;
    border: none;
    background: none;
    cursor: pointer;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 8px;
    position: relative;
    color: #666;
    transition: all 0.2s ease;
}

.category-tab.active {
    border-bottom: 2px solid #007bff;
    color: #007bff;
}

.folder-tab {
    color: #666;
    transition: color 0.2s;
}

.folder-tab:hover {
    color: #007bff;
}

/* 響應式設計 */
@media (max-width: 768px) {
    .category-tabs {
        padding: 0 8px;
    }
    
    .category-tab {
        padding: 8px 16px;
    }
} 
.stock-info {
    display: flex;
    align-items: center;
    gap: 12px;
    padding-bottom: 12px;
    border-bottom: none;
}

.stock-logo {
    width: 32px;
    height: 32px;
    min-width: 32px;
    border-radius: 50%;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #f3f4f6;
}

.stock-logo-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.stock-text-info {
    display: flex;
    flex-direction: column;
    margin-left: 10px;
    min-width: 0;
}

.watchlist-stock-symbol {
    font-size: 1.1em;
    font-weight: 600;
    color: #1f2937;
}

.stock-names {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.stock-name-zh,
.stock-name-en {
    font-size: 0.8em;
    color: #6b7280;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
} 
.stock-gauge-container {
    position: relative;
    width: 150px; /* Fixed width for consistency across cards */
    height: 30px; /* Fits within 80px card height */
    display: flex;
    flex-direction: column;
    justify-content: center; /* Vertically centers the gauge bar */
    padding: 0; /* Remove padding to avoid offset */
}

.gauge-bar {
    position: relative;
    width: 100%;
    height: 8px;
    background-color: rgba(226, 232, 240, 0.3); /* Matches COLORS.neutralBackground */
    border-radius: 4px;
    overflow: hidden;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1);
}

.gauge-fill {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    border-radius: 4px 0 0 4px;
    transition: width 0.75s ease-in-out;
}

.price-indicator {
    position: absolute;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: #fff; /* Default, overridden inline */
    border: 2px solid #fff;
    box-shadow: 0 0 4px rgba(0, 0, 0, 0.3);
    transition: left 0.75s ease-in-out;
}

.support-marker,
.resistance-marker {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 2px;
    height: 12px;
    background-color: rgba(0, 0, 0, 0.5);
}

.support-marker {
    left: 0;
}

.resistance-marker {
    left: 100%;
}

.price-label {
    position: absolute;
    top: -16px;
    font-size: 0.8em;
    font-weight: 600;
    color: #ffffff;
    background-color: rgb(112, 112, 112);
    padding: 2px 6px;
    border-radius: 4px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
    white-space: nowrap;
}
.stock-analysis-container {
    width: 100%;
    height: 100%; /* Fits within the 80px card height */
    display: flex;
    align-items: center; /* Vertically center the entire analysis section */
    justify-content: center; /* Horizontally center the content */
    padding: 0; /* Remove padding to keep it flush */
    box-sizing: border-box;
}

.stock-analysis-content {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center; /* Center the entire content block */
    width: auto; /* Allow it to shrink to content size */
    gap: 8px;
}

/* Support and resistance values */
.analysis-value {
    font-size: 0.9em;
    font-weight: 500;
    padding: 2px 6px;
    border-radius: 4px;
    white-space: nowrap;
}

.analysis-value.support {
    color: #22c55e;
    background-color: rgba(34, 197, 94, 0.08);
}

.analysis-value.resistance {
    color: #ef4444;
    background-color: rgba(239, 68, 68, 0.08);
}

/* Pulsing effect for near-edge conditions */
.analysis-value.support.pulse {
    animation: pulsateGreen 2s ease-in-out infinite;
    box-shadow: 0 0 0 rgba(34, 197, 94, 0.2);
}

.analysis-value.resistance.pulse {
    animation: pulsateRed 2s ease-in-out infinite;
    box-shadow: 0 0 0 rgba(239, 68, 68, 0.2);
}

@keyframes pulsateGreen {
    0% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.4); }
    70% { box-shadow: 0 0 0 6px rgba(34, 197, 94, 0); }
    100% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0); }
}

@keyframes pulsateRed {
    0% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.4); }
    70% { box-shadow: 0 0 0 6px rgba(239, 68, 68, 0); }
    100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
}

/* Current price - Already defined elsewhere, can be removed here */
.current-price {
    font-size: 1em;
    font-weight: 600;
    color: #111827;
    white-space: nowrap;
}

/* Loading state */
.analysis-loading {
    font-size: 0.9em;
    color: #666;
}

/* Remove this section as it’s redundant with the first document */
/* .stock-gauge-container {
    flex: 1;
    min-width: 150px;
    height: 40px;
} */

/* Responsive adjustments */
@media (max-width: 640px) {
    .stock-analysis-content {
        gap: 4px;
    }

    .analysis-value {
        font-size: 0.8em;
        padding: 2px 4px;
    }

    .current-price {
        font-size: 0.9em;
    }

    .stock-gauge-container {
        width: 120px; /* Adjusted for smaller screens */
    }
}
/* News list styles */
.stock-news-list {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    position: relative;
    padding: 0;
    margin: 0;
}

/* News item styles */
.stock-news-item {
    font-size: 0.9em;
    color: #1a73e8;
    cursor: pointer;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    transition: color 0.2s;
    padding: 4px 8px;
    border-radius: 4px;
    width: 100%;
    position: absolute;
    top: 50%; /* Center vertically */
    transform: translateY(-50%); /* Start in the middle */
    opacity: 0; /* Hidden until animation starts */
}

.stock-news-item:hover {
    color: #1557b0;
    text-decoration: underline;
    background-color: rgba(26, 115, 232, 0.05);
}

/* Single news - no animation, stays centered */
.stock-news-list.single-news .stock-news-item {
    animation: none;
    opacity: 1;
    position: absolute; /* Keep absolute for consistency */
    top: 50%;
    transform: translateY(-50%); /* Centered */
}

/* Two news items */
.stock-news-list.two-news .stock-news-item {
    animation: newsSlide 6s infinite;
}

.stock-news-list.two-news .stock-news-item:nth-child(1) {
    animation-delay: 0s;
}

.stock-news-list.two-news .stock-news-item:nth-child(2) {
    animation-delay: 3s;
}

/* Three news items */
.stock-news-list.three-news .stock-news-item {
    animation: newsSlide 9s infinite;
}

.stock-news-list.three-news .stock-news-item:nth-child(1) {
    animation-delay: 0s;
}

.stock-news-list.three-news .stock-news-item:nth-child(2) {
    animation-delay: 3s;
}

.stock-news-list.three-news .stock-news-item:nth-child(3) {
    animation-delay: 6s;
}

/* Animation keyframes - Start and end in the middle */
@keyframes newsSlide {
    0% {
        opacity: 0;
        transform: translateY(-50%); /* Start centered */
    }
    10% {
        opacity: 1;
        transform: translateY(-50%); /* Stay centered */
    }
    28% {
        opacity: 1;
        transform: translateY(-50%); /* Stay centered */
    }
    33% {
        opacity: 0;
        transform: translateY(-20px); /* Move up */
    }
    66% {
        opacity: 0;
        transform: translateY(20px); /* Move down */
    }
    100% {
        opacity: 0;
        transform: translateY(-50%); /* Return to center */
    }
}
.remove-stock-button {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: none;
    background: transparent;
    color: #dc2626;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    opacity: 0;
    z-index: 10;
} 
/* Stock card base styles */
.stock-item {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: clamp(4px, 1vw, 8px); /* Responsive gap */
    background: white;
    border-radius: 8px;
    padding: clamp(4px, 1.5vw, 16px); /* Responsive padding */
    min-height: 70px; /* Minimum height for consistency */
    height: auto;
    position: relative;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    overflow: hidden;
}

.stock-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

/* Section styles - Using flexible widths */
.stock-header-section {
    flex: 1 1 20%; /* Flexible growth and shrink */
    min-width: 100px;
    max-width: 25%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.current-price-section {
    flex: 0 1 15%;
    min-width: 60px;
    max-width: 100px;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.stock-analysis-section {
    flex: 1 1 30%;
    min-width: 150px;
    max-width: 35%;
    height: 100%;
    overflow: visible;
    display: flex;
    align-items: center;
    justify-content: center;
}

.stock-analysis-result-section { /* Added to align with sentiment header */
    flex: 0 1 15%; /* Matches current-price-section for consistency */
    min-width: 60px;
    max-width: 100px;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.stock-news-section {
    flex: 1 1 20%; /* Adjusted to account for remove-button-section */
    min-width: 180px;
    max-width: 25%; /* Reduced to fit remove-button-section */
    margin-left: clamp(8px, 2vw, 40px);
    overflow: hidden;
    position: relative;
    height: 100%;
}

.remove-button-section {
    flex: 0 0 auto;
    width: clamp(32px, 5vw, 40px);
    margin-left: auto;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Current price */
.current-price {
    font-size: clamp(0.875rem, 2vw, 1rem);
    font-weight: 600;
    color: #111827;
    white-space: nowrap;
}

/* Remove button styles */
.remove-stock-button {
    opacity: 1 !important;
    position: static;
    width: clamp(30px, 4vw, 35px);
    height: clamp(30px, 4vw, 35px);
    border-radius: 50%;
    border: none;
    background: transparent;
    color: #dc2626;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.remove-stock-button:hover {
    transform: scale(1.1);
    background-color: rgba(220, 38, 38, 0.1);
}

/* Button click effect */
.remove-stock-button:active {
    transform: scale(0.95);
}

/* Stock info */
.stock-info {
    display: flex;
    align-items: center;
    gap: clamp(6px, 1.5vw, 12px);
    padding-bottom: 0;
    border-bottom: none;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/*  修改：分析結果狀態標籤樣式 (取代原 analysis-result 樣式) */
.status-label {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 60px;
    padding: 6px 12px;
    border-radius: 16px;
    font-size: clamp(0.75rem, 1.5vw, 0.875rem);
    font-weight: 500;
    color: white;
    text-align: center;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* 修改：情緒特定樣式，使用漸層背景 (取代原 sentiment-xxx 樣式) - 新顏色方案 */
/* 將中文 class 修改為英文 */
.status-label.status-extremeOptimism { /* 原為 status-極度樂觀 - StockGauge: #D24A93 */
    background: linear-gradient(135deg, #D24A93 0%, #A83B75 100%); /* #A83B75 is a darker shade of #D24A93 */
}

.status-label.status-optimism { /* 原為 status-樂觀 - StockGauge: #F0B8CE */
    background: linear-gradient(135deg, #F0B8CE 0%, #C093A4 100%); /* #C093A4 is a darker shade of #F0B8CE */
}

.status-label.status-neutral { /* 原為 status-中性 - StockGauge: #708090 */
    background: linear-gradient(135deg, #708090 0%, #596673 100%); /* #596673 is a darker shade of #708090 */
}

.status-label.status-pessimism { /* 原為 status-悲觀 - StockGauge: #5B9BD5 */
    background: linear-gradient(135deg, #5B9BD5 0%, #487CAA 100%); /* #487CAA is a darker shade of #5B9BD5 */
}

.status-label.status-extremePessimism { /* 原為 status-極度悲觀 - StockGauge: #0000FF */
    background: linear-gradient(135deg, #0000FF 0%, #0000CC 100%); /* #0000CC is a darker shade of #0000FF */
}

/* 修改：Hover 效果 (取代原 analysis-result:hover 樣式) */
.status-label:hover {
    transform: translateY(-1px);
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.15);
}

/* Responsive adjustments for medium screens */
@media (max-width: 1024px) {
    .stock-item {
        padding: 8px;
    }

    
    .stock-header-section {
        flex: 1 1 30%;
        max-width: 15%;
    }

    .current-price-title {
        display: none;
    }
    .current-price-section {
        display: none;
    }

    .stock-analysis-section {
        flex: 1 1 35%;
        margin-left: 10%;
    }

    .stock-analysis-result-section {
        flex: 0 1 17%;
        margin-left: 10%;
    }

    .stock-news-section {
        flex: 1 1 100%;
        margin-left: 0;
        margin-top: 8px;
    }
}

@media (max-width: 880px) {
    .stock-analysis-title {
        margin-left: 10%;
    }
    .stock-sentiment-title {
        margin-left: 12%;
    }
    .stock-news-section {
        min-width: 50px;
        max-width: 150px;
        margin-right: 5%;
    }
    .remove-button-section {
        margin-left: -40px;
    }
}

@media (max-width: 768px) {
    .stock-analysis-title {
        margin-left: 10%;
    }
    .stock-sentiment-title {
        margin-right: 0%;
    }

    .stock-news-section {
        min-width: 50px;
        max-width: 150px;
        margin-right: 5%;
    }
    .remove-button-section {
        margin-left: -40px;
    }
}


/* Responsive adjustments for small screens (mobile) */
@media (max-width: 640px) {
    .stock-item {
        flex-direction: column;
        align-items: flex-start;
        min-height: 150px;
        padding: 8px;
    }

    .stock-header-section {
        display: flex;
        flex-direction: row;
        align-items: center;
        justify-content: flex-start;
        margin-right: 8px;
        width: auto;
        max-width: 100%;
        flex: none;
        margin-bottom: 0;
    }

    .current-price-section {
        display: none;
        justify-content: flex-start;
    }

    .stock-analysis-container-mobile {
        margin-top: 8%;
        display: flex;
        flex-direction: row;
        align-items: center;
        width: 100%;
        margin-bottom: 8px;
        justify-content: center;
    }

    .stock-analysis-section {
        flex: 2 1;
        min-width: 0;
        max-width: 70%;
        height: 100%;
        overflow: visible;
        display: flex;
        align-items: center;
        justify-content: center;
        margin-bottom: 0;
    }

    .stock-analysis-result-section {
        flex: 1 1;
        min-width: 0;
        max-width: 30%;
        height: 100%;
        overflow: visible;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .stock-news-section {
        width: 100%;
        max-width: 100%;
        flex: 1 1;
        margin-left: 0;
        margin-bottom: 8px;
        max-height: 150px;
        overflow: hidden;
        margin-top: 0;
    }

    .remove-button-section {
        position: absolute;
        top: 8px;
        right: 8px;
        margin-left: 0;
    }

    .status-label {
        min-width: 50px;
        padding: 4px 8px;
        font-size: 0.7rem;
    }
}

/* Responsive adjustments for very small screens */
@media (max-width: 480px) {
    .stock-item {
        padding: 6px;
    }

    .current-price {
        font-size: 0.875rem;
    }

    .stock-news-section {
        max-height: 120px;
    }
}

/* Header row styles */
.stock-card-header-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 16px;
    background-color: #f7f7f7;
    border-bottom: 1px solid #e0e0e0;
    font-size: 0.9em;
    color: #b6b3b3;
    box-sizing: border-box;
    width: 100%;
    border-radius: 8px;
}

.stock-card-header-row span {
    text-align: center;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.stock-header-title {
    flex: 1 1 20%;
    min-width: 100px;
    max-width: 18%;
    margin-left: -1.5%;
    margin-right: 1.5%;
}

.current-price-title {
    flex: 0 1 15%;
    min-width: 60px;
    max-width: 100px;
}

.stock-analysis-title {
    flex: 1 1 30%;
    min-width: 150px;
    max-width: 25%;
}

.stock-sentiment-title {
    flex: 0 1 15%; /* Matches stock-analysis-result-section */
    min-width: 60px;
    max-width: 100px;
}

.stock-news-title {
    flex: 1 1 20%; /* Adjusted to match stock-news-section */
    min-width: 180px;
    max-width: 25%;
}

/* No header for remove-button-section, so we leave a gap implicitly */
.error-boundary {
    padding: 24px;
    text-align: center;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    margin: 16px;
}

.error-boundary h2 {
    color: #dc2626;
    margin-bottom: 16px;
    font-size: 1.5em;
}

.error-boundary p {
    color: #4b5563;
    margin-bottom: 24px;
    line-height: 1.5;
}

.retry-button {
    padding: 8px 16px;
    background-color: #3b82f6;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    transition: background-color 0.2s;
}

.retry-button:hover {
    background-color: #2563eb;
}

.retry-button:active {
    background-color: #1d4ed8;
} 
.info-tool-container {
    display: inline-block;
    position: relative;
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", sans-serif;
}

.info-icon {
    cursor: pointer;
    color: #666;
    font-size: 1.1em;
    padding: 1px 1px;
    border-radius: 5%;
    transition: all 0.2s ease;
    -webkit-user-select: none;
            user-select: none;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.info-icon:hover {
    background: rgba(0, 0, 0, 0.05);
    color: #333;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.info-tooltip {
    position: absolute;
    background: rgba(33, 33, 33, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    color: #fff;
    padding: 16px 20px;
    border-radius: 16px;
    font-size: 0.9rem;
    line-height: 1.6;
    z-index: 10000;
    box-shadow: 
        0 4px 6px -1px rgba(0, 0, 0, 0.1),
        0 2px 4px -1px rgba(0, 0, 0, 0.06),
        0 0 0 1px rgba(255, 255, 255, 0.1);
    animation: tooltip-fade 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    max-width: 300px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

@keyframes tooltip-fade {
    from {
        opacity: 0;
        transform: scale(0.98) translateY(-2px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

/* 位置變體 */
.info-tooltip.top {
    bottom: 100%;
    margin-bottom: 8px;
    /* right: 0; */
    left: auto;
}

.info-tooltip.top-left {
    bottom: 100%;
    margin-bottom: 8px;
    right: auto;
    left: 0;
}

.info-tooltip.top-right {
    bottom: 100%;
    margin-bottom: 8px;
    right: 0;
    left: auto;
}

.info-tooltip.bottom {
    top: 100%;
    margin-top: 12px;
    width: 300px !important;
    max-width: 300px !important;
    white-space: normal;
    line-height: 1.6;
    z-index: 10000;
    overflow-wrap: break-word;
    word-wrap: break-word;
}

.info-tooltip.bottom-left {
    top: 100%;
    margin-top: 12px;
    width: 300px !important;
    max-width: 300px !important;
    white-space: normal;
    line-height: 1.6;
    z-index: 10000;
    right: auto;
    left: 0;
    overflow-wrap: break-word;
    word-wrap: break-word;
}

.info-tooltip.bottom-right {
    top: 100%;
    margin-top: 12px;
    width: 300px !important;
    max-width: 300px !important;
    white-space: normal;
    line-height: 1.6;
    z-index: 10000;
    right: 0;
    left: auto;
    overflow-wrap: break-word;
    word-wrap: break-word;
}

.info-tooltip.left {
    right: 100%;
    top: 50%;
    transform: translateY(-50%);
    margin-right: 8px;
}

.info-tooltip.left-right {
    left: 100%;
    top: 50%;
    transform: translateY(-50%);
    margin-left: 8px;
}

.info-tooltip.right {
    left: 100%;
    top: 50%;
    transform: translateY(-50%);
    margin-left: 8px;
}

.info-tooltip.right-left {
    right: 100%;
    top: 50%;
    transform: translateY(-50%);
    margin-right: 8px;
}

/* 行動裝置適配 */
@media (max-width: 768px) {
    .info-icon {
        padding: 8px 12px;
    }
    
    .info-tooltip {
        width: calc(100vw - 40px);
        max-width: 300px;
        box-sizing: border-box;
        font-size: 0.875rem;
        padding: 14px 18px;
    }

    .info-tooltip.bottom,
    .info-tooltip.bottom-left,
    .info-tooltip.bottom-right {
        width: calc(100vw - 40px) !important;
        max-width: 300px !important;
        left: auto;
        right: 0;
        transform: none;
    }
} 

/* 向左展開的樣式 */
.info-tooltip.bottom.left-aligned {
    right: auto;
    left: 0;
}

/* 向右展開的樣式 */
.info-tooltip.bottom.right-aligned {
    right: 0;
    left: auto;
} 
.ad-banner-container {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1000;
  width: 100%;
  max-width: 975px;
/*  display: none; /* 顯示 ad banner */
}

.ad-banner {
  position: relative;
  background-color: #ffffff;
  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
  padding: 10px;
  display: flex;
  justify-content: center;
  align-items: center;
  max-height: 95px;
  width: 100%;
}

.ad-content {
  max-width: 970px;
  width: 100%;
  height: 100%;
  position: relative;
  min-width: 728px;
  text-align: center;
}

.ad-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #f0f2f5;
  border-radius: 4px;
  color: #666;
}

.ad-close-button {
  position: absolute;
  top: -12px;
  left: 10px;
  background-color: #f0f2f5;
  border-radius: 50%;
  color: #888;
  font-size: 1rem;
  cursor: pointer;
  opacity: 0.7;
  transition: opacity 0.2s ease, background-color 0.2s ease;
  z-index: 1001;
  padding: 0;
  width: 30px;
  height: 30px;
  display: flex;
  justify-content: center;
  align-items: center;
  border: none;
}

.ad-close-button:hover {
  opacity: 1;
  background-color: #e0e0e0;
}

.ad-close-button svg {
  width: 15px;
  height: 15px;
}

@media (max-width: 720px) {
  .ad-banner-container {
    width: 320px;
    max-width: none;
    left: -5%;
    right: 0;
    margin-left: auto;
    margin-right: auto;
    transform: none;
  }
  .ad-content {
    min-height: 50px;
    max-height: 100px;
    min-width: 0;
    max-width: 728px;
    text-align: center;
  }
  .ad-close-button {
    width: 40px;
    height: 40px;
    color: #888;
    top: -15px;
    left: 5px;
  }
  .ad-close-button svg {
    width: 20px;
    height: 20px;
  }
}

@media (min-width: 721px) and (max-width: 969px) {
  .ad-banner-container {
    max-width: 748px;
    width: 100%;
    left: 49%;
  }
  .ad-banner {
    max-width: 748px;
  }
  .ad-content {
    max-width: 728px;
    min-width: 0;
    text-align: center;
  }
}

.ad-banner--collapsed {
  max-height: 25px;
  overflow: hidden;
  padding-bottom: 0;
  transition: max-height 0.3s ease-out, padding-bottom 0.3s ease-out;
  cursor: pointer;
  display: flex;
  align-items: center;
}

.ad-banner--collapsed .ad-content {
  display: none;
}

.ad-banner--collapsed .ad-close-button {
  position: static;
  opacity: 1;
  background-color: #f0f2f5;
  border-radius: 20px;
  width: 25px;
  height: 25px;
  display: flex;
  justify-content: center;
  align-items: center;
  margin-right: 10px;
}

.ad-banner--collapsed .ad-close-button:hover {
  opacity: 1;
  background-color: #e0e0e0;
}

.ad-banner--collapsed .ad-close-button svg {
  width: 15px;
  height: 15px;
  color: #666;
} 
.site-footer {
  background-color: #f8f9fa;
  padding: 40px 0 20px;
  margin-top: auto;
  border-top: 1px solid #e9ecef;
  font-size: 14px;
  color: #6c757d;
}

.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: #6c757d;
  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;
  }
  
  .disclaimer {
    font-size: 12px;
  }
} 
.floating-sponsor-button {
  position: fixed; /* 固定定位，使其漂浮在頁面上 */
  bottom: 20px; /* 修改 top 為 bottom，調整到頁面底部 */
  right: 20px; /* 距離右側一些距離 */
  z-index: 1000; /* 確保它在最上層，不會被其他內容遮蔽 */
  display: block; /* 確保是 block 元素，方便設定寬高等 */
  width: 70px; /* 設定按鈕寬度 */
  height: 70px; /* 設定按鈕高度，使其為正圓形 */
  border-radius: 50%; /* 圓角，使其變成圓形 */
  overflow: hidden; /* 確保圖片不會超出圓形範圍 */
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3); /* 增加陰影，使其看起來更立體 */
  transition: transform 0.3s ease; /* 添加動畫效果 */
  animation: pulse 2s infinite; /* 新增動畫屬性 */
}

.floating-sponsor-button:hover {
  transform: scale(1.1); /* hover 時稍微放大 */
}

.floating-sponsor-button img {
  display: block; /* 確保圖片是 block 元素，填滿整個按鈕 */
  width: 100%; /* 圖片寬度 100% */
  height: 100%; /* 圖片高度 100% */
  object-fit: cover; /* 圖片等比例填充並覆蓋容器 */
}

@media (max-width: 768px) { /* 手機螢幕尺寸 */
  .floating-sponsor-button {
    width: 70px; /* 在小螢幕上稍微縮小 */
    height: 70px;
    bottom: 100px; /* 調整到更靠近底部的位置 */
    right: 10px;
  }
}

@keyframes pulse { /* 定義關鍵影格動畫 */
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05); /* 稍微放大 */
  }
  100% {
    transform: scale(1);
  }
} 
.chat-widget {
  position: fixed;
  bottom: 100px;
  right: 95px;
  width: 330px;
  height: 450px;
  background: #f8f9fa;
  border-radius: 12px;
  box-shadow: 0 8px 20px rgba(253, 253, 253, 0.15);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  z-index: 1000;
}

@media(max-width: 768px) {
  .chat-widget {
    right: 85px;
    min-width: 290px;
    max-width: 100%;
  }

  .chat-widget.mobile-fullscreen {
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    border-radius: 0;
    box-shadow: none;
  }
}

.chat-header {
  background: #77b2ed;
  color: #e9edf1;
  padding: 15px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid #dee2e6;
  border-top-left-radius: 12px;
  border-top-right-radius: 12px;
}

.chat-body {
  flex: 1 1;
  padding: 20px;
  overflow-y: auto;
  overflow-x: hidden;
  background: #f8f9fa;
  display: flex;
  flex-direction: column;
  position: relative;
}

.welcome-message {
  position: static;
  transform: none;
  margin: 20px auto;
  text-align: center;
  color: #6c757d;
  padding: 15px;
  width: 90%;
  background-color: #e9ecef;
  border-radius: 8px;
}

.chat-message {
  margin-bottom: 10px;
  padding: 10px 15px;
  border-radius: 20px;
  clear: both;
  white-space: pre-wrap;
  overflow-wrap: break-word;
  max-width: 80%;
  margin-top: auto;
}

.chat-message.user {
  background-color: #d4edda;
  color: #155724;
  text-align: left;
  float: right;
  align-self: flex-end;
  margin-left: 30px;
  margin-right: 0px;
}

.chat-message.assistant {
  background-color: #fff;
  color: #212529;
  text-align: left;
  float: left;
  align-self: flex-start;
  box-shadow: 0 1px 3px rgba(0,0,0,0.12), 0 1px 2px rgba(0,0,0,0.24);
  margin-left: 0px;
  margin-right: 30px;
}

.chat-message.system.quick-replies-message-container,
.chat-message.assistant.quick-replies-message-container {
  background-color: #f0f0f0;
  color: #333;
  text-align: left;
  float: left;
  align-self: flex-start;
  box-shadow: 0 1px 3px rgba(0,0,0,0.12), 0 1px 2px rgba(0,0,0,0.24);
  margin-left: 0px;
  margin-right: 30px;
  padding: 10px 15px;
  border-radius: 20px;
  margin-bottom: 10px;
  max-width: 80%;
  clear: both;
  white-space: normal;
  overflow-wrap: break-word;
}

.quick-replies-title {
  margin-bottom: 10px;
  color: #6c757d;
  font-size: 0.9em;
  font-weight: bold;
  text-align: center;
}

/* **移除：分類下的問題列表標題樣式** */
/*
.quick-replies-category-title {
  margin-bottom: 12px;
  color: #495057;
  font-size: 0.95em;
  font-weight: bold;
  text-align: left;
  padding-left: 5px;
}
*/

.quick-reply-button-inline {
  display: block;
  width: 100%;
  background-color: #ffffff;
  border: 1px solid #007bff;
  border-radius: 15px;
  padding: 6px 12px;
  margin-bottom: 6px;
  cursor: pointer;
  text-align: center;
  font-size: 0.85rem;
  color: #007bff;
  transition: background-color 0.2s ease, color 0.2s ease;
  box-shadow: none;
}

.quick-reply-button-inline:hover {
  background-color: #e7f3ff;
  border-color: #0056b3;
}

.quick-reply-button-inline:active {
  background-color: #cce5ff;
  color: #004085;
}

.chat-input {
  display: flex;
  padding: 15px;
  background-color: #fff;
  border-top: 1px solid #dee2e6;
  align-items: center;
  box-sizing: border-box;
}

.chat-input input {
  flex: 1 1;
  border: 1px solid #ced4da;
  border-radius: 25px;
  padding: 10px 15px;
  margin-right: 5px;
  font-size: 1rem;
  box-sizing: border-box;
}

.chat-input input:focus {
  outline: none;
  border-color: #007bff;
  box-shadow: 0 0 0 0.2rem rgba(0,123,255,.25);
}

.chat-input button {
  background-image: url(/static/media/send.d3380f2eddb798ab1704.png);
  padding: 10px 10px;
  margin-right: 10px;
  margin-left: 10px;
  border: none;
  cursor: pointer;
  border-radius: 50%;
  transition: background-color 0.3s ease;
  background-color: #709ccb;
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  box-sizing: border-box;
}

.chat-input button:hover {
  background-color: #3a73b1;
}

.chat-input button:active {
  background-color: #004999;
}

.chat-toggle-button {
  position: fixed;
  bottom: 100px;
  right: 20px;
  width: 70px;
  height: 70px;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  box-shadow: 0 4px 10px rgba(0,0,0,0.25);
  transition: transform 0.2s ease-in-out;
  z-index: 1000;

  /* 1. 為不支援 image-set() 的舊版瀏覽器提供 PNG 備援 */
  /* 使用 background 簡寫來包含所有相關屬性 */
  background: url(/static/media/chatbot.4206a35a868ad6b764cb.png) no-repeat center center / cover;

  /* 2. 現代瀏覽器使用 image-set()，優先選擇 WebP */
  /* 再次使用 background 簡寫來確保所有屬性被正確應用和覆蓋 */
  background: url(/static/media/chatbot.0c6c92e7b377c9c5b5a3.webp) no-repeat center center;
  background-size: cover;
  background: -webkit-image-set(
              url(/static/media/chatbot.0c6c92e7b377c9c5b5a3.webp) type('image/webp'),
              url(/static/media/chatbot.4206a35a868ad6b764cb.png) type('image/png')
            ) no-repeat center center;
  background: image-set(
              url(/static/media/chatbot.0c6c92e7b377c9c5b5a3.webp) type('image/webp'),
              url(/static/media/chatbot.4206a35a868ad6b764cb.png) type('image/png')
            ) no-repeat center center;
  background-size: cover;
  /* 舊版 Webkit 前綴的 image-set (可以考慮是否仍需要) */
  /* 如果要加，也需要完整的 background 宣告 */
  /* background: -webkit-image-set(
              url('../../assets/images/chatbot.webp') 1x,
              url('../../assets/images/chatbot.png') 1x
            ) no-repeat center center / cover; */
}

.chat-toggle-button:hover {
  transform: scale(1.1);
}

.close-button {
  background: none;
  border: none;
  color: #f4f6f8;
  font-size: 1.5rem;
  cursor: pointer;
  opacity: 0.7;
  transition: opacity 0.2s ease;
}

.close-button:hover {
  opacity: 1;
}

@media (max-width: 768px) {
  .chat-toggle-button {
    width: 70px;
    height: 70px;
    bottom: 20px;
    right: 10px;
  }
}

.quick-replies {
  padding: 10px 15px;
  margin-bottom: 15px;
  border-bottom: 1px solid #eee;
  text-align: center;
}

.quick-replies p {
  margin-bottom: 10px;
  color: #6c757d;
  font-size: 0.9em;
  font-weight: bold;
}

.quick-reply-button {
  display: block;
  width: 100%;
  background-color: #ffffff;
  border: 1px solid #ced4da;
  border-radius: 20px;
  padding: 8px 15px;
  margin-bottom: 8px;
  cursor: pointer;
  text-align: left;
  font-size: 0.9rem;
  color: #007bff;
  transition: background-color 0.2s ease, border-color 0.2s ease;
  box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

.quick-reply-button:hover {
  background-color: #f8f9fa;
  border-color: #adb5bd;
}

.quick-reply-button:active {
  background-color: #e9ecef;
}
.language-switcher {
  position: relative;
  display: inline-block;
  margin-right: 10px; /* Add some space to the right */
}

.language-switcher-button {
  background: none;
  border: none;
  cursor: pointer;
  padding: 5px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2em; /* Adjust icon size */
  color: var(--text-color-primary); /* Use variable if available, or specific color */
}

.language-switcher-button:hover {
  opacity: 0.8;
}

.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 */
  min-width: 100px; /* Minimum width */
  padding: 5px 0;
}

.language-dropdown button {
  display: block;
  width: 100%;
  padding: 8px 15px;
  text-align: left;
  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); }
} 
/* 圖表和分析卡片樣式 */
.price-analysis-view .dashboard {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  justify-content: space-between;
  /* margin-bottom: 20px; */
  /* 由 content-layout-container 的 gap 控制 */
}

.price-analysis-view .chart-card,
.price-analysis-view .stock-analysis-card {
  background-color: white;
  background-color: var(--color-bg-card, white);
  border-radius: 8px;
  border-radius: var(--border-radius-large, 8px);
  /* 嘗試更大的圓角 */
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  box-shadow: var(--shadow-m, 0 2px 4px rgba(0, 0, 0, 0.1));
  /* padding: 20px; */
  /* 統一 padding */
}

.price-analysis-view .chart-card {
  position: relative; /* 新增：讓絕對定位的子元素可以正確定位 */
  flex: 1 1 65%;
  min-width: 300px;
  padding: 0px 5px 20px 20px;
  padding: 0px 5px var(--space-l, 20px) var(--space-l, 20px);
  overflow: visible;
  height: auto;
}

.price-analysis-view .stock-analysis-card {
  padding: 20px;
  padding: var(--space-l, 20px);
  /*flex: 1 1 15%;*/
  min-width: 200px;
  max-width: 300px;
  /* 保持原有限制，但在桌面版會被覆蓋 */
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  width: 100%;
}

.price-analysis-view .stock-analysis-card form {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
}

/* 圖表容器樣式 */
.price-analysis-view .chart-container {
  position: relative; /* 讓 ScrollToTopButton 相對於此定位 */
  width: 100%;
  height: 450px;
  max-width: 100%;
  overflow: visible;
  margin-bottom: 20px;
}

.price-analysis-view .chart-content {
  position: relative;
  width: 100%;
  height: 80%;
  margin-top: 0px;
}

.price-analysis-view .chart-content canvas {
  position: relative;
  /* 確保 transform 生效 */
  transform: translateY(-10px);
  /* 允許雙指縮放，但禁止單指平移 */
  touch-action: pinch-zoom;
}

/* 標題組容器樣式 */
.price-analysis-view .stock-analysis-card .title-group {
  text-align: center;
  margin-bottom: 30px;
  padding-bottom: 0;
}

/* 分析卡片中的主標題樣式 */
.price-analysis-view .stock-analysis-card .analysis-main-title {
  font-size: 1.6rem;
  font-weight: 700;
  color: #1d1d1f;
  color: var(--color-text-primary, #1d1d1f);
  margin: 0 0 5px 0;
  /* 減少與副標題的距離 */
  text-align: center;
  letter-spacing: -0.02em;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* 副標題樣式 */
.price-analysis-view .stock-analysis-card .analysis-subtitle {
  margin: 0;
  font-size: 0.9rem;
  font-weight: 400;
  color: #666;
  color: var(--color-text-secondary, #666);
  opacity: 0.8;
  text-align: center;
}

/* 圖表標題和標籤樣式 */
.price-analysis-view .chart-header {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 5px 10px;
  margin-top: -15px;
  margin-bottom: -10px;
  flex-direction: column;
}

.price-analysis-view .chart-title {
  font-size: 0.95em;
  font-weight: bold;
  color: #333;
  margin: 0;
}

/* 圖表切換按鈕樣式 */
.price-analysis-view .chart-tabs {
  display: flex;
  gap: 8px;
  margin: 0;
  background-color: #f5f5f7;
  background-color: var(--color-bg-page, #f5f5f7);
  /* 與頁面背景一致或稍深 */
  padding: 4px;
  border-radius: 8px;
  border-radius: var(--border-radius-medium, 8px);
}



.price-analysis-view .chart-tab {
  padding: 8px 16px;
  border: none;
  background: none;
  cursor: pointer;
  border-radius: 6px;
  border-radius: var(--border-radius-small, 6px);
  /* 內部按鈕圓角略小於容器 */
  font-size: 14px;
  font-weight: 500;
  color: #86868b;
  color: var(--color-text-secondary, #86868b);
  transition: all 0.2s ease;
  position: relative;
  white-space: nowrap;
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', sans-serif;
}

.price-analysis-view .chart-tab:hover {
  color: #1d1d1f;
}

.price-analysis-view .chart-tab.active {
  background-color: #ffffff;
  background-color: var(--color-bg-card, #ffffff);
  color: #1d1d1f;
  color: var(--color-text-primary, #1d1d1f);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  box-shadow: var(--shadow-xs, 0 1px 3px rgba(0, 0, 0, 0.1));
  /* 更細微的陰影 */
}

/* 圖表縮放按鈕組 - 蘋果風格 */
.price-analysis-view .chart-zoom-buttons {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 10;
  display: flex;
  flex-direction: column;
  gap: 1px;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-radius: 10px;
  padding: 4px;
  box-shadow: 0 2px 16px rgba(0, 0, 0, 0.12),
              0 0 0 0.5px rgba(0, 0, 0, 0.08);
}

.price-analysis-view .zoom-btn {
  width: 32px;
  height: 32px;
  border: none;
  background: transparent;
  color: #1d1d1f;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  transition: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
  padding: 0;
  position: relative;
}

.price-analysis-view .zoom-btn:hover {
  background: rgba(0, 0, 0, 0.06);
}

.price-analysis-view .zoom-btn:active {
  background: rgba(0, 0, 0, 0.12);
  transform: scale(0.95);
}

.price-analysis-view .zoom-btn svg {
  width: 16px;
  height: 16px;
  color: #1d1d1f;
}

/* 分隔線 */
.price-analysis-view .zoom-btn.zoom-out {
  margin-bottom: 4px;
  position: relative;
}

.price-analysis-view .zoom-btn.zoom-out::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 6px;
  right: 6px;
  height: 0.5px;
  background: rgba(0, 0, 0, 0.1);
}

/* 表單樣式 */
.price-analysis-view .input-group {
  margin-bottom: 15px;
  /* 統一間距為 15px */
  width: 100%;
  max-width: 320px;
  /* 稍微增加以容納更寬的 input */
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  /* 從 8px 減少到 6px，讓 label 和 input 更接近 */
}

.price-analysis-view .input-group label {
  margin-bottom: 0;
  white-space: nowrap;
  font-weight: 500;
  /* 比普通文字稍重 */
  font-size: 0.9em;
  /* 略小於主要內容文字 */
  flex-shrink: 0;
  /* 防止標籤被壓縮 */
}

.price-analysis-view .form-control {
  width: 180px;
  /* 從 150px 增加到 180px，向 label 延伸 */
  min-width: 60px;
  max-width: 180px;
  /* 同步更新最大寬度 */
  padding: 6px;
  border: 1px solid #ddd;
  border: 1px solid var(--color-border-default, #ddd);
  border-radius: 4px;
  border-radius: var(--border-radius-small, 4px);
  font-size: 16px;
  box-sizing: border-box;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.price-analysis-view .form-control:focus,
.price-analysis-view .react-datepicker__input-container input:focus {
  border-color: #007aff;
  border-color: var(--accent-color-blue, #007aff);
  box-shadow: 0 0 0 4px rgba(0, 122, 255, 0.3);
  box-shadow: var(--shadow-focus-ring, 0 0 0 4px rgba(0, 122, 255, 0.3));
  outline: none;
}

/* DatePicker 特定樣式 */
.price-analysis-view .react-datepicker-wrapper {
  width: 180px;
  /* 同步更新為 180px */
  min-width: 60px;
}

.price-analysis-view .react-datepicker__input-container input {
  width: 100%;
  /* 修改：使其填滿父層寬度 */
  max-width: 100%;
  /* 修改：確保不超過父層寬度 */
  padding: 8px;
  border: 1px solid #ddd;
  border: 1px solid var(--color-border-default, #ddd);
  border-radius: 4px;
  border-radius: var(--border-radius-small, 4px);
  font-size: 16px;
  box-sizing: border-box;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.price-analysis-view .input-group.query-mode-inputs.advanced-query-mode-inputs,
.price-analysis-view .input-group {
  overflow: visible !important;
}


.price-analysis-view .stock-analysis-card .react-datepicker-popper {
  transform: translateX(-50%);
  margin-top: 40px;
  z-index: 9999 !important;
}

/* 確保在 iOS 設備上日期輸入框的文字大小一致 */
@supports (-webkit-touch-callout: none) {
  .price-analysis-view input[type="date"].form-control {
    font-size: 16px !important;
  }
}

/* 響應式設計 */
@media (max-width: 768px) {
  .price-analysis-view .chart-title {
    font-size: 0.9em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .price-analysis-view .stock-analysis-card {
    flex-grow: 0;
    flex-shrink: 1;
    flex-basis: auto;
    width: 100%;
    min-width: 100%;
    max-width: none;
    padding: 10px 10px 0px 10px;
  }

  .price-analysis-view .input-group {
    width: 100%;
    padding: 0;
    display: flex;
    align-items: center;
  }


  .price-analysis-view .stock-analysis-card .title-group {
    margin-bottom: 25px;
    padding-bottom: 0;
  }

  .price-analysis-view .stock-analysis-card .analysis-main-title {
    font-size: 1.4rem;
    margin-bottom: 4px;
  }

  .price-analysis-view .stock-analysis-card .analysis-subtitle {
    font-size: 0.85rem;
  }

  /* 手機版底部說明標籤樣式 */
  .price-analysis-view .bottom-description-section .description-tabs {
    flex-wrap: wrap;
    gap: 5px;
    margin-bottom: 15px;
  }

  .price-analysis-view .bottom-description-section .description-tab {
    flex: 1 1 45%;
    font-size: 0.8rem;
    padding: 10px 8px;
    min-width: 0;
  }

  .price-analysis-view .bottom-description-section .description-tabs-container {
    padding: 15px;
  }

  .price-analysis-view .bottom-description-section .description-tab-content h3 {
    font-size: 1rem;
    margin-bottom: 12px;
  }

  .price-analysis-view .chart-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    margin-top: -10px;
    margin-bottom: 0px;
  }

  .price-analysis-view .chart-tabs {
    width: 100%;
    justify-content: stretch;
  }

  /* 手機版縮放按鈕 */
  .price-analysis-view .chart-zoom-buttons {
    top: 8px;
    left: 8px;
    padding: 3px;
  }

  .price-analysis-view .zoom-btn {
    width: 28px;
    height: 28px;
  }

  .price-analysis-view .zoom-btn svg {
    width: 14px;
    height: 14px;
    background-color: #f5f5f7;
    padding: 3px;
  }

  .price-analysis-view .chart-tab {
    flex: 1 1;
    text-align: center;
    padding: 8px 8px;
    font-size: 13px;
  }

  .price-analysis-view .chart-card {
    flex-grow: 0;
    flex-shrink: 0;
    flex-basis: auto;
    width: 100%;
    min-width: 0;
    padding: 20px 10px 0px 10px;
    box-sizing: border-box;
  }

  .price-analysis-view .chart-placeholder {
    height: 300px;
  }

  .price-analysis-view .content-layout-container .dashboard {
    flex-direction: column;
  }
}

.price-analysis-view .turnstile-container {
  margin: 15px 0;
  display: flex;
  justify-content: center;
}

.price-analysis-view .turnstile-container>div {
  transform: scale(0.85);
  transform-origin: center;
}


.price-analysis-view .error-message {
  color: #dc3545;
  font-size: 0.875rem;
  margin-top: 5px;
}

/* 分析結果樣式 */
.price-analysis-view .analysis-result {
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
  gap: 30px;
  padding: 15px 20px;
  margin: 10px 0;
  overflow: hidden;
  width: 100%;
}

.price-analysis-view .analysis-item {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 100px;
  max-width: 150px;
  flex-shrink: 1;
  align-items: center;
}

.price-analysis-view .analysis-label {
  font-size: 1em;
  color: #6c757d;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.price-analysis-view .analysis-value {
  font-size: 1.3em;
  font-weight: 600;
  color: #2c3e50;
  font-family: 'SF Pro Display', -apple-system, BlinkMacSystemFont, sans-serif;
}

/* 情緒狀態顏色 (修改選擇器) */
.price-analysis-view .sentiment-extremeOptimism {
  /* 原 .sentiment-極度樂觀 */
  color: #D24A93;
  /* 與圖表上軌顏色一致 - 深紅褐色 */
}

.price-analysis-view .sentiment-optimism {
  /* 原 .sentiment-樂觀 */
  color: #F0B8CE;
  /* 較淺的紅褐色 */
}

.price-analysis-view .sentiment-neutral {
  /* 原 .sentiment-中性 */
  color: #708090;
  /* 與 MA20 顏色一致 - 橙黃色 */
}

.price-analysis-view .sentiment-pessimism {
  /* 原 .sentiment-悲觀 */
  color: #5B9BD5;
  /* 較淺的墨綠色 */
}

.price-analysis-view .sentiment-extremePessimism {
  /* 原 .sentiment-極度悲觀 */
  color: #0000FF;
  /* 與圖表下軌顏色一致 - 深墨綠色 */
}

/* 響應式設計調整 */
@media (max-width: 768px) {
  .price-analysis-view .analysis-result {
    align-items: flex-start;
    gap: 2px;
    padding: 0px;
  }

  .price-analysis-view .analysis-item {
    width: 100%;
    max-width: none;
  }

  .price-analysis-view .analysis-value {
    font-size: 1.2em;
  }

  .price-analysis-view .description-container {
    margin-top: 10px;
    padding-top: 25px;
  }
}

/* 分析按鈕樣式 - 調整為在按鈕組中使用 */
/* 使用更具體的選擇器來覆蓋 App.css 中的 .btn-primary 樣式 */
.price-analysis-view .stock-analysis-card .button-group .analysis-button.btn-primary {
  flex: 1 1;
  padding: 10px 16px !important;
  font-size: 14px !important;
  font-weight: 500;
  color: white;
  border: none;
  border-radius: 8px !important;
  cursor: pointer;
  background: linear-gradient(135deg,
      #FF00FF 0%,
      /* 亮紫色 */
      #4B0082 25%,
      /* 靛青色 */
      #0000FF 50%,
      /* 藍色 */
      #00BFFF 75%,
      /* 天藍色 */
      #1E90FF 100%
      /* 道奇藍 */
    ) !important;
  background-size: 200% 200%;
  transition: all 0.3s ease;
  box-shadow: 0 2px 10px rgba(0, 0, 255, 0.2);
  white-space: nowrap;
  margin: 0 !important;
  display: inline-block;
  text-align: center;
}

.price-analysis-view .stock-analysis-card .button-group .analysis-button.btn-primary:hover {
  background: linear-gradient(135deg,
      #FF00FF 0%,
      #4B0082 25%,
      #0000FF 50%,
      #00BFFF 75%,
      #1E90FF 100%
    ) !important;
  background-position: right center;
  transform: translateY(-1px);
  box-shadow: 0 4px 15px rgba(0, 0, 255, 0.3);
}

.price-analysis-view .stock-analysis-card .button-group .analysis-button.btn-primary:active {
  transform: translateY(1px);
  box-shadow: 0 2px 8px rgba(0, 0, 255, 0.2);
}

/* 禁用狀態 */
.price-analysis-view .stock-analysis-card .button-group .analysis-button.btn-primary:disabled {
  background: linear-gradient(135deg,
      rgba(255, 0, 255, 0.5) 0%,
      rgba(75, 0, 130, 0.5) 25%,
      rgba(0, 0, 255, 0.5) 50%,
      rgba(0, 191, 255, 0.5) 75%,
      rgba(30, 144, 255, 0.5) 100%) !important;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* 確保描述容器不超出畫面 */
.price-analysis-view .description-container {
  width: 100%;
  /* 確保寬度為100% */
  max-width: 100%;
  /* 確保不超出父容器 */
  box-sizing: border-box;
  /* 包含padding和border在內 */

}

.price-analysis-view .react-datepicker__triangle {
  display: none;
  /* 隱藏三角形箭頭 */
}

/* 按鈕組容器 - 讓兩個按鈕並排 */
.price-analysis-view .stock-analysis-card .button-group {
  display: flex;
  gap: 10px;
  width: 100%;
  max-width: 320px;
  margin-top: 5px;
  margin-bottom: 15px;
  align-self: center;
}

/* 查詢模式切換按鈕樣式 - 調整為與分析按鈕相同大小 */
.price-analysis-view .stock-analysis-card .query-mode-button {
  flex: 1 1;
  padding: 10px 16px;
  font-size: 14px;
  font-weight: 500;
  color: #ffffff;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  background-color: #586e86;
  transition: all 0.3s ease;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.15);
  white-space: nowrap;
}

.price-analysis-view .stock-analysis-card .query-mode-button:hover {
  background-color: #2a4c6f;
  box-shadow: 0 3px 7px rgba(0, 0, 0, 0.2);
  transform: translateY(-1px);
}

.price-analysis-view .stock-analysis-card .query-mode-button:active {
  background-color: #004085;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
  transform: translateY(1px);
}

/* 進階查詢模式 - 輸入欄位容器樣式 (垂直排列) */
.price-analysis-view .stock-analysis-card .query-mode-inputs.advanced-query-mode-inputs {
  position: relative;
  margin-bottom: 15px;
  display: flex;
  flex-direction: column;
  /* 垂直排列 */
}

/* 所有查詢模式 - 輸入欄位容器樣式 (通用樣式) */
.price-analysis-view .stock-analysis-card .query-mode-inputs {
  margin-bottom: 10;
  /* 移除額外間距，讓內部 input-group 控制間距 */
}

/* 確保 input-group 在容器內水平置中 */
.price-analysis-view .stock-analysis-card .query-mode-inputs .input-group {
  margin-bottom: 8px;
  flex-direction: row;
  /* 水平排列 */
  display: flex;
  align-items: center;
}

/* 新增：圖表載入指示器的樣式 */
.price-analysis-view .chart-loading-indicator {
  position: absolute;
  /* 相對於 .chart-content 定位 */
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  /* 佔滿 .chart-content */
  display: flex;
  justify-content: center;
  align-items: center;
  background-color: rgba(255, 255, 255, 0.8);
  /* 半透明背景，可選 */
  z-index: 10;
  /* 確保在圖表之上 */
}

/* 確保 Loading.css 中的 spinner 樣式能正確顯示 */
.price-analysis-view .chart-loading-indicator .loading-spinner {
  min-height: auto;
  /* 覆蓋 Loading.css 中可能存在的 min-height */
  color: #666;
  /* 確保文字顏色可見 */
  /* 可能需要根據 Loading.css 的具體實現調整其他樣式 */
}

/* 佔位符樣式 (可選) */
.price-analysis-view .chart-placeholder {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 300px;
  /* 與 chart-content 高度一致 */
  color: #999;
  font-size: 1rem;
}

/* 新增：主內容區域佈局 (仿效 MarketSentimentIndex) */
.price-analysis-view .content-layout-container {
  display: flex;
  flex-direction: column;
  /* 預設垂直排列，適用於小螢幕 */
  gap: 20px;
  margin-top: 20px;
  margin-bottom: 20px;
  /* 增加底部間距 */
}

/* 桌面版面配置 */
@media (min-width: 1024px) {
  .price-analysis-view .content-layout-container {
    flex-direction: row;
    align-items: stretch;
    /* 讓子元素等高 */
    height: 78vh;
    /* 設定固定高度，讓內部可以滾動 */
    max-height: 78vh;
    /* 確保不超過此高度 */
  }

  /* 主要容器：現在只有 .dashboard */
  .price-analysis-view .content-layout-container .dashboard {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    overflow: hidden;
    width: 100%;
  }

  /* 包裹 stock-analysis-card 和 hot-searches-section 的容器 */
  .price-analysis-view .content-layout-container .dashboard .analysis-controls-wrapper {
    display: flex;
    flex-direction: column;
    flex: 0 0 380px;
    /* 固定寬度380px，不收縮不擴展 */
    height: auto;
    max-height: 100%;
    min-width: 350px;
    /* 最小寬度保證 */
  }

  /* .dashboard 內部的物件：.stock-analysis-card 和 .chart-card */
  .price-analysis-view .content-layout-container .dashboard .stock-analysis-card {
    flex-shrink: 0;
    width: 100%;
    max-width: none;
    /* 移除最大寬度限制，讓它能使用父容器的完整寬度 */
  }

  .price-analysis-view .content-layout-container .dashboard .chart-card {
    flex: 1 1 auto;
    /* 佔據剩餘空間，可收縮可擴展 */
    display: flex;
    flex-direction: column;
    overflow: hidden;
    min-width: 400px;
    /* 確保圖表有最小寬度 */
  }

  .price-analysis-view .content-layout-container .dashboard .chart-card .chart-container {
    flex-grow: 1;
    min-height: 0;
  }
}

/* 中大型螢幕優化 */
@media (min-width: 1200px) {
  .price-analysis-view .content-layout-container .dashboard .analysis-controls-wrapper {
    flex: 0 0 400px;
    /* 中大型螢幕使用400px */
  }
}

@media (min-width: 1500px) {
  .price-analysis-view .content-layout-container {
    height: 70vh;
    /* 設定固定高度，讓內部可以滾動 */
    max-height: 70vh;
    /* 確保不超過此高度 */
  }

  /* 在更大螢幕上給分析控制區更多空間 */
  .price-analysis-view .content-layout-container .dashboard .analysis-controls-wrapper {
    flex: 0 0 420px;
    /* 在大螢幕上增加到420px */
  }
}


/* 新增：說明區塊容器 (仿效 MarketSentimentIndex) */
.price-analysis-view .description-container-wrapper {
  background-color: white;
  background-color: var(--color-bg-card, white);
  border-radius: 8px;
  border-radius: var(--border-radius-large, 8px);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  box-shadow: var(--shadow-m, 0 2px 4px rgba(0, 0, 0, 0.1));
  padding: 0;
  display: flex;
  flex-direction: column;
  min-height: 0;
  /* 防止內容撐開 */
  overflow: hidden;
  /* 確保 wrapper 本身不出現滾動條 */
}

/* 移除右側容器相關樣式，因為現在使用底部佈局 */

/* 底部說明區域 */
.price-analysis-view .bottom-description-section {
  margin-top: 20px;
  background-color: white;
  background-color: var(--color-bg-card, white);
  border-radius: 8px;
  border-radius: var(--border-radius-large, 8px);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  box-shadow: var(--shadow-m, 0 2px 4px rgba(0, 0, 0, 0.1));
  overflow: hidden;
}

/* 底部標籤式說明容器 */
.price-analysis-view .bottom-description-section .description-tabs-container {
  display: flex;
  flex-direction: column;
  padding: 20px;
  padding: var(--space-l, 20px);
}

/* 水平說明標籤導航 */
.price-analysis-view .bottom-description-section .description-tabs {
  display: flex;
  border-bottom: 2px solid #f0f0f0;
  border-bottom: 2px solid var(--color-border-light, #f0f0f0);
  margin-bottom: 20px;
  gap: 0;
}

.price-analysis-view .bottom-description-section .description-tab {
  flex: 1 1;
  padding: 12px 16px;
  border: none;
  background: none;
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 500;
  color: #666;
  color: var(--color-text-secondary, #666);
  transition: all 0.2s ease;
  text-align: center;
  border-bottom: 3px solid transparent;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  position: relative;
}

.price-analysis-view .bottom-description-section .description-tab:hover {
  color: #1d1d1f;
  color: var(--color-text-primary, #1d1d1f);
  background-color: #f8f8f8;
  background-color: var(--color-bg-muted, #f8f8f8);
}

.price-analysis-view .bottom-description-section .description-tab.active {
  color: #007aff;
  color: var(--accent-color-blue, #007aff);
  border-bottom-color: #007aff;
  border-bottom-color: var(--accent-color-blue, #007aff);
  background-color: white;
  background-color: var(--color-bg-card, white);
  font-weight: 600;
}

/* 底部標籤內容區域 */
.price-analysis-view .bottom-description-section .description-tab-content {
  min-height: 200px;
  max-height: 400px;
  overflow-y: auto;
}

.price-analysis-view .description-tab-content h3 {
  margin: 0 0 15px 0;
  font-size: 1.1rem;
  font-weight: 600;
  color: #1d1d1f;
  color: var(--color-text-primary, #1d1d1f);
}

.price-analysis-view .description-tab-content p {
  margin: 0 0 15px 0;
  line-height: 1.6;
  color: #666;
  color: var(--color-text-secondary, #666);
}

.price-analysis-view .description-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.price-analysis-view .description-list li {
  padding: 8px 0;
  padding-left: 20px;
  position: relative;
  line-height: 1.5;
  color: #666;
  color: var(--color-text-secondary, #666);
}

.price-analysis-view .description-list li:before {
  content: "•";
  color: #007aff;
  color: var(--accent-color-blue, #007aff);
  font-weight: bold;
  position: absolute;
  left: 0;
}

.price-analysis-view .overview-links {
  margin-top: 20px;
  padding-top: 15px;
  border-top: 1px solid #f0f0f0;
  border-top: 1px solid var(--color-border-light, #f0f0f0);
}

.price-analysis-view .overview-links a {
  color: #007aff;
  color: var(--accent-color-blue, #007aff);
  text-decoration: none;
  font-weight: 500;
}

.price-analysis-view .overview-links a:hover {
  text-decoration: underline;
}

/* 新增：上半部內容容器樣式 */
.price-analysis-view .description-content-top {
  flex-basis: 100%;
  overflow-y: auto;
  padding-right: 10px;
  box-sizing: border-box;
}

/* 新增：下半部廣告容器樣式 */
.price-analysis-view .description-content-ad {
  flex-basis: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 10px;
  box-sizing: border-box;
}

.price-analysis-view .description-content-top::-webkit-scrollbar {
  width: 6px;
  /* 更細的捲動條 */
}

.price-analysis-view .description-content-top::-webkit-scrollbar-track {
  background: transparent;
  /* 軌道透明 */
}

.price-analysis-view .description-content-top::-webkit-scrollbar-thumb {
  background: #dcdcdc;
  background: var(--color-scrollbar-thumb, #dcdcdc);
  /* 淡灰色滑塊 */
  border-radius: 6px;
}

.price-analysis-view .description-content-top::-webkit-scrollbar-thumb:hover {
  background: #bfbfbf;
  background: var(--color-scrollbar-thumb-hover, #bfbfbf);
  /* 滑鼠懸停時略深 */
}

@media (max-width: 768px) {
  /* 按鈕組在小螢幕上保持並排，但調整間距 */
  .price-analysis-view .stock-analysis-card .button-group {
    gap: 8px;
    max-width: 100%;
  }

  /* 調整按鈕文字大小以適應小螢幕 */
  .price-analysis-view .stock-analysis-card .button-group .query-mode-button,
  .price-analysis-view .stock-analysis-card .button-group .analysis-button.btn-primary {
    font-size: 13px !important;
    padding: 10px 12px !important;
  }
}

@media (max-width: 430px) {
  .price-analysis-view .stock-analysis-card .input-group {
    align-items: center;
    width: 300px;
    /* 確保佔滿父容器寬度 */
    max-width: none;
    /* 移除或覆蓋全域的 max-width: 300px 限制 */
    /* padding: 0 5px; 如果希望內容與邊緣有一點點間距，可以取消註解此行，並加上 box-sizing: border-box; */
    /* box-sizing: border-box; */
  }

  .price-analysis-view .stock-analysis-card .form-control {
    width: 100% !important;
    max-width: 100% !important;
  }

  .price-analysis-view .stock-analysis-card .react-datepicker__input-container {
    width: 100% !important;
    max-width: 100% !important;
  }

  .price-analysis-view .stock-analysis-card .react-datepicker-wrapper {
    width: 100% !important;
    max-width: 100% !important;
  }

  /* 在極小螢幕上進一步調整按鈕 */
  .price-analysis-view .stock-analysis-card .button-group {
    gap: 6px;
  }

  .price-analysis-view .stock-analysis-card .button-group .query-mode-button,
  .price-analysis-view .stock-analysis-card .button-group .analysis-button.btn-primary {
    font-size: 12px !important;
    padding: 9px 10px !important;
  }
}

/* 快速選擇區塊樣式 (整合熱門搜尋和免費股票清單) */
/* 快速選擇區塊樣式 - 使用 Flexbox 佈局 */
.price-analysis-view .stock-analysis-card .quick-select-section {
  margin-top: 20px;
  width: 100%;
  height: 400px;
  /* 固定高度 */
  background-color: #f8f9fa;
  background-color: var(--color-bg-secondary, #f8f9fa);
  border-radius: 8px;
  border-radius: var(--border-radius-medium, 8px);
  border: 1px solid #e9ecef;
  border: 1px solid var(--color-border-light, #e9ecef);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* Tab 導航樣式 - 固定在頂部 */
.price-analysis-view .quick-select-tabs {
  display: flex;
  flex-shrink: 0;
  /* 不收縮 */
  background-color: rgba(0, 122, 255, 0.05);
  border-bottom: 1px solid #e9ecef;
  border-bottom: 1px solid var(--color-border-light, #e9ecef);
}

.price-analysis-view .quick-select-tab {
  flex: 1 1;
  padding: 12px 16px;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 500;
  color: #666;
  color: var(--color-text-secondary, #666);
  transition: all 0.2s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  position: relative;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.price-analysis-view .quick-select-tab:hover {
  background-color: rgba(0, 122, 255, 0.08);
  color: #333;
  color: var(--color-text-primary, #333);
}

.price-analysis-view .quick-select-tab.active {
  background-color: rgba(0, 122, 255, 0.1);
  color: #007AFF;
  font-weight: 600;
}

.price-analysis-view .quick-select-tab.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(135deg, #007AFF 0%, #5856D6 100%);
}

/* Tab 內容區域 - 可滾動 */
.price-analysis-view .quick-select-content {
  flex: 1 1;
  /* 佔據剩餘空間 */
  overflow-y: auto;
  overflow-x: hidden;
  padding: 16px;
  min-height: 0;
  /* 重要：允許 flex 子項收縮 */
  box-sizing: border-box;
  /* 確保 padding 包含在尺寸內 */
}

/* 熱門搜尋 Tab 內容 */
.price-analysis-view .hot-searches-tab-content {
  text-align: center;
}

.price-analysis-view .hot-searches-tab-content .loading-text,
.price-analysis-view .hot-searches-tab-content .no-data-text {
  font-size: 0.85em;
  color: #888;
  color: var(--color-text-tertiary, #888);
  margin: 20px 0;
}

/* 熱門搜尋列表 - 改為垂直排列 */
.price-analysis-view .hot-search-list {
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* 熱門搜尋項目 - 改為一列一個 */
.price-analysis-view .hot-search-item {
  background-color: rgba(255, 255, 255, 0.8);
  border-radius: 6px;
  border-radius: var(--border-radius-small, 6px);
  padding: 12px 16px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  border: 1px solid rgba(0, 0, 0, 0.08);
  width: 100%;
  text-align: left;
  box-sizing: border-box;
  /* 確保 padding 和 border 包含在寬度內 */
  min-width: 0;
  /* 允許收縮 */
}

.price-analysis-view .hot-search-item:hover,
.price-analysis-view .hot-search-item:focus {
  background-color: rgba(0, 122, 255, 0.05);
  border-color: #007AFF;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 122, 255, 0.15);
  outline: none;
}

.price-analysis-view .hot-search-item:active {
  transform: translateY(0);
}

/* 熱門搜尋項目資訊 */
.price-analysis-view .hot-search-info {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  min-width: 0;
  /* 允許收縮 */
  box-sizing: border-box;
  /* 確保正確的盒模型 */
}

.price-analysis-view .hot-search-ticker {
  font-size: 0.9rem;
  font-weight: 700;
  color: #007AFF;
  font-family: 'SF Mono', 'Monaco', 'Inconsolata', 'Roboto Mono', monospace;
  flex-shrink: 0;
  min-width: 60px;
}

.price-analysis-view .hot-search-name {
  font-size: 0.85rem;
  color: #666;
  color: var(--color-text-secondary, #666);
  flex: 1 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
  /* 重要：允許 flex 項目收縮到內容以下 */
}

/* 當只有 ticker 沒有 name 時的樣式調整 */
.price-analysis-view .hot-search-info .hot-search-ticker:only-child {
  flex: 1 1;
  text-align: left;
  min-width: auto;
}

/* 免費股票清單 Tab 內容 - 簡化樣式 */
.price-analysis-view .free-stocks-tab-content {
  height: 100%;
  /* 填滿父容器 */
  overflow: visible;
}

.price-analysis-view .integrated-free-stock-list {
  height: 100%;
}

.price-analysis-view .integrated-free-stock-list .free-stock-list {
  background: transparent;
  box-shadow: none;
  border: none;
  padding: 0;
  margin: 0;
  height: 100%;
  overflow: visible;
}

.price-analysis-view .integrated-free-stock-list .free-stock-list:hover {
  transform: none;
  box-shadow: none;
}

/* 響應式調整 */
@media (max-width: 768px) {
  .price-analysis-view .stock-analysis-card .quick-select-section {
    margin-top: 16px;
    margin-bottom: 10px;
    height: 350px;
    /* 在小螢幕上減少高度 */
  }

  .price-analysis-view .quick-select-tab {
    padding: 10px 8px;
    font-size: 0.8rem;
    min-width: 0;
  }

  .price-analysis-view .quick-select-content {
    padding: 12px;
  }

  .price-analysis-view .hot-search-item {
    padding: 10px 12px;
  }

  .price-analysis-view .hot-search-ticker {
    font-size: 0.8rem;
    min-width: 50px;
  }

  .price-analysis-view .hot-search-name {
    font-size: 0.75rem;
  }
}

/* 更小螢幕的調整 */
@media (max-width: 480px) {
  .price-analysis-view .stock-analysis-card .quick-select-section {
    height: 300px;
    /* 在更小螢幕上進一步減少高度 */
  }

  .price-analysis-view .quick-select-content {
    padding: 8px;
  }
}
.description-container {
  position: relative;
  width: 100%;
  max-width: 100%;
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', sans-serif;
  color: rgba(29, 29, 31, 0.8);
  color: var(--color-text-secondary, rgba(29, 29, 31, 0.8));
  background-color: transparent;
  transition: all 0.3s ease;
  cursor: pointer;
}

.description-container:hover {
}

.description-short {
  margin-bottom: 12px;
  line-height: 1.47059;
  font-size: 17px;
  font-weight: 400;
  letter-spacing: -0.022em;
  color: rgba(29, 29, 31, 0.8);
}

.description-full {
  display: block;
  margin-top: 12px;
  line-height: 1.47059;
  font-size: 17px;
  letter-spacing: -0.022em;
  opacity: 0.6;
  transition: all 0.3s ease;
  position: relative;
  max-height: 80px;
  overflow: hidden;
}

.description-full::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 60px;
  background: linear-gradient(
    to bottom,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0.8) 50%,
    rgba(255, 255, 255, 1) 100%
  );
  pointer-events: none;
}

.description-expanded .description-full {
  max-height: 2000px;
  opacity: 1;
  display: block;
}

.description-expanded .description-full::after {
  display: none;
}

.description-section {
  margin-bottom: 20px;
  opacity: 1;
}

.description-section h4 {
  margin-bottom: 12px;
  font-size: 19px;
  line-height: 1.21053;
  font-weight: 600;
  letter-spacing: .012em;
  color: rgba(29, 29, 31, 0.8);
}

.description-section ul {
  padding-left: 24px;
  margin: 12px 0;
  list-style-type: none;
}

.description-section li {
  margin-bottom: 12px;
  position: relative;
  color: rgba(29, 29, 31, 0.8);
}

.description-section li:before {
  content: "•";
  position: absolute;
  left: -18px;
  color: #06c;
}

.description-section p {
  color: rgba(66, 66, 69, 0.8);
  margin-bottom: 12px;
}

.description-toggle {
  color: #06c;
  cursor: pointer;
  font-size: 17px;
  font-weight: 400;
  letter-spacing: -0.022em;
  background: none;
  border: none;
  padding: 0;
  transition: color 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  position: relative;
  z-index: 2;
  background-color: transparent;
  padding: 8px 16px;
}

.description-toggle:after {
  content: "";
  display: inline-block;
  width: 12px;
  height: 12px;
  margin-left: 6px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 12 12%27 fill=%27%2306c%27%3E%3Cpath d=%27M6 9L0 3h12z%27%2F%3E%3C%2Fsvg%3E");
  transform: rotate(0);
  transition: transform 0.3s ease;
}

.description-toggle.expanded:after {
  transform: rotate(180deg);
}

.description-toggle:hover {
  color: #0077ed;
}

@media (max-width: 734px) {
  .description-container {
    font-size: 14px;
  }
  
  .description-short {
    font-size: 15px;
  }
  
  .description-full {
    font-size: 15px;
  }
  
  .description-section h4 {
    font-size: 17px;
  }
  
  .description-toggle {
    font-size: 15px;
  }
}

@media (max-width: 1068px) {
  .description-container {
  }
}

/* 新增主標題樣式 */
.description-main-title {
  font-size: 24px; /* 或者您偏好的大小 */
  font-weight: 600; /* 加粗 */
  color: #1d1d1f;
  color: var(--color-text-primary, #1d1d1f); /* 主要文字顏色 */
  margin-bottom: 16px; /* 與下方內容的間距 */
  line-height: 1.25;
  letter-spacing: .007em;
} 
/* 免費股票清單組件樣式 */
.free-stock-list {
  background: transparent;
  /* 在 Tab 中使用透明背景 */
  padding: 0;
  /* 移除 padding，由父容器控制 */
  margin: 0;
  /* 移除 margin */
  height: 100%;
  /* 填滿父容器 */
  overflow: visible;
  /* 確保內容可見 */
}

/* 區域容器 */
.free-stock-regions {
  display: flex;
  flex-direction: column;
  gap: 16px;
  height: 100%;
}

/* 單個區域 */
.free-stock-region {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* 區域標題 */
.region-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 4px;
  margin-bottom: 4px;
}

.region-icon {
  font-size: 1rem;
  line-height: 1;
}

.region-title {
  font-size: 0.8rem;
  font-weight: 600;
  color: #666;
  color: var(--color-text-secondary, #666);
  margin: 0;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

/* 區域內的股票列表 - 改為垂直排列 */
.region-stocks {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* 免費股票項目 - 改為一列一個，增大字體 */
.free-stock-item {
  display: flex;
  align-items: center;
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  text-align: left;
  position: relative;
  width: 100%;
}

.free-stock-item:hover {
  transform: translateY(-1px);
  border-color: #007AFF;
  box-shadow: 0 4px 12px rgba(0, 122, 255, 0.15);
  background: rgba(0, 122, 255, 0.05);
}

.free-stock-item:active {
  transform: translateY(0);
}

.free-stock-info {
  display: flex;
  flex-direction: row;
  align-items: center;
  width: 100%;
  min-width: 0;
  gap: 8px;
}

.free-stock-ticker {
  font-size: 0.8rem;
  font-weight: 700;
  color: #007AFF;
  font-family: 'SF Mono', 'Monaco', 'Inconsolata', 'Roboto Mono', monospace;
  flex-shrink: 0;
  min-width: 60px;
}

.free-stock-name {
  font-size: 0.8rem;
  color: #1d1d1f;
  line-height: 1.2;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1 1;
  min-width: 0;
}

/* 區域標籤 */
.stock-region-badge {
  font-size: 0.7rem;
  color: #999;
  color: var(--color-text-tertiary, #999);
  background: rgba(0, 0, 0, 0.05);
  padding: 2px 6px;
  border-radius: 3px;
  margin-left: auto;
  flex-shrink: 0;
  font-weight: 500;
}

/* 響應式設計 */
@media (max-width: 768px) {
  .free-stock-regions {
    gap: 12px;
  }

  .region-header {
    gap: 6px;
    margin-bottom: 2px;
  }

  .region-icon {
    font-size: 0.9rem;
  }

  .region-title {
    font-size: 0.75rem;
  }

  .region-stocks {
    gap: 6px;
  }

  .free-stock-item {
    padding: 10px 12px;
  }

  .free-stock-ticker {
    font-size: 0.8rem;
    min-width: 50px;
  }

  .free-stock-name {
    font-size: 0.75rem;
  }

  .stock-region-badge {
    font-size: 0.65rem;
    padding: 1px 4px;
  }
}

@media (max-width: 480px) {
  .free-stock-regions {
    gap: 10px;
  }

  .region-stocks {
    gap: 4px;
  }

  .free-stock-item {
    padding: 8px 10px;
  }

  .free-stock-ticker {
    font-size: 0.75rem;
    min-width: 45px;
  }

  .free-stock-name {
    font-size: 0.7rem;
  }

  .stock-region-badge {
    font-size: 0.6rem;
    padding: 1px 3px;
  }

  .free-stock-info {
    gap: 6px;
  }
}

/* 深色模式支援 */
@media (prefers-color-scheme: dark) {
  .free-stock-list {
    background: rgba(28, 28, 30, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.1);
  }

  .free-stock-item {
    background: rgba(44, 44, 46, 0.8);
    border-color: rgba(255, 255, 255, 0.1);
  }

  .free-stock-item:hover {
    background: rgba(0, 122, 255, 0.1);
    border-color: #007AFF;
  }

  .free-stock-name {
    color: #f5f5f7;
  }

  .stock-region-badge {
    background: rgba(255, 255, 255, 0.1);
    color: #999;
  }
}

/* 載入和錯誤狀態樣式 */
.loading-message,
.error-message,
.no-data-message {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 200px;
  font-size: 0.9rem;
  color: #666;
  color: var(--color-text-secondary, #666);
  text-align: center;
}

.error-message {
  color: #dc3545;
  color: var(--color-error, #dc3545);
}

.loading-message {
  color: #999;
  color: var(--color-text-tertiary, #999);
}

/* 深色模式支援 - 狀態訊息 */
@media (prefers-color-scheme: dark) {

  .loading-message,
  .no-data-message {
    color: #999;
  }

  .error-message {
    color: #ff6b6b;
  }
}
/* 回到頂端按鈕 - 蘋果風格 */
.scroll-to-top-button {
  position: absolute;
  top: -25px; /* 懸浮在 chart-card 上方 */
  left: 50%; /* 水平置中 */
  transform: translateX(-50%); /* 完美置中 */
  z-index: 100;
  width: 44px;
  height: 44px;
  border: none;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-radius: 22px; /* 完美圓形 */
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08),
              0 0 0 0.5px rgba(0, 0, 0, 0.04);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  color: #8E8E93; /* iOS 柔和灰色 */
  overflow: hidden; /* 隱藏超出的箭頭 */
}

.scroll-to-top-button:hover {
  transform: translateX(-50%) translateY(-2px); /* 保持置中並上浮 */
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12),
              0 0 0 0.5px rgba(0, 0, 0, 0.06);
  color: #636366; /* Hover 時顏色稍深 */
}

.scroll-to-top-button:active {
  transform: translateX(-50%) scale(0.95); /* 保持置中並縮放 */
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 1px 8px rgba(0, 0, 0, 0.08),
              0 0 0 0.5px rgba(0, 0, 0, 0.04);
  color: #48484A; /* Active 時顏色更深 */
}

/* Chevron 圖標 */
.scroll-to-top-button .arrow-icon {
  position: absolute;
  width: 16px;
  height: 16px;
  color: inherit;
  animation: arrowFloat 2.5s ease-in-out infinite;
  opacity: 0.9; /* 稍微透明，更柔和 */
}

/* 三個箭頭的延遲動畫 */
.scroll-to-top-button .arrow-1 {
  animation-delay: 0s;
}

.scroll-to-top-button .arrow-2 {
  animation-delay: 0.5s;
}

.scroll-to-top-button .arrow-3 {
  animation-delay: 1s;
}

/* 箭頭向上移動並淡出的動畫 */
@keyframes arrowFloat {
  0% {
    transform: translateY(8px);
    opacity: 0;
  }
  20% {
    opacity: 1;
  }
  80% {
    opacity: 1;
  }
  100% {
    transform: translateY(-12px);
    opacity: 0;
  }
}

/* 暫停動畫當 hover 或 active 時 */
.scroll-to-top-button:hover .arrow-icon,
.scroll-to-top-button:active .arrow-icon {
  animation-play-state: paused;
}

/* 文章列表頁面樣式 */
.articles-page {
    padding-top: 0;
    padding-bottom: 2rem;
    background-color: #f5f5f7;
}

/* .articles-page h1 {
    font-size: 30px;
    font-weight: 600;
    letter-spacing: -0.003em;
    color: #1d1d1f;
    margin-bottom: 20px;
    margin-top: 0px;
} */

.articles-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    grid-gap: 2rem;
    gap: 2rem;
    max-width: 1440px;
    margin: 0 auto;
    padding: 0 20px;
}

.article-item {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.article-item a {
    text-decoration: none;
    color: inherit;
    display: block;
}

.article-cover {
    width: 100%;
    aspect-ratio: 16/9;
    height: 200px;
    overflow: hidden;
}

.article-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.article-content {
    padding: 20px;
}

.article-tag {
    font-size: 12px;
    font-weight: 600;
    color: #6e6e73;
    margin: 16px 0 8px 0;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.article-item h3 {
    font-size: 21px;
    line-height: 1.381;
    font-weight: 600;
    color: #1d1d1f;
    margin: 0 0 8px 0;
}

.article-date {
    font-size: 14px;
    color: #6e6e73;
}

/* 懸浮效果 */
.article-item:hover {
    transform: scale(1.02);
}

.article-item:hover .article-cover img {
    transform: scale(1.05);
}

/* 響應式設計 */
@media (max-width: 1068px) {
    .articles-list {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .article-content {
        padding: 1.5rem;
    }

    .article-item h3 {
        font-size: 24px;
    }
}

@media (max-width: 734px) {
    .articles-page {
    }

    .articles-list {
        padding: 0 16px;
        gap: 1rem;
    }

    .article-content {
        padding: 1.25rem;
    }

    .article-item h3 {
        font-size: 21px;
    }
} 
/* 文章詳情頁面樣式 */
.article-detail-page {
    max-width: 100%;
    margin: 0 auto;
    background: #fff;
    padding-top: 40px;
}

.article-header {
    max-width: 980px;
    margin: 0 auto;
    padding: 60px 20px 40px;
    text-align: center;
}

.article-detail-page h1 {
    font-size: 56px;
    font-weight: 600;
    letter-spacing: -0.005em;
    color: #1d1d1f;
    margin: 0 0 20px;
    line-height: 1.1;
}

.article-meta {
    font-size: 17px;
    color: #6e6e73;
    margin-bottom: 40px;
}

.article-content {
    max-width: 680px;
    margin: 0 auto;
    padding: 0 20px 60px;
    font-size: 19px;
    line-height: 1.7;
    color: #1d1d1f;
}

/* 文章內容樣式 */
.article-content p {
    margin: 1.4em 0;
}

.article-content h2 {
    font-size: 32px;
    font-weight: 600;
    margin: 1.8em 0 0.8em;
    letter-spacing: -0.003em;
    scroll-margin-top: 80px;
}

.article-content h3 {
    font-size: 24px;
    font-weight: 600;
    margin: 1.5em 0 0.6em;
}

.article-content ul, 
.article-content ol {
    margin: 1.4em 0;
    padding-left: 1.2em;
}

.article-content li {
    margin: 0.6em 0;
}

.article-content img {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
    margin: 2em 0;
}

.article-content blockquote {
    margin: 2em 0;
    padding: 0 0 0 1.4em;
    border-left: 3px solid #1d1d1f;
    font-style: italic;
    color: #6e6e73;
}

.article-content code {
    background: #f5f5f7;
    padding: 0.2em 0.4em;
    border-radius: 4px;
    font-size: 0.9em;
}

.article-content pre {
    background: #f5f5f7;
    padding: 1.2em;
    border-radius: 8px;
    overflow-x: auto;
    margin: 1.4em 0;
}

.article-content pre code {
    background: none;
    padding: 0;
}

/* 響應式設計 */
@media (max-width: 768px) {
    .article-header {
        padding: 40px 16px 24px;
    }

    .article-detail-page h1 {
        font-size: 36px;
    }

    .article-meta {
        font-size: 15px;
        margin-bottom: 24px;
    }

    .article-content {
        font-size: 17px;
        padding: 0 16px 40px;
    }

    .article-content h2 {
        font-size: 26px;
    }

    .article-content h3 {
        font-size: 20px;
    }
}


/* 動畫效果 */
.article-detail-page {
    animation: fadeIn 0.5s ease-out;
}

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

.article-image {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
    margin: 2em 0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    transition: transform 0.2s ease;
}

.article-image:hover {
    transform: scale(1.02);
}

.image-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    cursor: pointer;
    animation: fadeIn 0.3s ease-out;
}

.modal-content {
    max-width: 90%;
    max-height: 90%;
    position: relative;
}

.modal-image {
    max-width: 100%;
    max-height: 90vh;
    object-fit: contain;
    border-radius: 8px;
}

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

html {
    scroll-behavior: smooth;
}

/* frontend/src/pages/SponsorUs.css */
.sponsor-us-page {
    display: flex;
    justify-content: center;
    background-color: #f9f9f9;
    background-color: var(--color-bg-page, #f9f9f9);
    min-height: 100vh;
    align-items: flex-start;
}
  
.sponsor-us-container {
    width: 90%;
    max-width: 1000px;
    background-color: #fff;
    background-color: var(--color-bg-card, #fff);
    padding: 24px;
    padding: var(--space-l, 24px);
    border-radius: 12px;
    border-radius: var(--border-radius-large, 12px);
    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));
    display: flex;
    flex-direction: column;
    gap: 24px;
    gap: var(--space-l, 24px);
    margin-top: 32px;
    margin-top: var(--space-xl, 32px);
    margin-bottom: 32px;
    margin-bottom: var(--space-xl, 32px);
}
  
/* 主要圖片區塊樣式 */
.main-image-section {
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 15px;
    box-shadow: 0 3px 7px rgba(0, 0, 0, 0.03);
}
  
.main-image-section img {
    display: block;
    width: 100%;
    height: auto;
}
  
/* 文字說明區塊樣式 */
.text-description-section {
    text-align: center;
    margin-bottom: 40px;
    color: #888;
    width: 110%;
    margin-left: -5%;
}
  
.text-description-section h1 {
    font-size: 1.8em;
    font-weight: bold;
    color: #e67e22;
    margin-top: 20px;
    margin-bottom: 20px;
    padding-bottom: 0;
    border-bottom: none;
    line-height: 1.4;
    text-align: center;
}
  
.text-description-section p {
    font-size: 1.1em;
    color: #888;
    line-height: 1.7;
    margin-bottom: 25px;
}
  
/* 收款方式展示區塊樣式 */
.donation-methods-section {
    margin-top: 0px;
}
  
.donation-methods-section h2 {
    font-size: 1.6em;
    margin-bottom: 30px;
    text-align: center;
    color: #3498db;
}
  
.donation-cards-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 25px;
}
  
.donation-card {
    background-color: #fff;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 3px 7px rgba(0, 0, 0, 0.05);
    width: 150px;
    height: 60px;
    cursor: pointer;
    transition: transform 0.2s ease-in-out, box-shadow 0.3s ease, opacity 0.3s ease;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    border: 1px solid #eee;
    opacity: 1;
}
  
.donation-card:hover {
    transform: none;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}
  
.donation-card.expanded {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 380px;
    height: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: transform 0.4s ease, opacity 0.4s ease, box-shadow 0.4s ease;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    opacity: 1;
}
  
.donation-card.collapsing {
    width: 90px;
    height: 60px;
    transition: transform 0.4s ease, opacity 0.4s ease, box-shadow 0.4s ease;
    box-shadow: 0 3px 7px rgba(0, 0, 0, 0.05);
    opacity: 0;
    transform: none;
}
  
.donation-card.collapsing .overlay {
    opacity: 0;
}
  
.donation-card img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    margin-bottom: 0;
}
  
.donation-card.expanded img {
    max-width: 85%;
    max-height: none;
    width: auto;
    height: auto;
    margin-top: 10px;
    margin-bottom: 40px;
}
  
.donation-card h3 {
    font-size: 1.3em;
    margin-bottom: 10px;
    color: #2c3e50;
}
  
.donation-card p {
    font-size: 0.95em;
    color: #777;
    line-height: 1.6;
}
  
.donation-card a {
    display: inline-block;
    margin-top: 15px;
    padding: 10px 20px;
    background-color: #2ecc71;
    color: #fff;
    text-decoration: none;
    border-radius: 8px;
    transition: background-color 0.3s ease;
}
  
.donation-card a:hover {
    background-color: #27ae60;
}
  
.donation-card.expanded a {
    background-color: transparent;
    color: #3498db;
    text-decoration: underline;
    padding: 0;
    border-radius: 0;
}
  
.donation-card.expanded a:hover {
    background-color: transparent;
    color: #2980b9;
}
  
.donation-card.expanded p {
    font-size: 1em;
    color: #777;
    line-height: 1.6;
    margin-bottom: 15px;
}
  
.donation-card.expanded p a {
    display: inline-block;
    line-height: 1.2;
    margin: 0;
    padding: 0;
}
  
.ctb-account-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    text-align: left;
    margin-top: 10px;
}
  
.ctb-account-list div {
    font-size: 0.9em;
    line-height: 1.5;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
  
.copy-button {
    background-color: #3498db;
    color: #fff;
    border: none;
    padding: 5px 10px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.8em;
    margin-left: 10px;
    transition: background-color 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}
  
.copy-button:hover {
    background-color: #2980b9;
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.3);
}
  
/* Media query for desktop screens */
@media (min-width: 1024px) {
    .main-image-section {
        height: 400px;
        overflow: hidden;
        border-radius: 12px;
    }
    .main-image-section img {
        width: 100%;
        height:100%;
        object-fit: cover;
        transition: transform 0.5s ease-in-out;
    }
    .main-image-section:hover img {
        transform: scale(1.05);
    }
}

/* 捐款人公告區塊樣式 */
.donor-announcement-section {
    margin: 50px auto;
    padding: 10px;
    background: linear-gradient(135deg, #fff6e5, #fff9f0);
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.03);
    text-align: center;
    max-width: 800px;
}

.donor-announcement-section p {
    font-size: 1.8em;
    margin: -10px;
    margin-top: 10px;
    margin-bottom: 25px;
    color: #ff9f43;
    font-weight: 600;
    position: relative;
    display: inline-block;
}

.donor-announcement-section p::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 3px;
    background: linear-gradient(90deg, #ff9f43, #ffd6a5);
    border-radius: 2px;
}

.donor-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px;
}

.donor-list li {
    background: linear-gradient(135deg, #ffffff, #f8f9fa);
    padding: 12px 25px;
    border-radius: 50px;
    font-size: 1em;
    color: #666;
    box-shadow: 0 3px 15px rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.8);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.donor-list li:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
    color: #ff9f43;
}

.donor-list li::before {
    content: '♥';
    margin-right: 8px;
    color: #ff9f43;
    font-size: 0.9em;
    opacity: 0.8;
}

/* 響應式設計 */
@media (max-width: 768px) {
    .donor-announcement-section {
        padding: 20px;
        margin: 30px auto;
    }

    .donor-announcement-section h2 {
        font-size: 1.5em;
    }

    .donor-list li {
        padding: 10px 20px;
        font-size: 0.9em;
    }
}

/* 新增捐款方式卡片 wrapper 與卡片下方名稱 */
.donation-card-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.donation-card-label {
    margin-top: 8px;
    font-size: 1em;
    color: #2c3e50;
    text-align: center;
}

.donation-card .content {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
}
/* Apple-inspired plan badge component */
.plan-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: 14px;
  border-radius: var(--border-radius-large, 14px);
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', sans-serif;
  font-weight: 600;
  font-size: 12px;
  line-height: 1.4;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  white-space: nowrap;
}

/* Colors */
.plan-badge--gray {
  background: rgba(142, 142, 147, 0.12);
  color: rgba(60, 60, 67, 0.85);
}

.plan-badge--blue {
  background: linear-gradient(135deg, rgba(0, 122, 255, 0.15) 0%, rgba(0, 86, 204, 0.15) 100%);
  color: #007aff;
  color: var(--accent-color-blue, #007aff);
  border: 1px solid rgba(0, 122, 255, 0.2);
}

.plan-badge--premium {
  background: linear-gradient(135deg, rgba(255, 149, 0, 0.15) 0%, rgba(255, 95, 0, 0.15) 100%);
  color: #ff9500;
  border: 1px solid rgba(255, 149, 0, 0.2);
}

/* Sizes */
.plan-badge--small {
  padding: 2px 8px;
  font-size: 10px;
  gap: 4px;
}

.plan-badge--small .plan-badge__icon {
  font-size: 10px;
}

.plan-badge--medium {
  padding: 4px 12px;
  font-size: 12px;
  gap: 6px;
}

.plan-badge--medium .plan-badge__icon {
  font-size: 12px;
}

.plan-badge--large {
  padding: 6px 16px;
  font-size: 14px;
  gap: 8px;
}

.plan-badge--large .plan-badge__icon {
  font-size: 14px;
}

/* Icon only variant */
.plan-badge--icon-only {
  padding: 6px;
  border-radius: 50%;
  aspect-ratio: 1;
  justify-content: center;
}

.plan-badge--icon-only.plan-badge--small {
  padding: 4px;
}

.plan-badge--icon-only.plan-badge--large {
  padding: 8px;
}

/* Icon styling */
.plan-badge__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.plan-badge__label {
  font-weight: 600;
  letter-spacing: 0.5px;
}

/* Hover effects for interactive badges */
.plan-badge--interactive {
  cursor: pointer;
  transition: all 0.2s ease;
}

.plan-badge--interactive:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.plan-badge--interactive.plan-badge--blue:hover {
  background: linear-gradient(135deg, rgba(0, 122, 255, 0.2) 0%, rgba(0, 86, 204, 0.2) 100%);
  border-color: rgba(0, 122, 255, 0.3);
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
  .plan-badge--gray {
    background: rgba(142, 142, 147, 0.24);
    color: rgba(235, 235, 245, 0.85);
  }
  
  .plan-badge--blue {
    background: linear-gradient(135deg, rgba(10, 132, 255, 0.2) 0%, rgba(0, 86, 204, 0.2) 100%);
    color: #0a84ff;
    border-color: rgba(10, 132, 255, 0.3);
  }
}
/* Apple-inspired button component */
.apple-button {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: 14px;
  border-radius: var(--border-radius-large, 14px);
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', sans-serif;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  outline: none;
  overflow: hidden;
}

.apple-button:focus-visible {
  box-shadow: 0 0 0 4px rgba(0, 122, 255, 0.3);
  box-shadow: var(--shadow-focus-ring, 0 0 0 4px rgba(0, 122, 255, 0.3));
}

/* Variants */
.apple-button--primary {
  background: linear-gradient(135deg, #007aff 0%, #0056cc 100%);
  color: white;
  box-shadow: 
    0 4px 16px rgba(0, 122, 255, 0.3),
    0 2px 4px rgba(0, 0, 0, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
  position: relative;
  overflow: hidden;
}

.apple-button--primary::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, transparent 50%);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.apple-button--primary:hover:not(:disabled) {
  background: linear-gradient(135deg, #0056cc 0%, #003d99 100%);
  box-shadow: 
    0 8px 24px rgba(0, 122, 255, 0.4),
    0 4px 8px rgba(0, 0, 0, 0.15),
    inset 0 1px 0 rgba(255, 255, 255, 0.3);
  transform: translateY(-2px);
}

.apple-button--primary:hover:not(:disabled)::before {
  opacity: 1;
}

.apple-button--primary:active:not(:disabled) {
  transform: translateY(0);
  box-shadow: 
    0 2px 8px rgba(0, 122, 255, 0.3),
    0 1px 2px rgba(0, 0, 0, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.apple-button--secondary {
  background: linear-gradient(135deg, rgba(0, 122, 255, 0.08) 0%, rgba(0, 122, 255, 0.12) 100%);
  color: #007aff;
  color: var(--accent-color-blue, #007aff);
  border: 1px solid rgba(0, 122, 255, 0.2);
  box-shadow: 
    0 2px 8px rgba(0, 122, 255, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.5);
  position: relative;
  overflow: hidden;
}

.apple-button--secondary::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(0, 122, 255, 0.05) 0%, transparent 50%);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.apple-button--secondary:hover:not(:disabled) {
  background: linear-gradient(135deg, rgba(0, 122, 255, 0.12) 0%, rgba(0, 122, 255, 0.18) 100%);
  border-color: rgba(0, 122, 255, 0.3);
  box-shadow: 
    0 4px 12px rgba(0, 122, 255, 0.15),
    inset 0 1px 0 rgba(255, 255, 255, 0.6);
  transform: translateY(-1px);
}

.apple-button--secondary:hover:not(:disabled)::before {
  opacity: 1;
}

.apple-button--outline {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.8) 0%, rgba(248, 248, 248, 0.9) 100%);
  color: rgba(0, 0, 0, 0.85);
  color: var(--color-text-primary, rgba(0, 0, 0, 0.85));
  border: 1px solid #d1d1d6;
  border: 1px solid var(--color-border-default, #d1d1d6);
  box-shadow: 
    0 2px 8px rgba(0, 0, 0, 0.05),
    inset 0 1px 0 rgba(255, 255, 255, 0.8);
  position: relative;
  overflow: hidden;
}

.apple-button--outline::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(0, 0, 0, 0.02) 0%, transparent 50%);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.apple-button--outline:hover:not(:disabled) {
  background: linear-gradient(135deg, rgba(248, 248, 248, 0.9) 0%, rgba(240, 240, 240, 1) 100%);
  border-color: #c7c7cc;
  border-color: var(--color-border-soft, #c7c7cc);
  box-shadow: 
    0 4px 12px rgba(0, 0, 0, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
  transform: translateY(-1px);
}

.apple-button--outline:hover:not(:disabled)::before {
  opacity: 1;
}

.apple-button--destructive {
  background: linear-gradient(135deg, #ff3b30 0%, #d70015 100%);
  color: white;
  box-shadow: 0 4px 16px rgba(255, 59, 48, 0.3);
}

.apple-button--destructive:hover:not(:disabled) {
  background: linear-gradient(135deg, #d70015 0%, #b8000c 100%);
  box-shadow: 0 6px 20px rgba(255, 59, 48, 0.4);
  transform: translateY(-1px);
}

/* Sizes */
.apple-button--small {
  padding: 8px 16px;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.4;
  min-height: 32px;
  letter-spacing: -0.01em;
}

.apple-button--medium {
  padding: 12px 24px;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.5;
  min-height: 44px;
  letter-spacing: -0.01em;
}

.apple-button--large {
  padding: 16px 32px;
  font-size: 18px;
  font-weight: 600;
  line-height: 1.5;
  min-height: 52px;
  letter-spacing: -0.02em;
}

/* States */
.apple-button--disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none !important;
  box-shadow: none !important;
}

.apple-button--loading {
  cursor: wait;
}

.apple-button--loading .apple-button__content {
  opacity: 0.7;
}

/* Loading spinner */
.apple-button__spinner {
  position: absolute;
  width: 16px;
  height: 16px;
  border: 2px solid transparent;
  border-top: 2px solid currentColor;
  border-radius: 50%;
  animation: apple-button-spin 1s linear infinite;
  margin-right: 8px;
}

.apple-button__content {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

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

/* Dark mode support */
@media (prefers-color-scheme: dark) {
  .apple-button--primary {
    background: linear-gradient(135deg, #0a84ff 0%, #0056cc 100%);
    box-shadow: 
      0 4px 16px rgba(10, 132, 255, 0.3),
      0 2px 4px rgba(0, 0, 0, 0.3),
      inset 0 1px 0 rgba(255, 255, 255, 0.15);
  }
  
  .apple-button--primary:hover:not(:disabled) {
    background: linear-gradient(135deg, #0056cc 0%, #003d99 100%);
    box-shadow: 
      0 8px 24px rgba(10, 132, 255, 0.4),
      0 4px 8px rgba(0, 0, 0, 0.4),
      inset 0 1px 0 rgba(255, 255, 255, 0.2);
  }
  
  .apple-button--secondary {
    background: linear-gradient(135deg, rgba(10, 132, 255, 0.15) 0%, rgba(10, 132, 255, 0.2) 100%);
    color: #0a84ff;
    border-color: rgba(10, 132, 255, 0.3);
    box-shadow: 
      0 2px 8px rgba(10, 132, 255, 0.15),
      inset 0 1px 0 rgba(255, 255, 255, 0.1);
  }
  
  .apple-button--outline {
    background: linear-gradient(135deg, rgba(58, 58, 60, 0.8) 0%, rgba(44, 44, 46, 0.9) 100%);
    color: rgba(235, 235, 245, 0.85);
    border-color: #48484a;
    box-shadow: 
      0 2px 8px rgba(0, 0, 0, 0.3),
      inset 0 1px 0 rgba(255, 255, 255, 0.05);
  }
  
  .apple-button--outline:hover:not(:disabled) {
    background: linear-gradient(135deg, rgba(72, 72, 74, 0.9) 0%, rgba(58, 58, 60, 1) 100%);
    border-color: #5a5a5c;
  }
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .apple-button--large {
    padding: 14px 28px;
    font-size: 16px;
    min-height: 48px;
  }
  
  .apple-button--medium {
    padding: 10px 20px;
    font-size: 15px;
    min-height: 40px;
  }
}
/* Apple-inspired Plan Info Component - Simplified */
.plan-info {
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', sans-serif;
}

.plan-info__main {
  display: flex;
  align-items: center;
  gap: 24px;
}

.plan-info__details {
  flex: 1 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.plan-info__date {
  display: flex;
  gap: 8px;
  font-size: 14px;
  align-items: center;
}

.plan-info__date-label {
  color: rgba(0, 0, 0, 0.60);
  color: var(--color-text-secondary, rgba(0, 0, 0, 0.60));
  font-weight: 500;
  flex-shrink: 0;
}

.plan-info__date-value {
  color: rgba(0, 0, 0, 0.85);
  color: var(--color-text-primary, rgba(0, 0, 0, 0.85));
  font-weight: 600;
  font-feature-settings: "tnum";
  font-variant-numeric: tabular-nums;
}

.plan-info__auto-renew {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
}

.plan-info__auto-renew-icon {
  font-size: 14px;
  flex-shrink: 0;
}

.plan-info__auto-renew-text {
  font-weight: 500;
  color: #007aff;
  color: var(--accent-color-blue, #007aff);
}

.plan-info__action {
  flex-shrink: 0;
}

.plan-info__upgrade-button {
  min-width: 120px;
}

/* Loading State */
.plan-info--loading {
  opacity: 0.6;
  pointer-events: none;
}

.plan-info__skeleton {
  display: flex;
  align-items: center;
  gap: 24px;
}

.plan-info__skeleton-badge {
  width: 100px;
  height: 32px;
  background: #f0f0f0;
  background: var(--color-bg-subtle, #f0f0f0);
  border-radius: 14px;
  border-radius: var(--border-radius-large, 14px);
  animation: plan-info-skeleton-pulse 1.5s ease-in-out infinite;
  flex-shrink: 0;
}

.plan-info__skeleton-text {
  height: 16px;
  background: #f0f0f0;
  background: var(--color-bg-subtle, #f0f0f0);
  border-radius: 8px;
  animation: plan-info-skeleton-pulse 1.5s ease-in-out infinite;
  flex: 1 1;
}

.plan-info__skeleton-text--short {
  width: 60%;
  flex: none;
}

@keyframes plan-info-skeleton-pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}

/* Error State */
.plan-info--error {
  padding: 32px;
  text-align: center;
  color: rgba(0, 0, 0, 0.60);
  color: var(--color-text-secondary, rgba(0, 0, 0, 0.60));
  background: #f0f0f0;
  background: var(--color-bg-subtle, #f0f0f0);
  border-radius: 10px;
  border-radius: var(--border-radius-medium, 10px);
  border: 1px solid #e5e5e5;
  border: 1px solid var(--color-border-soft, #e5e5e5);
}

/* Responsive Design */
@media (max-width: 768px) {
  .plan-info__main {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }
  
  .plan-info__details {
    width: 100%;
  }
  
  .plan-info__action {
    width: 100%;
  }
  
  .plan-info__upgrade-button {
    width: 100%;
  }
  
  .plan-info__skeleton {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }
  
  .plan-info__skeleton-text {
    width: 100%;
  }
}

@media (max-width: 480px) {
  .plan-info__main {
    gap: 12px;
  }
  
  .plan-info__details {
    gap: 6px;
  }
  
  .plan-info__date {
    font-size: 13px;
  }
  
  .plan-info__auto-renew {
    font-size: 13px;
  }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
  .plan-info__date-value {
    color: rgba(235, 235, 245, 0.85);
  }
  
  .plan-info__date-label {
    color: rgba(235, 235, 245, 0.60);
  }
  
  .plan-info__auto-renew-text {
    color: #0a84ff;
  }
  
  .plan-info__skeleton-badge,
  .plan-info__skeleton-text {
    background: rgba(142, 142, 147, 0.24);
  }
  
  .plan-info--error {
    background: rgba(142, 142, 147, 0.24);
    border-color: #38383a;
    color: rgba(235, 235, 245, 0.60);
  }
}/* Ca
ncel Subscription Styles */
.plan-info__actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex-shrink: 0;
}

.plan-info__cancel-button {
  min-width: 140px;
}

.plan-info__cancel-notice {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  background: #fff3cd;
  background: var(--color-warning-bg, #fff3cd);
  border: 1px solid #ffeaa7;
  border: 1px solid var(--color-warning-border, #ffeaa7);
  border-radius: 10px;
  border-radius: var(--border-radius-medium, 10px);
  font-size: 14px;
}

.plan-info__cancel-icon {
  font-size: 16px;
  flex-shrink: 0;
}

.plan-info__cancel-text {
  color: #856404;
  color: var(--color-warning-text, #856404);
  font-weight: 500;
}

/* Cancel Confirmation Dialog */
.plan-info__cancel-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;
  padding: 20px;
}

.plan-info__cancel-dialog {
  background: #ffffff;
  background: var(--color-bg-primary, #ffffff);
  border-radius: 14px;
  border-radius: var(--border-radius-large, 14px);
  padding: 32px;
  max-width: 480px;
  width: 100%;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
  animation: plan-info-dialog-appear 0.2s ease-out;
}

.plan-info__cancel-dialog-title {
  font-size: 20px;
  font-weight: 600;
  color: rgba(0, 0, 0, 0.85);
  color: var(--color-text-primary, rgba(0, 0, 0, 0.85));
  margin: 0 0 16px 0;
  text-align: center;
}

.plan-info__cancel-dialog-message {
  font-size: 16px;
  color: rgba(0, 0, 0, 0.60);
  color: var(--color-text-secondary, rgba(0, 0, 0, 0.60));
  line-height: 1.5;
  margin: 0 0 24px 0;
  text-align: center;
}

.plan-info__cancel-dialog-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
}

.plan-info__cancel-dialog-actions > * {
  flex: 1 1;
  min-width: 100px;
}

@keyframes plan-info-dialog-appear {
  from {
    opacity: 0;
    transform: scale(0.95) translateY(-10px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

/* Responsive adjustments for cancel functionality */
@media (max-width: 768px) {
  .plan-info__actions {
    width: 100%;
  }
  
  .plan-info__cancel-button,
  .plan-info__upgrade-button {
    width: 100%;
  }
  
  .plan-info__cancel-dialog {
    margin: 20px;
    padding: 24px;
  }
  
  .plan-info__cancel-dialog-actions {
    flex-direction: column;
  }
}

/* Dark mode support for cancel functionality */
@media (prefers-color-scheme: dark) {
  .plan-info__cancel-notice {
    background: rgba(255, 193, 7, 0.15);
    border-color: rgba(255, 193, 7, 0.3);
  }
  
  .plan-info__cancel-text {
    color: #ffc107;
  }
  
  .plan-info__cancel-dialog {
    background: #1c1c1e;
    background: var(--color-bg-secondary, #1c1c1e);
  }
  
  .plan-info__cancel-dialog-title {
    color: rgba(235, 235, 245, 0.85);
  }
  
  .plan-info__cancel-dialog-message {
    color: rgba(235, 235, 245, 0.60);
  }
  
  .plan-info__cancel-dialog-overlay {
    background: rgba(0, 0, 0, 0.7);
  }
}
/* Payment History - Apple Style Design */

/* Main Container */
.payment-history {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* Header */
.payment-history__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 4px;
}

.payment-history__title {
  font-size: 24px;
  font-weight: 600;
  color: rgba(0, 0, 0, 0.85);
  color: var(--color-text-primary, rgba(0, 0, 0, 0.85));
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', sans-serif;
  line-height: 1.3;
}

.payment-history__refresh-button {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: #f5f5f5;
  background: var(--color-bg-subtle, #f5f5f5);
  border: 1px solid #e5e5e5;
  border: 1px solid var(--color-border-soft, #e5e5e5);
  border-radius: 10px;
  color: rgba(0, 0, 0, 0.60);
  color: var(--color-text-secondary, rgba(0, 0, 0, 0.60));
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', sans-serif;
  font-size: 14px;
  font-weight: 500;
}

.payment-history__refresh-button:hover:not(:disabled) {
  background: #ffffff;
  background: var(--color-bg-card, #ffffff);
  border-color: #d0d0d0;
  border-color: var(--color-border-medium, #d0d0d0);
  color: rgba(0, 0, 0, 0.85);
  color: var(--color-text-primary, rgba(0, 0, 0, 0.85));
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.payment-history__refresh-button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.payment-history__refresh-icon {
  width: 16px;
  height: 16px;
  transition: transform 0.3s ease;
}

.payment-history__refresh-text {
  font-size: 14px;
}

.payment-history__refresh-icon--spinning {
  animation: payment-history-spin 1s linear infinite;
}

@keyframes payment-history-spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}



/* Payment Cards */
.payment-history__cards {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.payment-card {
  background: #ffffff;
  background: var(--color-bg-card, #ffffff);
  border: 1px solid #e5e5e5;
  border: 1px solid var(--color-border-soft, #e5e5e5);
  border-radius: 12px;
  padding: 20px;
  transition: all 0.2s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
}

.payment-card:hover {
  border-color: #d0d0d0;
  border-color: var(--color-border-medium, #d0d0d0);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
  transform: translateY(-1px);
}

.payment-card__header {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 20px;
}

.payment-card__main-info {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.payment-card__description {
  flex: 1 1;
  min-width: 0;
}

.payment-card__title {
  font-size: 18px;
  font-weight: 600;
  color: rgba(0, 0, 0, 0.85);
  color: var(--color-text-primary, rgba(0, 0, 0, 0.85));
  margin: 0 0 4px 0;
  line-height: 1.3;
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', sans-serif;
}

.payment-card__order-id {
  font-size: 14px;
  color: rgba(0, 0, 0, 0.60);
  color: var(--color-text-secondary, rgba(0, 0, 0, 0.60));
  margin: 0;
  font-family: 'SF Mono', Monaco, 'Cascadia Code', 'Roboto Mono', Consolas, 'Courier New', monospace;
}

.payment-card__amount {
  text-align: right;
}

.payment-card__amount-value {
  font-size: 24px;
  font-weight: 700;
  color: rgba(0, 0, 0, 0.85);
  color: var(--color-text-primary, rgba(0, 0, 0, 0.85));
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', sans-serif;
  line-height: 1.2;
}

.payment-card__status-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.payment-card__date {
  font-size: 14px;
  color: rgba(0, 0, 0, 0.60);
  color: var(--color-text-secondary, rgba(0, 0, 0, 0.60));
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', sans-serif;
}

/* Payment Status */
.payment-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', sans-serif;
  line-height: 1.2;
}

.payment-status__icon {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}

.payment-status__icon--spinning {
  animation: payment-status-spin 1s linear infinite;
}

@keyframes payment-status-spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.payment-status--success {
  background: rgba(52, 199, 89, 0.1);
  color: #34c759;
  border: 1px solid rgba(52, 199, 89, 0.2);
}

.payment-status--failed {
  background: rgba(255, 59, 48, 0.1);
  color: #ff3b30;
  border: 1px solid rgba(255, 59, 48, 0.2);
}

.payment-status--expired {
  background: rgba(255, 59, 48, 0.1);
  color: #ff3b30;
  border: 1px solid rgba(255, 59, 48, 0.2);
}

.payment-status--pending {
  background: rgba(255, 149, 0, 0.1);
  color: #ff9500;
  border: 1px solid rgba(255, 149, 0, 0.2);
}

.payment-status--refunded {
  background: rgba(142, 142, 147, 0.1);
  color: #8e8e93;
  border: 1px solid rgba(142, 142, 147, 0.2);
}

.payment-status--unknown {
  background: rgba(142, 142, 147, 0.1);
  color: #8e8e93;
  border: 1px solid rgba(142, 142, 147, 0.2);
}

/* Card Details */
.payment-card__details {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-gap: 16px;
  gap: 16px;
  margin-bottom: 20px;
  padding: 16px 0;
  border-top: 1px solid #e5e5e5;
  border-top: 1px solid var(--color-border-soft, #e5e5e5);
}

.payment-card__detail-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.payment-card__detail-label {
  font-size: 13px;
  font-weight: 500;
  color: rgba(0, 0, 0, 0.60);
  color: var(--color-text-secondary, rgba(0, 0, 0, 0.60));
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', sans-serif;
}

.payment-card__detail-value {
  font-size: 15px;
  font-weight: 500;
  color: rgba(0, 0, 0, 0.85);
  color: var(--color-text-primary, rgba(0, 0, 0, 0.85));
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', sans-serif;
}

/* Card Actions */
.payment-card__actions {
  display: flex;
  gap: 12px;
  padding-top: 16px;
  border-top: 1px solid #e5e5e5;
  border-top: 1px solid var(--color-border-soft, #e5e5e5);
}

.payment-card__action-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', sans-serif;
  border: none;
  text-decoration: none;
}

.payment-card__action-button--primary {
  background: #007aff;
  background: var(--accent-color-blue, #007aff);
  color: white;
}

.payment-card__action-button--primary:hover {
  background: #0056cc;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 122, 255, 0.3);
}

.payment-card__action-button--secondary {
  background: #f5f5f5;
  background: var(--color-bg-subtle, #f5f5f5);
  color: rgba(0, 0, 0, 0.85);
  color: var(--color-text-primary, rgba(0, 0, 0, 0.85));
  border: 1px solid #e5e5e5;
  border: 1px solid var(--color-border-soft, #e5e5e5);
}

.payment-card__action-button--secondary:hover {
  background: #ffffff;
  background: var(--color-bg-card, #ffffff);
  border-color: #d0d0d0;
  border-color: var(--color-border-medium, #d0d0d0);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.payment-card__action-icon {
  width: 16px;
  height: 16px;
}

/* Loading State */
.payment-history__loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 48px 24px;
  gap: 16px;
}

.payment-history__loading-text {
  font-size: 16px;
  color: rgba(0, 0, 0, 0.60);
  color: var(--color-text-secondary, rgba(0, 0, 0, 0.60));
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', sans-serif;
}

/* Error State */
.payment-history__error {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px;
  background: rgba(255, 59, 48, 0.05);
  border: 1px solid rgba(255, 59, 48, 0.2);
  border-radius: 12px;
}

.payment-history__error-icon {
  width: 24px;
  height: 24px;
  color: #ff3b30;
  flex-shrink: 0;
}

.payment-history__error-content {
  flex: 1 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.payment-history__error-title {
  font-size: 16px;
  font-weight: 600;
  color: #ff3b30;
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', sans-serif;
}

.payment-history__error-message {
  font-size: 14px;
  color: rgba(0, 0, 0, 0.60);
  color: var(--color-text-secondary, rgba(0, 0, 0, 0.60));
  margin: 0;
  line-height: 1.4;
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', sans-serif;
}

.payment-history__retry-button {
  align-self: flex-start;
  padding: 6px 12px;
  background: #ff3b30;
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', sans-serif;
  margin-top: 4px;
}

.payment-history__retry-button:hover {
  background: #d70015;
  transform: translateY(-1px);
}

/* Empty State */
.payment-history__empty {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 64px 24px;
}

.payment-history__empty-content {
  text-align: center;
  max-width: 400px;
}

.payment-history__empty-title {
  font-size: 20px;
  font-weight: 600;
  color: rgba(0, 0, 0, 0.85);
  color: var(--color-text-primary, rgba(0, 0, 0, 0.85));
  margin: 0 0 8px 0;
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', sans-serif;
}

.payment-history__empty-description {
  font-size: 16px;
  color: rgba(0, 0, 0, 0.60);
  color: var(--color-text-secondary, rgba(0, 0, 0, 0.60));
  margin: 0;
  line-height: 1.5;
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', sans-serif;
}

/* Payment Details Modal */
.payment-details-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.payment-details-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.payment-details-modal__container {
  position: relative;
  width: 100%;
  max-width: 600px;
  max-height: 90vh;
  overflow-y: auto;
}

.payment-details-modal__content {
  background: #ffffff;
  background: var(--color-bg-card, #ffffff);
  border-radius: 20px;
  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);
  border: 1px solid #e5e5e5;
  border: 1px solid var(--color-border-soft, #e5e5e5);
  overflow: hidden;
}

.payment-details-modal__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 32px 32px 24px 32px;
  border-bottom: 1px solid #e5e5e5;
  border-bottom: 1px solid var(--color-border-soft, #e5e5e5);
}

.payment-details-modal__header-content {
  flex: 1 1;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.payment-details-modal__title {
  font-size: 24px;
  font-weight: 700;
  color: rgba(0, 0, 0, 0.85);
  color: var(--color-text-primary, rgba(0, 0, 0, 0.85));
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', sans-serif;
  line-height: 1.2;
}

.payment-details-modal__close-button {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background: #f5f5f5;
  background: var(--color-bg-subtle, #f5f5f5);
  border: 1px solid #e5e5e5;
  border: 1px solid var(--color-border-soft, #e5e5e5);
  border-radius: 8px;
  color: rgba(0, 0, 0, 0.60);
  color: var(--color-text-secondary, rgba(0, 0, 0, 0.60));
  cursor: pointer;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.payment-details-modal__close-button:hover {
  background: #ffffff;
  background: var(--color-bg-card, #ffffff);
  border-color: #d0d0d0;
  border-color: var(--color-border-medium, #d0d0d0);
  color: rgba(0, 0, 0, 0.85);
  color: var(--color-text-primary, rgba(0, 0, 0, 0.85));
}

.payment-details-modal__close-button svg {
  width: 18px;
  height: 18px;
}

.payment-details-modal__amount-section {
  padding: 24px 32px;
  text-align: center;
  border-bottom: 1px solid #e5e5e5;
  border-bottom: 1px solid var(--color-border-soft, #e5e5e5);
}

.payment-details-modal__amount {
  font-size: 36px;
  font-weight: 700;
  color: rgba(0, 0, 0, 0.85);
  color: var(--color-text-primary, rgba(0, 0, 0, 0.85));
  margin: 0 0 8px 0;
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', sans-serif;
  line-height: 1.1;
}

.payment-details-modal__description {
  font-size: 16px;
  color: rgba(0, 0, 0, 0.60);
  color: var(--color-text-secondary, rgba(0, 0, 0, 0.60));
  margin: 0;
  line-height: 1.4;
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', sans-serif;
}

.payment-details-modal__details {
  padding: 32px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.payment-details-modal__detail-group {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-gap: 24px;
  gap: 24px;
}

.payment-details-modal__detail-item {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.payment-details-modal__detail-item--full {
  grid-column: 1 / -1;
}

.payment-details-modal__detail-label {
  font-size: 13px;
  font-weight: 600;
  color: rgba(0, 0, 0, 0.60);
  color: var(--color-text-secondary, rgba(0, 0, 0, 0.60));
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', sans-serif;
}

.payment-details-modal__detail-value {
  font-size: 16px;
  font-weight: 500;
  color: rgba(0, 0, 0, 0.85);
  color: var(--color-text-primary, rgba(0, 0, 0, 0.85));
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', sans-serif;
  line-height: 1.3;
}

.payment-details-modal__detail-value--mono {
  font-family: 'SF Mono', Monaco, 'Cascadia Code', 'Roboto Mono', Consolas, 'Courier New', monospace;
  font-size: 14px;
  background: #f5f5f5;
  background: var(--color-bg-subtle, #f5f5f5);
  padding: 6px 8px;
  border-radius: 6px;
  border: 1px solid #e5e5e5;
  border: 1px solid var(--color-border-soft, #e5e5e5);
}

.payment-details-modal__detail-value--error {
  color: #ff3b30;
  background: rgba(255, 59, 48, 0.05);
  padding: 8px 12px;
  border-radius: 8px;
  border: 1px solid rgba(255, 59, 48, 0.2);
}

.payment-details-modal__actions {
  display: flex;
  gap: 12px;
  padding: 24px 32px 32px 32px;
  border-top: 1px solid #e5e5e5;
  border-top: 1px solid var(--color-border-soft, #e5e5e5);
}

.payment-details-modal__action-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', sans-serif;
  border: none;
  text-decoration: none;
  flex: 1 1;
  justify-content: center;
}

.payment-details-modal__action-button--primary {
  background: linear-gradient(135deg, #007aff 0%, #5856d6 100%);
  color: white;
}

.payment-details-modal__action-button--primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 122, 255, 0.4);
}

.payment-details-modal__action-button--secondary {
  background: #f5f5f5;
  background: var(--color-bg-subtle, #f5f5f5);
  color: rgba(0, 0, 0, 0.85);
  color: var(--color-text-primary, rgba(0, 0, 0, 0.85));
  border: 1px solid #e5e5e5;
  border: 1px solid var(--color-border-soft, #e5e5e5);
}

.payment-details-modal__action-button--secondary:hover {
  background: #ffffff;
  background: var(--color-bg-card, #ffffff);
  border-color: #d0d0d0;
  border-color: var(--color-border-medium, #d0d0d0);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.payment-details-modal__action-icon {
  width: 18px;
  height: 18px;
}

/* Pagination */
.payment-history__pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 24px 0 16px 0;
  margin-top: 8px;
}

.payment-history__pagination-button {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 16px;
  background: #f5f5f5;
  background: var(--color-bg-subtle, #f5f5f5);
  border: 1px solid #e5e5e5;
  border: 1px solid var(--color-border-soft, #e5e5e5);
  border-radius: 10px;
  color: rgba(0, 0, 0, 0.60);
  color: var(--color-text-secondary, rgba(0, 0, 0, 0.60));
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', sans-serif;
  font-size: 14px;
  font-weight: 500;
}

.payment-history__pagination-button:hover:not(:disabled) {
  background: #ffffff;
  background: var(--color-bg-card, #ffffff);
  border-color: #d0d0d0;
  border-color: var(--color-border-medium, #d0d0d0);
  color: rgba(0, 0, 0, 0.85);
  color: var(--color-text-primary, rgba(0, 0, 0, 0.85));
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.payment-history__pagination-button:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  transform: none;
}

.payment-history__pagination-button svg {
  width: 16px;
  height: 16px;
}

.payment-history__pagination-info {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: #ffffff;
  background: var(--color-bg-card, #ffffff);
  border: 1px solid #e5e5e5;
  border: 1px solid var(--color-border-soft, #e5e5e5);
  border-radius: 10px;
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', sans-serif;
}

.payment-history__pagination-current {
  font-size: 16px;
  font-weight: 600;
  color: rgba(0, 0, 0, 0.85);
  color: var(--color-text-primary, rgba(0, 0, 0, 0.85));
}

.payment-history__pagination-separator {
  font-size: 14px;
  color: rgba(0, 0, 0, 0.60);
  color: var(--color-text-secondary, rgba(0, 0, 0, 0.60));
}

.payment-history__pagination-total {
  font-size: 14px;
  color: rgba(0, 0, 0, 0.60);
  color: var(--color-text-secondary, rgba(0, 0, 0, 0.60));
}

/* Responsive Design */
@media (max-width: 768px) {
  .payment-history__header {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .payment-history__title {
    font-size: 20px;
  }

  .payment-history__refresh-button {
    padding: 8px 12px;
    font-size: 13px;
    align-self: flex-end;
  }

  .payment-history__refresh-icon {
    width: 14px;
    height: 14px;
  }

  .payment-card {
    padding: 20px;
  }

  .payment-card__main-info {
    flex-direction: column;
    gap: 12px;
  }

  .payment-card__amount {
    text-align: left;
  }

  .payment-card__amount-value {
    font-size: 20px;
  }

  .payment-card__details {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .payment-card__actions {
    flex-direction: column;
  }

  .payment-details-modal {
    padding: 12px;
  }

  .payment-details-modal__header {
    padding: 24px 24px 20px 24px;
  }

  .payment-details-modal__title {
    font-size: 20px;
  }

  .payment-details-modal__amount-section {
    padding: 20px 24px;
  }

  .payment-details-modal__amount {
    font-size: 28px;
  }

  .payment-details-modal__details {
    padding: 24px;
  }

  .payment-details-modal__detail-group {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .payment-details-modal__actions {
    padding: 20px 24px 24px 24px;
    flex-direction: column;
  }
}

@media (max-width: 480px) {
  .payment-history__title {
    font-size: 20px;
  }

  .payment-card {
    padding: 16px;
  }

  .payment-card__title {
    font-size: 16px;
  }

  .payment-card__amount-value {
    font-size: 18px;
  }

  .payment-details-modal__header {
    padding: 20px 20px 16px 20px;
  }

  .payment-details-modal__amount-section {
    padding: 16px 20px;
  }

  .payment-details-modal__amount {
    font-size: 24px;
  }

  .payment-details-modal__details {
    padding: 20px;
  }

  .payment-details-modal__actions {
    padding: 16px 20px 20px 20px;
  }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
  .payment-history__title {
    color: rgba(235, 235, 245, 0.85);
  }
  .payment-card,
  .payment-details-modal__content {
    background: #1c1c1e;
    border-color: #38383a;
  }

  .payment-history__title,
  .payment-card__title,
  .payment-card__amount-value,
  .payment-details-modal__title,
  .payment-details-modal__amount,
  .payment-details-modal__detail-value,
  .payment-history__empty-title {
    color: rgba(235, 235, 245, 0.85);
  }

  .payment-history__subtitle,
  .payment-card__order-id,
  .payment-card__date,
  .payment-card__detail-label,
  .payment-details-modal__description,
  .payment-details-modal__detail-label,
  .payment-history__loading-text,
  .payment-history__empty-description {
    color: rgba(235, 235, 245, 0.60);
  }

  .payment-history__refresh-button,
  .payment-card__action-button--secondary,
  .payment-details-modal__close-button,
  .payment-details-modal__action-button--secondary {
    background: rgba(142, 142, 147, 0.24);
    border-color: #38383a;
    color: rgba(235, 235, 245, 0.60);
  }

  .payment-history__refresh-button:hover:not(:disabled),
  .payment-card__action-button--secondary:hover,
  .payment-details-modal__close-button:hover,
  .payment-details-modal__action-button--secondary:hover {
    background: #1c1c1e;
    border-color: #48484a;
    color: rgba(235, 235, 245, 0.85);
  }

  .payment-details-modal__backdrop {
    background: rgba(0, 0, 0, 0.6);
  }

  .payment-details-modal__detail-value--mono {
    background: rgba(142, 142, 147, 0.24);
    border-color: #38383a;
    color: rgba(235, 235, 245, 0.85);
  }

  .payment-card__details,
  .payment-details-modal__header,
  .payment-details-modal__amount-section,
  .payment-details-modal__actions {
    border-color: #38383a;
  }
}
/* Apple-inspired User Account Page */
.user-account-page {
  min-height: 100vh;
  background: #f5f5f7;
  background: var(--color-bg-page, #f5f5f7);
  padding: 20px;
}

.user-account-container {
  max-width: 1000px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 32px;
}

/* Header Section */
.user-account-header {
  background: #ffffff;
  background: var(--color-bg-card, #ffffff);
  border-radius: 14px;
  border-radius: var(--border-radius-large, 14px);
  padding: 32px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
  box-shadow: var(--shadow-s, 0 2px 6px rgba(0, 0, 0, 0.05));
  border: 1px solid #e5e5e5;
  border: 1px solid var(--color-border-soft, #e5e5e5);
}

.user-account-header__content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  width: 100%;
}

.user-account-header__avatar {
  flex-shrink: 0;
}

.user-account-header__avatar-image {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid #e5e5e5;
  border: 3px solid var(--color-border-soft, #e5e5e5);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
  box-shadow: var(--shadow-s, 0 2px 6px rgba(0, 0, 0, 0.05));
}

.user-account-header__avatar-default {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 32px;
  text-transform: uppercase;
  border: 3px solid #e5e5e5;
  border: 3px solid var(--color-border-soft, #e5e5e5);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
  box-shadow: var(--shadow-s, 0 2px 6px rgba(0, 0, 0, 0.05));
}

.user-account-header__info {
  flex: 1 1;
  min-width: 0;
}

.user-account-header__title {
  font-size: 32px;
  font-weight: 700;
  color: rgba(0, 0, 0, 0.85);
  color: var(--color-text-primary, rgba(0, 0, 0, 0.85));
  margin: 0 0 8px 0;
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', sans-serif;
  line-height: 1.2;
}

.user-account-header__details {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.user-account-header__details .username {
  font-size: 18px;
  font-weight: 600;
  color: rgba(0, 0, 0, 0.85);
  color: var(--color-text-primary, rgba(0, 0, 0, 0.85));
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', sans-serif;
}

.user-account-header__details .email {
  font-size: 16px;
  font-weight: 400;
  color: rgba(0, 0, 0, 0.60);
  color: var(--color-text-secondary, rgba(0, 0, 0, 0.60));
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', sans-serif;
}

.user-account-header__actions {
  margin-left: auto;
}

.logout-button {
  padding: 10px 20px;
  background: transparent;
  border: 1px solid #e5e5e5;
  border: 1px solid var(--color-border-soft, #e5e5e5);
  border-radius: 6px;
  border-radius: var(--border-radius-small, 6px);
  color: rgba(0, 0, 0, 0.60);
  color: var(--color-text-secondary, rgba(0, 0, 0, 0.60));
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', sans-serif;
}

.logout-button:hover {
  background: #f5f5f5;
  background: var(--color-bg-subtle, #f5f5f5);
  border-color: #d0d0d0;
  border-color: var(--color-border-medium, #d0d0d0);
  color: rgba(0, 0, 0, 0.85);
  color: var(--color-text-primary, rgba(0, 0, 0, 0.85));
}

/* Content Sections */
.user-account-content {
  display: flex;
  flex-direction: column;
  gap: 32px;
}

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

.user-account-section__title {
  font-size: 24px;
  font-weight: 600;
  color: rgba(0, 0, 0, 0.85);
  color: var(--color-text-primary, rgba(0, 0, 0, 0.85));
  margin: 0 0 24px 0;
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', sans-serif;
  line-height: 1.3;
  padding-bottom: 12px;
  border-bottom: 1px solid #e5e5e5;
  border-bottom: 1px solid var(--color-border-soft, #e5e5e5);
}

/* Container for section content - styles applied by child components */

/* Special styling for payment history section */
.user-account-section--payment-history {
  padding: 24px 32px;
}

/* Redemption Code Section */
.user-account-redemption {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.user-account-redemption__description {
  font-size: 16px;
  color: rgba(0, 0, 0, 0.60);
  color: var(--color-text-secondary, rgba(0, 0, 0, 0.60));
  margin: 0;
  line-height: 1.5;
}

.user-account-redemption__input {
  max-width: 500px;
}

/* Error State */
.user-account-error {
  background: #ffffff;
  background: var(--color-bg-card, #ffffff);
  border-radius: 14px;
  border-radius: var(--border-radius-large, 14px);
  padding: 48px 32px;
  text-align: center;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
  box-shadow: var(--shadow-s, 0 2px 6px rgba(0, 0, 0, 0.05));
  border: 1px solid #e5e5e5;
  border: 1px solid var(--color-border-soft, #e5e5e5);
}

.user-account-error h2 {
  font-size: 24px;
  font-weight: 600;
  color: rgba(0, 0, 0, 0.85);
  color: var(--color-text-primary, rgba(0, 0, 0, 0.85));
  margin: 0 0 16px 0;
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', sans-serif;
}

.user-account-error p {
  font-size: 16px;
  color: rgba(0, 0, 0, 0.60);
  color: var(--color-text-secondary, rgba(0, 0, 0, 0.60));
  margin: 0;
  line-height: 1.5;
}

/* Loading State */
.user-account-loading {
  background: #ffffff;
  background: var(--color-bg-card, #ffffff);
  border-radius: 14px;
  border-radius: var(--border-radius-large, 14px);
  padding: 48px 32px;
  text-align: center;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
  box-shadow: var(--shadow-s, 0 2px 6px rgba(0, 0, 0, 0.05));
  border: 1px solid #e5e5e5;
  border: 1px solid var(--color-border-soft, #e5e5e5);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.user-account-loading__spinner {
  width: 32px;
  height: 32px;
  border: 3px solid #e5e5e5;
  border: 3px solid var(--color-border-soft, #e5e5e5);
  border-top: 3px solid #007aff;
  border-top: 3px solid var(--accent-color-blue, #007aff);
  border-radius: 50%;
  animation: user-account-spin 1s linear infinite;
}

.user-account-loading p {
  font-size: 16px;
  color: rgba(0, 0, 0, 0.60);
  color: var(--color-text-secondary, rgba(0, 0, 0, 0.60));
  margin: 0;
}

@keyframes user-account-spin {
  0% {
    transform: rotate(0deg);
  }

  100% {
    transform: rotate(360deg);
  }
}

/* Responsive Design */
@media (max-width: 768px) {
  .user-account-page {
    padding: 16px;
  }

  .user-account-container {
    gap: 24px;
  }

  .user-account-header {
    padding: 24px;
  }

  .user-account-header__content {
    flex-direction: column;
    text-align: center;
    gap: 16px;
  }

  .user-account-header__avatar-image {
    width: 64px;
    height: 64px;
  }

  .user-account-header__title {
    font-size: 28px;
  }

  .user-account-header__details .username {
    font-size: 16px;
  }

  .user-account-header__details .email {
    font-size: 14px;
  }

  .user-account-header__actions {
    margin-left: 0;
    margin-top: 8px;
  }

  .logout-button {
    padding: 8px 16px;
    font-size: 13px;
  }

  .user-account-section {
    padding: 24px;
  }

  .user-account-section--payment-history {
    padding: 20px 24px;
  }

  .user-account-section__title {
    font-size: 20px;
    margin-bottom: 20px;
  }

  .user-account-content {
    gap: 24px;
  }

  /* Redemption section mobile styles */
  .user-account-redemption {
    gap: 16px;
  }

  .user-account-redemption__description {
    font-size: 14px;
  }
}

@media (max-width: 480px) {
  .user-account-page {
    padding: 12px;
  }

  .user-account-header {
    padding: 20px;
  }

  .user-account-header__title {
    font-size: 24px;
  }

  .user-account-section {
    padding: 20px;
  }

  .user-account-section--payment-history {
    padding: 16px 20px;
  }

  .user-account-section__title {
    font-size: 18px;
    margin-bottom: 16px;
  }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
  .user-account-page {
    background: #000000;
  }

  .user-account-header,
  .user-account-section,
  .user-account-error,
  .user-account-loading {
    background: #1c1c1e;
    border-color: #38383a;
  }

  .user-account-header__title,
  .user-account-section__title,
  .user-account-error h2 {
    color: rgba(235, 235, 245, 0.85);
  }

  .user-account-header__details .username {
    color: rgba(235, 235, 245, 0.85);
  }

  .user-account-header__details .email,
  .user-account-error p,
  .user-account-loading p {
    color: rgba(235, 235, 245, 0.60);
  }

  .logout-button {
    border-color: #38383a;
    color: rgba(235, 235, 245, 0.60);
  }

  .logout-button:hover {
    background: rgba(142, 142, 147, 0.24);
    border-color: #48484a;
    color: rgba(235, 235, 245, 0.85);
  }

  .user-account-header__avatar-image {
    border-color: #38383a;
  }

  .user-account-loading__spinner {
    border-color: #38383a;
    border-top-color: #0a84ff;
  }

  /* Redemption section dark mode */
  .user-account-redemption__description {
    color: rgba(235, 235, 245, 0.60);
  }
}
/* Apple-inspired Plan Card Component */
.plan-card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: #ffffff;
  background: var(--color-bg-card, #ffffff);
  border-radius: 14px;
  border-radius: var(--border-radius-large, 14px);
  padding: 32px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
  box-shadow: var(--shadow-s, 0 2px 6px rgba(0, 0, 0, 0.05));
  border: 2px solid #e5e5e5;
  border: 2px solid var(--color-border-soft, #e5e5e5);
  transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', sans-serif;
  overflow: hidden;
}

.plan-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
  box-shadow: var(--shadow-l, 0 10px 30px rgba(0, 0, 0, 0.08));
  border-color: rgba(0, 122, 255, 0.2);
}

.plan-card--current {
  border-color: #007aff;
  border-color: var(--accent-color-blue, #007aff);
  background: linear-gradient(135deg, rgba(0, 122, 255, 0.02) 0%, rgba(0, 86, 204, 0.02) 100%);
}

.plan-card--popular {
  border-color: #ff9500;
  background: linear-gradient(135deg, rgba(255, 149, 0, 0.02) 0%, rgba(255, 95, 0, 0.02) 100%);
}

.plan-card--popular:hover {
  border-color: #ff9500;
}

.plan-card__popular-badge {
  position: absolute;
  top: -1px;
  left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(135deg, #ff9500 0%, #ff5f00 100%);
  color: white;
  padding: 6px 20px;
  border-radius: 0 0 10px 10px;
  border-radius: 0 0 var(--border-radius-medium, 10px) var(--border-radius-medium, 10px);
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  box-shadow: 0 2px 8px rgba(255, 149, 0, 0.3);
}

.plan-card__header {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 24px;
}

.plan-card__badge-container {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
}

/* Removed .plan-card__current-indicator styles as it's no longer used */

.plan-card__name {
  font-size: 28px;
  font-weight: 700;
  color: rgba(0, 0, 0, 0.85);
  color: var(--color-text-primary, rgba(0, 0, 0, 0.85));
  margin: 0;
  line-height: 1.2;
}

.plan-card__description {
  font-size: 16px;
  color: rgba(0, 0, 0, 0.60);
  color: var(--color-text-secondary, rgba(0, 0, 0, 0.60));
  margin: 0;
  line-height: 1.5;
}

.plan-card__pricing {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 32px;
  padding-bottom: 24px;
  border-bottom: 1px solid #e5e5e5;
  border-bottom: 1px solid var(--color-border-soft, #e5e5e5);
  transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  min-height: 80px;
  /* Ensure consistent height across plans */
}

.plan-card__price-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.plan-card__discount-info {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
}

.plan-card__discount-badge {
  background: linear-gradient(135deg, #34c759 0%, #30d158 100%);
  color: white;
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  box-shadow: 0 2px 6px rgba(52, 199, 89, 0.3);
  animation: fadeInScale 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  white-space: nowrap;
}

.plan-card__original-price {
  font-size: 12px;
  color: rgba(0, 0, 0, 0.40);
  color: var(--color-text-tertiary, rgba(0, 0, 0, 0.40));
  font-weight: 500;
  text-decoration: line-through;
  font-feature-settings: "tnum";
  font-variant-numeric: tabular-nums;
  animation: fadeInScale 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  text-align: right;
  white-space: nowrap;
}

/* Redemption Discount Styles */
.plan-card__redemption-discount {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
}

.plan-card__original-price-redemption {
  font-size: 14px;
  color: rgba(0, 0, 0, 0.40);
  color: var(--color-text-tertiary, rgba(0, 0, 0, 0.40));
  font-weight: 500;
  text-decoration: line-through;
  font-feature-settings: "tnum";
  font-variant-numeric: tabular-nums;
  text-align: right;
  white-space: nowrap;
}

.plan-card__redemption-badge {
  background: linear-gradient(135deg, #FF6B35 0%, #FF8E53 100%);
  color: white;
  padding: 6px 14px;
  border-radius: 14px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  box-shadow: 0 3px 8px rgba(255, 107, 53, 0.3);
  animation: fadeInScale 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  white-space: nowrap;
  position: relative;
}

.plan-card__redemption-badge::before {
  content: '🎟️';
  margin-right: 6px;
  font-size: 10px;
}

.plan-card__applied-redemption {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background: rgba(52, 199, 89, 0.1);
  border: 1px solid rgba(52, 199, 89, 0.2);
  border-radius: 12px;
  margin-top: 8px;
  animation: fadeInScale 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.plan-card__applied-redemption-icon {
  color: #34C759;
  flex-shrink: 0;
}

.plan-card__applied-redemption span {
  font-size: 13px;
  font-weight: 500;
  color: #34C759;
}

.plan-card__price {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.plan-card__price-amount {
  font-size: 36px;
  font-weight: 700;
  color: rgba(0, 0, 0, 0.85);
  color: var(--color-text-primary, rgba(0, 0, 0, 0.85));
  line-height: 1;
  font-feature-settings: "tnum";
  font-variant-numeric: tabular-nums;
}

.plan-card__price-period {
  font-size: 16px;
  color: rgba(0, 0, 0, 0.60);
  color: var(--color-text-secondary, rgba(0, 0, 0, 0.60));
  font-weight: 500;
}

.plan-card__price-yearly {
  font-size: 14px;
  color: rgba(0, 0, 0, 0.40);
  color: var(--color-text-tertiary, rgba(0, 0, 0, 0.40));
  font-weight: 500;
  font-feature-settings: "tnum";
  font-variant-numeric: tabular-nums;
}

.plan-card__features {
  flex: 1 1;
  margin-bottom: 40px;
}

.plan-card__features-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.plan-card__feature-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.plan-card__feature-icon {
  color: #34c759;
  font-weight: 600;
  font-size: 16px;
  flex-shrink: 0;
  margin-top: 2px;
}

.plan-card__feature-item--disabled .plan-card__feature-icon {
  color: #ff3b30;
}

.plan-card__feature-item--disabled .plan-card__feature-text {
  color: rgba(0, 0, 0, 0.40);
  color: var(--color-text-tertiary, rgba(0, 0, 0, 0.40));
  text-decoration: line-through;
}

.plan-card__feature-item--limited .plan-card__feature-icon {
  color: #ff9500;
}

.plan-card__feature-item--limited .plan-card__feature-text {
  color: rgba(0, 0, 0, 0.50);
  color: var(--color-text-secondary, rgba(0, 0, 0, 0.50));
}

.plan-card__feature-text {
  font-size: 15px;
  color: rgba(0, 0, 0, 0.60);
  color: var(--color-text-secondary, rgba(0, 0, 0, 0.60));
  line-height: 1.5;
}

.plan-card__action {
  margin-top: auto;
  padding-top: 8px;
}

.plan-card__button {
  width: 100%;
  justify-content: center;
}

/* Desktop spacing optimization */
@media (min-width: 769px) {
  .plan-card__features {
    margin-bottom: 48px;
  }

  .plan-card__action {
    padding-top: 12px;
  }
}

/* Responsive Design */
@media (max-width: 768px) {
  .plan-card {
    padding: 24px;
  }

  .plan-card__name {
    font-size: 24px;
  }

  .plan-card__description {
    font-size: 14px;
  }

  .plan-card__price-amount {
    font-size: 32px;
  }

  .plan-card__pricing {
    margin-bottom: 24px;
    padding-bottom: 20px;
  }

  .plan-card__price-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .plan-card__discount-info {
    align-items: flex-start;
  }

  .plan-card__features {
    margin-bottom: 24px;
  }

  .plan-card__features-list {
    gap: 12px;
  }

  .plan-card__feature-text {
    font-size: 14px;
  }
}

@media (max-width: 480px) {
  .plan-card {
    padding: 20px;
  }

  .plan-card__header {
    gap: 12px;
    margin-bottom: 20px;
  }

  .plan-card__name {
    font-size: 20px;
  }

  .plan-card__description {
    font-size: 13px;
  }

  .plan-card__price-amount {
    font-size: 28px;
  }

  .plan-card__pricing {
    margin-bottom: 20px;
    padding-bottom: 16px;
  }

  .plan-card__features {
    margin-bottom: 20px;
  }
}

/* Animations */
@keyframes fadeInScale {
  0% {
    opacity: 0;
    transform: scale(0.95);
  }

  100% {
    opacity: 1;
    transform: scale(1);
  }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
  .plan-card {
    background: #1c1c1e;
    border-color: #38383a;
  }

  .plan-card:hover {
    border-color: rgba(10, 132, 255, 0.3);
  }

  .plan-card--current {
    border-color: #0a84ff;
    background: linear-gradient(135deg, rgba(10, 132, 255, 0.05) 0%, rgba(0, 86, 204, 0.05) 100%);
  }

  .plan-card--popular {
    background: linear-gradient(135deg, rgba(255, 149, 0, 0.05) 0%, rgba(255, 95, 0, 0.05) 100%);
  }



  .plan-card__name,
  .plan-card__price-amount {
    color: rgba(235, 235, 245, 0.85);
  }

  .plan-card__description,
  .plan-card__price-period,
  .plan-card__feature-text {
    color: rgba(235, 235, 245, 0.60);
  }

  .plan-card__price-yearly,
  .plan-card__original-price {
    color: rgba(235, 235, 245, 0.40);
  }

  .plan-card__pricing {
    border-color: #38383a;
  }

  /* Redemption dark mode styles */
  .plan-card__original-price-redemption {
    color: rgba(235, 235, 245, 0.40);
  }

  .plan-card__applied-redemption {
    background: rgba(50, 215, 75, 0.15);
    border-color: rgba(50, 215, 75, 0.3);
  }

  .plan-card__applied-redemption-icon,
  .plan-card__applied-redemption span {
    color: #32D74B;
  }

  .plan-card__feature-item--disabled .plan-card__feature-icon {
    color: #ff453a;
  }

  .plan-card__feature-item--disabled .plan-card__feature-text {
    color: rgba(235, 235, 245, 0.30);
  }

  .plan-card__feature-item--limited .plan-card__feature-icon {
    color: #ffb340;
  }

  .plan-card__feature-item--limited .plan-card__feature-text {
    color: rgba(235, 235, 245, 0.50);
  }
}

/* 
Not Applicable Indicator */
.plan-card__not-applicable {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background: #fff3cd;
  background: var(--color-bg-warning-soft, #fff3cd);
  border: 1px solid #ffeaa7;
  border: 1px solid var(--color-border-warning, #ffeaa7);
  border-radius: 6px;
  border-radius: var(--border-radius-small, 6px);
  margin-top: 12px;
  font-size: 13px;
  color: #856404;
  color: var(--color-text-warning, #856404);
}

.plan-card__not-applicable-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  color: #856404;
  color: var(--color-text-warning, #856404);
}

/* Disabled state for non-applicable plans */
.plan-card--not-applicable {
  opacity: 0.6;
  pointer-events: none;
}

.plan-card--not-applicable .plan-card__button {
  background: #f8f9fa;
  background: var(--color-bg-disabled, #f8f9fa);
  color: #6c757d;
  color: var(--color-text-disabled, #6c757d);
  border-color: #dee2e6;
  border-color: var(--color-border-disabled, #dee2e6);
  cursor: not-allowed;
}

/* Status Indicator Styles */
.plan-card__status-indicator {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-radius: 10px;
  border-radius: var(--border-radius-medium, 10px);
  margin-bottom: 20px;
  font-size: 14px;
  font-weight: 500;
  animation: fadeInScale 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.plan-card__status-indicator--cancelled {
  background: linear-gradient(135deg, rgba(255, 149, 0, 0.1) 0%, rgba(255, 95, 0, 0.1) 100%);
  border: 1px solid rgba(255, 149, 0, 0.3);
  color: #ff9500;
}

.plan-card__status-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.plan-card__status-content {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1 1;
}

.plan-card__status-title {
  font-weight: 600;
  font-size: 14px;
  line-height: 1.2;
}

.plan-card__status-subtitle {
  font-size: 12px;
  opacity: 0.8;
  line-height: 1.2;
}

/* Dark mode support for status indicator */
@media (prefers-color-scheme: dark) {
  .plan-card__status-indicator--cancelled {
    background: linear-gradient(135deg, rgba(255, 149, 0, 0.15) 0%, rgba(255, 95, 0, 0.15) 100%);
    border-color: rgba(255, 149, 0, 0.4);
    color: #ffb340;
  }
}

/* Mobile responsive adjustments for status indicator */
@media (max-width: 768px) {
  .plan-card__status-indicator {
    padding: 10px 14px;
    margin-bottom: 16px;
    font-size: 13px;
  }

  .plan-card__status-icon {
    width: 18px;
    height: 18px;
  }

  .plan-card__status-title {
    font-size: 13px;
  }

  .plan-card__status-subtitle {
    font-size: 11px;
  }
}
/* Apple-style Billing Period Toggle Component */
.billing-period-toggle {
  display: flex;
  justify-content: center;
  margin-bottom: 32px;
}

.billing-period-toggle__container {
  position: relative;
  display: flex;
  background: #f2f2f7;
  background: var(--color-bg-secondary, #f2f2f7);
  border-radius: 22px;
  padding: 2px;
  height: 44px;
  min-width: 300px;
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', sans-serif;
}

.billing-period-toggle__slider {
  position: absolute;
  top: 2px;
  left: 2px;
  width: calc(50% - 2px);
  height: 40px;
  background: white;
  border-radius: 20px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  z-index: 1;
}

.billing-period-toggle__slider--yearly {
  transform: translateX(100%);
}

.billing-period-toggle__option {
  position: relative;
  flex: 1 1;
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  font-size: 16px;
  font-weight: 500;
  color: rgba(0, 0, 0, 0.6);
  color: var(--color-text-secondary, rgba(0, 0, 0, 0.6));
  cursor: pointer;
  transition: color 0.3s ease;
  z-index: 2;
  padding: 0 12px;
  border-radius: 20px;
}

.billing-period-toggle__option--yearly {
  padding: 0 8px;
}

.billing-period-toggle__option--active {
  color: rgba(0, 0, 0, 0.85);
  color: var(--color-text-primary, rgba(0, 0, 0, 0.85));
  font-weight: 600;
}

.billing-period-toggle__option:hover {
  color: rgba(0, 0, 0, 0.85);
  color: var(--color-text-primary, rgba(0, 0, 0, 0.85));
}



.billing-period-toggle__yearly-content {
  display: flex;
  align-items: center;
  gap: 4px;
  justify-content: center;
  width: 100%;
}

.billing-period-toggle__option-text {
  font-size: 16px;
  font-weight: 500;
}

.billing-period-toggle__discount-badge {
  background: linear-gradient(135deg, #ff6b35 0%, #ff8c42 100%);
  color: white;
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  padding: 2px 6px;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(255, 107, 53, 0.3);
  animation: pulse 2s infinite;
  white-space: nowrap;
}

.billing-period-toggle__option:not(.billing-period-toggle__option--yearly) .billing-period-toggle__discount-badge {
  display: none;
}

/* Pulse animation for discount badge */
@keyframes pulse {
  0% {
    box-shadow: 0 2px 4px rgba(255, 107, 53, 0.3);
  }

  50% {
    box-shadow: 0 2px 8px rgba(255, 107, 53, 0.5), 0 0 0 2px rgba(255, 107, 53, 0.2);
  }

  100% {
    box-shadow: 0 2px 4px rgba(255, 107, 53, 0.3);
  }
}

/* Responsive Design */
@media (max-width: 768px) {
  .billing-period-toggle {
    margin-bottom: 24px;
  }

  .billing-period-toggle__container {
    min-width: 260px;
    height: 40px;
  }

  .billing-period-toggle__slider {
    height: 36px;
  }

  .billing-period-toggle__option {
    font-size: 15px;
    padding: 0 12px;
  }

  .billing-period-toggle__option-text {
    font-size: 15px;
  }

  .billing-period-toggle__discount-badge {
    font-size: 8px;
    padding: 2px 5px;
  }
}

@media (max-width: 480px) {
  .billing-period-toggle__container {
    min-width: 220px;
    height: 36px;
  }

  .billing-period-toggle__slider {
    height: 32px;
  }

  .billing-period-toggle__option {
    font-size: 14px;
    padding: 0 8px;
  }

  .billing-period-toggle__option-text {
    font-size: 14px;
  }

  .billing-period-toggle__discount-badge {
    font-size: 7px;
    padding: 1px 4px;
  }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
  .billing-period-toggle__container {
    background: #2c2c2e;
  }

  .billing-period-toggle__slider {
    background: #3a3a3c;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  }

  .billing-period-toggle__option {
    color: rgba(235, 235, 245, 0.6);
  }

  .billing-period-toggle__option--active,
  .billing-period-toggle__option:hover {
    color: rgba(235, 235, 245, 0.85);
  }

  .billing-period-toggle__option:focus {
    box-shadow: 0 0 0 2px rgba(10, 132, 255, 0.3);
  }

  .billing-period-toggle__option {
    color: rgba(235, 235, 245, 0.6);
  }

  .billing-period-toggle__option--active,
  .billing-period-toggle__option:hover {
    color: rgba(235, 235, 245, 0.85);
  }

  .billing-period-toggle__discount-badge {
    background: linear-gradient(135deg, #ff6b35 0%, #ff8c42 100%);
    color: white;
  }
}
/**
 * RedemptionCodeInput Component Styles
 * 
 * Responsive design following existing component patterns
 * Supports multiple states: default, validating, success, error
 */

.redemption-code-input {
    width: 100%;
    max-width: 500px;
}

/* Form Layout */
.redemption-form {
    width: 100%;
}

.redemption-input-container {
    display: flex;
    gap: 12px;
    align-items: flex-start;
}

/* Input Wrapper */
.redemption-input-wrapper {
    position: relative;
    flex: 0 0 280px;
    min-width: 0;
    box-sizing: border-box;
}

/* Input Field */
.redemption-input {
    width: 280px;
    padding: 12px 16px;
    padding-right: 40px;
    /* Space for spinner/check icon */
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 16px;
    font-family: 'SF Mono', 'Monaco', 'Inconsolata', 'Roboto Mono', monospace;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    background-color: #ffffff;
    transition: all 0.2s ease-in-out;
    outline: none;
    box-sizing: border-box;
}

.redemption-input:focus {
    border-color: #3b82f6;
    box-shadow: none;
}

.redemption-input:disabled {
    background-color: #f9fafb;
    color: #6b7280;
    cursor: not-allowed;
}

.redemption-input::placeholder {
    color: #9ca3af;
    font-family: inherit;
    letter-spacing: normal;
    text-transform: none;
}

/* Input States */
.redemption-input-wrapper--validating .redemption-input,
.redemption-input-wrapper--processing .redemption-input {
    border-color: #f59e0b;
    background-color: #fffbeb;
}

.redemption-input-wrapper--success .redemption-input {
    border-color: #10b981;
    background-color: #f0fdf4;
}

.redemption-input-wrapper--error .redemption-input {
    border-color: #ef4444;
    background-color: #fef2f2;
}

/* Processing state indicator */
.redemption-input-wrapper--processing {
    position: relative;
}

.redemption-input-wrapper--processing::after {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    border: 2px solid transparent;
    border-top-color: #f59e0b;
    border-radius: 10px;
    animation: spin 1s linear infinite;
    pointer-events: none;
}

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

    100% {
        transform: rotate(360deg);
    }
}

/* Input Icons */
.redemption-input-spinner,
.redemption-input-check {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.redemption-input-check {
    color: #10b981;
}

/* Submit Button */
.redemption-submit-btn {
    padding: 12px 24px;
    background-color: #3b82f6;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
    white-space: nowrap;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 120px;
    height: 48px;
    position: relative;
}

.redemption-submit-btn:hover:not(:disabled) {
    background-color: #2563eb;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.redemption-submit-btn:active:not(:disabled) {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(59, 130, 246, 0.3);
}

.redemption-submit-btn:disabled {
    background-color: #9ca3af;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
    opacity: 0.7;
}

/* Processing state for button */
.redemption-submit-btn--processing {
    background-color: #f59e0b;
    cursor: wait;
}

.redemption-submit-btn--processing:hover {
    background-color: #f59e0b;
    transform: none;
    box-shadow: none;
}

/* Preview Section */
.redemption-preview {
    margin-top: 16px;
    padding: 16px;
    background-color: #f0fdf4;
    border: 1px solid #bbf7d0;
    border-radius: 8px;
    animation: slideDown 0.3s ease-out;
}

.redemption-preview-header h4 {
    margin: 0 0 8px 0;
    font-size: 14px;
    font-weight: 600;
    color: #065f46;
}

.redemption-preview-content {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.redemption-preview-benefit {
    font-size: 16px;
    font-weight: 500;
    color: #047857;
}

.redemption-preview-warning {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    background-color: #fef3c7;
    border: 1px solid #fcd34d;
    border-radius: 6px;
    font-size: 13px;
    color: #92400e;
}

/* Error Display */
.redemption-error {
    margin-top: 12px;
    padding: 12px 16px;
    background-color: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 8px;
    display: flex;
    align-items: flex-start;
    gap: 8px;
    animation: slideDown 0.3s ease-out;
}

.redemption-error-icon {
    color: #dc2626;
    flex-shrink: 0;
    margin-top: 1px;
}

.redemption-error-content {
    flex: 1 1;
}

.redemption-error-message {
    font-size: 14px;
    color: #991b1b;
    line-height: 1.4;
    margin-bottom: 8px;
}

.redemption-error-actions {
    display: flex;
    gap: 8px;
    margin-top: 8px;
    flex-wrap: wrap;
}

.redemption-error-actions button {
    padding: 6px 12px;
    border: none;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.redemption-upgrade-btn {
    background-color: #3b82f6;
    color: white;
}

.redemption-upgrade-btn:hover {
    background-color: #2563eb;
    transform: translateY(-1px);
}

.redemption-payment-btn {
    background-color: #10b981;
    color: white;
}

.redemption-payment-btn:hover {
    background-color: #059669;
    transform: translateY(-1px);
}

.redemption-history-btn {
    background-color: #6b7280;
    color: white;
}

.redemption-history-btn:hover {
    background-color: #4b5563;
    transform: translateY(-1px);
}

.redemption-retry-btn {
    background-color: #f59e0b;
    color: white;
}

.redemption-retry-btn:hover {
    background-color: #d97706;
    transform: translateY(-1px);
}

.redemption-alternatives-btn {
    background-color: #8b5cf6;
    color: white;
}

.redemption-alternatives-btn:hover {
    background-color: #7c3aed;
    transform: translateY(-1px);
}

/* Success Display */
.redemption-success {
    margin-top: 12px;
    padding: 12px 16px;
    background-color: #f0fdf4;
    border: 1px solid #bbf7d0;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
    animation: slideDown 0.3s ease-out, fadeOut 0.5s ease-out 2.5s forwards;
}

.redemption-success-icon {
    color: #059669;
    flex-shrink: 0;
}

.redemption-success-message {
    font-size: 14px;
    color: #047857;
    font-weight: 500;
}

/* Animations */
@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

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

@keyframes fadeOut {
    from {
        opacity: 1;
    }

    to {
        opacity: 0;
    }
}

/* Responsive Design */
@media (max-width: 640px) {
    .redemption-input-container {
        flex-direction: column;
        gap: 8px;
    }

    .redemption-input-wrapper {
        flex: 1 1 auto;
    }

    .redemption-input {
        width: 100%;
        font-size: 16px;
        /* Prevent zoom on iOS */
    }

    .redemption-submit-btn {
        width: 100%;
        min-width: auto;
    }

    .redemption-preview,
    .redemption-error,
    .redemption-success {
        margin-top: 12px;
        padding: 12px;
    }
}

@media (max-width: 480px) {
    .redemption-input {
        width: 100%;
        padding: 10px 14px;
        padding-right: 36px;
        font-size: 14px;
    }

    .redemption-submit-btn {
        padding: 10px 20px;
        font-size: 13px;
        height: 42px;
    }

    .redemption-input-spinner,
    .redemption-input-check {
        right: 10px;
    }
}

/* Dark mode support (if implemented) */
@media (prefers-color-scheme: dark) {
    .redemption-input {
        background-color: #1f2937;
        border-color: #374151;
        color: #f9fafb;
    }

    .redemption-input:focus {
        border-color: #60a5fa;
        box-shadow: none;
    }

    .redemption-input::placeholder {
        color: #6b7280;
    }

    .redemption-input:disabled {
        background-color: #111827;
        color: #4b5563;
    }

    .redemption-input-wrapper--validating .redemption-input {
        background-color: #451a03;
        border-color: #f59e0b;
    }

    .redemption-input-wrapper--success .redemption-input {
        background-color: #064e3b;
        border-color: #10b981;
    }

    .redemption-input-wrapper--error .redemption-input {
        background-color: #7f1d1d;
        border-color: #ef4444;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .redemption-input {
        border-width: 3px;
    }

    .redemption-submit-btn {
        border: 2px solid transparent;
    }

    .redemption-submit-btn:focus {
        border-color: #ffffff;
    }
}
/* Apple-inspired Subscription Plans Page */
.subscription-plans-page {
  min-height: 100vh;
  background: #f5f5f7;
  background: var(--color-bg-page, #f5f5f7);
  padding: 40px 20px;
}

/* Upgrade Notification */
.upgrade-notification {
  background: linear-gradient(135deg, #007AFF 0%, #5856D6 100%);
  border-radius: 16px;
  padding: 24px;
  margin-bottom: 32px;
  position: relative;
  box-shadow: 0 8px 32px rgba(0, 122, 255, 0.2);
  animation: slideInFromTop 0.5s ease-out;
}

.upgrade-notification__content {
  display: flex;
  flex-direction: column;
  gap: 12px;
  position: relative;
}

.upgrade-notification__title {
  font-size: 20px;
  font-weight: 600;
  color: white;
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', sans-serif;
}

.upgrade-notification__message {
  font-size: 16px;
  color: rgba(255, 255, 255, 0.9);
  margin: 0;
  line-height: 1.5;
  font-weight: 400;
}

.upgrade-notification__close {
  position: absolute;
  top: -8px;
  right: -8px;
  width: 32px;
  height: 32px;
  border: none;
  background: rgba(255, 255, 255, 0.2);
  color: white;
  border-radius: 50%;
  font-size: 18px;
  font-weight: 300;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  -webkit-backdrop-filter: blur(10px);
          backdrop-filter: blur(10px);
}

.upgrade-notification__close:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: scale(1.1);
}

.upgrade-notification__close:active {
  transform: scale(0.95);
}

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

.subscription-plans-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 48px;
}

/* Header Section */
.subscription-plans-header {
  text-align: center;
  max-width: 800px;
  margin: 0 auto;
}

.subscription-plans-header__title {
  font-size: 48px;
  font-weight: 700;
  color: rgba(0, 0, 0, 0.85);
  color: var(--color-text-primary, rgba(0, 0, 0, 0.85));
  margin: 0 0 16px 0;
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', sans-serif;
  line-height: 1.1;
}

.subscription-plans-header__subtitle {
  font-size: 20px;
  color: rgba(0, 0, 0, 0.60);
  color: var(--color-text-secondary, rgba(0, 0, 0, 0.60));
  margin: 0;
  line-height: 1.4;
  font-weight: 400;
}

/* Apple-style Redemption Section */
.apple-redemption-section {
  max-width: 800px;
  margin: 0 auto;
}

.apple-redemption-card {
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 24px;
  padding: 32px;
  box-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);
  position: relative;
  overflow: hidden;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.apple-redemption-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, 
    transparent 0%, 
    rgba(255, 255, 255, 0.6) 20%, 
    rgba(255, 255, 255, 0.6) 80%, 
    transparent 100%);
}

.apple-redemption-card:hover {
  transform: translateY(-2px);
  box-shadow: 
    0 12px 40px rgba(0, 0, 0, 0.08),
    0 2px 4px rgba(0, 0, 0, 0.06),
    inset 0 1px 0 rgba(255, 255, 255, 0.5);
}

.apple-redemption-header {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 24px;
}

.apple-redemption-icon {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  background: linear-gradient(135deg, #007AFF 0%, #5856D6 100%);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  box-shadow: 0 4px 16px rgba(0, 122, 255, 0.3);
}

.apple-redemption-title-group {
  flex: 1 1;
  min-width: 0;
}

.apple-redemption-title {
  font-size: 22px;
  font-weight: 600;
  color: rgba(0, 0, 0, 0.9);
  color: var(--color-text-primary, rgba(0, 0, 0, 0.9));
  margin: 0 0 6px 0;
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', sans-serif;
  line-height: 1.3;
}

.apple-redemption-subtitle {
  font-size: 15px;
  color: rgba(0, 0, 0, 0.65);
  color: var(--color-text-secondary, rgba(0, 0, 0, 0.65));
  margin: 0;
  line-height: 1.4;
  font-weight: 400;
}

.apple-redemption-content {
  position: relative;
}

/* Override RedemptionCodeInput styles for Apple design */
.apple-redemption-content .redemption-code-input {
  max-width: none;
}

.apple-redemption-content .redemption-input-container {
  display: flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.6);
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 16px;
  padding: 4px;
  gap: 4px;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  max-width: 100%;
  width: 100%;
}

.apple-redemption-content .redemption-input-wrapper {
  flex: 1 1;
  min-width: 0;
  max-width: calc(100% - 140px); /* Reserve more space for button + gap */
}

.apple-redemption-content .redemption-input {
  width: 100%;
  border: none;
  background: transparent;
  padding: 16px 20px;
  font-size: 16px;
  font-weight: 500;
  color: rgba(0, 0, 0, 0.9);
  color: var(--color-text-primary, rgba(0, 0, 0, 0.9));
  border-radius: 12px;
  transition: all 0.2s ease;
  outline: none;
}

.apple-redemption-content .redemption-input:focus {
  background: rgba(255, 255, 255, 0.8);
  box-shadow: none;
}

.apple-redemption-content .redemption-input::placeholder {
  color: rgba(0, 0, 0, 0.4);
  font-weight: 400;
}

.apple-redemption-content .redemption-submit-btn {
  background: linear-gradient(135deg, #007AFF 0%, #5856D6 100%);
  border: none;
  border-radius: 12px;
  padding: 16px 18px;
  font-size: 15px;
  font-weight: 600;
  color: white;
  width: 120px;
  height: auto;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(0, 122, 255, 0.3);
  transition: all 0.2s ease;
  white-space: nowrap;
}

.apple-redemption-content .redemption-submit-btn:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(0, 122, 255, 0.4);
  background: linear-gradient(135deg, #0056CC 0%, #4A4AE6 100%);
}

.apple-redemption-content .redemption-submit-btn:active:not(:disabled) {
  transform: translateY(0);
  box-shadow: 0 2px 8px rgba(0, 122, 255, 0.3);
}

.apple-redemption-content .redemption-submit-btn:disabled {
  background: rgba(0, 0, 0, 0.1);
  color: rgba(0, 0, 0, 0.3);
  box-shadow: none;
  transform: none;
}

/* Success state */
.apple-redemption-success {
  margin-top: 20px;
  background: rgba(52, 199, 89, 0.1);
  border: 1px solid rgba(52, 199, 89, 0.2);
  border-radius: 16px;
  padding: 16px 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  animation: slideInFromTop 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.apple-redemption-success-icon {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  background: #34C759;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
}

.apple-redemption-success-content h4 {
  font-size: 15px;
  font-weight: 600;
  color: #1D4E20;
  margin: 0 0 2px 0;
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', sans-serif;
}

.apple-redemption-success-content p {
  font-size: 13px;
  color: #2D5A31;
  margin: 0;
  line-height: 1.4;
}

/* Plan Cards Section */
.subscription-plans-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  grid-gap: 32px;
  gap: 32px;
  max-width: 800px;
  margin: 0 auto;
}

/* Mobile swipe container for small screens */
@media (max-width: 768px) {
  .subscription-plans-cards {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    gap: 20px;
    padding: 0 20px;
    margin: 0 -20px;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE and Edge */
  }
  
  .subscription-plans-cards::-webkit-scrollbar {
    display: none; /* Chrome, Safari, Opera */
  }
  
  .subscription-plans-cards .plan-card {
    flex: 0 0 280px;
    scroll-snap-align: center;
    margin: 0 auto;
  }
}

@media (max-width: 480px) {
  .subscription-plans-cards {
    padding: 0 16px;
    margin: 0 -16px;
    gap: 16px;
  }
  
  .subscription-plans-cards .plan-card {
    flex: 0 0 260px;
  }
}



/* Medium screen adjustments for better button spacing */
@media (max-width: 1600px) {
  .apple-redemption-content .redemption-input-wrapper {
    max-width: calc(100% - 150px); /* More space for medium screens */
  }
  
  .apple-redemption-content .redemption-submit-btn {
    width: 130px;
    padding: 16px 16px;
  }
}

@media (max-width: 1400px) {
  .apple-redemption-content .redemption-input-wrapper {
    max-width: calc(100% - 160px); /* Even more space for smaller desktop */
  }
  
  .apple-redemption-content .redemption-submit-btn {
    width: 140px;
    padding: 16px 14px;
  }
}

/* Tablet and mobile breakpoint */
@media (max-width: 900px) {
  .apple-redemption-content .redemption-input-container {
    flex-direction: column;
    gap: 8px;
    padding: 8px;
  }
  
  .apple-redemption-content .redemption-input-wrapper {
    max-width: 100%;
  }
  
  .apple-redemption-content .redemption-submit-btn {
    width: 100%;
    max-width: none;
    padding: 14px 20px;
  }
}

/* Responsive Design */
@media (max-width: 768px) {
  .subscription-plans-page {
    padding: 32px 16px;
  }
  
  .subscription-plans-container {
    gap: 40px;
  }
  
  .subscription-plans-header__title {
    font-size: 36px;
  }
  
  .subscription-plans-header__subtitle {
    font-size: 18px;
  }
  
  /* Mobile swipe styles are defined above */
  
  .upgrade-notification {
    padding: 20px;
    margin-bottom: 24px;
  }
  
  .upgrade-notification__title {
    font-size: 18px;
  }
  
  .upgrade-notification__message {
    font-size: 15px;
  }
  
  /* Redemption section mobile styles */
  .subscription-plans-redemption {
    padding: 24px 20px;
    margin: 0 -4px;
  }
  
  .subscription-plans-redemption__title {
    font-size: 20px;
  }
  
  .subscription-plans-redemption__subtitle {
    font-size: 14px;
  }
  
  /* Apple Redemption Mobile Styles */
  .apple-redemption-card {
    padding: 24px 20px;
    border-radius: 20px;
    margin: 0 auto;
  }
  
  .apple-redemption-header {
    gap: 12px;
    margin-bottom: 20px;
  }
  
  .apple-redemption-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
  }
  
  .apple-redemption-title {
    font-size: 20px;
  }
  
  .apple-redemption-subtitle {
    font-size: 14px;
  }
  
  .apple-redemption-content .redemption-input-container {
    flex-direction: column;
    gap: 8px;
    padding: 8px;
  }
  
  .apple-redemption-content .redemption-input-wrapper {
    max-width: 100%;
  }
  
  .apple-redemption-content .redemption-input {
    padding: 14px 16px;
    font-size: 16px;
  }
  
  .apple-redemption-content .redemption-submit-btn {
    width: 100%;
    max-width: none;
    padding: 14px 20px;
    min-width: auto;
  }
  
  .apple-redemption-success {
    margin-top: 16px;
    padding: 14px 16px;
    border-radius: 14px;
  }
  
  .apple-redemption-success-icon {
    width: 28px;
    height: 28px;
  }
}

@media (max-width: 480px) {
  .subscription-plans-page {
    padding: 24px 12px;
  }
  
  .subscription-plans-container {
    gap: 32px;
  }
  
  .subscription-plans-header__title {
    font-size: 28px;
  }
  
  .subscription-plans-header__subtitle {
    font-size: 16px;
  }
  
  /* Mobile swipe styles are defined above */
  
  .upgrade-notification {
    padding: 16px;
    margin-bottom: 20px;
    border-radius: 12px;
  }
  
  .upgrade-notification__title {
    font-size: 16px;
  }
  
  .upgrade-notification__message {
    font-size: 14px;
  }
  
  .upgrade-notification__close {
    width: 28px;
    height: 28px;
    font-size: 16px;
  }
  
  /* Redemption section small mobile styles */
  .subscription-plans-redemption {
    padding: 20px 16px;
    border-radius: 16px;
  }
  
  .subscription-plans-redemption__title {
    font-size: 18px;
  }
  
  .subscription-plans-redemption__subtitle {
    font-size: 13px;
    margin-bottom: 20px;
  }
  
  /* Apple Redemption Small Mobile Styles */
  .apple-redemption-card {
    padding: 20px 16px;
    border-radius: 18px;
  }
  
  .apple-redemption-header {
    flex-direction: column;
    text-align: center;
    gap: 16px;
  }
  
  .apple-redemption-icon {
    align-self: center;
    width: 44px;
    height: 44px;
  }
  
  .apple-redemption-title {
    font-size: 18px;
  }
  
  .apple-redemption-subtitle {
    font-size: 13px;
  }
  
  .apple-redemption-content .redemption-input-container {
    gap: 6px;
    padding: 6px;
  }
  
  .apple-redemption-content .redemption-input {
    padding: 12px 14px;
    font-size: 15px;
  }
  
  .apple-redemption-content .redemption-submit-btn {
    padding: 12px 18px;
    font-size: 14px;
  }
  
  .applied-redemption-banner {
    padding: 14px 16px;
    border-radius: 12px;
  }
  
  .applied-redemption-banner__icon {
    width: 20px;
    height: 20px;
  }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
  .subscription-plans-page {
    background: #000000;
  }
  
  .subscription-plans-header__title {
    color: rgba(235, 235, 245, 0.85);
  }
  
  .subscription-plans-header__subtitle {
    color: rgba(235, 235, 245, 0.60);
  }
  
  .upgrade-notification {
    background: linear-gradient(135deg, #0A84FF 0%, #5E5CE6 100%);
    box-shadow: 0 8px 32px rgba(10, 132, 255, 0.3);
  }
  
  /* Apple Redemption Dark Mode */
  .apple-redemption-card {
    background: rgba(28, 28, 30, 0.8);
    border-color: rgba(84, 84, 88, 0.3);
    box-shadow: 
      0 8px 32px rgba(0, 0, 0, 0.3),
      0 1px 2px rgba(0, 0, 0, 0.2),
      inset 0 1px 0 rgba(255, 255, 255, 0.1);
  }
  
  .apple-redemption-card::before {
    background: linear-gradient(90deg, 
      transparent 0%, 
      rgba(255, 255, 255, 0.1) 20%, 
      rgba(255, 255, 255, 0.1) 80%, 
      transparent 100%);
  }
  
  .apple-redemption-title {
    color: rgba(235, 235, 245, 0.9);
  }
  
  .apple-redemption-subtitle {
    color: rgba(235, 235, 245, 0.65);
  }
  
  .apple-redemption-content .redemption-input-container {
    background: rgba(58, 58, 60, 0.6);
    border-color: rgba(84, 84, 88, 0.3);
  }
  
  .apple-redemption-content .redemption-input {
    color: rgba(235, 235, 245, 0.9);
  }
  
  .apple-redemption-content .redemption-input:focus {
    background: rgba(58, 58, 60, 0.8);
    box-shadow: none;
  }
  
  .apple-redemption-content .redemption-input::placeholder {
    color: rgba(235, 235, 245, 0.4);
  }
  
  .apple-redemption-success {
    background: rgba(48, 209, 88, 0.15);
    border-color: rgba(48, 209, 88, 0.3);
  }
  
  .apple-redemption-success-content h4 {
    color: #32D74B;
  }
  
  .apple-redemption-success-content p {
    color: rgba(50, 215, 75, 0.8);
  }
}/* 臨
時免費模式對話框樣式 */
.free-trial-dialog {
  padding: 24px;
  text-align: center;
}

.free-trial-dialog__content {
  margin-bottom: 32px;
}

.free-trial-dialog__icon {
  font-size: 48px;
  margin-bottom: 16px;
}

.free-trial-dialog__heading {
  font-size: 24px;
  font-weight: 600;
  color: #1d1d1f;
  color: var(--color-text-primary, #1d1d1f);
  margin: 0 0 16px 0;
  line-height: 1.2;
}

.free-trial-dialog__message {
  font-size: 16px;
  color: rgba(0, 0, 0, 0.60);
  color: var(--color-text-secondary, rgba(0, 0, 0, 0.60));
  line-height: 1.5;
  margin: 0 0 24px 0;
}

.free-trial-dialog__features {
  background: #f5f5f7;
  background: var(--color-bg-soft, #f5f5f7);
  border-radius: 12px;
  padding: 20px;
  text-align: left;
}

.free-trial-dialog__features h4 {
  font-size: 16px;
  font-weight: 600;
  color: #1d1d1f;
  color: var(--color-text-primary, #1d1d1f);
  margin: 0 0 12px 0;
}

.free-trial-dialog__features ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.free-trial-dialog__features li {
  font-size: 14px;
  color: rgba(0, 0, 0, 0.60);
  color: var(--color-text-secondary, rgba(0, 0, 0, 0.60));
  line-height: 1.5;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.free-trial-dialog__features li:last-child {
  margin-bottom: 0;
}

.free-trial-dialog__actions {
  display: flex;
  justify-content: center;
}

.free-trial-dialog__button {
  background: #007aff;
  background: var(--accent-color-blue, #007aff);
  color: white;
  border: none;
  border-radius: 12px;
  padding: 12px 32px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: inherit;
}

.free-trial-dialog__button:hover {
  background: #0056cc;
  background: var(--accent-color-blue-hover, #0056cc);
  transform: translateY(-1px);
}

.free-trial-dialog__button:active {
  transform: translateY(0);
}

/* 響應式設計 */
@media (max-width: 768px) {
  .free-trial-dialog {
    padding: 20px;
  }
  
  .free-trial-dialog__heading {
    font-size: 20px;
  }
  
  .free-trial-dialog__message {
    font-size: 14px;
  }
  
  .free-trial-dialog__features {
    padding: 16px;
  }
}

/* Subscription Plans API Loading State */
.subscription-plans-page__api-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  text-align: center;
  grid-column: 1 / -1; /* 佔滿整個 grid */
}

.subscription-plans-page__api-loading-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid rgba(0, 122, 255, 0.1);
  border-top: 3px solid #007AFF;
  border-radius: 50%;
  animation: subscription-plans-api-spinner-spin 1s linear infinite;
  margin-bottom: 16px;
}

.subscription-plans-page__api-loading-text {
  font-size: 16px;
  color: #86868b;
  color: var(--color-text-secondary, #86868b);
  margin: 0;
  font-weight: 400;
}

/* Subscription Plans API Error State */
.subscription-plans-page__api-error {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  text-align: center;
  grid-column: 1 / -1; /* 佔滿整個 grid */
  background: rgba(255, 149, 0, 0.1);
  border-radius: 12px;
  border: 1px solid rgba(255, 149, 0, 0.2);
}

.subscription-plans-page__api-error-message {
  font-size: 16px;
  color: #FF9500;
  margin: 0 0 8px 0;
  font-weight: 500;
}

.subscription-plans-page__api-error-details {
  font-size: 14px;
  color: rgba(255, 149, 0, 0.7);
  margin: 0;
}

/* Subscription Plans API Loading Animation */
@keyframes subscription-plans-api-spinner-spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Responsive adjustments for subscription plans API loading states */
@media (max-width: 768px) {
  .subscription-plans-page__api-loading {
    padding: 40px 20px;
  }
  
  .subscription-plans-page__api-loading-spinner {
    width: 32px;
    height: 32px;
  }
  
  .subscription-plans-page__api-loading-text {
    font-size: 14px;
  }
}
/* frontend/src/pages/SponsorSuccess.css */
.sponsor-success-page {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 80vh; /* 確保頁面至少佔據視窗高度 */
    background-color: #f9f4f0; /* 柔和的背景色 */
    padding: 20px;
  }
  
  .sponsor-success-container {
    text-align: center;
    background-color: white;
    padding: 40px;
    border-radius: 15px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    max-width: 700px;
    width: 100%;
  }
  
  .heart-icon {
    font-size: 4em;
    color: #e74c3c; /* 愛心圖示的顏色 */
    margin-bottom: 20px;
    animation: heartbeat 1.5s ease infinite; /* 加入心跳動畫 */
  }
  
  @keyframes heartbeat {
    0% {
      transform: scale(1);
    }
    50% {
      transform: scale(1.2);
    }
    100% {
      transform: scale(1);
    }
  }
  
  .sponsor-success-container h1 {
    color: #34495e; /* 標題文字顏色 */
    font-size: 2.2em;
    margin-bottom: 20px;
  }
  
  .sponsor-success-container p {
    color: #555; /* 段落文字顏色 */
    font-size: 1.1em;
    line-height: 1.7;
    margin-bottom: 30px;
  }
  
  .signature {
    font-style: italic;
    color: #777;
    margin-top: 20px;
  }
.google-trends-search-area {
    width: 100%;
    box-sizing: border-box;
    position: relative;
    max-width: 500px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.search-container {
    position: relative;
    width: 100%;
    margin-bottom: 8px;
    box-sizing: border-box;
}

.search-input {
    width: 100%;
    padding: 8px 36px;
    height: 40px;
    border: 1px solid #e2e8f0;
    border-radius: 20px;
    background: #f8fafc;
    font-size: 14px;
    color: #1f2937;
    box-sizing: border-box;
    transition: all 0.2s ease;
}

.search-input:focus {
    background: #ffffff;
    border-color: #3b82f6;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.1);
    outline: none;
}

.search-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    font-size: 16px;
    pointer-events: none;
}

.search-results-container {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    max-width: 500px;
    max-height: 320px;
    box-sizing: border-box;
    border-radius: 16px;
    border: 1px solid #e2e8f0;
    background: white;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    overflow-y: auto;
    z-index: 1000;
    margin-top: 4px;
}

.search-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 32px 24px;
    color: #94a3b8;
    text-align: center;
}

.search-empty-state .icon {
    font-size: 24px;
    margin-bottom: 12px;
    color: #cbd5e1;
}

.search-empty-state .message {
    font-size: 14px;
    line-height: 1.5;
}

.stock-result-item {
    display: grid;
    grid-template-columns: 80px 1fr 60px;
    align-items: center;
    padding: 10px 16px;
    border-bottom: 1px solid #f1f5f9;
    cursor: pointer;
    transition: all 0.2s ease;
    background: white;
}

.stock-result-item:hover {
    background: #f8fafc;
}

.stock-result-item:last-child {
    border-bottom: none;
}

.stock-result-item .stock-symbol {
    font-weight: 600;
    color: #1f2937;
    font-size: 14px;
    min-width: 80px;
    padding-right: 8px;
}

.stock-result-item .stock-name {
    color: #64748b;
    font-size: 14px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    padding: 0 8px;
}

.stock-result-item .stock-market {
    min-width: 60px;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
    text-align: center;
}

@media (max-width: 640px) {
    .search-empty-state {
        padding: 20px 16px;
    }
    
    .search-empty-state .icon {
        font-size: 20px;
    }
    
    .stock-result-item {
        grid-template-columns: 70px 1fr 50px;
        padding: 8px 12px;
    }
    
    .stock-result-item .stock-symbol {
        min-width: 70px;
    }
    
    .stock-result-item .stock-market {
        min-width: 50px;
        padding: 3px 6px;
        font-size: 11px;
    }
} 
/* 圖表卡片樣式 */
.google-trends-chart-card {
    flex: 1 1 70%;
    min-width: 300px;
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    padding: 20px;
    overflow: hidden;
    margin-bottom: 20px;
}

/* 圖表容器 */
.google-trends-chart-container {
    width: 100%;
    height: 450px;
    position: relative;
    overflow: visible;
}


/* 圖表描述文字 */
.chart-description {
    margin-top: 20px;
    font-size: 0.875rem;
    color: #666;
    line-height: 1.5;
    padding: 0 20px;
}

/* 無數據提示 */
.no-data-message {
    text-align: center;
    color: #888;
    margin-top: 20px;
}

/* 響應式設計 */
@media (max-width: 768px) {
    .google-trends-chart-card {
        flex: 1 1 100%;
        min-width: 100%;
        padding: 15px;
    }

    .google-trends-chart-container {
        height: 350px;
    }

    .chart-description {
        padding: 0 10px;
    }
}



/* 自訂 Tooltip 樣式 */
.google-trends-tooltip {
    background-color: rgba(0, 0, 0, 0.7) !important;
    color: white !important;
    border: none;
    border-radius: 6px;
    padding: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    z-index: 1000; /* 確保顯示在最上層 */
}

.google-trends-tooltip p {
    font-size: 0.9rem;
    margin: 4px 0;
    line-height: 1.4;
}

.google-trends-tooltip p:first-child {
    font-weight: 600;
    margin-bottom: 8px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    padding-bottom: 4px;
} 
.google-trends-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.google-trends-chart-card {
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    padding: 20px;
    margin-top: 20px;
    overflow: hidden;  /* 確保內容不會超出圓角 */
}

.chart-description {
    font-size: 0.9rem;
    color: #666;
    margin-top: 15px;
    text-align: center;
}

.empty-state {
    text-align: center;
    color: #888;
    margin-top: 20px;
}

/* 響應式設計 */
@media (max-width: 768px) {
    .google-trends-container {
        padding: 10px;
    }

    .google-trends-chart-card {
        padding: 15px;
    }
} 
 /* 主容器樣式 */
.google-trends-page-container {
    padding: 20px;
    max-width: 1200px;
    margin: 0 auto;
  }
  
  /* 標題樣式 */
  .google-trends-page-title {
    text-align: left;
    font-size: 1.8rem;
    margin-bottom: 20px;
    color: #333;
  }
  
  /* 儀表板佈局 */
  .google-trends-dashboard {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: space-between;
    margin-bottom: 20px;
  }
  
  /* 主要圖表卡片 */
  .google-trends-chart-card {
    flex: 1 1 70%;
    min-width: 300px;
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    padding: 20px;
    overflow: hidden;
  }
  
  /* 圖表容器 */
  .google-trends-chart-container {
    width: 100%;
    height: 450px;
    position: relative;
    overflow: visible;
  }
  
  /* 分析結果樣式 */
  .google-trends-analysis-result {
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    gap: 30px;
    padding: 15px 20px;
    margin: 20px 0;
  }
  
  /* 響應式設計 */
  @media (max-width: 768px) {
    .google-trends-dashboard {
      flex-direction: column;
    }
    
    .google-trends-chart-card {
      flex: 1 1 100%;
      min-width: 100%;
      padding: 15px;
    }
    
    .google-trends-analysis-result {
      flex-direction: column;
      gap: 15px;
      padding: 10px;
    }
  }
  
  /* 與 PriceAnalysis 共用的全域樣式 */
  .description-container {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;

  }
  
  .error-message {
    color: #dc3545;
    font-size: 0.875rem;
    margin-top: 5px;
  }
/* 參考自 GoogleTrendsSymbolContainer.css，但將 class 名稱調整為 market 專屬 */
.google-trends-market-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.google-trends-market-chart-card {
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    padding: 20px;
    margin-top: 20px;
    overflow: hidden;  /* 確保內容不會超出圓角 */
}

.chart-description {
    font-size: 0.9rem;
    color: #666;
    margin-top: 15px;
    text-align: center;
}

.empty-state {
    text-align: center;
    color: #888;
    margin-top: 20px;
}

/* 響應式設計 */
@media (max-width: 768px) {
    .google-trends-market-container {
        padding: 10px;
    }

    .google-trends-market-chart-card {
        padding: 15px;
    }
} 
/* 主容器樣式 */
.google-trends-market-page-container {
    padding: 20px;
    max-width: 1200px;
    margin: 0 auto;
}

/* 標題樣式 */
.google-trends-market-page-title {
    font-size: 2rem;
    color: #2c3e50;
    text-align: center;
    margin-bottom: 30px;
    font-weight: 600;
}

/* 儀表板佈局 */
.google-trends-market-dashboard {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: space-between;
    margin-bottom: 20px;
}

/* 主要圖表卡片 */
.google-trends-market-chart-card {
    flex: 1 1 70%;
    min-width: 300px;
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    padding: 20px;
    overflow: hidden;
}

/* 圖表容器 */
.google-trends-market-chart-container {
    width: 100%;
    height: 450px;
    position: relative;
    overflow: visible;
}

/* 分析結果樣式 */
.google-trends-market-analysis-result {
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    gap: 30px;
    padding: 15px 20px;
    margin: 20px 0;
}

/* 響應式設計 */
@media (max-width: 768px) {
    .google-trends-market-dashboard {
        flex-direction: column;
    }
    
    .google-trends-market-chart-card {
        flex: 1 1 100%;
        min-width: 100%;
        padding: 15px;
    }
    
    .google-trends-market-analysis-result {
        flex-direction: column;
        gap: 15px;
        padding: 10px;
    }
}

/* 與 PriceAnalysis 共用的全域樣式 */
.description-container {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;

}

.error-message {
    color: #dc3545;
    font-size: 0.875rem;
    margin-top: 5px;
} 
/* Apple-inspired Payment Page */
.payment-page {
  min-height: 100vh;
  background: #f5f5f7;
  background: var(--color-bg-page, #f5f5f7);
  padding: 0;
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', sans-serif;
}

.payment-page__container {
  max-width: 800px;
  margin: 0 auto;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Header Section */
.payment-page__header {
  background: #ffffff;
  background: var(--color-bg-card, #ffffff);
  border-bottom: 1px solid #e5e5e5;
  border-bottom: 1px solid var(--color-border-soft, #e5e5e5);
  padding: 20px 32px;
  position: -webkit-sticky;
  position: sticky;
  top: 0;
  z-index: 10;
  -webkit-backdrop-filter: blur(20px);
          backdrop-filter: blur(20px);
  background: rgba(255, 255, 255, 0.95);
}

.payment-page__back-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: none;
  border: none;
  color: #007aff;
  color: var(--color-text-link, #007aff);
  font-size: 16px;
  font-weight: 400;
  cursor: pointer;
  padding: 8px 0;
  margin-bottom: 24px;
  transition: all 0.2s ease;
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', sans-serif;
}

.payment-page__back-button:hover {
  opacity: 0.7;
  transform: translateX(-2px);
}

.payment-page__back-button:active {
  transform: translateX(-1px);
}

.payment-page__back-button svg {
  transition: transform 0.2s ease;
}

.payment-page__back-button:hover svg {
  transform: translateX(-2px);
}

.payment-page__title-section {
  text-align: center;
  max-width: 600px;
  margin: 0 auto;
  width: 100%;
}

.payment-page__title {
  font-size: 32px;
  font-weight: 700;
  color: rgba(0, 0, 0, 0.85);
  color: var(--color-text-primary, rgba(0, 0, 0, 0.85));
  margin: 0 0 12px 0;
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', sans-serif;
  line-height: 1.2;
  text-align: center;
}

.payment-page__subtitle {
  font-size: 18px;
  color: rgba(0, 0, 0, 0.60);
  color: var(--color-text-secondary, rgba(0, 0, 0, 0.60));
  margin: 0;
  line-height: 1.4;
  font-weight: 400;
}

/* Steps Indicator */
.payment-page__steps {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 32px 20px;
  margin: 0 auto;
  max-width: 600px;
}

.payment-page__step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.payment-page__step-number {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #d1d1d6;
  background: var(--color-border-default, #d1d1d6);
  color: rgba(0, 0, 0, 0.60);
  color: var(--color-text-secondary, rgba(0, 0, 0, 0.60));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 600;
  transition: all 0.3s ease;
}

.payment-page__step--active .payment-page__step-number {
  background: #007aff;
  background: var(--color-text-link, #007aff);
  color: white;
}

.payment-page__step-title {
  font-size: 12px;
  color: rgba(0, 0, 0, 0.60);
  color: var(--color-text-secondary, rgba(0, 0, 0, 0.60));
  font-weight: 500;
  text-align: center;
}

.payment-page__step--active .payment-page__step-title {
  color: rgba(0, 0, 0, 0.85);
  color: var(--color-text-primary, rgba(0, 0, 0, 0.85));
  font-weight: 600;
}

.payment-page__step-connector {
  width: 60px;
  height: 2px;
  background: #d1d1d6;
  background: var(--color-border-default, #d1d1d6);
  margin: 0 16px;
  transition: all 0.3s ease;
}

.payment-page__step-connector--completed {
  background: #007aff;
  background: var(--color-text-link, #007aff);
}

/* Content Section */
.payment-page__content {
  flex: 1 1;
  padding: 20px 32px 40px;
  display: flex;
  justify-content: center;
  align-items: flex-start;
}

/* Plan Section */
.payment-page__plan-section {
  width: 100%;
  max-width: 500px;
}

.payment-page__plan-card {
  background: #ffffff;
  background: var(--color-bg-card, #ffffff);
  border-radius: 14px;
  border-radius: var(--border-radius-large, 14px);
  padding: 32px;
  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));
  border: 1px solid #e5e5e5;
  border: 1px solid var(--color-border-soft, #e5e5e5);
  margin-bottom: 32px;
}

.payment-page__plan-header {
  text-align: center;
  margin-bottom: 32px;
}

.payment-page__plan-badge {
  display: inline-block;
  background: linear-gradient(135deg, #007AFF 0%, #5856D6 100%);
  color: white;
  padding: 6px 16px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 16px;
}

.payment-page__plan-name {
  font-size: 28px;
  font-weight: 700;
  color: rgba(0, 0, 0, 0.85);
  color: var(--color-text-primary, rgba(0, 0, 0, 0.85));
  margin: 0 0 16px 0;
}

.payment-page__plan-price {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 4px;
  margin-bottom: 8px;
}

.payment-page__plan-amount {
  font-size: 36px;
  font-weight: 700;
  color: #007aff;
  color: var(--color-text-link, #007aff);
}

.payment-page__plan-period {
  font-size: 18px;
  color: rgba(0, 0, 0, 0.60);
  color: var(--color-text-secondary, rgba(0, 0, 0, 0.60));
  font-weight: 500;
}

.payment-page__plan-discount {
  margin-top: 12px;
  padding: 12px;
  background: rgba(52, 199, 89, 0.1);
  border-radius: 8px;
  border: 1px solid rgba(52, 199, 89, 0.2);
}

.payment-page__original-price {
  font-size: 14px;
  color: rgba(0, 0, 0, 0.60);
  color: var(--color-text-secondary, rgba(0, 0, 0, 0.60));
  text-decoration: line-through;
  margin-bottom: 4px;
}

.payment-page__discount-badge {
  font-size: 14px;
  color: #34C759;
  font-weight: 600;
  margin-bottom: 4px;
}

.payment-page__redemption-code {
  font-size: 12px;
  color: rgba(0, 0, 0, 0.60);
  color: var(--color-text-secondary, rgba(0, 0, 0, 0.60));
  font-weight: 500;
}

.payment-page__plan-features {
  border-top: 1px solid #e5e5e5;
  border-top: 1px solid var(--color-border-soft, #e5e5e5);
  padding-top: 24px;
}

.payment-page__features-title {
  font-size: 16px;
  font-weight: 600;
  color: rgba(0, 0, 0, 0.85);
  color: var(--color-text-primary, rgba(0, 0, 0, 0.85));
  margin: 0 0 16px 0;
}

.payment-page__features-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.payment-page__feature-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 0;
  font-size: 15px;
  color: rgba(0, 0, 0, 0.85);
  color: var(--color-text-primary, rgba(0, 0, 0, 0.85));
}

.payment-page__feature-icon {
  color: #34C759;
  flex-shrink: 0;
}

/* Terms Section */
.payment-page__terms-section {
  width: 100%;
  max-width: 600px;
}

.payment-page__terms-content {
  background: #ffffff;
  background: var(--color-bg-card, #ffffff);
  border-radius: 14px;
  border-radius: var(--border-radius-large, 14px);
  padding: 32px;
  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));
  border: 1px solid #e5e5e5;
  border: 1px solid var(--color-border-soft, #e5e5e5);
  margin-bottom: 32px;
}

.payment-page__terms-title {
  font-size: 24px;
  font-weight: 600;
  color: rgba(0, 0, 0, 0.85);
  color: var(--color-text-primary, rgba(0, 0, 0, 0.85));
  margin: 0 0 24px 0;
  text-align: center;
}

.payment-page__terms-box {
  background: #f0f0f0;
  background: var(--color-bg-subtle, #f0f0f0);
  border-radius: 10px;
  border-radius: var(--border-radius-medium, 10px);
  padding: 24px;
  margin-bottom: 24px;
  max-height: 300px;
  overflow-y: auto;
}

.payment-page__terms-group {
  margin-bottom: 20px;
}

.payment-page__terms-group:last-child {
  margin-bottom: 0;
}

.payment-page__terms-group h4 {
  font-size: 16px;
  font-weight: 600;
  color: rgba(0, 0, 0, 0.85);
  color: var(--color-text-primary, rgba(0, 0, 0, 0.85));
  margin: 0 0 12px 0;
}

.payment-page__terms-group ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.payment-page__terms-group li {
  font-size: 14px;
  color: rgba(0, 0, 0, 0.60);
  color: var(--color-text-secondary, rgba(0, 0, 0, 0.60));
  line-height: 1.5;
  margin-bottom: 8px;
  padding-left: 16px;
  position: relative;
}

.payment-page__terms-group li::before {
  content: "•";
  color: #007aff;
  color: var(--color-text-link, #007aff);
  position: absolute;
  left: 0;
}

.payment-page__checkbox-label {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  cursor: pointer;
}

.payment-page__checkbox {
  width: 18px;
  height: 18px;
  margin: 0;
  accent-color: #007aff;
  accent-color: var(--color-text-link, #007aff);
}

.payment-page__checkbox-text {
  font-size: 15px;
  color: rgba(0, 0, 0, 0.85);
  color: var(--color-text-primary, rgba(0, 0, 0, 0.85));
  line-height: 1.5;
}

.payment-page__link {
  color: #007aff;
  color: var(--color-text-link, #007aff);
  text-decoration: none;
  margin: 0 4px;
}

.payment-page__link:hover {
  text-decoration: underline;
}

/* Confirmation Section */
.payment-page__confirmation-section {
  width: 100%;
  max-width: 500px;
}

.payment-page__order-summary {
  background: #ffffff;
  background: var(--color-bg-card, #ffffff);
  border-radius: 14px;
  border-radius: var(--border-radius-large, 14px);
  padding: 32px;
  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));
  border: 1px solid #e5e5e5;
  border: 1px solid var(--color-border-soft, #e5e5e5);
  margin-bottom: 24px;
}

.payment-page__summary-title {
  font-size: 20px;
  font-weight: 600;
  color: rgba(0, 0, 0, 0.85);
  color: var(--color-text-primary, rgba(0, 0, 0, 0.85));
  margin: 0 0 24px 0;
  text-align: center;
}

.payment-page__order-details {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.payment-page__order-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 15px;
}

.payment-page__order-row span:first-child {
  color: rgba(0, 0, 0, 0.60);
  color: var(--color-text-secondary, rgba(0, 0, 0, 0.60));
}

.payment-page__order-row span:last-child {
  color: rgba(0, 0, 0, 0.85);
  color: var(--color-text-primary, rgba(0, 0, 0, 0.85));
  font-weight: 500;
}

.payment-page__order-id {
  font-family: 'SF Mono', Monaco, 'Cascadia Code', 'Roboto Mono', Consolas, 'Courier New', monospace;
  font-size: 13px;
}

.payment-page__order-total {
  border-top: 1px solid #e5e5e5;
  border-top: 1px solid var(--color-border-soft, #e5e5e5);
  padding-top: 16px;
  font-size: 18px;
  font-weight: 600;
}

.payment-page__order-total span:last-child {
  color: #007aff;
  color: var(--color-text-link, #007aff);
  font-weight: 700;
}

.payment-page__security-notice {
  background: #ffffff;
  background: var(--color-bg-card, #ffffff);
  border-radius: 14px;
  border-radius: var(--border-radius-large, 14px);
  padding: 24px;
  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));
  border: 1px solid #e5e5e5;
  border: 1px solid var(--color-border-soft, #e5e5e5);
  margin-bottom: 32px;
  display: flex;
  gap: 16px;
}

.payment-page__security-icon {
  color: #34C759;
  flex-shrink: 0;
}

.payment-page__security-text h4 {
  font-size: 16px;
  font-weight: 600;
  color: rgba(0, 0, 0, 0.85);
  color: var(--color-text-primary, rgba(0, 0, 0, 0.85));
  margin: 0 0 12px 0;
}

.payment-page__security-text ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.payment-page__security-text li {
  font-size: 14px;
  color: rgba(0, 0, 0, 0.60);
  color: var(--color-text-secondary, rgba(0, 0, 0, 0.60));
  line-height: 1.5;
  margin-bottom: 6px;
  padding-left: 16px;
  position: relative;
}

.payment-page__security-text li::before {
  content: "•";
  color: #34C759;
  position: absolute;
  left: 0;
}

/* Actions */
.payment-page__actions {
  display: flex;
  gap: 16px;
  justify-content: center;
}

.payment-page__button {
  padding: 14px 32px;
  border-radius: 10px;
  border-radius: var(--border-radius-medium, 10px);
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  border: none;
  min-width: 120px;
  font-family: inherit;
}

.payment-page__button--secondary {
  background: #f0f0f0;
  background: var(--color-bg-subtle, #f0f0f0);
  color: rgba(0, 0, 0, 0.85);
  color: var(--color-text-primary, rgba(0, 0, 0, 0.85));
}

.payment-page__button--secondary:hover {
  background: #e0e0e0;
  transform: translateY(-1px);
}

.payment-page__button--primary {
  background: #007aff;
  background: var(--color-text-link, #007aff);
  color: white;
}

.payment-page__button--primary:hover {
  background: #0056cc;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 122, 255, 0.3);
}

.payment-page__button--primary:disabled {
  background: #d1d1d6;
  background: var(--color-border-default, #d1d1d6);
  color: rgba(0, 0, 0, 0.60);
  color: var(--color-text-secondary, rgba(0, 0, 0, 0.60));
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.payment-page__button--payment {
  background: linear-gradient(135deg, #34C759 0%, #30D158 100%);
}

.payment-page__button--payment:hover {
  background: linear-gradient(135deg, #28A745 0%, #34C759 100%);
  box-shadow: 0 4px 12px rgba(52, 199, 89, 0.3);
}

/* Error Message */
.payment-page__error-message {
  background: #FFEBEE;
  border: 1px solid #FFCDD2;
  border-radius: 10px;
  border-radius: var(--border-radius-medium, 10px);
  padding: 16px;
  margin: 0 32px 24px;
  display: flex;
  align-items: center;
  gap: 12px;
  color: #C62828;
  font-size: 15px;
}

.payment-page__error-message svg {
  flex-shrink: 0;
}

/* Loading */
.payment-page__loading {
  display: flex;
  justify-content: center;
  padding: 40px;
}

/* Error State */
.payment-page__error {
  text-align: center;
  padding: 80px 32px;
  max-width: 500px;
  margin: 0 auto;
}

.payment-page__error h1 {
  font-size: 28px;
  font-weight: 600;
  color: rgba(0, 0, 0, 0.85);
  color: var(--color-text-primary, rgba(0, 0, 0, 0.85));
  margin: 0 0 16px 0;
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', sans-serif;
}

.payment-page__error p {
  font-size: 16px;
  color: rgba(0, 0, 0, 0.60);
  color: var(--color-text-secondary, rgba(0, 0, 0, 0.60));
  margin: 0 0 32px 0;
  line-height: 1.5;
}

.payment-page__error .payment-page__back-button {
  background: #007aff;
  background: var(--color-text-link, #007aff);
  color: white;
  padding: 12px 24px;
  border-radius: 10px;
  border-radius: var(--border-radius-medium, 10px);
  font-weight: 500;
  margin: 0;
  transition: all 0.2s ease;
}

.payment-page__error .payment-page__back-button:hover {
  background: #0056cc;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 122, 255, 0.3);
}

.payment-page__error .payment-page__back-button:active {
  transform: translateY(0);
}

/* Responsive Design */
@media (max-width: 768px) {
  .payment-page__header {
    padding: 16px 20px;
  }
  
  .payment-page__back-button {
    font-size: 15px;
    margin-bottom: 20px;
  }
  
  .payment-page__title {
    font-size: 24px;
  }
  
  .payment-page__subtitle {
    font-size: 16px;
  }
  
  .payment-page__steps {
    padding: 24px 16px;
  }
  
  .payment-page__step-connector {
    width: 40px;
    margin: 0 8px;
  }
  
  .payment-page__step-title {
    font-size: 11px;
  }
  
  .payment-page__content {
    padding: 20px 16px 32px;
  }
  
  .payment-page__plan-card,
  .payment-page__terms-content,
  .payment-page__order-summary,
  .payment-page__security-notice {
    padding: 24px;
    margin-bottom: 24px;
  }
  
  .payment-page__plan-name {
    font-size: 24px;
  }
  
  .payment-page__plan-amount {
    font-size: 32px;
  }
  
  .payment-page__terms-title {
    font-size: 20px;
  }
  
  .payment-page__terms-box {
    padding: 20px;
  }
  
  .payment-page__actions {
    flex-direction: column;
    gap: 12px;
  }
  
  .payment-page__button {
    width: 100%;
    padding: 16px 24px;
  }
  
  .payment-page__error-message {
    margin: 0 16px 20px;
    padding: 14px;
    font-size: 14px;
  }
  
  .payment-page__error {
    padding: 60px 20px;
  }
  
  .payment-page__error h1 {
    font-size: 22px;
  }
}

@media (max-width: 480px) {
  .payment-page__header {
    padding: 12px 16px;
  }
  
  .payment-page__back-button {
    font-size: 14px;
    gap: 6px;
    margin-bottom: 16px;
  }
  
  .payment-page__back-button svg {
    width: 20px;
    height: 20px;
  }
  
  .payment-page__title {
    font-size: 20px;
  }
  
  .payment-page__subtitle {
    font-size: 15px;
  }
  
  .payment-page__steps {
    padding: 20px 12px;
  }
  
  .payment-page__step-number {
    width: 28px;
    height: 28px;
    font-size: 12px;
  }
  
  .payment-page__step-connector {
    width: 30px;
    margin: 0 6px;
  }
  
  .payment-page__step-title {
    font-size: 10px;
  }
  
  .payment-page__content {
    padding: 16px 12px 24px;
  }
  
  .payment-page__plan-card,
  .payment-page__terms-content,
  .payment-page__order-summary,
  .payment-page__security-notice {
    padding: 20px;
    margin-bottom: 20px;
  }
  
  .payment-page__plan-name {
    font-size: 22px;
  }
  
  .payment-page__plan-amount {
    font-size: 28px;
  }
  
  .payment-page__plan-period {
    font-size: 16px;
  }
  
  .payment-page__terms-title {
    font-size: 18px;
  }
  
  .payment-page__terms-box {
    padding: 16px;
  }
  
  .payment-page__security-notice {
    flex-direction: column;
    gap: 12px;
    text-align: center;
  }
  
  .payment-page__button {
    padding: 14px 20px;
    font-size: 15px;
  }
  
  .payment-page__error-message {
    margin: 0 12px 16px;
    padding: 12px;
    font-size: 13px;
  }
  
  .payment-page__error {
    padding: 40px 16px;
  }
  
  .payment-page__error h1 {
    font-size: 20px;
  }
  
  .payment-page__error p {
    font-size: 15px;
  }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
  .payment-page {
    background: #000000;
  }
  
  .payment-page__header {
    background: rgba(28, 28, 30, 0.95);
    border-bottom-color: rgba(84, 84, 88, 0.6);
  }
  
  .payment-page__title {
    color: rgba(235, 235, 245, 0.85);
  }
  
  .payment-page__subtitle {
    color: rgba(235, 235, 245, 0.60);
  }
  
  .payment-page__back-button {
    color: #0A84FF;
  }
  
  .payment-page__step-number {
    background: rgba(84, 84, 88, 0.6);
    color: rgba(235, 235, 245, 0.60);
  }
  
  .payment-page__step--active .payment-page__step-number {
    background: #0A84FF;
    color: white;
  }
  
  .payment-page__step-title {
    color: rgba(235, 235, 245, 0.60);
  }
  
  .payment-page__step--active .payment-page__step-title {
    color: rgba(235, 235, 245, 0.85);
  }
  
  .payment-page__step-connector {
    background: rgba(84, 84, 88, 0.6);
  }
  
  .payment-page__step-connector--completed {
    background: #0A84FF;
  }
  
  .payment-page__plan-card,
  .payment-page__terms-content,
  .payment-page__order-summary,
  .payment-page__security-notice {
    background: rgba(28, 28, 30, 1);
    border-color: rgba(84, 84, 88, 0.6);
  }
  
  .payment-page__plan-name,
  .payment-page__terms-title,
  .payment-page__summary-title,
  .payment-page__features-title,
  .payment-page__terms-group h4,
  .payment-page__security-text h4 {
    color: rgba(235, 235, 245, 0.85);
  }
  
  .payment-page__plan-amount {
    color: #0A84FF;
  }
  
  .payment-page__plan-period,
  .payment-page__feature-item,
  .payment-page__checkbox-text,
  .payment-page__terms-group li,
  .payment-page__security-text li {
    color: rgba(235, 235, 245, 0.60);
  }
  
  .payment-page__order-row span:first-child {
    color: rgba(235, 235, 245, 0.60);
  }
  
  .payment-page__order-row span:last-child {
    color: rgba(235, 235, 245, 0.85);
  }
  
  .payment-page__order-total span:last-child {
    color: #0A84FF;
  }
  
  .payment-page__terms-box {
    background: rgba(58, 58, 60, 0.5);
  }
  
  .payment-page__terms-group li::before {
    color: #0A84FF;
  }
  
  .payment-page__security-text li::before {
    color: #30D158;
  }
  
  .payment-page__link {
    color: #0A84FF;
  }
  
  .payment-page__button--secondary {
    background: rgba(58, 58, 60, 1);
    color: rgba(235, 235, 245, 0.85);
  }
  
  .payment-page__button--secondary:hover {
    background: rgba(72, 72, 74, 1);
  }
  
  .payment-page__button--primary {
    background: #0A84FF;
  }
  
  .payment-page__button--primary:hover {
    background: #409CFF;
  }
  
  .payment-page__button--primary:disabled {
    background: rgba(84, 84, 88, 0.6);
    color: rgba(235, 235, 245, 0.30);
  }
  
  .payment-page__button--payment {
    background: linear-gradient(135deg, #30D158 0%, #34C759 100%);
  }
  
  .payment-page__button--payment:hover {
    background: linear-gradient(135deg, #28CD4F 0%, #30D158 100%);
  }
  
  .payment-page__error-message {
    background: rgba(255, 69, 58, 0.1);
    border-color: rgba(255, 69, 58, 0.3);
    color: #FF453A;
  }
  
  .payment-page__error h1 {
    color: rgba(235, 235, 245, 0.85);
  }
  
  .payment-page__error p {
    color: rgba(235, 235, 245, 0.60);
  }
  
  .payment-page__error .payment-page__back-button {
    background: #0A84FF;
  }
  
  .payment-page__error .payment-page__back-button:hover {
    background: #409CFF;
  }
}/* Discount
 Display Styles */
.payment-page__plan-discount {
  margin-top: 12px;
  padding: 12px;
  background: #f0f9f0;
  background: var(--color-bg-success-soft, #f0f9f0);
  border: 1px solid #d4edda;
  border: 1px solid var(--color-border-success, #d4edda);
  border-radius: 8px;
}

.payment-page__original-price {
  font-size: 14px;
  color: #666;
  color: var(--color-text-secondary, #666);
  text-decoration: line-through;
  margin-bottom: 4px;
}

.payment-page__discount-badge {
  font-size: 14px;
  font-weight: 600;
  color: #28a745;
  color: var(--color-text-success, #28a745);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.payment-page__discount-badge::before {
  content: "🎉";
  font-size: 16px;
}/* Ord
er Summary Discount Styles */
.payment-page__order-discount {
  color: #28a745;
  color: var(--color-text-success, #28a745);
}

.payment-page__discount-amount {
  font-weight: 600;
}

.payment-page__order-total {
  border-top: 1px solid #e5e5e5;
  border-top: 1px solid var(--color-border-soft, #e5e5e5);
  padding-top: 12px;
  margin-top: 8px;
  font-weight: 600;
}
.payment-result-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 20px;
}

.payment-result-card {
    background: white;
    border-radius: 16px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    padding: 40px;
    max-width: 600px;
    width: 100%;
    text-align: center;
    animation: slideUp 0.6s ease-out;
}

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

/* 載入狀態 */
.loading-spinner {
    padding: 40px 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

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

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

/* 圖示樣式 */
.success-icon,
.failure-icon,
.pending-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 30px;
    animation: scaleIn 0.5s ease-out 0.3s both;
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.5);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.success-icon svg,
.failure-icon svg,
.pending-icon svg {
    width: 100%;
    height: 100%;
}

/* 標題樣式 */
.result-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 20px;
    animation: fadeInUp 0.6s ease-out 0.4s both;
}

.result-title.success {
    color: #4CAF50;
}

.result-title.failure {
    color: #f44336;
}

.result-title.pending {
    color: #FF9800;
}

/* 訊息樣式 */
.result-message {
    font-size: 1.2rem;
    color: #666;
    margin-bottom: 30px;
    line-height: 1.6;
    animation: fadeInUp 0.6s ease-out 0.5s both;
}

/* 付款詳情 */
.payment-details {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 25px;
    margin: 30px 0;
    text-align: left;
    animation: fadeInUp 0.6s ease-out 0.6s both;
}

.payment-details h3 {
    color: #333;
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 20px;
    text-align: center;
}

.detail-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid #e9ecef;
}

.detail-row:last-child {
    border-bottom: none;
}

.detail-row .label {
    font-weight: 500;
    color: #666;
}

.detail-row .value {
    font-weight: 600;
    color: #333;
    font-family: 'Courier New', monospace;
}

/* 下一步驟 / 建議 / 待確認資訊 */
.next-steps,
.failure-suggestions,
.pending-info {
    background: #f0f7ff;
    border-radius: 12px;
    padding: 25px;
    margin: 30px 0;
    text-align: left;
    animation: fadeInUp 0.6s ease-out 0.7s both;
}

.failure-suggestions {
    background: #fff5f5;
}

.pending-info {
    background: #fff8e1;
}

.next-steps h3,
.failure-suggestions h3,
.pending-info h3 {
    color: #333;
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 15px;
    text-align: center;
}

.next-steps ul,
.failure-suggestions ul,
.pending-info ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.next-steps li,
.failure-suggestions li,
.pending-info li {
    padding: 8px 0;
    position: relative;
    padding-left: 25px;
}

.next-steps li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: #4CAF50;
    font-weight: bold;
}

.failure-suggestions li::before {
    content: '•';
    position: absolute;
    left: 0;
    color: #f44336;
    font-weight: bold;
}

.pending-info li::before {
    content: '⏳';
    position: absolute;
    left: 0;
    color: #FF9800;
}

/* 按鈕樣式 */
.action-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin: 30px 0;
    animation: fadeInUp 0.6s ease-out 0.8s both;
}

.btn {
    padding: 12px 30px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
}

.btn-primary {
    background: #667eea;
    color: white;
}

.btn-primary:hover {
    background: #5a6fd8;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.3);
}

.btn-secondary {
    background: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background: #5a6268;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(108, 117, 125, 0.3);
}

/* 自動跳轉提示 */
.auto-redirect-notice {
    margin-top: 20px;
    padding: 15px;
    background: #e8f4fd;
    border-radius: 8px;
    animation: fadeInUp 0.6s ease-out 0.9s both;
}

.auto-redirect-notice p {
    margin: 0;
    color: #0066cc;
    font-size: 0.9rem;
}

/* 輪詢資訊 */
.polling-info {
    margin-top: 10px;
    color: #666;
    font-size: 0.9rem;
}

/* 動畫延遲類 */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 響應式設計 */
@media (max-width: 768px) {
    .payment-result-card {
        padding: 30px 20px;
        margin: 10px;
    }
    
    .result-title {
        font-size: 2rem;
    }
    
    .result-message {
        font-size: 1.1rem;
    }
    
    .action-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .btn {
        width: 100%;
        max-width: 250px;
    }
    
    .detail-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }
    
    .detail-row .value {
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .payment-result-container {
        padding: 10px;
    }
    
    .payment-result-card {
        padding: 25px 15px;
    }
    
    .result-title {
        font-size: 1.8rem;
    }
    
    .success-icon,
    .failure-icon,
    .pending-icon {
        width: 60px;
        height: 60px;
    }
}
/* CodeManagementPanel Styles */

.code-management-panel {
    padding: 24px;
    background: #f8f9fa;
    min-height: 100vh;
}

/* Header */
.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 32px;
    padding: 24px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.header-content h1 {
    margin: 0 0 8px 0;
    font-size: 28px;
    font-weight: 600;
    color: #1a1a1a;
}

.header-content p {
    margin: 0;
    color: #666;
    font-size: 16px;
}

.header-actions {
    display: flex;
    gap: 16px;
    align-items: center;
}

.refresh-controls {
    display: flex;
    gap: 12px;
    align-items: center;
}

.auto-refresh-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #666;
    cursor: pointer;
}

.auto-refresh-toggle input[type="checkbox"] {
    margin: 0;
}

/* Analytics Summary */
.analytics-summary {
    margin-bottom: 24px;
    padding: 20px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.summary-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    grid-gap: 20px;
    gap: 20px;
}

.summary-card {
    text-align: center;
    padding: 16px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    background: #fafafa;
}

.card-value {
    font-size: 32px;
    font-weight: 700;
    color: #2196f3;
    margin-bottom: 4px;
}

.card-label {
    font-size: 14px;
    color: #666;
    font-weight: 500;
}

/* Filters Section */
.filters-section {
    margin-bottom: 24px;
    padding: 20px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

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

.filters-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: #1a1a1a;
}

.filter-actions {
    display: flex;
    gap: 12px;
}

.filters-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    grid-gap: 16px;
    gap: 16px;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.filter-group label {
    font-size: 14px;
    font-weight: 500;
    color: #333;
}

.filter-group input,
.filter-group select {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    background: white;
}

.filter-group input:focus,
.filter-group select:focus {
    outline: none;
    border-color: #2196f3;
    box-shadow: 0 0 0 2px rgba(33, 150, 243, 0.1);
}

/* Bulk Operations */
.bulk-operations {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    padding: 12px 16px;
    background: #e3f2fd;
    border: 1px solid #2196f3;
    border-radius: 8px;
}

.selection-info {
    font-size: 14px;
    font-weight: 500;
    color: #1976d2;
}

.bulk-actions {
    display: flex;
    gap: 12px;
}

/* Codes Table */
.codes-table-container {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.table-header {
    padding: 16px 20px;
    border-bottom: 1px solid #e0e0e0;
    background: #fafafa;
}

.table-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.selection-controls .select-all {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
}

.export-controls {
    display: flex;
    gap: 8px;
}

.status-summary {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.status-badge {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
    text-transform: uppercase;
}

.status-badge.status-active {
    background: #e8f5e8;
    color: #2e7d32;
}

.status-badge.status-inactive {
    background: #f5f5f5;
    color: #757575;
}

.status-badge.status-expired {
    background: #ffebee;
    color: #c62828;
}

.status-badge.status-exhausted {
    background: #fff3e0;
    color: #ef6c00;
}

.status-badge.status-scheduled {
    background: #e3f2fd;
    color: #1976d2;
}

.table-wrapper {
    overflow-x: auto;
}

.codes-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.codes-table th {
    padding: 12px 16px;
    text-align: left;
    font-weight: 600;
    color: #333;
    background: #fafafa;
    border-bottom: 1px solid #e0e0e0;
    white-space: nowrap;
}

.codes-table td {
    padding: 12px 16px;
    border-bottom: 1px solid #f0f0f0;
    vertical-align: middle;
}

.code-row:hover {
    background: #f8f9fa;
}

.code-row.selected {
    background: #e3f2fd;
}

.select-column {
    width: 40px;
    text-align: center;
}

.code-column {
    min-width: 150px;
}

.code-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.code-value {
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-weight: 600;
    color: #1a1a1a;
}

.code-prefix {
    font-size: 12px;
    color: #666;
}

.type-column {
    min-width: 120px;
}

.type-badge {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
    text-transform: uppercase;
}

.type-badge.type-percentage_discount {
    background: #e8f5e8;
    color: #2e7d32;
}

.type-badge.type-fixed_amount_discount {
    background: #e3f2fd;
    color: #1976d2;
}

.type-badge.type-time_extension {
    background: #fff3e0;
    color: #ef6c00;
}

.campaign-column {
    min-width: 120px;
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.status-column {
    min-width: 100px;
}

.usage-column {
    min-width: 120px;
}

.usage-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.usage-text {
    font-size: 13px;
    color: #333;
}

.usage-bar {
    width: 100%;
    height: 4px;
    background: #e0e0e0;
    border-radius: 2px;
    overflow: hidden;
}

.usage-fill {
    height: 100%;
    background: linear-gradient(90deg, #4caf50, #2196f3);
    transition: width 0.3s ease;
}

.expires-column,
.created-column {
    min-width: 100px;
    font-size: 13px;
    color: #666;
}

.actions-column {
    min-width: 120px;
}

.action-buttons {
    display: flex;
    gap: 8px;
}

.action-buttons .btn {
    padding: 4px 8px;
    font-size: 12px;
    border-radius: 4px;
}

/* Pagination */
.table-pagination {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-top: 1px solid #e0e0e0;
    background: #fafafa;
}

.pagination-info {
    font-size: 14px;
    color: #666;
}

.pagination-controls {
    display: flex;
    gap: 8px;
}

/* Button Styles */
.btn {
    padding: 8px 16px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

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

.btn-primary {
    background: #2196f3;
    color: white;
}

.btn-primary:hover:not(:disabled) {
    background: #1976d2;
}

.btn-secondary {
    background: #f5f5f5;
    color: #333;
    border: 1px solid #ddd;
}

.btn-secondary:hover:not(:disabled) {
    background: #e0e0e0;
}

.btn-success {
    background: #4caf50;
    color: white;
}

.btn-success:hover:not(:disabled) {
    background: #388e3c;
}

.btn-warning {
    background: #ff9800;
    color: white;
}

.btn-warning:hover:not(:disabled) {
    background: #f57c00;
}

.btn-danger {
    background: #f44336;
    color: white;
}

.btn-danger:hover:not(:disabled) {
    background: #d32f2f;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 12px;
}

/* Loading State */
.loading-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    text-align: center;
}

.loading-container p {
    margin-top: 16px;
    color: #666;
    font-size: 16px;
}

/* Responsive Design */
@media (max-width: 1200px) {
    .filters-grid {
        grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    }
    
    .summary-cards {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    }
}

@media (max-width: 768px) {
    .code-management-panel {
        padding: 16px;
    }
    
    .panel-header {
        flex-direction: column;
        gap: 16px;
        align-items: stretch;
    }
    
    .header-actions {
        flex-direction: column;
        gap: 12px;
    }
    
    .table-controls {
        flex-direction: column;
        gap: 12px;
        align-items: stretch;
    }
    
    .table-pagination {
        flex-direction: column;
        gap: 12px;
        align-items: stretch;
    }
    
    .filters-grid {
        grid-template-columns: 1fr;
    }
    
    .summary-cards {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .bulk-operations {
        flex-direction: column;
        gap: 12px;
        align-items: stretch;
    }
    
    .codes-table {
        font-size: 12px;
    }
    
    .codes-table th,
    .codes-table td {
        padding: 8px 12px;
    }
    
    .action-buttons {
        flex-direction: column;
        gap: 4px;
    }
}

@media (max-width: 480px) {
    .summary-cards {
        grid-template-columns: 1fr;
    }
    
    .card-value {
        font-size: 24px;
    }
    
    .status-summary {
        flex-direction: column;
        gap: 8px;
    }
}
/* CodeGenerationWizard Styles */

.wizard-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;
    padding: 20px;
}

.wizard-modal {
    background: white;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    width: 100%;
    max-width: 900px;
    max-height: 90vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.wizard-modal.wizard-success {
    max-width: 600px;
}

/* Header */
.wizard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px 32px;
    border-bottom: 1px solid #e0e0e0;
    background: #fafafa;
}

.wizard-header h2 {
    margin: 0;
    font-size: 24px;
    font-weight: 600;
    color: #1a1a1a;
}

.close-btn {
    background: none;
    border: none;
    font-size: 24px;
    color: #666;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.close-btn:hover {
    background: #f0f0f0;
    color: #333;
}

/* Progress Indicator */
.wizard-progress {
    display: flex;
    padding: 20px 32px;
    background: #f8f9fa;
    border-bottom: 1px solid #e0e0e0;
    overflow-x: auto;
}

.progress-step {
    display: flex;
    align-items: center;
    flex: 1 1;
    min-width: 200px;
    position: relative;
}

.progress-step:not(:last-child)::after {
    content: '';
    position: absolute;
    right: -10px;
    top: 15px;
    width: 20px;
    height: 2px;
    background: #e0e0e0;
    z-index: 1;
}

.progress-step.active::after,
.progress-step.completed::after {
    background: #2196f3;
}

.step-number {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: #e0e0e0;
    color: #666;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 14px;
    margin-right: 12px;
    flex-shrink: 0;
    transition: all 0.3s ease;
}

.progress-step.active .step-number {
    background: #2196f3;
    color: white;
}

.progress-step.completed .step-number {
    background: #4caf50;
    color: white;
}

.step-info {
    flex: 1 1;
}

.step-title {
    font-weight: 600;
    color: #333;
    font-size: 14px;
    margin-bottom: 2px;
}

.step-description {
    font-size: 12px;
    color: #666;
    line-height: 1.3;
}

.progress-step.active .step-title {
    color: #2196f3;
}

/* Content */
.wizard-content {
    flex: 1 1;
    overflow-y: auto;
    padding: 32px;
}

.wizard-step {
    max-width: 100%;
}

.step-header {
    margin-bottom: 32px;
}

.step-header h3 {
    margin: 0 0 8px 0;
    font-size: 20px;
    font-weight: 600;
    color: #1a1a1a;
}

.step-header p {
    margin: 0;
    color: #666;
    font-size: 16px;
    line-height: 1.5;
}

/* Templates Section */
.templates-section {
    margin-bottom: 32px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
}

.templates-section h4 {
    margin: 0 0 16px 0;
    font-size: 16px;
    font-weight: 600;
    color: #333;
}

.template-buttons {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.template-btn {
    padding: 8px 16px;
    border: 1px solid #2196f3;
    background: white;
    color: #2196f3;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.template-btn:hover {
    background: #2196f3;
    color: white;
}

/* Form Styles */
.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    grid-gap: 20px;
    gap: 20px;
}

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

.form-group.full-width {
    grid-column: 1 / -1;
}

.form-group label {
    font-size: 14px;
    font-weight: 500;
    color: #333;
}

.form-group input,
.form-group select,
.form-group textarea {
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    background: white;
    transition: border-color 0.2s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #2196f3;
    box-shadow: 0 0 0 2px rgba(33, 150, 243, 0.1);
}

.form-group input.error,
.form-group select.error,
.form-group textarea.error {
    border-color: #f44336;
    box-shadow: 0 0 0 2px rgba(244, 67, 54, 0.1);
}

.error-message {
    font-size: 12px;
    color: #f44336;
    margin-top: 4px;
}

.checkbox-group {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    cursor: pointer;
    margin: 0;
}

.checkbox-label input[type="checkbox"] {
    margin: 0;
    width: auto;
}

/* Preview Section */
.preview-section {
    margin-top: 32px;
    padding: 24px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
}

.preview-section h4 {
    margin: 0 0 20px 0;
    font-size: 18px;
    font-weight: 600;
    color: #333;
}

.preview-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    grid-gap: 20px;
    gap: 20px;
    margin-bottom: 24px;
}

.preview-card {
    background: white;
    padding: 20px;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
}

.preview-card h5 {
    margin: 0 0 16px 0;
    font-size: 16px;
    font-weight: 600;
    color: #333;
}

.preview-items {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.preview-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid #f0f0f0;
}

.preview-item:last-child {
    border-bottom: none;
}

.preview-item .label {
    font-size: 14px;
    color: #666;
    font-weight: 500;
}

.preview-item .value {
    font-size: 14px;
    color: #333;
    font-weight: 600;
}

.sample-codes {
    background: white;
    padding: 20px;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
}

.sample-codes h5 {
    margin: 0 0 16px 0;
    font-size: 16px;
    font-weight: 600;
    color: #333;
}

.codes-preview {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.sample-code {
    padding: 6px 12px;
    background: #e3f2fd;
    color: #1976d2;
    border-radius: 4px;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 13px;
    font-weight: 600;
}

/* Footer */
.wizard-footer {
    padding: 20px 32px;
    border-top: 1px solid #e0e0e0;
    background: #fafafa;
}

.nav-buttons {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Success Modal */
.success-message {
    text-align: center;
    margin-bottom: 32px;
}

.success-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: #4caf50;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    font-weight: bold;
    margin: 0 auto 16px;
}

.success-message p {
    font-size: 18px;
    color: #333;
    margin: 0;
}

.generation-summary {
    margin-bottom: 32px;
}

.generation-summary h3 {
    margin: 0 0 16px 0;
    font-size: 18px;
    font-weight: 600;
    color: #333;
}

.summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    grid-gap: 16px;
    gap: 16px;
}

.summary-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 12px;
    background: #f8f9fa;
    border-radius: 6px;
}

.summary-item label {
    font-size: 12px;
    color: #666;
    font-weight: 500;
    text-transform: uppercase;
}

.summary-item span {
    font-size: 16px;
    color: #333;
    font-weight: 600;
}

.generated-codes {
    margin-bottom: 32px;
}

.generated-codes h3 {
    margin: 0 0 16px 0;
    font-size: 18px;
    font-weight: 600;
    color: #333;
}

.codes-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 200px;
    overflow-y: auto;
}

.code-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    background: #f8f9fa;
    border-radius: 6px;
    border: 1px solid #e0e0e0;
}

.code-value {
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 14px;
    font-weight: 600;
    color: #333;
}

.copy-btn {
    padding: 4px 8px;
    background: #2196f3;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 12px;
    cursor: pointer;
    transition: background 0.2s ease;
}

.copy-btn:hover {
    background: #1976d2;
}

/* Button Styles */
.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-width: 100px;
}

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

.btn-primary {
    background: #2196f3;
    color: white;
}

.btn-primary:hover:not(:disabled) {
    background: #1976d2;
}

.btn-secondary {
    background: #f5f5f5;
    color: #333;
    border: 1px solid #ddd;
}

.btn-secondary:hover:not(:disabled) {
    background: #e0e0e0;
}

.btn-success {
    background: #4caf50;
    color: white;
}

.btn-success:hover:not(:disabled) {
    background: #388e3c;
}

/* Responsive Design */
@media (max-width: 768px) {
    .wizard-overlay {
        padding: 10px;
    }
    
    .wizard-modal {
        max-height: 95vh;
    }
    
    .wizard-header,
    .wizard-content,
    .wizard-footer {
        padding-left: 20px;
        padding-right: 20px;
    }
    
    .wizard-progress {
        padding: 16px 20px;
        flex-direction: column;
        gap: 16px;
    }
    
    .progress-step {
        min-width: auto;
    }
    
    .progress-step:not(:last-child)::after {
        display: none;
    }
    
    .form-grid {
        grid-template-columns: 1fr;
    }
    
    .preview-grid {
        grid-template-columns: 1fr;
    }
    
    .summary-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .template-buttons {
        flex-direction: column;
    }
    
    .nav-buttons {
        flex-direction: column;
        gap: 12px;
    }
    
    .nav-buttons .btn {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .wizard-header h2 {
        font-size: 20px;
    }
    
    .step-header h3 {
        font-size: 18px;
    }
    
    .summary-grid {
        grid-template-columns: 1fr;
    }
    
    .checkbox-group {
        flex-direction: column;
        gap: 8px;
    }
}
/* CodeDetailsModal Styles */

.modal-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;
    padding: 20px;
}

.code-details-modal {
    background: white;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    width: 100%;
    max-width: 800px;
    max-height: 90vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

/* Header */
.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px 32px;
    border-bottom: 1px solid #e0e0e0;
    background: #fafafa;
}

.header-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.header-info h2 {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
    color: #1a1a1a;
}

.code-value {
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 16px;
    font-weight: 600;
    color: #2196f3;
    background: #e3f2fd;
    padding: 4px 8px;
    border-radius: 4px;
    display: inline-block;
}

.close-btn {
    background: none;
    border: none;
    font-size: 24px;
    color: #666;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.close-btn:hover {
    background: #f0f0f0;
    color: #333;
}

/* Error Display */
.modal-error {
    padding: 16px 32px;
    border-bottom: 1px solid #e0e0e0;
}

/* Content */
.modal-content {
    flex: 1 1;
    overflow-y: auto;
    padding: 32px;
}

.info-section {
    margin-bottom: 32px;
}

.info-section:last-child {
    margin-bottom: 0;
}

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

.info-section h3 {
    margin: 0 0 20px 0;
    font-size: 18px;
    font-weight: 600;
    color: #1a1a1a;
}

.section-header h3 {
    margin: 0;
}

/* Info Grid */
.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    grid-gap: 20px;
    gap: 20px;
}

.info-item {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.info-item.full-width {
    grid-column: 1 / -1;
}

.info-item label {
    font-size: 14px;
    font-weight: 500;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.info-item span {
    font-size: 16px;
    color: #333;
    font-weight: 500;
}

.code-display {
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace !important;
    background: #f8f9fa;
    padding: 8px 12px;
    border-radius: 6px;
    border: 1px solid #e0e0e0;
}

.notes-text {
    background: #f8f9fa;
    padding: 12px;
    border-radius: 6px;
    border: 1px solid #e0e0e0;
    white-space: pre-wrap;
    line-height: 1.5;
}

/* Status and Type Badges */
.status-badge {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
    text-transform: uppercase;
    display: inline-block;
}

.status-badge.status-active {
    background: #e8f5e8;
    color: #2e7d32;
}

.status-badge.status-inactive {
    background: #f5f5f5;
    color: #757575;
}

.status-badge.status-expired {
    background: #ffebee;
    color: #c62828;
}

.status-badge.status-exhausted {
    background: #fff3e0;
    color: #ef6c00;
}

.status-badge.status-scheduled {
    background: #e3f2fd;
    color: #1976d2;
}

.type-badge {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
    text-transform: uppercase;
    display: inline-block;
}

.type-badge.type-percentage_discount {
    background: #e8f5e8;
    color: #2e7d32;
}

.type-badge.type-fixed_amount_discount {
    background: #e3f2fd;
    color: #1976d2;
}

.type-badge.type-time_extension {
    background: #fff3e0;
    color: #ef6c00;
}

/* Edit Form */
.edit-form {
    background: #f8f9fa;
    padding: 24px;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    grid-gap: 20px;
    gap: 20px;
    margin-bottom: 24px;
}

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

.form-group.full-width {
    grid-column: 1 / -1;
}

.form-group label {
    font-size: 14px;
    font-weight: 500;
    color: #333;
}

.form-group input,
.form-group select,
.form-group textarea {
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    background: white;
    transition: border-color 0.2s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #2196f3;
    box-shadow: 0 0 0 2px rgba(33, 150, 243, 0.1);
}

.form-group input.error,
.form-group select.error,
.form-group textarea.error {
    border-color: #f44336;
    box-shadow: 0 0 0 2px rgba(244, 67, 54, 0.1);
}

.error-message {
    font-size: 12px;
    color: #f44336;
    margin-top: 4px;
}

.checkbox-group {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    cursor: pointer;
    margin: 0;
}

.checkbox-label input[type="checkbox"] {
    margin: 0;
    width: auto;
}

.edit-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    padding-top: 20px;
    border-top: 1px solid #e0e0e0;
}

/* Usage Statistics */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    grid-gap: 16px;
    gap: 16px;
    margin-bottom: 20px;
}

.stat-card {
    text-align: center;
    padding: 16px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
}

.stat-value {
    font-size: 24px;
    font-weight: 700;
    color: #2196f3;
    margin-bottom: 4px;
}

.stat-label {
    font-size: 12px;
    color: #666;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.usage-bar-container {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.usage-bar {
    width: 100%;
    height: 8px;
    background: #e0e0e0;
    border-radius: 4px;
    overflow: hidden;
}

.usage-fill {
    height: 100%;
    background: linear-gradient(90deg, #4caf50, #2196f3);
    transition: width 0.3s ease;
}

.usage-text {
    font-size: 14px;
    color: #666;
    text-align: center;
}

/* Metadata Display */
.metadata-display {
    background: #f8f9fa;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    padding: 16px;
    overflow-x: auto;
}

.metadata-display pre {
    margin: 0;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 12px;
    color: #333;
    line-height: 1.4;
}

/* Footer */
.modal-footer {
    padding: 20px 32px;
    border-top: 1px solid #e0e0e0;
    background: #fafafa;
    display: flex;
    justify-content: flex-end;
}

/* Button Styles */
.btn {
    padding: 8px 16px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

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

.btn-primary {
    background: #2196f3;
    color: white;
}

.btn-primary:hover:not(:disabled) {
    background: #1976d2;
}

.btn-secondary {
    background: #f5f5f5;
    color: #333;
    border: 1px solid #ddd;
}

.btn-secondary:hover:not(:disabled) {
    background: #e0e0e0;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 12px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .modal-overlay {
        padding: 10px;
    }
    
    .code-details-modal {
        max-height: 95vh;
    }
    
    .modal-header,
    .modal-content,
    .modal-footer {
        padding-left: 20px;
        padding-right: 20px;
    }
    
    .modal-content {
        padding-top: 20px;
        padding-bottom: 20px;
    }
    
    .info-grid,
    .form-grid {
        grid-template-columns: 1fr;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .section-header {
        flex-direction: column;
        gap: 12px;
        align-items: stretch;
    }
    
    .edit-actions {
        flex-direction: column;
        gap: 8px;
    }
    
    .edit-actions .btn {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .header-info h2 {
        font-size: 18px;
    }
    
    .code-value {
        font-size: 14px;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .stat-value {
        font-size: 20px;
    }
    
    .checkbox-group {
        flex-direction: column;
        gap: 8px;
    }
}
/* BulkOperationsModal Styles */

.modal-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;
    padding: 20px;
}

.bulk-operations-modal {
    background: white;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    width: 100%;
    max-width: 700px;
    max-height: 90vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

/* Header */
.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px 32px;
    border-bottom: 1px solid #e0e0e0;
    background: #fafafa;
}

.modal-header h2 {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
    color: #1a1a1a;
}

.close-btn {
    background: none;
    border: none;
    font-size: 24px;
    color: #666;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.close-btn:hover {
    background: #f0f0f0;
    color: #333;
}

/* Error Display */
.modal-error {
    padding: 16px 32px;
    border-bottom: 1px solid #e0e0e0;
}

/* Content */
.modal-content {
    flex: 1 1;
    overflow-y: auto;
    padding: 32px;
}

.section {
    margin-bottom: 32px;
}

.section:last-child {
    margin-bottom: 0;
}

.section h3 {
    margin: 0 0 20px 0;
    font-size: 18px;
    font-weight: 600;
    color: #1a1a1a;
}

/* Operation Selection */
.operation-options {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.operation-option {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 16px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.operation-option:hover {
    border-color: #2196f3;
    background: #f8f9fa;
}

.operation-option input[type="radio"] {
    margin: 4px 0 0 0;
    flex-shrink: 0;
}

.operation-option input[type="radio"]:checked + .option-content {
    color: #2196f3;
}

.option-content {
    flex: 1 1;
}

.option-title {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin-bottom: 4px;
}

.option-description {
    font-size: 14px;
    color: #666;
    line-height: 1.4;
}

/* Options Form */
.options-form {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    grid-gap: 16px;
    gap: 16px;
}

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

.form-group.full-width {
    grid-column: 1 / -1;
}

.form-group label {
    font-size: 14px;
    font-weight: 500;
    color: #333;
}

.form-group input,
.form-group select,
.form-group textarea {
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    background: white;
    transition: border-color 0.2s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #2196f3;
    box-shadow: 0 0 0 2px rgba(33, 150, 243, 0.1);
}

.form-group input.error,
.form-group select.error,
.form-group textarea.error {
    border-color: #f44336;
    box-shadow: 0 0 0 2px rgba(244, 67, 54, 0.1);
}

.form-group small {
    font-size: 12px;
    color: #666;
    margin-top: 4px;
}

.error-message {
    font-size: 12px;
    color: #f44336;
    margin-top: 4px;
}

/* Affected Codes Summary */
.affected-summary {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
}

.summary-stats {
    margin-bottom: 20px;
}

.stat-item {
    text-align: center;
    padding: 16px;
    background: white;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
    display: inline-block;
}

.stat-item.success {
    border-color: #4caf50;
    background: #e8f5e8;
}

.stat-item.error {
    border-color: #f44336;
    background: #ffebee;
}

.stat-item.total {
    border-color: #2196f3;
    background: #e3f2fd;
}

.stat-value {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 4px;
}

.stat-item.success .stat-value {
    color: #2e7d32;
}

.stat-item.error .stat-value {
    color: #c62828;
}

.stat-item.total .stat-value {
    color: #1976d2;
}

.stat-label {
    font-size: 12px;
    color: #666;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.summary-breakdown {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    grid-gap: 20px;
    gap: 20px;
}

.breakdown-section h4 {
    margin: 0 0 12px 0;
    font-size: 14px;
    font-weight: 600;
    color: #333;
}

.breakdown-items {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.breakdown-item {
    padding: 4px 8px;
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
}

.breakdown-item.status-active {
    border-color: #4caf50;
    color: #2e7d32;
}

.breakdown-item.status-inactive {
    border-color: #757575;
    color: #424242;
}

.breakdown-item.status-expired {
    border-color: #f44336;
    color: #c62828;
}

.breakdown-item.status-exhausted {
    border-color: #ff9800;
    color: #ef6c00;
}

/* Confirmation Step */
.confirmation-step {
    text-align: center;
}

.confirmation-header {
    margin-bottom: 32px;
}

.confirmation-header h3 {
    margin: 0 0 8px 0;
    font-size: 20px;
    font-weight: 600;
    color: #1a1a1a;
}

.confirmation-header p {
    margin: 0;
    color: #666;
    font-size: 16px;
}

.confirmation-details {
    background: #f8f9fa;
    padding: 24px;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
    margin-bottom: 24px;
    text-align: left;
}

.detail-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid #e0e0e0;
}

.detail-item:last-child {
    border-bottom: none;
}

.detail-item label {
    font-size: 14px;
    font-weight: 500;
    color: #666;
}

.detail-item span {
    font-size: 14px;
    font-weight: 600;
    color: #333;
}

.confirmation-warning {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 16px;
    background: #fff3e0;
    border: 1px solid #ff9800;
    border-radius: 8px;
    text-align: left;
}

.warning-icon {
    font-size: 24px;
    flex-shrink: 0;
}

.warning-text strong {
    display: block;
    margin-bottom: 4px;
    color: #ef6c00;
    font-size: 14px;
}

.warning-text p {
    margin: 0;
    color: #666;
    font-size: 14px;
    line-height: 1.4;
}

/* Processing Step */
.processing-display {
    text-align: center;
    padding: 40px 20px;
}

.processing-display h3 {
    margin: 20px 0 8px 0;
    font-size: 20px;
    font-weight: 600;
    color: #1a1a1a;
}

.processing-display p {
    margin: 0 0 32px 0;
    color: #666;
    font-size: 16px;
}

.progress-info {
    max-width: 300px;
    margin: 0 auto;
}

.progress-text {
    font-size: 14px;
    color: #666;
    margin-bottom: 8px;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: #e0e0e0;
    border-radius: 4px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #4caf50, #2196f3);
    transition: width 0.3s ease;
}

/* Results Step */
.results-summary {
    text-align: center;
}

.summary-header {
    margin-bottom: 32px;
}

.operation-info {
    margin-bottom: 24px;
}

.operation-info h3 {
    margin: 0 0 8px 0;
    font-size: 20px;
    font-weight: 600;
    color: #1a1a1a;
}

.operation-info p {
    margin: 0;
    color: #666;
    font-size: 16px;
}

.results-stats {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

.failed-operations {
    background: #ffebee;
    padding: 20px;
    border-radius: 8px;
    border: 1px solid #f44336;
    text-align: left;
}

.failed-operations h4 {
    margin: 0 0 16px 0;
    font-size: 16px;
    font-weight: 600;
    color: #c62828;
}

.failed-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 200px;
    overflow-y: auto;
}

.failed-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    background: white;
    border-radius: 4px;
    border: 1px solid #f44336;
}

.code-id {
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 12px;
    font-weight: 600;
    color: #333;
}

.error-message {
    font-size: 12px;
    color: #c62828;
    flex: 1 1;
    text-align: right;
    margin-left: 12px;
}

/* Footer */
.modal-footer {
    padding: 20px 32px;
    border-top: 1px solid #e0e0e0;
    background: #fafafa;
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

/* Button Styles */
.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-width: 100px;
}

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

.btn-primary {
    background: #2196f3;
    color: white;
}

.btn-primary:hover:not(:disabled) {
    background: #1976d2;
}

.btn-secondary {
    background: #f5f5f5;
    color: #333;
    border: 1px solid #ddd;
}

.btn-secondary:hover:not(:disabled) {
    background: #e0e0e0;
}

.btn-danger {
    background: #f44336;
    color: white;
}

.btn-danger:hover:not(:disabled) {
    background: #d32f2f;
}

/* Responsive Design */
@media (max-width: 768px) {
    .modal-overlay {
        padding: 10px;
    }
    
    .bulk-operations-modal {
        max-height: 95vh;
    }
    
    .modal-header,
    .modal-content,
    .modal-footer {
        padding-left: 20px;
        padding-right: 20px;
    }
    
    .modal-content {
        padding-top: 20px;
        padding-bottom: 20px;
    }
    
    .form-grid {
        grid-template-columns: 1fr;
    }
    
    .summary-breakdown {
        grid-template-columns: 1fr;
    }
    
    .results-stats {
        flex-direction: column;
        align-items: center;
    }
    
    .modal-footer {
        flex-direction: column;
        gap: 8px;
    }
    
    .modal-footer .btn {
        width: 100%;
    }
    
    .confirmation-details {
        padding: 16px;
    }
    
    .detail-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }
}

@media (max-width: 480px) {
    .operation-option {
        padding: 12px;
    }
    
    .option-title {
        font-size: 14px;
    }
    
    .option-description {
        font-size: 13px;
    }
    
    .stat-value {
        font-size: 20px;
    }
    
    .breakdown-items {
        flex-direction: column;
        gap: 4px;
    }
    
    .failed-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }
    
    .error-message {
        text-align: left;
        margin-left: 0;
    }
}
/**
 * AdminOnly Component Styles
 * 
 * Provides styling for the AdminOnly component including
 * loading states and container styling.
 */

.admin-only-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    min-height: 60px;
}

.admin-loading-spinner {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #666;
    font-size: 0.9rem;
}

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

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

.admin-only-container {
    /* Base container styles - can be overridden */
}

.admin-only-fallback {
    /* Base fallback styles - can be overridden */
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .admin-only-loading {
        padding: 0.75rem;
        min-height: 50px;
    }
    
    .admin-loading-spinner {
        font-size: 0.8rem;
        gap: 0.5rem;
    }
    
    .admin-loading-spinner .spinner {
        width: 16px;
        height: 16px;
    }
}
/* RedemptionAnalytics Styles */

.redemption-analytics {
    padding: 24px;
    background: #f8f9fa;
    min-height: 100vh;
}

/* Header */
.redemption-analytics-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 32px;
    padding: 24px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.redemption-analytics-header-content h1 {
    margin: 0 0 8px 0;
    font-size: 28px;
    font-weight: 600;
    color: #1a1a1a;
}

.redemption-analytics-header-content p {
    margin: 0;
    color: #666;
    font-size: 16px;
}

.redemption-analytics-header-controls {
    display: flex;
    gap: 20px;
    align-items: flex-end;
    flex-wrap: wrap;
}

.redemption-analytics-time-range-selector,
.redemption-analytics-refresh-controls,
.redemption-analytics-export-controls {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.redemption-analytics-time-range-selector label,
.redemption-analytics-refresh-controls label {
    font-size: 14px;
    font-weight: 500;
    color: #666;
}

.redemption-analytics-time-range-selector select {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    background: white;
}

.redemption-analytics-refresh-controls {
    flex-direction: row;
    align-items: center;
    gap: 12px;
}

.redemption-analytics-auto-refresh-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #666;
    cursor: pointer;
}

.redemption-analytics-auto-refresh-toggle input[type="checkbox"] {
    margin: 0;
}

.redemption-analytics-export-controls {
    flex-direction: row;
    gap: 8px;
}

/* Fraud Alerts Section */
.redemption-analytics-fraud-alerts-section {
    margin-bottom: 32px;
    padding: 20px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    border-left: 4px solid #f44336;
}

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

.redemption-analytics-alerts-header h2 {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
    color: #1a1a1a;
}

.redemption-analytics-alerts-summary {
    display: flex;
    gap: 12px;
}

.redemption-analytics-alert-badge {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
    text-transform: uppercase;
}

.redemption-analytics-alert-badge.alert-high {
    background: #ffebee;
    color: #c62828;
}

.redemption-analytics-alert-badge.alert-medium {
    background: #fff3e0;
    color: #ef6c00;
}

.redemption-analytics-alert-badge.alert-low {
    background: #e8f5e8;
    color: #2e7d32;
}

.redemption-analytics-alerts-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.redemption-analytics-fraud-alert {
    padding: 16px;
    border-radius: 8px;
    border: 1px solid;
}

.redemption-analytics-fraud-alert.alert-high {
    background: #ffebee;
    border-color: #f44336;
}

.redemption-analytics-fraud-alert.alert-medium {
    background: #fff3e0;
    border-color: #ff9800;
}

.redemption-analytics-fraud-alert.alert-low {
    background: #e8f5e8;
    border-color: #4caf50;
}

.redemption-analytics-alert-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.redemption-analytics-alert-type {
    font-weight: 600;
    font-size: 14px;
}

.redemption-analytics-alert-timestamp {
    font-size: 12px;
    color: #666;
}

.redemption-analytics-alert-message {
    font-size: 14px;
    margin-bottom: 8px;
    line-height: 1.4;
}

.redemption-analytics-alert-details {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.redemption-analytics-detail-item {
    font-size: 12px;
    color: #666;
    background: rgba(255, 255, 255, 0.7);
    padding: 4px 8px;
    border-radius: 4px;
}

/* Metrics Section */
.redemption-analytics-metrics-section {
    margin-bottom: 32px;
}

.redemption-analytics-metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    grid-gap: 20px;
    gap: 20px;
}

.redemption-analytics-metric-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 24px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    border-left: 4px solid;
}

.redemption-analytics-metric-card.metric-blue {
    border-left-color: #2196f3;
}

.redemption-analytics-metric-card.metric-green {
    border-left-color: #4caf50;
}

.redemption-analytics-metric-card.metric-purple {
    border-left-color: #9c27b0;
}

.redemption-analytics-metric-card.metric-orange {
    border-left-color: #ff9800;
}

.redemption-analytics-metric-icon {
    font-size: 32px;
    opacity: 0.8;
}

.redemption-analytics-metric-content {
    flex: 1 1;
}

.redemption-analytics-metric-value {
    font-size: 28px;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 4px;
}

.redemption-analytics-metric-title {
    font-size: 14px;
    color: #666;
    font-weight: 500;
}

.redemption-analytics-metric-change {
    font-size: 12px;
    font-weight: 600;
    margin-top: 4px;
}

.redemption-analytics-metric-change.positive {
    color: #4caf50;
}

.redemption-analytics-metric-change.negative {
    color: #f44336;
}

/* Charts Section */
.redemption-analytics-charts-section {
    margin-bottom: 32px;
}

.redemption-analytics-charts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    grid-gap: 20px;
    gap: 20px;
}

.redemption-analytics-chart-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.redemption-analytics-chart-card.full-width {
    grid-column: 1 / -1;
}

.redemption-analytics-chart-header {
    padding: 20px 24px 0;
    border-bottom: 1px solid #f0f0f0;
}

.redemption-analytics-chart-header h3 {
    margin: 0 0 16px 0;
    font-size: 16px;
    font-weight: 600;
    color: #1a1a1a;
}

.redemption-analytics-chart-content {
    padding: 24px;
    min-height: 200px;
}

/* Simple Chart Styles */
.redemption-analytics-simple-chart {
    height: 150px;
    display: flex;
    align-items: end;
}

.redemption-analytics-chart-bars {
    display: flex;
    align-items: end;
    gap: 8px;
    width: 100%;
    height: 100%;
}

.redemption-analytics-chart-bar {
    flex: 1 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    height: 100%;
}

.redemption-analytics-bar-fill {
    width: 100%;
    background: linear-gradient(180deg, #2196f3, #1976d2);
    border-radius: 4px 4px 0 0;
    min-height: 4px;
    transition: height 0.3s ease;
}

.redemption-analytics-bar-label {
    font-size: 12px;
    color: #666;
    margin-top: 8px;
}

.redemption-analytics-pie-chart-simple {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.redemption-analytics-pie-item {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 14px;
}

.redemption-analytics-pie-color {
    width: 16px;
    height: 16px;
    border-radius: 50%;
}

.redemption-analytics-pie-color.color-0 {
    background: #2196f3;
}

.redemption-analytics-pie-color.color-1 {
    background: #4caf50;
}

.redemption-analytics-pie-color.color-2 {
    background: #ff9800;
}

.redemption-analytics-pie-color.color-3 {
    background: #9c27b0;
}

.redemption-analytics-horizontal-bars {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.redemption-analytics-bar-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

.redemption-analytics-bar-label {
    min-width: 120px;
    font-size: 14px;
    color: #333;
    font-weight: 500;
}

.redemption-analytics-bar-container {
    flex: 1 1;
    height: 20px;
    background: #f0f0f0;
    border-radius: 10px;
    overflow: hidden;
}

.redemption-analytics-bar-container .redemption-analytics-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #4caf50, #2196f3);
    border-radius: 10px;
    transition: width 0.3s ease;
}

.redemption-analytics-bar-value {
    min-width: 40px;
    text-align: right;
    font-size: 14px;
    font-weight: 600;
    color: #333;
}

.redemption-analytics-fraud-patterns-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.redemption-analytics-pattern-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    border-radius: 6px;
    border: 1px solid;
}

.redemption-analytics-pattern-item.severity-high {
    background: #ffebee;
    border-color: #f44336;
}

.redemption-analytics-pattern-item.severity-medium {
    background: #fff3e0;
    border-color: #ff9800;
}

.redemption-analytics-pattern-item.severity-low {
    background: #e8f5e8;
    border-color: #4caf50;
}

.redemption-analytics-pattern-name {
    font-weight: 500;
    color: #333;
}

.redemption-analytics-pattern-count {
    font-weight: 600;
    color: #666;
}

.redemption-analytics-pattern-severity {
    font-size: 12px;
    font-weight: 500;
    text-transform: uppercase;
    padding: 2px 6px;
    border-radius: 3px;
}

.redemption-analytics-pattern-severity.severity-high {
    background: #f44336;
    color: white;
}

.redemption-analytics-pattern-severity.severity-medium {
    background: #ff9800;
    color: white;
}

.redemption-analytics-pattern-severity.severity-low {
    background: #4caf50;
    color: white;
}

/* Detailed Analytics */
.redemption-analytics-detailed-analytics {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.redemption-analytics-tabs {
    display: flex;
    border-bottom: 1px solid #e0e0e0;
}

.redemption-analytics-tab-button {
    padding: 16px 24px;
    border: none;
    background: none;
    font-size: 14px;
    font-weight: 500;
    color: #666;
    cursor: pointer;
    transition: all 0.2s ease;
    border-bottom: 2px solid transparent;
}

.redemption-analytics-tab-button:hover {
    background: #f8f9fa;
    color: #333;
}

.redemption-analytics-tab-button.active {
    color: #2196f3;
    border-bottom-color: #2196f3;
    background: #f8f9fa;
}

.redemption-analytics-tab-content {
    padding: 32px;
}

/* Tab Content Styles */
.redemption-analytics-overview-tab {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.redemption-analytics-overview-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    grid-gap: 24px;
    gap: 24px;
}

.redemption-analytics-overview-section h4 {
    margin: 0 0 16px 0;
    font-size: 16px;
    font-weight: 600;
    color: #1a1a1a;
}

.redemption-analytics-breakdown-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.redemption-analytics-breakdown-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid #f0f0f0;
}

.redemption-analytics-breakdown-item:last-child {
    border-bottom: none;
}

.redemption-analytics-breakdown-label {
    font-size: 14px;
    color: #666;
}

.redemption-analytics-breakdown-value {
    font-size: 14px;
    font-weight: 600;
    color: #333;
}

.redemption-analytics-conversion-tab {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.redemption-analytics-conversion-metrics {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.redemption-analytics-metric-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px;
    background: #f8f9fa;
    border-radius: 8px;
}

.redemption-analytics-metric-label {
    font-size: 16px;
    color: #666;
}

.redemption-analytics-metric-value {
    font-size: 20px;
    font-weight: 600;
    color: #2196f3;
}

.redemption-analytics-fraud-tab {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.redemption-analytics-fraud-summary h4 {
    margin: 0 0 16px 0;
    font-size: 16px;
    font-weight: 600;
    color: #1a1a1a;
}

.redemption-analytics-fraud-alerts-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.redemption-analytics-campaigns-tab {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.redemption-analytics-campaigns-table {
    display: flex;
    flex-direction: column;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
}

.redemption-analytics-table-header {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    background: #f8f9fa;
    border-bottom: 1px solid #e0e0e0;
}

.redemption-analytics-header-cell {
    padding: 12px 16px;
    font-size: 14px;
    font-weight: 600;
    color: #333;
}

.redemption-analytics-table-row {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    border-bottom: 1px solid #f0f0f0;
}

.redemption-analytics-table-row:last-child {
    border-bottom: none;
}

.redemption-analytics-table-cell {
    padding: 12px 16px;
    font-size: 14px;
    color: #666;
}

/* Button Styles */
.btn {
    padding: 8px 16px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

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

.btn-secondary {
    background: #f5f5f5;
    color: #333;
    border: 1px solid #ddd;
}

.btn-secondary:hover:not(:disabled) {
    background: #e0e0e0;
}

/* Loading State */
.loading-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    text-align: center;
}

.loading-container p {
    margin-top: 16px;
    color: #666;
    font-size: 16px;
}

/* Responsive Design */
@media (max-width: 1200px) {
    .redemption-analytics-charts-grid {
        grid-template-columns: 1fr;
    }

    .redemption-analytics-metrics-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    }

    .redemption-analytics-overview-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .redemption-analytics {
        padding: 16px;
    }

    .redemption-analytics-header {
        flex-direction: column;
        gap: 20px;
        align-items: stretch;
    }

    .redemption-analytics-header-controls {
        flex-direction: column;
        gap: 16px;
        align-items: stretch;
    }

    .redemption-analytics-refresh-controls,
    .redemption-analytics-export-controls {
        flex-direction: row;
        justify-content: space-between;
    }

    .redemption-analytics-alerts-header {
        flex-direction: column;
        gap: 12px;
        align-items: stretch;
    }

    .redemption-analytics-tabs {
        overflow-x: auto;
    }

    .redemption-analytics-tab-button {
        white-space: nowrap;
        min-width: 120px;
    }

    .redemption-analytics-table-header,
    .redemption-analytics-table-row {
        grid-template-columns: 2fr 1fr 1fr 1fr;
        font-size: 12px;
    }

    .redemption-analytics-header-cell,
    .redemption-analytics-table-cell {
        padding: 8px 12px;
    }

    .redemption-analytics-bar-row {
        flex-direction: column;
        gap: 8px;
        align-items: stretch;
    }

    .redemption-analytics-bar-label {
        min-width: auto;
    }
}

@media (max-width: 480px) {
    .redemption-analytics-metrics-grid {
        grid-template-columns: 1fr;
    }

    .redemption-analytics-metric-card {
        padding: 16px;
    }

    .redemption-analytics-metric-value {
        font-size: 24px;
    }

    .redemption-analytics-metric-icon {
        font-size: 24px;
    }

    .redemption-analytics-alerts-summary {
        flex-direction: column;
        gap: 8px;
    }

    .redemption-analytics-alert-header {
        flex-direction: column;
        gap: 4px;
        align-items: flex-start;
    }

    .redemption-analytics-alert-details {
        flex-direction: column;
        gap: 8px;
    }

    .redemption-analytics-table-header,
    .redemption-analytics-table-row {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .redemption-analytics-header-cell,
    .redemption-analytics-table-cell {
        padding: 8px;
        border-bottom: 1px solid #f0f0f0;
    }
}
/* UserUpgradePanel Styles */
.user-upgrade-panel {
    padding: 24px;
    max-width: 800px;
    margin: 0 auto;
}

/* Header */
.panel-header {
    margin-bottom: 32px;
    text-align: center;
}

.panel-header h2 {
    font-size: 28px;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 8px;
}

.panel-header p {
    font-size: 16px;
    color: #666;
    margin: 0;
}

/* Search Section */
.upgrade-panel-search-section {
    margin-bottom: 32px;
}

.upgrade-panel-search-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.upgrade-panel-search-input-group {
    display: flex;
    gap: 12px;
    align-items: center;
}

.upgrade-panel-search-input {
    flex: 1 1;
    padding: 12px 16px;
    border: 2px solid #e1e5e9;
    border-radius: 12px;
    font-size: 16px;
    transition: all 0.2s ease;
    background: #fff;
}

.upgrade-panel-search-input:focus {
    outline: none;
    border-color: #007AFF;
    box-shadow: 0 0 0 3px rgba(0, 122, 255, 0.1);
}

.upgrade-panel-search-input:disabled {
    background: #f5f5f7;
    color: #8e8e93;
}

.upgrade-panel-search-button {
    padding: 12px 24px;
    background: #007AFF;
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 100px;
    justify-content: center;
}

.upgrade-panel-search-button:hover:not(:disabled) {
    background: #0056b3;
    transform: translateY(-1px);
}

.upgrade-panel-search-button:disabled {
    background: #c7c7cc;
    cursor: not-allowed;
    transform: none;
}

/* Messages */
.error-message,
.success-message {
    padding: 12px 16px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    margin-top: 8px;
}

.error-message {
    background: #ffebee;
    color: #c62828;
    border: 1px solid #ffcdd2;
}

.success-message {
    background: #e8f5e8;
    color: #2e7d32;
    border: 1px solid #c8e6c9;
}

.error-icon,
.success-icon {
    font-size: 16px;
}

/* Search Results */
.upgrade-panel-search-results {
    margin-top: 24px;
}

.user-card {
    background: #fff;
    border: 1px solid #e1e5e9;
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.user-info {
    margin-bottom: 24px;
}

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

.user-header h3 {
    font-size: 20px;
    font-weight: 600;
    color: #1a1a1a;
    margin: 0;
}

.plan-badge {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.plan-badge.free {
    background: #f0f0f0;
    color: #666;
}

.plan-badge.pro {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.plan-badge.ultra {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
}

.user-details {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.detail-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

.detail-row .label {
    font-weight: 500;
    color: #666;
    min-width: 80px;
}

.detail-row .value {
    color: #1a1a1a;
    flex: 1 1;
}

/* Upgrade Section */
.upgrade-section {
    border-top: 1px solid #e1e5e9;
    padding-top: 24px;
}

.upgrade-section h4 {
    font-size: 18px;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 16px;
}

.upgrade-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.form-row {
    display: flex;
    gap: 16px;
}

.form-group {
    flex: 1 1;
}

.form-group label {
    display: block;
    font-weight: 500;
    color: #333;
    margin-bottom: 8px;
    font-size: 14px;
}

.duration-input {
    display: flex;
    gap: 8px;
    align-items: center;
}

.duration-number {
    flex: 1 1;
    padding: 10px 12px;
    border: 1px solid #e1e5e9;
    border-radius: 8px;
    font-size: 14px;
    max-width: 100px;
}

.duration-unit {
    padding: 10px 12px;
    border: 1px solid #e1e5e9;
    border-radius: 8px;
    font-size: 14px;
    background: white;
    min-width: 80px;
}

.reason-input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #e1e5e9;
    border-radius: 8px;
    font-size: 14px;
}

.duration-number:focus,
.duration-unit:focus,
.reason-input:focus {
    outline: none;
    border-color: #007AFF;
    box-shadow: 0 0 0 2px rgba(0, 122, 255, 0.1);
}

.form-actions {
    margin-top: 16px;
}

.upgrade-button {
    padding: 12px 32px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    justify-content: center;
    min-width: 140px;
}

.upgrade-button:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.upgrade-button:disabled {
    background: #c7c7cc;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* No Results */
.no-results {
    text-align: center;
    padding: 48px 24px;
    color: #666;
}

.no-results-icon {
    font-size: 48px;
    display: block;
    margin-bottom: 16px;
}

.no-results p {
    font-size: 16px;
    margin: 0;
}

/* Responsive Design */
@media (max-width: 768px) {
    .user-upgrade-panel {
        padding: 16px;
    }
    
    .upgrade-panel-search-input-group {
        flex-direction: column;
    }
    
    .upgrade-panel-search-input,
    .upgrade-panel-search-button {
        width: 100%;
    }
    
    .user-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    
    .form-row {
        flex-direction: column;
    }
    
    .duration-input {
        max-width: 200px;
    }
}

/* Loading Spinner Integration */
.user-upgrade-panel .loading-spinner {
    width: 16px;
    height: 16px;
}

.user-upgrade-panel .loading-spinner.small {
    width: 14px;
    height: 14px;
}
/* 公告編輯器樣式 */
.announcement-editor-container h2 {
  font-size: 1.5rem;
  font-weight: 600;
  color: #1d1d1f;
  margin: 0 0 24px 0;
  padding-bottom: 12px;
  border-bottom: 2px solid #f5f5f7;
}

/* 表單群組 */
.announcement-editor-form-group {
  margin-bottom: 24px;
}

.announcement-editor-form-group label {
  display: block;
  font-size: 0.95rem;
  font-weight: 500;
  color: #1d1d1f;
  margin-bottom: 8px;
}

/* 切換開關樣式 */
.announcement-editor-toggle-label {
  display: flex;
  align-items: center;
  cursor: pointer;
  -webkit-user-select: none;
          user-select: none;
  margin-bottom: 0;
}

.announcement-editor-toggle-input {
  display: none;
}

.announcement-editor-toggle-slider {
  position: relative;
  width: 50px;
  height: 28px;
  background: #e5e5ea;
  border-radius: 14px;
  transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  margin-right: 12px;
}

.announcement-editor-toggle-slider::before {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 24px;
  height: 24px;
  background: white;
  border-radius: 50%;
  transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.announcement-editor-toggle-input:checked + .announcement-editor-toggle-slider {
  background: #007aff;
}

.announcement-editor-toggle-input:checked + .announcement-editor-toggle-slider::before {
  transform: translateX(22px);
}

.announcement-editor-toggle-text {
  font-size: 0.95rem;
  color: #1d1d1f;
  font-weight: 500;
}

/* 訊息輸入框 */
.announcement-editor-message-input {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid #e5e5ea;
  border-radius: 12px;
  font-size: 0.95rem;
  font-family: inherit;
  resize: vertical;
  min-height: 100px;
  transition: all 0.2s ease;
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.announcement-editor-message-input:focus {
  outline: none;
  border-color: #007aff;
  box-shadow: 0 0 0 3px rgba(0, 122, 255, 0.1);
}

.announcement-editor-message-input.error {
  border-color: #ff3b30;
}

.announcement-editor-message-input.error:focus {
  box-shadow: 0 0 0 3px rgba(255, 59, 48, 0.1);
}

/* 輸入框底部資訊 */
.announcement-editor-input-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 8px;
  font-size: 0.85rem;
}

.announcement-editor-char-count {
  color: #6e6e73;
  font-weight: 500;
}

.announcement-editor-char-count.error {
  color: #ff3b30;
}

.announcement-editor-error-text {
  color: #ff3b30;
  font-weight: 500;
}

/* 延遲時間輸入 */
.announcement-editor-delay-input-container {
  display: flex;
  align-items: center;
  gap: 16px;
}

.announcement-editor-delay-slider {
  flex: 1 1;
  height: 6px;
  border-radius: 3px;
  background: #e5e5ea;
  outline: none;
  -webkit-appearance: none;
  appearance: none;
}

.announcement-editor-delay-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #007aff;
  cursor: pointer;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  -webkit-transition: all 0.2s ease;
  transition: all 0.2s ease;
}

.announcement-editor-delay-slider::-webkit-slider-thumb:hover {
  transform: scale(1.1);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.announcement-editor-delay-slider::-moz-range-thumb {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #007aff;
  cursor: pointer;
  border: none;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.announcement-editor-delay-value {
  font-weight: 600;
  color: #007aff;
  min-width: 40px;
  text-align: center;
}

/* 驗證錯誤 */
.announcement-editor-validation-errors {
  background: rgba(255, 59, 48, 0.05);
  border: 1px solid rgba(255, 59, 48, 0.2);
  border-radius: 8px;
  padding: 12px;
  margin-bottom: 20px;
}

.announcement-editor-error-item {
  display: flex;
  align-items: center;
  color: #d70015;
  font-size: 0.9rem;
  margin-bottom: 4px;
}

.announcement-editor-error-item:last-child {
  margin-bottom: 0;
}

.announcement-editor-error-icon {
  margin-right: 8px;
}

/* 操作按鈕 */
.announcement-editor-actions {
  display: flex;
  gap: 12px;
  margin-bottom: 32px;
}

.announcement-editor-btn {
  padding: 12px 24px;
  border: none;
  border-radius: 8px;
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
}

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

.announcement-editor-btn-primary {
  background: #007aff;
  color: white;
}

.announcement-editor-btn-primary:hover:not(:disabled) {
  background: #0056cc;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 122, 255, 0.3);
}

.announcement-editor-btn-secondary {
  background: rgba(0, 0, 0, 0.05);
  color: #1d1d1f;
  border: 1px solid rgba(0, 0, 0, 0.1);
}

.announcement-editor-btn-secondary:hover:not(:disabled) {
  background: rgba(0, 0, 0, 0.1);
  transform: translateY(-1px);
}



/* 使用提示 */
.announcement-editor-tips {
  background: rgba(0, 122, 255, 0.05);
  border: 1px solid rgba(0, 122, 255, 0.1);
  border-radius: 12px;
  padding: 20px;
}

.announcement-editor-tips h4 {
  font-size: 1rem;
  font-weight: 600;
  color: #1d1d1f;
  margin: 0 0 12px 0;
}

.announcement-editor-tips ul {
  margin: 0;
  padding-left: 20px;
  color: #6e6e73;
}

.announcement-editor-tips li {
  font-size: 0.9rem;
  line-height: 1.5;
  margin-bottom: 6px;
}

.announcement-editor-tips li:last-child {
  margin-bottom: 0;
}

/* 響應式設計 */
@media (max-width: 768px) {
  .announcement-editor-actions {
    flex-direction: column;
  }

  .announcement-editor-btn {
    width: 100%;
  }

  .announcement-editor-delay-input-container {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }

  .announcement-editor-delay-value {
    text-align: left;
  }
}
/* 預覽區域樣式 */
.announcement-preview-container h2 {
  font-size: 1.5rem;
  font-weight: 600;
  color: #1d1d1f;
  margin: 0 0 24px 0;
  padding-bottom: 12px;
  border-bottom: 2px solid #f5f5f7;
}

/* 預覽標題區域 */
.announcement-preview-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}

.announcement-preview-controls {
  display: flex;
  gap: 8px;
}

.announcement-preview-control-btn {
  background: rgba(0, 0, 0, 0.05);
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 6px;
  padding: 6px 10px;
  cursor: pointer;
  font-size: 0.9rem;
  transition: all 0.2s ease;
}

.announcement-preview-control-btn:hover {
  background: rgba(0, 0, 0, 0.1);
  transform: translateY(-1px);
}

/* 預覽容器 */
.announcement-preview-main-container {
  margin-bottom: 24px;
}

/* 預覽框架 */
.announcement-preview-frame {
  border: 2px solid #e5e5ea;
  border-radius: 12px;
  overflow: hidden;
  background: white;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
  margin-bottom: 20px;
}

/* 模擬網站 */
.announcement-preview-mock-website {
  min-height: 300px;
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
}

/* 模擬標題欄 */
.announcement-preview-mock-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 24px;
  background: white;
  border-bottom: 1px solid #e5e5ea;
}

.announcement-preview-mock-logo {
  font-size: 1.2rem;
  font-weight: 700;
  color: #007aff;
}

.announcement-preview-mock-nav {
  display: flex;
  gap: 24px;
}

.announcement-preview-mock-nav span {
  font-size: 0.9rem;
  color: #6e6e73;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 4px;
  transition: background-color 0.2s ease;
}

.announcement-preview-mock-nav span:hover {
  background: rgba(0, 0, 0, 0.05);
}

/* 公告預覽區域 */
.announcement-preview-area {
  position: relative;
  min-height: 60px;
}

.announcement-preview-no-announcement {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 60px;
  background: rgba(0, 0, 0, 0.02);
  border-top: 1px dashed #d1d1d6;
  border-bottom: 1px dashed #d1d1d6;
}

.announcement-preview-no-announcement p {
  color: #8e8e93;
  font-size: 0.9rem;
  margin: 0;
  font-style: italic;
}

/* 模擬內容 */
.announcement-preview-mock-content {
  padding: 32px 24px;
}

.announcement-preview-mock-section h3 {
  font-size: 1.3rem;
  font-weight: 600;
  color: #1d1d1f;
  margin: 0 0 12px 0;
}

.announcement-preview-mock-section p {
  color: #6e6e73;
  line-height: 1.6;
  margin: 0;
}

/* 預覽資訊 */
.announcement-preview-info {
  background: rgba(0, 122, 255, 0.05);
  border: 1px solid rgba(0, 122, 255, 0.1);
  border-radius: 8px;
  padding: 16px;
  margin-bottom: 16px;
}

.announcement-preview-info h4 {
  font-size: 1rem;
  font-weight: 600;
  color: #1d1d1f;
  margin: 0 0 12px 0;
}

.announcement-preview-info-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.announcement-preview-info-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.announcement-preview-info-label {
  font-size: 0.9rem;
  color: #6e6e73;
  font-weight: 500;
}

.announcement-preview-info-value {
  font-size: 0.9rem;
  color: #1d1d1f;
  font-weight: 500;
}

.announcement-preview-info-value.status.enabled {
  color: #34c759;
}

.announcement-preview-info-value.status.disabled {
  color: #ff3b30;
}

/* 驗證資訊 */
.announcement-preview-validation-info {
  background: rgba(52, 199, 89, 0.05);
  border: 1px solid rgba(52, 199, 89, 0.1);
  border-radius: 8px;
  padding: 16px;
  margin-bottom: 16px;
}

.announcement-preview-validation-info h4 {
  font-size: 1rem;
  font-weight: 600;
  color: #1d1d1f;
  margin: 0 0 12px 0;
}

.announcement-preview-validation-status {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.announcement-preview-status-indicator {
  font-size: 1rem;
}

.announcement-preview-validation-details {
  font-size: 0.85rem;
  color: #6e6e73;
}

/* 預覽說明 */
.announcement-preview-notes {
  background: rgba(142, 142, 147, 0.05);
  border: 1px solid rgba(142, 142, 147, 0.1);
  border-radius: 8px;
  padding: 16px;
}

.announcement-preview-notes h4 {
  font-size: 1rem;
  font-weight: 600;
  color: #1d1d1f;
  margin: 0 0 12px 0;
}

.announcement-preview-notes ul {
  margin: 0;
  padding-left: 20px;
  color: #6e6e73;
}

.announcement-preview-notes li {
  font-size: 0.85rem;
  line-height: 1.5;
  margin-bottom: 4px;
}

.announcement-preview-notes li:last-child {
  margin-bottom: 0;
}

/* 響應式設計 */
@media (max-width: 768px) {
  .announcement-preview-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .announcement-preview-mock-header {
    flex-direction: column;
    gap: 12px;
    text-align: center;
  }

  .announcement-preview-mock-nav {
    justify-content: center;
  }

  .announcement-preview-mock-content {
    padding: 20px 16px;
  }

  .announcement-preview-info-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }
}

@media (max-width: 480px) {
  .announcement-preview-frame {
    border-radius: 8px;
  }

  .announcement-preview-mock-header {
    padding: 12px 16px;
  }

  .announcement-preview-mock-content {
    padding: 16px 12px;
  }

  .announcement-preview-info,
  .announcement-preview-validation-info,
  .announcement-preview-notes {
    padding: 12px;
  }
}
/* 公告管理器主容器 */
.announcement-mgr-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 24px;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica Neue', Arial, sans-serif;
}

/* 標題區域 */
.announcement-mgr-header {
  margin-bottom: 32px;
  text-align: center;
}

.announcement-mgr-header h1 {
  font-size: 2.5rem;
  font-weight: 700;
  color: #1d1d1f;
  margin: 0 0 8px 0;
  letter-spacing: -0.02em;
}

.announcement-mgr-header .subtitle {
  font-size: 1.1rem;
  color: #6e6e73;
  margin: 0;
  font-weight: 400;
}



/* 警告訊息 */
.announcement-mgr-alert {
  display: flex;
  align-items: center;
  padding: 16px 20px;
  border-radius: 12px;
  margin-bottom: 24px;
  font-size: 0.95rem;
  font-weight: 500;
  position: relative;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.announcement-mgr-alert-error {
  background: linear-gradient(135deg, 
    rgba(255, 59, 48, 0.1) 0%, 
    rgba(255, 69, 58, 0.05) 100%);
  border: 1px solid rgba(255, 59, 48, 0.2);
  color: #d70015;
}

.announcement-mgr-alert-success {
  background: linear-gradient(135deg, 
    rgba(52, 199, 89, 0.1) 0%, 
    rgba(48, 176, 199, 0.05) 100%);
  border: 1px solid rgba(52, 199, 89, 0.2);
  color: #1d7324;
}

.announcement-mgr-alert-icon {
  margin-right: 12px;
  font-size: 1.1rem;
}

.announcement-mgr-alert-message {
  flex: 1 1;
}

.announcement-mgr-alert-close {
  background: none;
  border: none;
  font-size: 1.2rem;
  color: inherit;
  cursor: pointer;
  padding: 4px;
  margin-left: 12px;
  border-radius: 4px;
  transition: background-color 0.2s ease;
}

.announcement-mgr-alert-close:hover {
  background-color: rgba(0, 0, 0, 0.1);
}

/* 主要內容區域 */
.announcement-mgr-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-gap: 32px;
  gap: 32px;
  margin-bottom: 32px;
}

.announcement-mgr-editor-section,
.announcement-mgr-preview-section {
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 16px;
  padding: 24px;
  box-shadow: 
    0 8px 32px rgba(0, 0, 0, 0.04),
    0 4px 16px rgba(0, 0, 0, 0.02);
}

/* 配置資訊區域 */
.announcement-mgr-config-info {
  background: rgba(248, 248, 248, 0.8);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: 12px;
  padding: 20px;
  margin-top: 24px;
}

.announcement-mgr-config-info h3 {
  font-size: 1.2rem;
  font-weight: 600;
  color: #1d1d1f;
  margin: 0 0 16px 0;
}

.announcement-mgr-info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  grid-gap: 16px;
  gap: 16px;
}

.announcement-mgr-info-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.announcement-mgr-info-item label {
  font-size: 0.85rem;
  font-weight: 500;
  color: #6e6e73;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.announcement-mgr-info-item span {
  font-size: 0.95rem;
  color: #1d1d1f;
  font-weight: 400;
}

/* 響應式設計 */
@media (max-width: 768px) {
  .announcement-mgr-container {
    padding: 16px;
  }

  .announcement-mgr-header h1 {
    font-size: 2rem;
  }

  .announcement-mgr-content {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .announcement-mgr-editor-section,
  .announcement-mgr-preview-section {
    padding: 20px;
  }

  .announcement-mgr-info-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .announcement-mgr-container {
    padding: 12px;
  }

  .announcement-mgr-header h1 {
    font-size: 1.8rem;
  }

  .announcement-mgr-header .subtitle {
    font-size: 1rem;
  }

  .announcement-mgr-editor-section,
  .announcement-mgr-preview-section {
    padding: 16px;
    border-radius: 12px;
  }

  .announcement-mgr-config-info {
    padding: 16px;
  }
}
/* PaymentRetryPanel.css */

.payment-retry-panel {
    padding: 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.panel-header {
    margin-bottom: 30px;
    text-align: center;
}

.panel-header h2 {
    color: #2c3e50;
    margin-bottom: 8px;
    font-size: 28px;
    font-weight: 600;
}

.panel-header p {
    color: #7f8c8d;
    font-size: 16px;
    margin: 0;
}

/* Section Navigation */
.section-nav {
    display: flex;
    gap: 8px;
    margin-bottom: 30px;
    border-bottom: 2px solid #ecf0f1;
    padding-bottom: 0;
}

.section-tab {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    border: none;
    background: transparent;
    color: #7f8c8d;
    cursor: pointer;
    border-radius: 8px 8px 0 0;
    transition: all 0.2s ease;
    font-size: 14px;
    font-weight: 500;
}

.section-tab:hover {
    background: #f8f9fa;
    color: #2c3e50;
}

.section-tab.active {
    background: #3498db;
    color: white;
    border-bottom: 2px solid #3498db;
}

.tab-icon {
    font-size: 16px;
}

.tab-label {
    font-weight: 500;
}

/* Error Message */
.error-message {
    margin-bottom: 20px;
    padding: 0;
}

.error-content {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: #fee;
    border: 1px solid #fcc;
    border-radius: 8px;
    color: #c33;
}

.error-icon {
    font-size: 18px;
}

.error-text {
    flex: 1 1;
    font-size: 14px;
}

.error-dismiss {
    background: none;
    border: none;
    color: #c33;
    cursor: pointer;
    font-size: 18px;
    padding: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
}

.error-dismiss:hover {
    background: rgba(204, 51, 51, 0.1);
}

/* Panel Content */
.panel-content {
    background: white;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    min-height: 400px;
}

/* Overview Section */
.retry-overview h3 {
    color: #2c3e50;
    margin-bottom: 20px;
    font-size: 20px;
}

.health-status {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 30px;
}

.status-indicator {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
}

.status-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #27ae60;
}

.status-indicator.unhealthy .status-dot {
    background: #e74c3c;
}

.status-text {
    font-size: 16px;
    font-weight: 600;
    color: #2c3e50;
}

.health-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    grid-gap: 16px;
    gap: 16px;
}

.health-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
}

.health-item label {
    font-weight: 500;
    color: #7f8c8d;
}

.health-item span {
    color: #2c3e50;
    font-weight: 500;
}

.overview-actions {
    display: flex;
    gap: 16px;
    justify-content: center;
}

/* Statistics Section */
.retry-stats h3 {
    color: #2c3e50;
    margin-bottom: 20px;
    font-size: 20px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    grid-gap: 20px;
    gap: 20px;
}

.stat-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 24px;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.stat-card:nth-child(2) {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.stat-card:nth-child(3) {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

.stat-card:nth-child(4) {
    background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
}

.stat-value {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 8px;
}

.stat-label {
    font-size: 14px;
    opacity: 0.9;
    font-weight: 500;
}

/* Pending Retries Section */
.pending-retries h3 {
    color: #2c3e50;
    margin-bottom: 20px;
    font-size: 20px;
}

.retries-table {
    overflow-x: auto;
}

.retries-table table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.retries-table th {
    background: #3498db;
    color: white;
    padding: 16px;
    text-align: left;
    font-weight: 600;
    font-size: 14px;
}

.retries-table td {
    padding: 16px;
    border-bottom: 1px solid #ecf0f1;
    color: #2c3e50;
    font-size: 14px;
}

.retries-table tr:last-child td {
    border-bottom: none;
}

.retries-table tr:hover {
    background: #f8f9fa;
}

/* Job Control Section */
.job-control h3 {
    color: #2c3e50;
    margin-bottom: 20px;
    font-size: 20px;
}

.job-status-section {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 24px;
}

.job-status-info {
    margin-bottom: 24px;
}

.status-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid #ecf0f1;
}

.status-item:last-child {
    border-bottom: none;
}

.status-item label {
    font-weight: 600;
    color: #7f8c8d;
}

.status-item span {
    color: #2c3e50;
    font-weight: 500;
}

.status.running {
    color: #27ae60;
}

.status.stopped {
    color: #e74c3c;
}

.status.idle {
    color: #f39c12;
}

.job-actions {
    display: flex;
    gap: 16px;
    justify-content: center;
}

/* Common Elements */
.loading-placeholder,
.no-data {
    text-align: center;
    padding: 40px;
    color: #7f8c8d;
    font-size: 16px;
}

.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

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

.btn-primary {
    background: #3498db;
    color: white;
}

.btn-primary:hover:not(:disabled) {
    background: #2980b9;
    transform: translateY(-1px);
}

.btn-secondary {
    background: #95a5a6;
    color: white;
}

.btn-secondary:hover:not(:disabled) {
    background: #7f8c8d;
    transform: translateY(-1px);
}

.btn-sm {
    padding: 6px 12px;
    font-size: 12px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .payment-retry-panel {
        padding: 16px;
    }
    
    .section-nav {
        flex-wrap: wrap;
        gap: 4px;
    }
    
    .section-tab {
        padding: 8px 12px;
        font-size: 12px;
    }
    
    .panel-content {
        padding: 20px;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .health-details {
        grid-template-columns: 1fr;
    }
    
    .overview-actions,
    .job-actions {
        flex-direction: column;
        align-items: stretch;
    }
    
    .retries-table {
        font-size: 12px;
    }
    
    .retries-table th,
    .retries-table td {
        padding: 8px;
    }
}
/* AdminPage Styles */

.admin-page {
    min-height: 100vh;
    background-color: #f8fafc;
    padding: 0;
}

/* Loading State */
.admin-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 60vh;
    gap: 1rem;
}

.admin-loading p {
    color: #64748b;
    font-size: 1rem;
}

/* Access Denied */
.admin-access-denied {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 60vh;
    padding: 2rem;
}

.access-denied-content {
    text-align: center;
    max-width: 400px;
}

.access-denied-icon {
    color: #ef4444;
    margin-bottom: 1.5rem;
    display: flex;
    justify-content: center;
}

.access-denied-content h2 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 0.5rem;
}

.access-denied-content p {
    color: #6b7280;
    margin-bottom: 2rem;
    line-height: 1.6;
}

.access-denied-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* Header */
.admin-header {
    background: white;
    border-bottom: 1px solid #e5e7eb;
    padding: 2rem;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 1rem;
}

.admin-header-content h1 {
    font-size: 2rem;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 0.5rem;
}

.admin-header-content p {
    color: #6b7280;
    font-size: 1rem;
    line-height: 1.5;
}

.admin-header-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.admin-status {
    display: flex;
    align-items: center;
}

.admin-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background-color: #dcfce7;
    color: #166534;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    font-weight: 500;
}

/* Navigation */
.admin-nav {
    background: white;
    border-bottom: 1px solid #e5e7eb;
    padding: 0 2rem;
}

.admin-tabs {
    display: flex;
    gap: 0;
    overflow-x: auto;
}

.admin-tab {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 1.5rem;
    border: none;
    background: none;
    color: #6b7280;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.admin-tab:hover {
    color: #374151;
    background-color: #f9fafb;
}

.admin-tab.active {
    color: #3b82f6;
    border-bottom-color: #3b82f6;
    background-color: #eff6ff;
}

.tab-icon {
    font-size: 1rem;
}

.tab-label {
    font-weight: 500;
}

/* Content */
.admin-content {
    padding: 0;
    min-height: calc(100vh - 200px);
}

/* Button Styles */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: 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;
}

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

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

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

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

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

/* Responsive Design */
@media (max-width: 768px) {
    .admin-header {
        padding: 1rem;
        flex-direction: column;
        align-items: stretch;
    }
    
    .admin-header-content {
        text-align: center;
    }
    
    .admin-header-content h1 {
        font-size: 1.5rem;
    }
    
    .admin-nav {
        padding: 0 1rem;
    }
    
    .admin-tabs {
        justify-content: center;
    }
    
    .admin-tab {
        padding: 0.75rem 1rem;
        font-size: 0.8rem;
    }
    
    .access-denied-actions {
        flex-direction: column;
    }
    
    .access-denied-actions .btn {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .admin-header-content h1 {
        font-size: 1.25rem;
    }
    
    .admin-tab {
        flex-direction: column;
        gap: 0.25rem;
        padding: 0.5rem;
        text-align: center;
    }
    
    .tab-icon {
        font-size: 1.25rem;
    }
    
    .tab-label {
        font-size: 0.75rem;
    }
}
