/* 全局基礎設定 */
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  margin: 0;
  padding: 0;
  background-color: #f3f4f6;
  color: #1f2937;
  height: 100vh;
}

/* 登入介面樣式 */
.auth-container {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100vh;
  background: linear-gradient(135deg, #1e3a8a, #3b82f6);
}
.auth-card {
  background: white;
  padding: 30px;
  border-radius: 12px;
  width: 100%;
  max-width: 400px;
  box-shadow: 0 10px 25px rgba(0,0,0,0.2);
}
.form-group { margin-bottom: 20px; }
.form-group label { display: block; margin-bottom: 8px; font-weight: bold; }
.form-group input { width: 100%; padding: 10px; border: 1px solid #d1d5db; border-radius: 6px; box-sizing: border-box; }
.primary-btn { width: 100%; background: #2563eb; color: white; border: none; padding: 12px; border-radius: 6px; font-size: 16px; cursor: pointer; font-weight: bold; }
.primary-btn:hover { background: #1d4ed8; }
.auth-footer { text-align: center; margin-top: 15px; }
.auth-footer a { color: #2563eb; text-decoration: none; }

/* 聊天室主介面樣式 */
.chat-container { display: flex; height: 100vh; }
.sidebar { width: 260px; background: #1f2937; color: white; padding: 20px; display: flex; flex-direction: column; justify-content: space-between; }
.user-profile { font-size: 18px; font-weight: bold; border-bottom: 1px solid #374151; padding-bottom: 15px; }
.logout-btn { background: #374151; color: white; border: none; padding: 10px; border-radius: 6px; cursor: pointer; }
.logout-btn:hover { background: #4b5563; }

.chat-main { flex: 1; display: flex; flex-direction: column; background: #f9fafb; }
.chat-messages { flex: 1; padding: 20px; overflow-y: auto; display: flex; flex-direction: column; gap: 10px; }
.message { padding: 10px 14px; border-radius: 8px; max-width: 70%; background: white; box-shadow: 0 1px 2px rgba(0,0,0,0.05); }
.message.system { align-self: center; background: #e5e7eb; color: #4b5563; font-size: 13px; }

/* 語音與輸入區 */
.input-area { padding: 20px; background: white; border-top: 1px solid #e5e7eb; }
.input-area textarea { width: 100%; height: 80px; padding: 10px; border: 1px solid #e5e7eb; border-radius: 8px; resize: none; box-sizing: border-box; font-size: 15px; }
.input-controls { display: flex; justify-content: flex-end; gap: 10px; margin-top: 10px; }
.voice-btn { background: #10b981; color: white; border: none; padding: 8px 16px; border-radius: 6px; cursor: pointer; }
.clear-btn { background: #9ca3af; color: white; border: none; padding: 8px 16px; border-radius: 6px; cursor: pointer; }
.send-btn { background: #2563eb; color: white; border: none; padding: 8px 24px; border-radius: 6px; cursor: pointer; font-weight: bold; }

/* 管理員介面與表格樣式 */
.app-header { display: flex; justify-content: space-between; align-items: center; padding: 15px 30px; background: white; box-shadow: 0 1px 3px rgba(0,0,0,0.1); }
.admin-trigger-btn { background: #2563eb; color: white; border: none; padding: 10px 20px; border-radius: 6px; cursor: pointer; font-weight: bold; margin-right: 10px; }
.back-btn { background: #4b5563; color: white; border: none; padding: 10px 15px; border-radius: 6px; cursor: pointer; }
.app-main { padding: 30px; }
.welcome-box { background: white; padding: 24px; border-radius: 8px; box-shadow: 0 2px 4px rgba(0,0,0,0.05); }

/* 彈出視窗 (Modal) */
.modal { position: fixed; z-index: 9999; left: 0; top: 0; width: 100%; height: 100%; background-color: rgba(0, 0, 0, 0.5); display: flex; justify-content: center; align-items: center; }
.modal-content { background: white; padding: 24px; border-radius: 12px; width: 90%; max-width: 950px; max-height: 85vh; overflow-y: auto; }
.modal-header { display: flex; justify-content: space-between; align-items: center; border-bottom: 2px solid #f3f4f6; padding-bottom: 12px; margin-bottom: 16px; }
.close-btn { font-size: 28px; font-weight: bold; cursor: pointer; color: #9ca3af; }
.close-btn:hover { color: #1f2937; }

.admin-table { width: 100%; border-collapse: collapse; text-align: left; }
.admin-table th, .admin-table td { padding: 14px 16px; border-bottom: 1px solid #e5e7eb; }
.admin-table th { background-color: #f9fafb; color: #4b5563; }
.gender-icon-container { display: inline-flex; align-items: center; gap: 8px; }
.delete-btn { background-color: #ef4444; color: white; border: none; padding: 6px 14px; border-radius: 6px; cursor: pointer; }
.delete-btn:hover { background-color: #dc2626; }
