/* 麥力手機桌布產生器 - 主要樣式 */

/* 根變數設定 */
:root { 
  --gap: 16px; 
  --brand: #6366f1; 
  --brand-light: #818cf8;
  --text-primary: #1f2937;
  --text-secondary: #6b7280;
  --bg-primary: #ffffff;
  --bg-secondary: #f9fafb;
  --bg-card: #ffffff;
  --border-color: #e5e7eb;
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
}

/* 基本樣式 */
body { 
  font-family: 'Noto Serif TC', "Noto Sans TC","PingFang TC",Arial, sans-serif; 
  margin: 0; 
  /* 深藍色紋理背景 */
  background: #1a2332;
  background-image: 
    radial-gradient(circle at 20% 50%, rgba(30, 50, 70, 0.3) 0%, transparent 50%),
    radial-gradient(circle at 80% 80%, rgba(20, 40, 60, 0.3) 0%, transparent 50%),
    repeating-linear-gradient(
      45deg,
      transparent,
      transparent 2px,
      rgba(0, 0, 0, 0.1) 2px,
      rgba(0, 0, 0, 0.1) 4px
    );
  color: #ffffff;
  line-height: 1.6;
  min-height: 100vh;
  position: relative;
}

/* 添加紋理效果 */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: 
    url("data:image/svg+xml,%3Csvg width='100' height='100' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M0 0h100v100H0z' fill='%23000' opacity='0.03'/%3E%3Cpath d='M0 0L100 100M100 0L0 100' stroke='%23fff' stroke-width='0.5' opacity='0.02'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 0;
}

/* 頁面標題區域 */
header { 
  padding: 16px 20px; 
  background: rgba(26, 35, 50, 0.9);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  text-align: center;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
  position: relative;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

header::before {
  display: none;
}

h1 { 
  margin: 0; 
  font-size: 20px; 
  font-weight: 600;
  color: #ffffff;
  display: inline-block;
  flex: 1;
  text-align: center;
}

/* 設定圖示按鈕 */
#settingsBtn {
  background: rgba(255, 255, 255, 0.1);
  border: none;
  color: #ffffff;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  transition: all 0.3s ease;
}

#settingsBtn:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: rotate(90deg);
}

/* 裝置類型指示器樣式 */
#deviceType {
  font-size: 14px;
  color: var(--brand);
  background: rgba(99, 102, 241, 0.1);
  padding: 6px 12px;
  border-radius: 20px;
  margin-left: 12px;
  border: 1px solid rgba(99, 102, 241, 0.2);
  font-weight: 500;
}

/* 主要內容區域 */
main { 
  max-width: 1200px; 
  margin: 0 auto; 
  padding: 32px 20px; 
  display: grid; 
  gap: 24px; 
  grid-template-columns: 1fr 1fr; 
  position: relative;
  z-index: 1;
}

/* 當只有一個可見區域時，使用單欄佈局 */
main:has(#step1Section:only-child),
main:has(#previewSection:only-child),
main:has(#advancedSection:only-child) {
  grid-template-columns: 1fr;
  max-width: 600px;
}

/* 預覽區域優化 */
#previewSection {
  display: flex;
  flex-direction: column;
  gap: var(--gap);
}

/* 確保預覽區域內容不會超出視窗 */
#previewSection .card {
  max-height: 90vh;
  overflow-y: auto;
}

/* 確保單個卡片時置中顯示 */
.card:only-child {
  max-width: 600px;
  margin: 0 auto;
}

/* 手機版覆蓋單個卡片的設定 */
body.mobile .card:only-child {
  max-width: calc(100vw - 24px);
  width: calc(100% - 24px);
}

/* 強制單欄佈局（當其他區域隱藏時） */
main:has(#step1Section[style*="display: none"]) {
  grid-template-columns: 1fr;
  max-width: 600px;
}

/* 更簡單的方法：直接為可見的卡片設定置中 */
#step1Section:not([style*="display: none"]) {
  max-width: 600px;
  margin: 0 auto;
  grid-column: 1 / -1;
}

/* 手機版覆蓋 step1Section 的設定 */
body.mobile #step1Section:not([style*="display: none"]) {
  max-width: calc(100vw - 24px);
  width: calc(100% - 24px);
}

/* 動態佈局類別 */
main.single-column {
  grid-template-columns: 1fr !important;
  max-width: 600px !important;
}

/* 手機版覆蓋單欄佈局設定 */
body.mobile main.single-column {
  max-width: 100% !important;
  width: 100% !important;
}

main.two-column {
  grid-template-columns: 1fr 1fr !important;
  max-width: 1200px !important;
}

/* 電腦版Canvas顯示尺寸 */
canvas {
  width: 100%; 
  border-radius: 16px; 
  border: 2px solid rgba(255, 255, 255, 0.2); 
  background: rgba(255, 255, 255, 0.05); 
  /* 確保高解析度Canvas顯示清晰 */
  image-rendering: -webkit-optimize-contrast;
  image-rendering: crisp-edges;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  transition: all 0.3s ease;
}

/* 電腦版Canvas最大寬度限制 */
body:not(.mobile) canvas {
  max-width: 600px;
  max-height: 60vh; /* 限制最大高度為視窗高度的60% */
  margin: 0 auto;
  display: block;
  /* 保持寬高比，防止變型 */
  aspect-ratio: 9 / 20; /* 手機桌布的標準比例 */
  object-fit: contain;
  width: 100%;
  height: auto;
}

/* 卡片樣式 */
.card { 
  background: rgba(255, 255, 255, 0.05); 
  border: 1px solid rgba(255, 255, 255, 0.1); 
  border-radius: 16px; 
  padding: 24px; 
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
  position: relative;
  z-index: 1;
}

.card:hover {
  box-shadow: 0 6px 30px rgba(0, 0, 0, 0.4);
  transform: translateY(-2px);
  background: rgba(255, 255, 255, 0.08);
}

/* 行排列 */
.row { 
  display: flex; 
  gap: 16px; 
  align-items: center; 
  flex-wrap: wrap; 
}

/* 輸入框樣式 */
input[type="text"], 
input[type="number"] { 
  padding: 12px 16px; 
  border-radius: 12px; 
  border: 1px solid rgba(255, 255, 255, 0.2); 
  background: rgba(255, 255, 255, 0.1); 
  color: #ffffff;
  font-size: 14px;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

input[type="text"]:focus, 
input[type="number"]:focus { 
  outline: none;
  border-color: rgba(255, 255, 255, 0.4);
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.15);
}

input[type="text"]::placeholder,
input[type="number"]::placeholder {
  color: rgba(255, 255, 255, 0.5);
}

/* 按鈕樣式 */
button.btn { 
  background: rgba(60, 70, 85, 0.8); 
  border: 1px solid rgba(255, 255, 255, 0.1); 
  padding: 16px 24px; 
  border-radius: 12px; 
  cursor: pointer; 
  color: #ffffff;
  font-weight: 500;
  transition: all 0.3s ease;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  max-width: 100%;
  position: relative;
}

button.btn:hover {
  background: rgba(70, 80, 95, 0.9);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
  transform: translateY(-2px);
}

button.primary { 
  background: rgba(60, 70, 85, 0.8); 
  color: #ffffff; 
  border: 1px solid rgba(255, 255, 255, 0.1); 
  font-weight: 600;
}

button.primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
  background: rgba(70, 80, 95, 0.9);
}

/* 主要按鈕樣式（我有載具/我沒有載具） */
.main-action-btn {
  background: rgba(60, 70, 85, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 20px 24px;
  border-radius: 12px;
  cursor: pointer;
  color: #ffffff;
  font-weight: 500;
  transition: all 0.3s ease;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  position: relative;
  flex: 1;
  min-width: 0;
}

.main-action-btn:hover {
  background: rgba(70, 80, 95, 0.9);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
  transform: translateY(-2px);
}

.main-action-btn .btn-title {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 18px;
  font-weight: 600;
  width: 100%;
}

.main-action-btn .btn-desc {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.7);
  margin-top: 4px;
}

.main-action-btn .btn-arrow {
  position: absolute;
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 20px;
  color: rgba(255, 255, 255, 0.6);
}

/* 文字樣式 */
small.muted { 
  color: rgba(255, 255, 255, 0.6); 
}

/* 深色主題下的文字顏色 */
h2, h3 {
  color: #ffffff;
}

p {
  color: rgba(255, 255, 255, 0.9);
}

label {
  color: rgba(255, 255, 255, 0.9);
}

/* 畫布樣式已在上方定義，此處移除重複定義 */

/* 狀態顏色 */
.ok { 
  color: #059669; 
  background: rgba(5, 150, 105, 0.1);
  padding: 8px 12px;
  border-radius: 8px;
  border: 1px solid rgba(5, 150, 105, 0.2);
}
.warn { 
  color: #d97706; 
  background: rgba(217, 119, 6, 0.1);
  padding: 8px 12px;
  border-radius: 8px;
  border: 1px solid rgba(217, 119, 6, 0.2);
}
.err { 
  color: #dc2626; 
  background: rgba(220, 38, 38, 0.1);
  padding: 8px 12px;
  border-radius: 8px;
  border: 1px solid rgba(220, 38, 38, 0.2);
}

/* 控制面板樣式 */
.control-panel {
  margin-top: 20px;
  padding: 20px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(10px);
}

.control-group {
  margin-bottom: 20px;
}

.control-group:last-child {
  margin-bottom: 0;
}

.control-group label {
  display: block;
  margin-bottom: 8px;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.9);
  font-weight: 600;
}

.control-row {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 12px;
}

.control-row input[type="range"] {
  flex: 1;
  height: 8px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 4px;
  outline: none;
  -webkit-appearance: none;
  appearance: none;
}

.control-row input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 20px;
  height: 20px;
  background: #ffffff;
  border-radius: 50%;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.control-row input[type="range"]::-moz-range-thumb {
  width: 20px;
  height: 20px;
  background: #ffffff;
  border-radius: 50%;
  cursor: pointer;
  border: none;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.control-row input[type="number"] {
  width: 80px;
  text-align: center;
}

.control-row span {
  min-width: 40px;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.8);
  font-weight: 500;
}

/* 拖拽提示 */
.drag-hint {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.7);
  margin-top: 8px;
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  border-left: 3px solid rgba(255, 255, 255, 0.3);
}

/* 手機版響應式樣式 */
body.mobile {
  /* 手機版基本設定 */
  font-size: 14px;
  line-height: 1.4;
  background: #1a2332;
  background-image: 
    radial-gradient(circle at 20% 50%, rgba(30, 50, 70, 0.3) 0%, transparent 50%),
    radial-gradient(circle at 80% 80%, rgba(20, 40, 60, 0.3) 0%, transparent 50%),
    repeating-linear-gradient(
      45deg,
      transparent,
      transparent 2px,
      rgba(0, 0, 0, 0.1) 2px,
      rgba(0, 0, 0, 0.1) 4px
    );
  color: #ffffff;
}

body.mobile header {
  padding: 16px 12px;
  background: rgba(26, 35, 50, 0.9);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

body.mobile h1 {
  font-size: 20px;
  color: #ffffff;
}

body.mobile #deviceType {
  font-size: 12px;
  padding: 4px 8px;
  margin-left: 8px;
}

body.mobile main {
  max-width: 100%;
  margin: 0 auto;
  padding: 16px 12px;
  grid-template-columns: 1fr;
  gap: 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  box-sizing: border-box;
}

body.mobile .card {
  padding: 16px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(10px);
  width: calc(100vw - 24px);
  max-width: calc(100vw - 24px);
  margin: 0 auto;
  box-sizing: border-box;
  overflow: hidden;
}

/* 手機版預覽區域優化 */
body.mobile #previewSection .card {
  max-height: 85vh;
  overflow-y: auto;
}

body.mobile .row {
  gap: 8px;
  flex-direction: column;
  align-items: center;
  width: 100%;
}

body.mobile .row button {
  width: 100%;
  max-width: 300px;
  padding: 12px;
  font-size: 16px;
}

/* 手機版按鈕優化 */
body.mobile button {
  min-height: 44px;
  font-size: 16px;
  padding: 12px 16px;
  border-radius: 8px;
  margin: 4px;
}

body.mobile input[type="text"],
body.mobile input[type="number"] {
  padding: 10px 12px;
  font-size: 16px;
}

body.mobile .control-panel {
  margin-top: 12px;
  padding: 10px;
}

body.mobile .control-group {
  margin-bottom: 10px;
}

body.mobile .control-group label {
  font-size: 13px;
  margin-bottom: 6px;
  color: var(--text-primary);
}

body.mobile .control-row {
  gap: 6px;
  margin-bottom: 6px;
}

body.mobile .control-row input[type="range"] {
  height: 8px;
}

/* 手機版隱藏X、Y軸的滑桿，只保留數字輸入框 */
body.mobile #fgX,
body.mobile #fgY,
body.mobile #textX,
body.mobile #textY {
  display: none;
}

/* 手機版調整X、Y軸控制列的樣式 */
body.mobile .control-row span:first-child {
  min-width: 25px;
  font-size: 12px;
  font-weight: bold;
}

body.mobile #fgXValue,
body.mobile #fgYValue,
body.mobile #textXValue,
body.mobile #textYValue {
  width: 80px;
  font-size: 14px;
  text-align: center;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid var(--border-color);
  background: var(--bg-primary);
  color: var(--text-primary);
}

body.mobile .control-row input[type="number"] {
  width: 70px;
  font-size: 14px;
}

body.mobile .control-row span {
  min-width: 30px;
  font-size: 11px;
}

body.mobile canvas {
  border-radius: 8px;
  /* 縮小預覽尺寸，但保持比例 */
  object-fit: contain;
  /* 縮小顯示尺寸，讓下載按鈕不用滾動就能看到 */
  width: calc(100% - 32px);
  max-width: calc(100vw - 48px);
  max-height: 50vh; /* 限制最大高度為視窗高度的50% */
  height: auto;
  display: block;
  margin: 0 auto;
  box-sizing: border-box;
}

body.mobile .drag-hint {
  font-size: 11px;
  margin-top: 6px;
}

/* 手機版位置控制提示 */
body.mobile .control-group:has(#fgX) .drag-hint::after,
body.mobile .control-group:has(#textX) .drag-hint::after {
  content: " 💡 手機版：直接輸入數值或拖拽圖片調整位置";
  display: block;
  margin-top: 4px;
  color: #888;
  font-size: 10px;
}

/* 手機版觸控優化 */
body.mobile button {
  min-height: 44px; /* 確保觸控目標足夠大 */
}

body.mobile input[type="range"] {
  min-height: 20px; /* 增加滑桿的觸控區域 */
}

/* 手機版橫向滾動防止 */
body.mobile {
  overflow-x: hidden;
  width: 100%;
  box-sizing: border-box;
}

/* 手機版狀態指示器 */
body.mobile .ok,
body.mobile .warn,
body.mobile .err {
  font-size: 13px;
  padding: 4px 8px;
  border-radius: 4px;
  display: inline-block;
}

/* 載入動畫 */
@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* 漂亮的Loading Spinner */
.loading-spinner {
  width: 60px;
  height: 60px;
  border: 4px solid rgba(99, 102, 241, 0.1);
  border-left: 4px solid var(--brand);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto 24px auto;
  position: relative;
  box-shadow: var(--shadow-md);
}

.loading-spinner::after {
  content: '';
  position: absolute;
  top: -2px;
  left: -2px;
  right: -2px;
  bottom: -2px;
  border: 2px solid transparent;
  border-top: 2px solid rgba(99, 102, 241, 0.3);
  border-radius: 50%;
  animation: spin 2s linear infinite reverse;
}

/* 載入畫面淡出動畫 */
@keyframes fadeOut {
  0% { opacity: 1; }
  100% { opacity: 0; visibility: hidden; }
}

.loading-screen-hidden {
  animation: fadeOut 0.5s ease-out forwards;
}

/* 進度條樣式 */
.progress-container {
  width: 200px;
  margin: 0 auto 15px auto;
  text-align: center;
}

.progress-bar {
  width: 100%;
  height: 8px;
  background: rgba(99, 102, 241, 0.1);
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 8px;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1);
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--brand), var(--brand-light));
  border-radius: 4px;
  width: 0%;
  transition: width 0.3s ease;
  position: relative;
}

.progress-fill::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  animation: shimmer 2s infinite;
}

.progress-text {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.8);
  font-weight: 500;
}

@keyframes shimmer {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

/* 額度提示框 */
.quota-indicator {
  background: rgba(139, 195, 74, 0.2);
  border: 1px solid rgba(139, 195, 74, 0.3);
  border-radius: 12px;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 20px auto;
  width: 280px;
  min-width: 280px;
  max-width: 280px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  box-sizing: border-box;
}

.quota-indicator .quota-icon {
  font-size: 18px;
  color: #ffc107;
  flex-shrink: 0;
}

.quota-indicator .quota-text {
  color: #ffffff;
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
  flex: 1;
  text-align: center;
}

/* 頁腳樣式 */
footer {
  background: rgba(20, 30, 45, 0.9);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding: 24px 20px;
  margin-top: 40px;
  text-align: center;
  position: relative;
  z-index: 10;
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.footer-links a {
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
  font-size: 14px;
  transition: color 0.3s ease;
}

.footer-links a:hover {
  color: #ffffff;
  text-decoration: underline;
}

.footer-copyright {
  color: rgba(255, 255, 255, 0.6);
  font-size: 12px;
  margin-top: 8px;
}

.footer-version {
  position: fixed;
  bottom: 10px;
  right: 10px;
  color: rgba(255, 255, 255, 0.4);
  font-size: 11px;
  z-index: 100;
  pointer-events: none;
  display: flex;
  align-items: baseline;
  gap: 0;
}

.footer-version .version-number {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.4);
}

/* 麥力品牌連結樣式 */
a.maili-link {
  color: rgba(255, 255, 255, 0.9);
  text-decoration: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.3);
  transition: all 0.3s ease;
}

a.maili-link:hover {
  color: #ffffff;
  border-bottom-color: rgba(255, 255, 255, 0.6);
}

/* 版權中的連結樣式 */
.footer-copyright a.maili-link {
  color: rgba(255, 255, 255, 0.6);
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.footer-copyright a.maili-link:hover {
  color: rgba(255, 255, 255, 0.8);
  border-bottom-color: rgba(255, 255, 255, 0.4);
}

/* 手機版版號調整 */
@media (max-width: 768px) {
  .footer-version {
    bottom: 5px;
    right: 5px;
    font-size: 10px;
  }
}

/* 主標題樣式 */
.main-title {
  font-size: 32px;
  font-weight: 700;
  color: #ffffff;
  text-align: center;
  margin: 40px 0 20px 0;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.main-description {
  color: rgba(255, 255, 255, 0.9);
  font-size: 16px;
  text-align: center;
  margin: 0 auto 30px auto;
  max-width: 500px;
  line-height: 1.6;
}

/* 按鈕容器 */
.action-buttons-container {
  display: flex;
  gap: 16px;
  max-width: 600px;
  margin: 30px auto;
  padding: 0 20px;
}

@media (max-width: 768px) {
  .action-buttons-container {
    flex-direction: column;
    gap: 12px;
  }
  
  .main-action-btn {
    width: 100%;
  }
}

/* 跑馬燈輪播樣式 */
.showcase-carousel {
  width: 100%;
  max-width: 400px;
  margin: 0 auto 30px auto;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.3);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.carousel-container {
  position: relative;
  width: 100%;
  padding-top: 75%; /* 4:3 比例 */
  overflow: hidden;
}

.carousel-slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 0.6s ease-in-out;
  z-index: 1;
}

.carousel-slide.active {
  opacity: 1;
  z-index: 2;
}

.carousel-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* 手機版跑馬燈樣式 */
@media (max-width: 768px) {
  .showcase-carousel {
    max-width: 100%;
    margin-bottom: 20px;
    border-radius: 12px;
  }
  
  .carousel-container {
    padding-top: 75%; /* 保持 4:3 比例 */
  }
  
  /* 手機版額度指示器 */
  .quota-indicator {
    width: calc(100% - 32px) !important;
    min-width: auto !important;
    max-width: calc(100% - 32px) !important;
    margin: 20px 16px !important;
    padding: 10px 12px !important;
  }
  
  .quota-indicator .quota-text {
    font-size: 13px !important;
  }
}
