/* ==========================================================================
   國中英語單字全集與學習系統 - 自訂樣式表
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=Noto+Sans+TC:wght@300;400;500;700;900&family=JetBrains+Mono:wght@400;600&display=swap');

:root {
  --font-sans: 'Inter', 'Noto Sans TC', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
}

body {
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* 3D 單字卡翻轉效果 */
.perspective-1000 {
  perspective: 1200px;
}

.flashcard-inner {
  position: relative;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  transition: transform 0.55s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.flashcard-inner.is-flipped {
  transform: rotateY(180deg);
}

.flashcard-front,
.flashcard-back {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  display: flex;
  flex-direction: column;
}

.flashcard-back {
  transform: rotateY(180deg);
}

/* 自訂捲軸樣式 */
::-webkit-scrollbar {
  width: 7px;
  height: 7px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: rgba(156, 163, 175, 0.4);
  border-radius: 9999px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(107, 114, 128, 0.7);
}

/* 閱讀測驗單字點擊高亮樣式 */
.reading-word {
  display: inline-block;
  padding: 0 2px;
  border-bottom: 2px dashed #6366f1;
  color: #4338ca;
  font-weight: 600;
  cursor: pointer;
  border-radius: 3px;
  transition: all 0.15s ease;
}

.dark .reading-word {
  border-bottom-color: #818cf8;
  color: #a5b4fc;
}

.reading-word:hover {
  background-color: rgba(99, 102, 241, 0.15);
  transform: translateY(-1px);
}

/* 玻璃擬態與陰影 */
.glass-panel {
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.dark .glass-panel {
  background: rgba(30, 41, 59, 0.85);
}

/* 平滑轉場 */
.tab-transition-enter-active,
.tab-transition-leave-active {
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.tab-transition-enter-from {
  opacity: 0;
  transform: translateY(8px);
}

.tab-transition-leave-to {
  opacity: 0;
  transform: translateY(-8px);
}
