/* 主樣式 */
body, html {
  height: 100%;
  margin: 0;
  padding: 0;
  font-family: 'Noto Sans TC', 'Microsoft JhengHei', Arial, sans-serif;
}

/* 首頁背景 */
.main-bg {
  min-height: 100vh;
  width: 100vw;
  background: linear-gradient(135deg, #2b3a67 0%, #3e5a99 100%);
  display: flex;
  align-items: center;
  justify-content: center;
}

.main-container {
  width: 100vw;
  max-width: 480px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
}

.main-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.2rem 1.2rem 0.5rem 1.2rem;
}

.main-title {
  color: #fff;
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: 1px;
}

.header-icons {
  display: flex;
  gap: 0.5rem;
}
.icon-btn {
  background: rgba(255,255,255,0.18);
  border: none;
  border-radius: 50%;
  width: 2.3rem;
  height: 2.3rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  cursor: pointer;
  transition: background 0.18s;
}
.icon-btn:hover {
  background: rgba(255,255,255,0.35);
}

.main-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 0.5rem 0 0.5rem 0;
}

.feature-cards {
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
  width: 90vw;
  max-width: 340px;
  margin: 0 auto;
}

.feature-card.glass {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.3rem;
  padding: 1.2rem 0;
  border-radius: 1.2rem;
  background: rgba(255,255,255,0.18);
  box-shadow: 0 4px 18px 0 rgba(31,38,135,0.18);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1.2px solid rgba(255,255,255,0.22);
  color: #fff;
  font-size: 1.15rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.18s, transform 0.12s;
  outline: none;
  user-select: none;
}
.feature-card.glass:active {
  background: rgba(255,255,255,0.32);
  transform: scale(0.97);
}
.feature-icon {
  font-size: 2.1rem;
  margin-bottom: 0.2rem;
}
.feature-label {
  font-size: 1.13rem;
  letter-spacing: 1px;
}

.main-nav {
  width: 100vw;
  max-width: 480px;
  background: rgba(255,255,255,0.13);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-top: 1.2px solid rgba(255,255,255,0.18);
  display: flex;
  justify-content: space-around;
  align-items: center;
  padding: 0.2rem 0 0.1rem 0;
  position: fixed;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  z-index: 10;
}
.nav-btn {
  background: none;
  border: none;
  color: #fff;
  font-size: 1.1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0.3rem 0.5rem 0.1rem 0.5rem;
  border-radius: 0.7rem;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.nav-btn.active, .nav-btn:active {
  background: rgba(62,219,122,0.18);
  color: #3edb7a;
}
.nav-icon {
  font-size: 1.3rem;
}
.nav-label {
  font-size: 0.85rem;
  margin-top: 0.1rem;
}

/* 全白簡約主頁面樣式 */
.main-white-bg {
  min-height: 100vh;
  width: 100vw;
  background: var(--primary-bg);
  display: flex;
  align-items: center;
  justify-content: center;
}
.main-white-container {
  width: 100vw;
  max-width: 480px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  background: var(--primary-bg);
}
.main-white-header {
  padding: 2.2rem 1.2rem 0.5rem 1.2rem;
  text-align: center;
  position: relative;
  color: var(--primary-text);
}
.main-white-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary-text);
  letter-spacing: 1px;
  margin-bottom: 0.3rem;
}
.main-white-subtitle {
  font-size: 1.05rem;
  color: var(--primary-text);
  margin-bottom: 1.2rem;
}
.main-white-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding: 0 1.2rem 1.2rem 1.2rem;
  color: var(--primary-text);
}
.input-tabs {
  display: flex;
  width: 100%;
  max-width: 400px;
  background: #f3f4f6;
  border-radius: 1.2rem;
  margin-bottom: 2rem;
  box-shadow: 0 1px 4px #0001;
}
.input-tab {
  flex: 1;
  padding: 0.7rem 0;
  background: none;
  border: none;
  border-radius: 1.2rem;
  font-size: 1.08rem;
  font-weight: 500;
  color: #666;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, box-shadow 0.15s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
}
.input-tab.active {
  background: #fff;
  color: #2563eb;
  box-shadow: 0 0 0 2px #2563eb33;
  font-weight: 700;
}
.tab-icon {
  font-size: 1.2em;
}
.input-panel {
  width: 100%;
  max-width: 400px;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.voice-mic-btn {
  width: 80px;
  height: 80px;
  background: #2563eb;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.5rem auto;
  box-shadow: 0 4px 16px #2563eb22;
  cursor: pointer;
  transition: background 0.18s, box-shadow 0.18s, transform 0.12s;
}
.voice-mic-btn:active {
  background: #1742a0;
  box-shadow: 0 2px 8px #2563eb33;
  transform: scale(0.96);
}
.voice-mic-btn.listening {
  background: #22c55e;
  box-shadow: 0 0 0 6px #22c55e33;
  animation: pulse 1s infinite;
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 6px #22c55e33; }
  50% { box-shadow: 0 0 0 16px #22c55e11; }
  100% { box-shadow: 0 0 0 6px #22c55e33; }
}
.mic-icon {
  color: #fff;
  font-size: 2.3rem;
}
.voice-result-box {
  width: 100%;
  min-height: 70px;
  background: #f8fafc;
  border: 2px dashed #d1d5db;
  border-radius: 0.8rem;
  padding: 1rem 1.2rem;
  margin-bottom: 0.5rem;
  box-sizing: border-box;
}
.voice-result-label {
  color: #666;
  font-size: 1rem;
  margin-bottom: 0.3rem;
}
.voice-result-text {
  color: #222;
  font-size: 1.13rem;
  word-break: break-all;
}
.manual-label {
  color: #222;
  font-size: 1.08rem;
  font-weight: 500;
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.3rem;
}
.manual-row {
  display: flex;
  gap: 0.7rem;
  width: 100%;
  margin-bottom: 0.5rem;
}
.manual-input {
  flex: 1;
  padding: 0.7rem 1rem;
  border-radius: 0.7rem;
  border: 1.5px solid #d1d5db;
  background: #f8fafc;
  font-size: 1.1rem;
  outline: none;
  transition: border 0.15s, background 0.15s;
}
.manual-input:focus {
  border: 1.5px solid #2563eb;
  background: #fff;
}
.manual-confirm-btn {
  padding: 0.7rem 1.2rem;
  border-radius: 0.7rem;
  border: none;
  background: #2563eb;
  color: #fff;
  font-size: 1.08rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s;
}
.manual-confirm-btn:active {
  background: #1742a0;
}
.manual-format {
  color: #888;
  font-size: 0.98rem;
  margin-bottom: 0.5rem;
}
.main-white-nav {
  width: 100vw;
  max-width: 480px;
  background: #fff;
  border-top: 1.5px solid #e5e7eb;
  display: flex;
  justify-content: space-around;
  align-items: center;
  padding: 0.2rem 0 0.1rem 0;
  position: fixed;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  z-index: 10;
}
.main-white-nav .nav-btn {
  background: none;
  border: none;
  color: #888;
  font-size: 1.1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0.3rem 0.5rem 0.1rem 0.5rem;
  border-radius: 0.7rem;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.main-white-nav .nav-btn.active, .main-white-nav .nav-btn:active {
  background: #e0e7ff;
  color: #2563eb;
}
.nav-icon {
  font-size: 1.3rem;
}
.nav-label {
  font-size: 0.85rem;
  margin-top: 0.1rem;
}
@media (max-width: 480px) {
  .main-white-container {
    max-width: 100vw;
  }
  .main-white-header {
    padding: 1.2rem 0.5rem 0.3rem 0.5rem;
  }
  .main-white-title {
    font-size: 1.15rem;
  }
  .main-white-content {
    padding: 0 0.3rem 1.2rem 0.3rem;
  }
  .input-tabs, .input-panel {
    max-width: 99vw;
  }
}

/* 登入頁樣式保留 */
.login-bg {
  min-height: 100vh;
  width: 100vw;
  background: linear-gradient(135deg, #2b3a67 0%, #3e5a99 100%);
  display: flex;
  align-items: center;
  justify-content: center;
}

.login-card.glass {
  width: 90vw;
  max-width: 370px;
  padding: 2.2rem 1.5rem 2rem 1.5rem;
  border-radius: 1.5rem;
  background: rgba(255, 255, 255, 0.18);
  box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.25);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1.5px solid rgba(255,255,255,0.25);
  display: flex;
  flex-direction: column;
  align-items: stretch;
}

.login-title {
  display: flex;
  align-items: center;
  font-size: 1.5rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 1.5rem;
  justify-content: center;
  letter-spacing: 1px;
}

.lock-icon {
  font-size: 1.6rem;
  margin-right: 0.5rem;
}

form {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

label {
  color: #f0f0f0;
  font-size: 1.08rem;
  margin-bottom: 0.2rem;
  font-weight: 500;
}

input[type="text"], input[type="password"] {
  width: 100%;
  padding: 0.7rem 1rem;
  border-radius: 0.7rem;
  border: none;
  background: rgba(255,255,255,0.85);
  font-size: 1.1rem;
  margin-bottom: 0.2rem;
  outline: none;
  box-sizing: border-box;
}

input[type="text"]:focus, input[type="password"]:focus {
  background: #fff;
  box-shadow: 0 0 0 2px #3e5a99;
}

.remember-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.remember-row label {
  color: #e0e0e0;
  font-size: 1rem;
  margin: 0;
  font-weight: 400;
}

.btn-row {
  display: flex;
  gap: 1rem;
  margin-top: 0.7rem;
}

.btn-primary, .btn-secondary {
  flex: 1;
  padding: 0.8rem 0;
  font-size: 1.15rem;
  border-radius: 0.7rem;
  border: none;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}

.btn-primary {
  background: linear-gradient(90deg, #3edb7a 0%, #1fa463 100%);
  color: #fff;
  box-shadow: 0 2px 8px 0 rgba(62,219,122,0.12);
}

.btn-primary:hover {
  background: linear-gradient(90deg, #1fa463 0%, #3edb7a 100%);
}

.btn-secondary {
  background: rgba(255,255,255,0.35);
  color: #2b3a67;
  border: 1.5px solid #fff;
}

.btn-secondary:hover {
  background: rgba(255,255,255,0.55);
}

@media (max-width: 480px) {
  .main-container {
    max-width: 100vw;
  }
  .feature-cards {
    max-width: 98vw;
    gap: 0.8rem;
  }
  .feature-card.glass {
    padding: 0.9rem 0;
    font-size: 1rem;
  }
  .main-header {
    padding: 1rem 0.5rem 0.3rem 0.5rem;
  }
  .main-title {
    font-size: 1.05rem;
  }
  .main-nav {
    max-width: 100vw;
    font-size: 0.95rem;
  }
  .login-card.glass {
    padding: 1.2rem 0.5rem 1.2rem 0.5rem;
    max-width: 98vw;
  }
  .login-title {
    font-size: 1.2rem;
  }
  .btn-primary, .btn-secondary {
    font-size: 1rem;
    padding: 0.7rem 0;
  }
}

.hidden { display: none !important; }

:root {
  --primary-bg: #fff;
  --primary-text: #222;
  --accent: #1976d2;
  --transition: background 0.3s, color 0.3s;
}
body {
  background: var(--primary-bg);
  color: var(--primary-text);
  transition: var(--transition);
}
.theme-section {
  margin: 1.5rem 0 0.5rem 0;
  padding: 1.2rem 1rem;
  background: rgba(255,255,255,0.18);
  border-radius: 1.2rem;
  box-shadow: 0 2px 10px 0 rgba(31,38,135,0.10);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.theme-section h3 {
  font-size: 1.13rem;
  font-weight: 700;
  margin-bottom: 0.7rem;
  color: var(--primary-text);
}
.theme-list {
  display: flex;
  gap: 12px;
  margin: 12px 0;
}
.theme-btn {
  width: 36px; height: 36px;
  border: 2px solid #ccc;
  border-radius: 50%;
  cursor: pointer;
  outline: none;
  transition: border 0.2s, box-shadow 0.2s;
  box-shadow: 0 1px 4px 0 rgba(0,0,0,0.08);
}
.theme-btn[data-theme="white"]  { background: #fff; }
.theme-btn[data-theme="blue"]   { background: #1976d2; }
.theme-btn[data-theme="green"]  { background: #43a047; }
.theme-btn[data-theme="orange"] { background: #ff9800; }
.theme-btn[data-theme="violet"] { background: #8e24aa; }
.theme-btn.selected { border: 3px solid var(--accent); box-shadow: 0 0 0 3px #1976d233; }
.theme-mode { margin-top: 8px; color: var(--primary-text); font-size: 1.05rem; }

.user-card {
  margin: 2.2rem auto 0 auto;
  padding: 1.2rem 1rem 1.2rem 1rem;
  max-width: 340px;
  background: rgba(255,255,255,0.22);
  border-radius: 1.2rem;
  box-shadow: 0 2px 10px 0 rgba(31,38,135,0.10);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.7rem;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.user-avatar {
  font-size: 2.3rem;
  background: var(--accent);
  color: #fff;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.3rem;
  box-shadow: 0 2px 8px #1976d233;
}
.user-info {
  text-align: center;
  margin-bottom: 0.2rem;
}
.user-name {
  font-size: 1.13rem;
  font-weight: 700;
  color: var(--primary-text);
}
.user-id {
  font-size: 0.98rem;
  color: #666;
}
.logout-btn {
  margin-top: 0.7rem;
  padding: 0.6rem 1.5rem;
  border-radius: 0.7rem;
  border: none;
  background: #e65100;
  color: #fff;
  font-size: 1.08rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s;
  box-shadow: 0 1px 4px #e6510033;
}
.logout-btn:active {
  background: #b84300;
}
@media (max-width: 480px) {
  .user-card { max-width: 98vw; padding: 1.1rem 0.3rem; }
  .user-avatar { font-size: 2rem; width: 44px; height: 44px; }
  .user-name { font-size: 1rem; }
  .logout-btn { font-size: 1rem; padding: 0.5rem 1.1rem; }
}

.back-btn {
  position: absolute;
  left: 1.2rem;
  top: 1.2rem;
  background: rgba(255,255,255,0.7);
  color: #2563eb;
  border: none;
  border-radius: 0.7rem;
  font-size: 1.08rem;
  font-weight: 600;
  padding: 0.4rem 1.1rem 0.4rem 0.8rem;
  cursor: pointer;
  box-shadow: 0 1px 4px #2563eb22;
  transition: background 0.15s, color 0.15s;
  z-index: 2;
}
.back-btn:active {
  background: #e0e7ff;
  color: #1742a0;
}
@media (max-width: 480px) {
  .back-btn { left: 0.5rem; top: 0.7rem; font-size: 0.98rem; padding: 0.35rem 0.7rem 0.35rem 0.6rem; }
}

/* 查詢結果美化 */
.container-result {
  margin-top: 24px;
  margin-bottom: 12px;
}
.result-card {
  background: rgba(255,255,255,0.75);
  border-radius: 16px;
  box-shadow: 0 4px 18px 0 rgba(30,60,120,0.10);
  padding: 20px 22px 16px 22px;
  margin-bottom: 18px;
  backdrop-filter: blur(10px);
  border: 1.5px solid #e3eafc;
  transition: box-shadow 0.2s;
}
.result-card:hover {
  box-shadow: 0 8px 28px 0 rgba(30,60,120,0.18);
}
.result-row {
  display: flex;
  align-items: center;
  margin-bottom: 10px;
  font-size: 1.08rem;
}
.result-label {
  color: #3576f5;
  font-weight: 700;
  margin-right: 10px;
  min-width: 56px;
  letter-spacing: 1px;
}
.result-value {
  color: #223366;
  font-weight: 500;
}
.result-value.highlight {
  color: #e65100;
  font-size: 1.18rem;
  font-weight: bold;
  letter-spacing: 1px;
}
.result-msg {
  background: rgba(255,255,255,0.85);
  border-radius: 12px;
  color: #3576f5;
  font-size: 1.08rem;
  text-align: center;
  padding: 16px 0 14px 0;
  margin-bottom: 12px;
  box-shadow: 0 2px 8px 0 rgba(30,60,120,0.06);
}
@media (max-width: 600px) {
  .result-card {
    padding: 14px 8px 10px 8px;
  }
  .result-label {
    min-width: 44px;
    font-size: 0.98rem;
  }
  .result-row {
    font-size: 0.98rem;
  }
  .result-value.highlight {
    font-size: 1.05rem;
  }
}

.operation-section {
  margin: 24px auto 0 auto;
  max-width: 340px;
  padding: 18px 0 0 0;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.operation-type-group {
  display: flex;
  gap: 16px;
  margin-bottom: 18px;
}
.op-type-btn {
  font-size: 1.15rem;
  font-weight: 600;
  padding: 10px 28px;
  border-radius: 8px;
  border: none;
  background: #e3eafc;
  color: #223366;
  cursor: pointer;
  transition: background 0.18s, color 0.18s;
}
.op-type-btn.active {
  background: #3576f5;
  color: #fff;
}
.operation-status-group {
  display: flex;
  gap: 14px;
  margin-bottom: 10px;
  justify-content: center;
}
.status-btn {
  font-size: 1.13rem;
  font-weight: 700;
  padding: 12px 26px;
  border-radius: 8px;
  border: none;
  color: #fff;
  cursor: pointer;
  transition: box-shadow 0.15s, border 0.15s;
  outline: none;
  box-shadow: 0 2px 8px 0 rgba(30,60,120,0.08);
}
.status-btn.active {
  border: 2.5px solid #222;
  box-shadow: 0 4px 16px 0 rgba(30,60,120,0.13);
}
.status-red {
  background: #e53935;
}
.status-orange {
  background: #ff9800;
}
.status-blue {
  background: #1976d2;
}
@media (max-width: 600px) {
  .operation-section {
    max-width: 98vw;
    padding: 10px 0 0 0;
  }
  .op-type-btn, .status-btn {
    font-size: 1rem;
    padding: 10px 10vw;
  }
  .operation-type-group, .operation-status-group {
    gap: 8px;
  }
}

.voice-select-section {
  margin: 18px auto 0 auto;
  max-width: 340px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}
.voice-select-label {
  font-size: 1.08rem;
  color: #3576f5;
  margin-bottom: 6px;
  font-weight: 600;
}
.voice-select {
  width: 100%;
  font-size: 1.08rem;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1.5px solid #dbeafe;
  background: #f7fafd;
  color: #223366;
  outline: none;
  transition: border 0.2s;
}
.voice-select:focus {
  border-color: #3576f5;
  background: #fff;
}
@media (max-width: 600px) {
  .voice-select-section {
    max-width: 98vw;
  }
  .voice-select {
    font-size: 1rem;
    padding: 10px 4vw;
  }
} 