/* ==========================================
   今日智者 | Today's Sage v1.0.0 - 樣式表
   ========================================== */

:root {
  --bg-gradient-start: #1A1D2E;
  --bg-gradient-end: #232841;
  --primary-color: #F2FF49;
  --text-white: #FFFFFF;
  --text-subdued: #8E97B0;
  --line-subdued: rgba(142, 151, 176, 0.25);
  --scratch-coating: #C8CCD4;
  --font-family: 'Noto Sans TC', sans-serif;
}

/* 基礎重置 */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  user-select: none;
  -webkit-user-select: none;
}

body {
  font-family: var(--font-family);
  background-color: #0E101A;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 20px 0;
  color: var(--text-white);
  overflow-x: hidden;
}

/* 9:16 卡片主容器 */
.card-container {
  width: 88vw;
  max-width: 420px;
  aspect-ratio: 9 / 16;
  background: linear-gradient(180deg, var(--bg-gradient-start) 0%, var(--bg-gradient-end) 100%);
  border-radius: 16px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4), 0 0 1px rgba(242, 255, 73, 0.2);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  padding: 32px 28px;
  position: relative;
  overflow: hidden;
}

/* 頂部圖示 */
.card-top-icon {
  color: var(--primary-color);
  font-size: 18px;
  letter-spacing: 2px;
}

/* 智者名字區域 */
.sage-area {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  position: relative;
}

.sage-label {
  font-size: 12px;
  color: var(--primary-color);
  letter-spacing: 6px;
  margin-bottom: 8px;
  opacity: 0.9;
}

.sage-name-wrapper {
  position: relative;
  display: inline-block;
  padding: 8px 16px;
  min-width: 140px;
  min-height: 48px;
  text-align: center;
}

.sage-name {
  font-size: 26px;
  font-weight: 700;
  color: var(--primary-color);
  letter-spacing: 10px;
  text-align: center;
}

/* 分隔線 */
.divider-primary {
  width: 40px;
  height: 2px;
  background-color: var(--primary-color);
  border-radius: 1px;
  margin: 12px 0;
}

.divider-subdued {
  width: 100%;
  height: 1px;
  background-color: var(--line-subdued);
  margin: 16px 0;
}

/* 語錄與原典內容區塊 */
.content-area {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  width: 100%;
  padding: 10px 0;
}

.main-quote {
  font-size: 20px;
  font-weight: 700;
  line-height: 1.5;
  color: var(--text-white);
  margin-bottom: 16px;
  opacity: 0;
  transition: opacity 0.6s ease;
}

.source-quote {
  font-size: 12px;
  color: var(--text-subdued);
  line-height: 1.6;
  letter-spacing: 0.5px;
  opacity: 0;
  transition: opacity 0.6s ease;
}

/* 底部資訊列 */
.card-footer {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 8px;
}

.footer-tip {
  font-size: 11px;
  color: var(--text-subdued);
  letter-spacing: 1px;
}

.qr-placeholder {
  width: 48px;
  height: 48px;
  background-color: var(--text-white);
  border-radius: 4px;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 8px;
  font-weight: bold;
  color: #000;
}

/* 按鈕區塊 */
.actions-container {
  width: 88vw;
  max-width: 420px;
  margin-top: 24px;
  display: flex;
  gap: 12px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.6s ease;
}

.btn {
  flex: 1;
  padding: 14px 0;
  border-radius: 28px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  border: none;
  outline: none;
  text-align: center;
  transition: all 0.2s ease;
}

.btn-secondary {
  background: transparent;
  color: var(--text-white);
  border: 1px solid rgba(255, 255, 255, 0.4);
}

.btn-secondary:active {
  background: rgba(255, 255, 255, 0.1);
}

.btn-primary {
  background-color: var(--primary-color);
  color: #1A1D2E;
}

.btn-primary:active {
  transform: scale(0.98);
  opacity: 0.9;
}

/* 通用淡入顯示類別 */
.is-visible {
  opacity: 1 !important;
  pointer-events: auto !important;
}